Closed Bug 1388904 Opened 2 years ago Closed 2 years ago
stylo: <ruby> at line ends may not have correct justification applied
In gecko, the attached test case will read "東 京" in kanji with ruby on top. The "東" and "京" will be at the 1/3 and 2/3 mark of the page. In stylo, the "東" and "京" will be at opposite ends of the page, but the ruby will be in the same spot. I thought this might be due to us not handling mTextAlignLastUnsafe, but that's not getting set on this page. This causes ./layout/reftests/writing-mode/1135361-ruby-justify-1.html
Attachment #8895576 - Attachment mime type: text/plain → text/html
I also verified that the getComputedStyle() trees are identical (which only points more strongly to something weird going on with the disabled unsafe/true value support), but that's not the case either.
So this is because the SHOULD_SUPPRESS_LINEBREAK flag is not correctly set to the text frame in this case, so it breaks the shortcut check at https://searchfox.org/mozilla-central/rev/e5b13e6224dbe3182050cf442608c4cb6a8c5c55/layout/generic/nsLineLayout.cpp#3133,3142 So in this case, inheriting flags doesn't work, because the text frame inherits from <ruby>, which doesn't have the flag we want. We need to do an additional check in StyleAdjuster::adjust_for_text() to apply this flag when its parent has any ruby display type.
Assignee: nobody → xidorn+moz
Priority: P3 → P2
Summary: stylo: text-align-last doesn't work with <ruby> inside <p> → stylo: <ruby> at line ends may not have correct justification applied
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/aeef23d80cf2 Update reftest expectation.
You need to log in before you can comment on or make changes to this bug.