Title: [294003] trunk/Source/WebCore
Revision
294003
Author
[email protected]
Date
2022-05-09 23:53:52 -0700 (Mon, 09 May 2022)

Log Message

Check if node is connected after calling mergeWithNeighboringLists
https://bugs.webkit.org/show_bug.cgi?id=240234

Patch by Rob Buis <[email protected]> on 2022-05-09
Reviewed by Wenson Hsieh.

Check if node is connected after calling mergeWithNeighboringLists since
DOM mutations can change the DOM tree.

* editing/InsertListCommand.cpp:
(WebCore::InsertListCommand::doApplyForSingleParagraph):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (294002 => 294003)


--- trunk/Source/WebCore/ChangeLog	2022-05-10 06:52:20 UTC (rev 294002)
+++ trunk/Source/WebCore/ChangeLog	2022-05-10 06:53:52 UTC (rev 294003)
@@ -1,3 +1,16 @@
+2022-05-09  Rob Buis  <[email protected]>
+
+        Check if node is connected after calling mergeWithNeighboringLists
+        https://bugs.webkit.org/show_bug.cgi?id=240234
+
+        Reviewed by Wenson Hsieh.
+
+        Check if node is connected after calling mergeWithNeighboringLists since
+        DOM mutations can change the DOM tree.
+
+        * editing/InsertListCommand.cpp:
+        (WebCore::InsertListCommand::doApplyForSingleParagraph):
+
 2022-05-09  Oriol Brufau  <[email protected]>
 
         [cssom] Don't index perspective/transform-origin-* in computed styles

Modified: trunk/Source/WebCore/editing/InsertListCommand.cpp (294002 => 294003)


--- trunk/Source/WebCore/editing/InsertListCommand.cpp	2022-05-10 06:52:20 UTC (rev 294002)
+++ trunk/Source/WebCore/editing/InsertListCommand.cpp	2022-05-10 06:53:52 UTC (rev 294003)
@@ -225,6 +225,8 @@
                 return;
 
             listNode = mergeWithNeighboringLists(*listElement);
+            if (!listNode || !listNode->isConnected())
+                return;
         }
         
         if (!listNode->hasTagName(listTag)) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to