Title: [141225] trunk/Source/WebCore
Revision
141225
Author
[email protected]
Date
2013-01-29 22:14:58 -0800 (Tue, 29 Jan 2013)

Log Message

Convert deprecatedShadowAncestorNode() to shadowHost() in Editor.cpp
https://bugs.webkit.org/show_bug.cgi?id=108287

Reviewed by Hajime Morita.

This is the effort to convert deprecatedShadowAncestorNode() to shadowHost().

Since all the caller object of deprecatedShadowAncestorNode() is in a shadow tree, calling deprecatedShadowAncestorNode()
is equiavalent to calling shadowHost(). Also, for all the occurence of deprecatedShadowAncestorNode(), we don't need to
worry about nested ShadowDOM issues. So directly converting deprecatedShadowAncestorNode() to shadowHost() should be safe.

No new tests, simple refactoring.

* editing/Editor.cpp:
(WebCore::Editor::rangeOfString):
(WebCore::Editor::countMatchesForText):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (141224 => 141225)


--- trunk/Source/WebCore/ChangeLog	2013-01-30 06:07:21 UTC (rev 141224)
+++ trunk/Source/WebCore/ChangeLog	2013-01-30 06:14:58 UTC (rev 141225)
@@ -1,3 +1,22 @@
+2013-01-29  Shinya Kawanaka  <[email protected]>
+
+        Convert deprecatedShadowAncestorNode() to shadowHost() in Editor.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=108287
+
+        Reviewed by Hajime Morita.
+
+        This is the effort to convert deprecatedShadowAncestorNode() to shadowHost().
+
+        Since all the caller object of deprecatedShadowAncestorNode() is in a shadow tree, calling deprecatedShadowAncestorNode()
+        is equiavalent to calling shadowHost(). Also, for all the occurence of deprecatedShadowAncestorNode(), we don't need to
+        worry about nested ShadowDOM issues. So directly converting deprecatedShadowAncestorNode() to shadowHost() should be safe.
+
+        No new tests, simple refactoring.
+
+        * editing/Editor.cpp:
+        (WebCore::Editor::rangeOfString):
+        (WebCore::Editor::countMatchesForText):
+
 2013-01-29  Simon Fraser  <[email protected]>
 
         Rubberband scrolling on news.google.com causes text to blink repeatedly

Modified: trunk/Source/WebCore/editing/Editor.cpp (141224 => 141225)


--- trunk/Source/WebCore/editing/Editor.cpp	2013-01-30 06:07:21 UTC (rev 141224)
+++ trunk/Source/WebCore/editing/Editor.cpp	2013-01-30 06:14:58 UTC (rev 141225)
@@ -2709,9 +2709,9 @@
     if (resultRange->collapsed() && shadowTreeRoot) {
         searchRange = rangeOfContents(m_frame->document());
         if (forward)
-            searchRange->setStartAfter(shadowTreeRoot->deprecatedShadowAncestorNode());
+            searchRange->setStartAfter(shadowTreeRoot->shadowHost());
         else
-            searchRange->setEndBefore(shadowTreeRoot->deprecatedShadowAncestorNode());
+            searchRange->setEndBefore(shadowTreeRoot->shadowHost());
 
         resultRange = findPlainText(searchRange.get(), target, options);
     }
@@ -2768,7 +2768,7 @@
             if (!resultRange->startContainer()->isInShadowTree())
                 break;
 
-            searchRange->setStartAfter(resultRange->startContainer()->deprecatedShadowAncestorNode(), exception);
+            searchRange->setStartAfter(resultRange->startContainer()->shadowHost(), exception);
             searchRange->setEnd(originalEndContainer, originalEndOffset, exception);
             continue;
         }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to