WebKit Bugzilla
Attachment 343125 Details for
Bug 186829
: ARKit badge drop shadow updates its blur radius based on page zoom
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186829-20180620105209.patch (text/plain), 2.59 KB, created by
Dean Jackson
on 2018-06-19 17:52:10 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Dean Jackson
Created:
2018-06-19 17:52:10 PDT
Size:
2.59 KB
patch
obsolete
>Subversion Revision: 232857 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 778a8db67660dd003f8011614630833f87fc4af8..b1eaeffab482fc1c4aad0431644c553d43ce9f70 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-06-19 Dean Jackson <dino@apple.com> >+ >+ ARKit badge drop shadow updates its blur radius based on page zoom >+ https://bugs.webkit.org/show_bug.cgi?id=186829 >+ <rdar://problem/40738779> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ We need to make sure the shadow blur radius takes into account the >+ current zoom. Thankfully, the GraphicsContext platform code already >+ does this, so just use it. >+ >+ * rendering/RenderThemeIOS.mm: >+ (WebCore::RenderThemeIOS::paintSystemPreviewBadge): >+ > 2018-06-19 Dean Jackson <dino@apple.com> > > Blank viewer comes up and then auto-dismisses when device is not connected to Internet >diff --git a/Source/WebCore/rendering/RenderThemeIOS.mm b/Source/WebCore/rendering/RenderThemeIOS.mm >index 782b4a1397c363b3429eb6bd99274f1b8d9a4c1c..30a25941ec6dcfba9884cd766b1cfc011d00eb3e 100644 >--- a/Source/WebCore/rendering/RenderThemeIOS.mm >+++ b/Source/WebCore/rendering/RenderThemeIOS.mm >@@ -1856,6 +1856,8 @@ void RenderThemeIOS::paintSystemPreviewBadge(Image& image, const PaintInfo& pain > if (graphicsContext.paintingDisabled()) > return; > >+ GraphicsContextStateSaver stateSaver(graphicsContext); >+ > CGContextRef ctx = graphicsContext.platformContext(); > if (!ctx) > return; >@@ -1863,13 +1865,15 @@ void RenderThemeIOS::paintSystemPreviewBadge(Image& image, const PaintInfo& pain > CGContextSaveGState(ctx); > > // Draw a drop shadow around the circle. >- CGFloat shadowColorComponents[4] = { 0, 0, 0, 0.1 }; >- RetainPtr<CGColorRef> shadowColor = adoptCF(CGColorCreate(sRGBColorSpaceRef(), shadowColorComponents)); >+ // Use the GraphicsContext function, because it calculates the blur radius in context space, >+ // rather than screen space. >+ Color shadowColor = Color { 0.f, 0.f, 0.f, 0.1f }; >+ graphicsContext.setShadow(FloatSize { }, 16, shadowColor); >+ > // The circle must have an alpha channel value of 1 for the shadow color to appear. > CGFloat circleColorComponents[4] = { 0, 0, 0, 1 }; > RetainPtr<CGColorRef> circleColor = adoptCF(CGColorCreate(sRGBColorSpaceRef(), circleColorComponents)); > CGContextSetFillColorWithColor(ctx, circleColor.get()); >- CGContextSetShadowWithColor(ctx, CGSizeZero, 16, shadowColor.get()); > > // Clip out the circle to only show the shadow. > CGContextBeginPath(ctx);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
thorton
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186829
: 343125