Title: [232342] tags/Safari-606.1.19/Source/WebCore
- Revision
- 232342
- Author
- [email protected]
- Date
- 2018-05-31 00:10:50 -0700 (Thu, 31 May 2018)
Log Message
Cherry-pick r232320. rdar://problem/40662705
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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: tags/Safari-606.1.19/Source/WebCore/ChangeLog (232341 => 232342)
--- tags/Safari-606.1.19/Source/WebCore/ChangeLog 2018-05-31 07:10:48 UTC (rev 232341)
+++ tags/Safari-606.1.19/Source/WebCore/ChangeLog 2018-05-31 07:10:50 UTC (rev 232342)
@@ -1,3 +1,39 @@
+2018-05-31 Kocsen Chung <[email protected]>
+
+ Cherry-pick r232320. rdar://problem/40662705
+
+ 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.
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 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 Stephen McGruer <[email protected]>
iOS: setting 'defaultValue' of input type=date from script should cause a UI update
Modified: tags/Safari-606.1.19/Source/WebCore/rendering/RenderThemeIOS.mm (232341 => 232342)
--- tags/Safari-606.1.19/Source/WebCore/rendering/RenderThemeIOS.mm 2018-05-31 07:10:48 UTC (rev 232341)
+++ tags/Safari-606.1.19/Source/WebCore/rendering/RenderThemeIOS.mm 2018-05-31 07:10:50 UTC (rev 232342)
@@ -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