Title: [201583] trunk/Source/WebKit2
- Revision
- 201583
- Author
- [email protected]
- Date
- 2016-06-01 18:09:55 -0700 (Wed, 01 Jun 2016)
Log Message
[iOS] Regression(r200972): Crash under WebKit::WebPage::selectTextWithGranularityAtPoint()
https://bugs.webkit.org/show_bug.cgi?id=158284
<rdar://problem/26573954>
Reviewed by Ryosuke Niwa.
range can be null but r200972 started dereferencing it without null
check. This patch adds a null check for range and uses the pre-r200972
code path if range is null.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectTextWithGranularityAtPoint):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (201582 => 201583)
--- trunk/Source/WebKit2/ChangeLog 2016-06-02 00:45:18 UTC (rev 201582)
+++ trunk/Source/WebKit2/ChangeLog 2016-06-02 01:09:55 UTC (rev 201583)
@@ -1,3 +1,18 @@
+2016-06-01 Chris Dumez <[email protected]>
+
+ [iOS] Regression(r200972): Crash under WebKit::WebPage::selectTextWithGranularityAtPoint()
+ https://bugs.webkit.org/show_bug.cgi?id=158284
+ <rdar://problem/26573954>
+
+ Reviewed by Ryosuke Niwa.
+
+ range can be null but r200972 started dereferencing it without null
+ check. This patch adds a null check for range and uses the pre-r200972
+ code path if range is null.
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::selectTextWithGranularityAtPoint):
+
2016-06-01 Brady Eidson <[email protected]>
Modernize lambda usage for all callers of RunLoop::dispatch().
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (201582 => 201583)
--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2016-06-02 00:45:18 UTC (rev 201582)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2016-06-02 01:09:55 UTC (rev 201583)
@@ -1875,8 +1875,8 @@
m_blockSelectionDesiredSize.setWidth(blockSelectionStartWidth);
m_blockSelectionDesiredSize.setHeight(blockSelectionStartHeight);
m_currentBlockSelection = nullptr;
- auto* renderer = range->startContainer().renderer();
- if (renderer->style().preserveNewline())
+ auto* renderer = range ? range->startContainer().renderer() : nullptr;
+ if (renderer && renderer->style().preserveNewline())
m_blockRectForTextSelection = renderer->absoluteBoundingBoxRect(true);
else {
auto paragraphRange = enclosingTextUnitOfGranularity(visiblePositionInFocusedNodeForPoint(frame, point, isInteractingWithAssistedNode), ParagraphGranularity, DirectionForward);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes