Changeset 232999 in webkit
- Timestamp:
- Jun 19, 2018 6:01:48 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r232997 r232999 1 2018-06-19 Dean Jackson <dino@apple.com> 2 3 ARKit badge drop shadow updates its blur radius based on page zoom 4 https://bugs.webkit.org/show_bug.cgi?id=186829 5 <rdar://problem/40738779> 6 7 Reviewed by Tim Horton. 8 9 We need to make sure the shadow blur radius takes into account the 10 current zoom. Thankfully, the GraphicsContext platform code already 11 does this, so just use it. 12 13 * rendering/RenderThemeIOS.mm: 14 (WebCore::RenderThemeIOS::paintSystemPreviewBadge): 15 1 16 2018-06-19 Dean Jackson <dino@apple.com> 2 17 -
trunk/Source/WebCore/rendering/RenderThemeIOS.mm
r232487 r232999 1857 1857 return; 1858 1858 1859 GraphicsContextStateSaver stateSaver(graphicsContext); 1860 1859 1861 CGContextRef ctx = graphicsContext.platformContext(); 1860 1862 if (!ctx) … … 1864 1866 1865 1867 // Draw a drop shadow around the circle. 1866 CGFloat shadowColorComponents[4] = { 0, 0, 0, 0.1 }; 1867 RetainPtr<CGColorRef> shadowColor = adoptCF(CGColorCreate(sRGBColorSpaceRef(), shadowColorComponents)); 1868 // Use the GraphicsContext function, because it calculates the blur radius in context space, 1869 // rather than screen space. 1870 Color shadowColor = Color { 0.f, 0.f, 0.f, 0.1f }; 1871 graphicsContext.setShadow(FloatSize { }, 16, shadowColor); 1872 1868 1873 // The circle must have an alpha channel value of 1 for the shadow color to appear. 1869 1874 CGFloat circleColorComponents[4] = { 0, 0, 0, 1 }; 1870 1875 RetainPtr<CGColorRef> circleColor = adoptCF(CGColorCreate(sRGBColorSpaceRef(), circleColorComponents)); 1871 1876 CGContextSetFillColorWithColor(ctx, circleColor.get()); 1872 CGContextSetShadowWithColor(ctx, CGSizeZero, 16, shadowColor.get());1873 1877 1874 1878 // Clip out the circle to only show the shadow.
Note: See TracChangeset
for help on using the changeset viewer.