WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
253610
[margin-trim] Trimmed block-end margins for block-level boxes in a block container should be reflected in computed style
https://bugs.webkit.org/show_bug.cgi?id=253610
Summary
[margin-trim] Trimmed block-end margins for block-level boxes in a block cont...
Sammy Gill
Reported
2023-03-08 15:11:16 PST
The web inspector shows the untrimmed margins for a box even if has been trimmed by the containing block's margin-trim property.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-03-08 15:11:43 PST
<
rdar://problem/106454992
>
Sammy Gill
Comment 2
2023-03-09 14:32:07 PST
This scenario is actually slightly more tricky than the block-start one. By the time we get to the end of the block container, we have propagated some margin information from the top that will be used to determine the final margin of the block container. At this point we actually haven’t trimmed any of the block-end margins of the children (the m_marginBox in the renderer still contains the used value of the margin), but we only consider the propagated value to update/trim the block containers block-end margin. I think in order for this to be correct, we need to walk back up the container's children and trim the block-end margins (and block-start if the child is self collapsing) until we get to a child that is not self collapsing. I think this means that we also need to update the position for the self-collapsing children, which may be just below the first non self-collapsing child.
Sammy Gill
Comment 3
2023-04-20 09:45:21 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/12977
Sammy Gill
Comment 4
2023-04-24 20:51:04 PDT
Submitted web-platform-tests pull request:
https://github.com/web-platform-tests/wpt/pull/39673
EWS
Comment 5
2023-04-25 20:08:30 PDT
Committed
263398@main
(e44bd7f346a1): <
https://commits.webkit.org/263398@main
> Reviewed commits have been landed. Closing PR #12977 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug