Title: [232320] trunk/Source/WebCore
- Revision
- 232320
- Author
- [email protected]
- Date
- 2018-05-30 17:02:07 -0700 (Wed, 30 May 2018)
Log Message
WebContent crashes with system preview content
https://bugs.webkit.org/show_bug.cgi?id=186118
Reviewed by Myles Maxfield.
We were receiving crash reports on iOS devices when getting
platformContext() from a GraphicsContext. This usually
occurred when the page was invisible. Debugging showed that
it was trying to draw with a disabled context.
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintSystemPreviewBadge): Early
return if the context has painting disabled.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (232319 => 232320)
--- trunk/Source/WebCore/ChangeLog 2018-05-30 23:48:36 UTC (rev 232319)
+++ trunk/Source/WebCore/ChangeLog 2018-05-31 00:02:07 UTC (rev 232320)
@@ -1,3 +1,19 @@
+2018-05-30 Dean Jackson <[email protected]>
+
+ WebContent crashes with system preview content
+ https://bugs.webkit.org/show_bug.cgi?id=186118
+
+ Reviewed by Myles Maxfield.
+
+ We were receiving crash reports on iOS devices when getting
+ platformContext() from a GraphicsContext. This usually
+ occurred when the page was invisible. Debugging showed that
+ it was trying to draw with a disabled context.
+
+ * rendering/RenderThemeIOS.mm:
+ (WebCore::RenderThemeIOS::paintSystemPreviewBadge): Early
+ return if the context has painting disabled.
+
2018-05-30 Daniel Bates <[email protected]>
Web Inspector: Annotate Same-Site cookies
Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (232319 => 232320)
--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2018-05-30 23:48:36 UTC (rev 232319)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2018-05-31 00:02:07 UTC (rev 232320)
@@ -1852,8 +1852,14 @@
// Create a circle to be used for the clipping path in the badge, as well as the drop shadow.
RetainPtr<CGPathRef> circle = adoptCF(CGPathCreateWithRoundedRect(absoluteBadgeRect, badgeDimension / 2, badgeDimension / 2, nullptr));
- CGContextRef ctx = paintInfo.context().platformContext();
+ auto& graphicsContext = paintInfo.context();
+ if (graphicsContext.paintingDisabled())
+ return;
+ CGContextRef ctx = graphicsContext.platformContext();
+ if (!ctx)
+ return;
+
CGContextSaveGState(ctx);
// Draw a drop shadow around the circle.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes