Title: [175702] trunk/Source/WebKit2
- Revision
- 175702
- Author
- [email protected]
- Date
- 2014-11-06 10:58:33 -0800 (Thu, 06 Nov 2014)
Log Message
Null deref in rangeForDictionaryLookupAtHitTestResult on occasion
https://bugs.webkit.org/show_bug.cgi?id=138459
<rdar://problem/18872825>
Reviewed by Andreas Kling.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::rangeForDictionaryLookupAtHitTestResult):
rangeExpandedAroundPositionByCharacters can return null.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (175701 => 175702)
--- trunk/Source/WebKit2/ChangeLog 2014-11-06 18:57:04 UTC (rev 175701)
+++ trunk/Source/WebKit2/ChangeLog 2014-11-06 18:58:33 UTC (rev 175702)
@@ -1,5 +1,17 @@
2014-11-06 Tim Horton <[email protected]>
+ Null deref in rangeForDictionaryLookupAtHitTestResult on occasion
+ https://bugs.webkit.org/show_bug.cgi?id=138459
+ <rdar://problem/18872825>
+
+ Reviewed by Andreas Kling.
+
+ * WebProcess/WebPage/mac/WebPageMac.mm:
+ (WebKit::rangeForDictionaryLookupAtHitTestResult):
+ rangeExpandedAroundPositionByCharacters can return null.
+
+2014-11-06 Tim Horton <[email protected]>
+
Prefer link action menus over images
https://bugs.webkit.org/show_bug.cgi?id=138461
<rdar://problem/18768377>
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (175701 => 175702)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm 2014-11-06 18:57:04 UTC (rev 175701)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm 2014-11-06 18:58:33 UTC (rev 175702)
@@ -577,6 +577,9 @@
// As context, we are going to use 250 characters of text before and after the point.
RefPtr<Range> fullCharacterRange = rangeExpandedAroundPositionByCharacters(position, 250);
+ if (!fullCharacterRange)
+ return nullptr;
+
NSRange rangeToPass = NSMakeRange(TextIterator::rangeLength(makeRange(fullCharacterRange->startPosition(), position).get()), 0);
String fullPlainTextString = plainText(fullCharacterRange.get());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes