Title: [202472] trunk/Source/WebCore
Revision
202472
Author
[email protected]
Date
2016-06-26 09:25:49 -0700 (Sun, 26 Jun 2016)

Log Message

Regression(r202262): Infinite loop under searchForLinkRemovingExistingDDLinks()
https://bugs.webkit.org/show_bug.cgi?id=159122
<rdar://problem/27014649>

Reviewed by Ryosuke Niwa.

Infinite loop under searchForLinkRemovingExistingDDLinks() because the
value returned by NodeTraversal::next() was ignored and the node iterator
was never updated.

* editing/cocoa/DataDetection.mm:
(WebCore::searchForLinkRemovingExistingDDLinks):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (202471 => 202472)


--- trunk/Source/WebCore/ChangeLog	2016-06-26 10:04:30 UTC (rev 202471)
+++ trunk/Source/WebCore/ChangeLog	2016-06-26 16:25:49 UTC (rev 202472)
@@ -1,3 +1,18 @@
+2016-06-26  Chris Dumez  <[email protected]>
+
+        Regression(r202262): Infinite loop under searchForLinkRemovingExistingDDLinks()
+        https://bugs.webkit.org/show_bug.cgi?id=159122
+        <rdar://problem/27014649>
+
+        Reviewed by Ryosuke Niwa.
+
+        Infinite loop under searchForLinkRemovingExistingDDLinks() because the
+        value returned by NodeTraversal::next() was ignored and the node iterator
+        was never updated.
+
+        * editing/cocoa/DataDetection.mm:
+        (WebCore::searchForLinkRemovingExistingDDLinks):
+
 2016-06-25  Benjamin Poulain  <[email protected]>
 
         The active state of elements can break when focus changes

Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (202471 => 202472)


--- trunk/Source/WebCore/editing/cocoa/DataDetection.mm	2016-06-26 10:04:30 UTC (rev 202471)
+++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm	2016-06-26 16:25:49 UTC (rev 202472)
@@ -273,7 +273,7 @@
 static bool searchForLinkRemovingExistingDDLinks(Node& startNode, Node& endNode, bool& didModifyDOM)
 {
     didModifyDOM = false;
-    for (Node* node = &startNode; node; NodeTraversal::next(*node)) {
+    for (Node* node = &startNode; node; node = NodeTraversal::next(*node, &startNode)) {
         if (is<HTMLAnchorElement>(*node)) {
             auto& anchor = downcast<HTMLAnchorElement>(*node);
             if (!equalIgnoringASCIICase(anchor.fastGetAttribute(x_apple_data_detectorsAttr), "true"))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to