Bug 264625 - RenderBox::applyVisualEffectOverflow() and RenderBox::outlineBoundsForRepaint() use different ways of computing outline/shadow extent
Summary: RenderBox::applyVisualEffectOverflow() and RenderBox::outlineBoundsForRepaint...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-10 15:05 PST by Simon Fraser (smfr)
Modified: 2023-11-28 18:35 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2023-11-10 15:05:00 PST
RenderBox::applyVisualEffectOverflow() and RenderBox::outlineBoundsForRepaint() have different logic for combining outline/shadow extents, and give different answers on an element like:

        .box {
            margin: 30px;
            width: 50%;
            height: 500px;
            border: 12px solid gray;
            outline: 5px solid green;
            box-shadow: 0 0 0px 20px black;
        }
Comment 1 Simon Fraser (smfr) 2023-11-10 15:05:25 PST
RenderBox 0x138003430 outlineBoundsForRepaint - outline bounds (-25,-25) width=225 height=574 bigger than visual overflow (-20,-20) width=215 height=564
Comment 2 Simon Fraser (smfr) 2023-11-10 15:11:35 PST
These should give the same result:

    applyVisualEffectOverflow(borderBoxRect())

and

    LayoutRect box = borderBoundingBox();
    adjustRectForOutlineAndShadow(box);
Comment 3 Radar WebKit Bug Importer 2023-11-17 15:05:13 PST
<rdar://problem/118582062>
Comment 4 Simon Fraser (smfr) 2023-11-27 16:20:38 PST
Pull request: https://github.com/WebKit/WebKit/pull/20961
Comment 5 EWS 2023-11-28 18:35:25 PST
Committed 271254@main (6aa1f6767674): <https://commits.webkit.org/271254@main>

Reviewed commits have been landed. Closing PR #20961 and removing active labels.