Title: [202390] trunk
Revision
202390
Author
[email protected]
Date
2016-06-23 12:17:49 -0700 (Thu, 23 Jun 2016)

Log Message

Handle (0, 0) ranges from Lookup
https://bugs.webkit.org/show_bug.cgi?id=159062
rdar://problem/26960385

Reviewed by Tim Horton.

Source/WebCore:

* editing/mac/DictionaryLookup.mm: (WebCore::DictionaryLookup::rangeAtHitTestResult):
Paper over <https://bugs.webkit.org/show_bug.cgi?id=159063>, which seems too involved
to fix now.

LayoutTests:

* platform/mac/TestExpectations: Unmark the test that was broken due to this.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (202389 => 202390)


--- trunk/LayoutTests/ChangeLog	2016-06-23 19:16:42 UTC (rev 202389)
+++ trunk/LayoutTests/ChangeLog	2016-06-23 19:17:49 UTC (rev 202390)
@@ -1,3 +1,13 @@
+2016-06-23  Alexey Proskuryakov  <[email protected]>
+
+        Handle (0, 0) ranges from Lookup
+        https://bugs.webkit.org/show_bug.cgi?id=159062
+        rdar://problem/26960385
+
+        Reviewed by Tim Horton.
+
+        * platform/mac/TestExpectations: Unmark the test that was broken due to this.
+
 2016-06-23  Joseph Pecoraro  <[email protected]>
 
         CSSComputedStyleDeclaration::length should recalculate styles if needed to provide the correct value

Modified: trunk/LayoutTests/platform/mac/TestExpectations (202389 => 202390)


--- trunk/LayoutTests/platform/mac/TestExpectations	2016-06-23 19:16:42 UTC (rev 202389)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2016-06-23 19:17:49 UTC (rev 202390)
@@ -1440,6 +1440,3 @@
 
 # rdar://problem/26950065
 [ Sierra+ ] editing/mac/input/unconfirmed-text-navigation-with-page-cache.html [ Skip ]
-
-# rdar://problem/26960385
-[ Sierra+ ] editing/mac/dictionary-lookup/dictionary-lookup-input.html [ Failure ]

Modified: trunk/Source/WebCore/ChangeLog (202389 => 202390)


--- trunk/Source/WebCore/ChangeLog	2016-06-23 19:16:42 UTC (rev 202389)
+++ trunk/Source/WebCore/ChangeLog	2016-06-23 19:17:49 UTC (rev 202390)
@@ -1,3 +1,15 @@
+2016-06-23  Alexey Proskuryakov  <[email protected]>
+
+        Handle (0, 0) ranges from Lookup
+        https://bugs.webkit.org/show_bug.cgi?id=159062
+        rdar://problem/26960385
+
+        Reviewed by Tim Horton.
+
+        * editing/mac/DictionaryLookup.mm: (WebCore::DictionaryLookup::rangeAtHitTestResult):
+        Paper over <https://bugs.webkit.org/show_bug.cgi?id=159063>, which seems too involved
+        to fix now.
+
 2016-06-23  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: first heap snapshot taken when a page is reloaded happens before the reload navigation

Modified: trunk/Source/WebCore/editing/mac/DictionaryLookup.mm (202389 => 202390)


--- trunk/Source/WebCore/editing/mac/DictionaryLookup.mm	2016-06-23 19:16:42 UTC (rev 202389)
+++ trunk/Source/WebCore/editing/mac/DictionaryLookup.mm	2016-06-23 19:17:49 UTC (rev 202390)
@@ -141,7 +141,8 @@
         extractedRange = [luLookupDefinitionModule tokenRangeForString:fullPlainTextString range:rangeToPass options:options];
 
     // This function sometimes returns {NSNotFound, 0} if it was unable to determine a good string.
-    if (extractedRange.location == NSNotFound)
+    // FIXME (159063): We shouldn't need to check for zero length here.
+    if (extractedRange.location == NSNotFound || extractedRange.length == 0)
         return nullptr;
 
     return TextIterator::subrange(fullCharacterRange.get(), extractedRange.location, extractedRange.length);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to