Title: [199370] releases/WebKitGTK/webkit-2.12/Source/WebCore
- Revision
- 199370
- Author
- [email protected]
- Date
- 2016-04-12 09:58:29 -0700 (Tue, 12 Apr 2016)
Log Message
Merge r198243 - Occasional crash under GraphicsContext::platformContext() when dragging Google maps
https://bugs.webkit.org/show_bug.cgi?id=155521
rdar://problem/24357307
Reviewed by Tim Horton.
It's possible for createDragImageForSelection() to return a null image, if the bounds
of the selection are an empty rect. That would cause a crash under convertImageToBitmap()
because a zero-sized ShareableBitmap will return a null GraphicsContext.
To avoid this, early return from DragController::startDrag() if the dragImage is null.
I wasn't able to come up with a test for this.
* page/DragController.cpp:
(WebCore::DragController::startDrag):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (199369 => 199370)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-04-12 16:57:23 UTC (rev 199369)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-04-12 16:58:29 UTC (rev 199370)
@@ -1,3 +1,22 @@
+2016-03-15 Simon Fraser <[email protected]>
+
+ Occasional crash under GraphicsContext::platformContext when dragging Google maps
+ https://bugs.webkit.org/show_bug.cgi?id=155521
+ rdar://problem/24357307
+
+ Reviewed by Tim Horton.
+
+ It's possible for createDragImageForSelection() to return a null image, if the bounds
+ of the selection are an empty rect. That would cause a crash under convertImageToBitmap()
+ because a zero-sized ShareableBitmap will return a null GraphicsContext.
+
+ To avoid this, early return from DragController::startDrag() if the dragImage is null.
+
+ I wasn't able to come up with a test for this.
+
+ * page/DragController.cpp:
+ (WebCore::DragController::startDrag):
+
2016-03-15 Zalan Bujtas <[email protected]>
Delay HTMLFormControlElement::focus() call until after layout is finished.
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/page/DragController.cpp (199369 => 199370)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/page/DragController.cpp 2016-04-12 16:57:23 UTC (rev 199369)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/page/DragController.cpp 2016-04-12 16:58:29 UTC (rev 199370)
@@ -838,6 +838,10 @@
dragLoc = dragLocForSelectionDrag(src);
m_dragOffset = IntPoint(dragOrigin.x() - dragLoc.x(), dragOrigin.y() - dragLoc.y());
}
+
+ if (!dragImage)
+ return false;
+
doSystemDrag(dragImage, dragLoc, dragOrigin, dataTransfer, src, false);
} else if (!src.document()->securityOrigin()->canDisplay(linkURL)) {
src.document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Not allowed to drag local resource: " + linkURL.stringCenterEllipsizedToLength());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes