WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
74131
[CSS Regions] Incorrect margin-top result in regions with mixed widths
https://bugs.webkit.org/show_bug.cgi?id=74131
Summary
[CSS Regions] Incorrect margin-top result in regions with mixed widths
Alan Stearns
Reported
2011-12-08 14:44:39 PST
Created
attachment 118475
[details]
reftest If you have an element in a region with a percentage margin, and the region is followed by another region with a larger width, this affects the top margin display. If the element is displayed entirely within a single region its margins should only be affected by that single region. If an element spans regions the margins should be calculated for each segment using the local region dimensions. In the test file it appears as if the size and margin calculations are using the widest region in the flow, then moving and clipping for display in the first region. The computed dimensions are reported as 240px by 50px with a 30px margin, but the displayed dimensions are 160px by 50px with left and right margins of 20px and a top margin of 30px. For this testfile I'd expect the displayed dimensions but with an overall margin of 20px.
Attachments
reftest
(1.01 KB, application/zip)
2011-12-08 14:44 PST
,
Alan Stearns
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Michelangelo De Simone
Comment 1
2013-06-13 20:57:08 PDT
Still repros on today's nightly (
r151543
)
Simon Pena
Comment 2
2013-07-15 08:00:11 PDT
Taking a look at this.
Simon Pena
Comment 3
2013-07-30 02:31:14 PDT
I have been debugging this, and found that during the layout stage, the computed values of the margins end up being 30px (left, right and top). If you use the web inspector, those are the reported values. However, as Alan says in
comment 0
, the displayed margins are 20px. It is in the paint stage where the left and right margins get the 20px values they display, in the WebCore::RenderBox::borderBoxRectInRegion method. However, in that place the top margin is not updated. I talked to Mihnea and he warned me that since at this point margins are/can be collapsed (
http://www.w3.org/TR/CSS2/box.html#collapsing-margins
), it can be complicated / impossible to simply update the top-margin there. I am still trying to see if there's something we can do about the top margin (which doesn't break existing behaviour), but feel free to comment if you have some ideas or suggestions. My feeling is that trying to fix this behaviour so that we actually compute the correct margins in the layout stage would be quite complicated and would require many changes, but I might be missing something.
Brent Fulgham
Comment 4
2022-07-13 09:29:04 PDT
CSS Regions were removed in
Bug 174978
.
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