Changeset 252689 in webkit
- Timestamp:
- Nov 20, 2019 9:12:08 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r252688 r252689 1 2019-11-20 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (r252161): box-shadow with inset and rounded borders is clipped 4 https://bugs.webkit.org/show_bug.cgi?id=204348 5 6 Reviewed by Zalan Bujtas. 7 8 * fast/box-shadow/inset-box-shadow-expected.html: Added. 9 * fast/box-shadow/inset-box-shadow.html: Added. 10 1 11 2019-11-20 Per Arne Vollan <pvollan@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r252686 r252689 1 2019-11-20 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (r252161): box-shadow with inset and rounded borders is clipped 4 https://bugs.webkit.org/show_bug.cgi?id=204348 5 6 Reviewed by Zalan Bujtas. 7 8 r252161 introduced a bug for inset shadows where we passed the wrong rect to areaCastingShadowInHole(). 9 Clean the code up a little, and make the xOffset stuff more similar to the outset shadow path. 10 We could still do a better job of pixel snapping here. 11 12 Test: fast/box-shadow/inset-box-shadow.html 13 14 * rendering/RenderBoxModelObject.cpp: 15 (WebCore::RenderBoxModelObject::paintBoxShadow): 16 1 17 2019-11-20 Zalan Bujtas <zalan@apple.com> 2 18 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r252161 r252689 2475 2475 Color fillColor(shadowColor.red(), shadowColor.green(), shadowColor.blue(), 255); 2476 2476 2477 FloatRect pixelSnappedOuterRect = snapRectToDevicePixels(areaCastingShadowInHole(holeRect, shadowPaintingExtent, shadowSpread, shadowOffset), deviceScaleFactor);2477 LayoutRect shadowCastingRect = areaCastingShadowInHole(border.rect(), shadowPaintingExtent, shadowSpread, shadowOffset); 2478 2478 RoundedRect roundedHoleRect(holeRect, border.radii()); 2479 2480 FloatRect pixelSnappedOuterRect = snapRectToDevicePixels(shadowCastingRect, deviceScaleFactor); 2479 2481 FloatRoundedRect pixelSnappedRoundedHole = roundedHoleRect.pixelSnappedRoundedRectForPainting(deviceScaleFactor); 2480 2482 … … 2486 2488 context.clip(pixelSnappedBorderRect.rect()); 2487 2489 2488 IntSize extraOffset(2 * roundToInt(paintRect.width()) + std::max<LayoutUnit>(0, shadowOffset.width()) + shadowPaintingExtent - 2 * shadowSpread + 1, 0); 2490 LayoutUnit xOffset = 2 * paintRect.width() + std::max<LayoutUnit>(0, shadowOffset.width()) + shadowPaintingExtent + 2 * shadowSpread + LayoutUnit(1); 2491 LayoutSize extraOffset(xOffset.ceil(), 0); 2492 2489 2493 context.translate(extraOffset); 2490 2494 shadowOffset -= extraOffset;
Note: See TracChangeset
for help on using the changeset viewer.