Ruby elements with padding have incorrect layout
Categories
(Core :: Layout: Ruby, defect, P3)
Tracking
()
People
(Reporter: toasted.nutbread, Assigned: xidorn)
Details
(Keywords: testcase)
Attachments
(4 files)
Ruby elements with padding contained within a display:inline-block element have incorrect layout.
An example is provided to demonstrate the issue. Collapsing the whitespace will change the layout to not wrap, but the elements will be incorrectly cut off.
Expected: no word wrapping.
Actual: text1
and text2
are wrapped onto different lines.
.item {
display: inline-block;
background-color: #ff9999;
}
.item:nth-child(2n) {
background-color: #9999ff;
}
.item>ruby {
padding-right: 1em;
}
<span class="item">
<ruby>text1</ruby>
<span>text2</span>
</span>
Side note: when more complex HTML is used which has this pattern, the inspect element feature will cause the elements to jump around as they are hovered. I can get an example of that if necessary, but it likely stems from this issue.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
I think I know what's going on here... will take a closer look this weekend.
Assignee | ||
Comment 3•3 years ago
|
||
This issue is revealled by the test for this bug in a later part, so it's also covered by that test.
Assignee | ||
Comment 4•3 years ago
|
||
While nsInlineFrame and nsFirstLetterFrame are going to continue sharing the same code, nsRubyFrame will use the refactored version to compute its intrinsic sizes.
This way we can also eliminate the need for checking the intrinsic type inside the function.
Depends on D109226
Assignee | ||
Comment 5•3 years ago
|
||
Depends on D109227
Assignee | ||
Comment 6•3 years ago
|
||
Pushed by mozilla@upsuper.org: https://hg.mozilla.org/integration/autoland/rev/43ae915dc91a part 1 - Fix incorrect span sizing on ruby with border / padding. r=dholbert https://hg.mozilla.org/integration/autoland/rev/00afc8414972 part 2 - Refactor DoIntrinsicInlineISize to make it accept a function for handling children. r=dholbert https://hg.mozilla.org/integration/autoland/rev/1245e772d2de part 3 - Fix intrinsic isize calculation for ruby frame. r=dholbert
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/28184 for changes under testing/web-platform/tests
Comment 9•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/43ae915dc91a
https://hg.mozilla.org/mozilla-central/rev/00afc8414972
https://hg.mozilla.org/mozilla-central/rev/1245e772d2de
Upstream PR merged by moz-wptsync-bot
Updated•3 years ago
|
Description
•