Title: [179155] branches/safari-600.4-branch/Source/WebCore
Revision
179155
Author
[email protected]
Date
2015-01-26 16:19:19 -0800 (Mon, 26 Jan 2015)

Log Message

Merge r179086. rdar://problem/19566089

Modified Paths

Diff

Modified: branches/safari-600.4-branch/Source/WebCore/ChangeLog (179154 => 179155)


--- branches/safari-600.4-branch/Source/WebCore/ChangeLog	2015-01-27 00:19:17 UTC (rev 179154)
+++ branches/safari-600.4-branch/Source/WebCore/ChangeLog	2015-01-27 00:19:19 UTC (rev 179155)
@@ -1,5 +1,23 @@
 2015-01-26  Matthew Hanson  <[email protected]>
 
+        Merge r179086. rdar://problem/19566089
+
+    2015-01-25  Timothy Horton  <[email protected]>
+
+            Long spins under Frame::rangeForPoint when doing Lookup on feedly.com
+            https://bugs.webkit.org/show_bug.cgi?id=140862
+            <rdar://problem/19566089>
+
+            Reviewed by Dan Bernstein.
+
+            * page/Frame.cpp:
+            (WebCore::Frame::rangeForPoint):
+            If there isn't a selectable text node at the given point, rangeForPoint
+            will eventually return null. However, we can make it fail much faster
+            by checking the initial position's text-ness and selectability.
+
+2015-01-26  Matthew Hanson  <[email protected]>
+
         Merge r179014. rdar://problem/19573674
 
     2015-01-23  Timothy Horton  <[email protected]>

Modified: branches/safari-600.4-branch/Source/WebCore/page/Frame.cpp (179154 => 179155)


--- branches/safari-600.4-branch/Source/WebCore/page/Frame.cpp	2015-01-27 00:19:17 UTC (rev 179154)
+++ branches/safari-600.4-branch/Source/WebCore/page/Frame.cpp	2015-01-27 00:19:19 UTC (rev 179155)
@@ -860,6 +860,11 @@
     if (position.isNull())
         return 0;
 
+    Position deepPosition = position.deepEquivalent();
+    Text* containerText = deepPosition.containerText();
+    if (!containerText || !containerText->renderer() || containerText->renderer()->style().userSelect() == SELECT_NONE)
+        return nullptr;
+
     VisiblePosition previous = position.previous();
     if (previous.isNotNull()) {
         RefPtr<Range> previousCharacterRange = makeRange(previous, position);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to