DIR attribute in RB and RT is ignored.
Categories
(Core :: Layout: Ruby, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox112 | --- | fixed |
People
(Reporter: aprilop, Assigned: jfkthame)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Android 11; Mobile; rv:109.0) Gecko/109.0 Firefox/109.0
Steps to reproduce:
Write <rb dir=rtl> or <rt dir=rtl> inside <ruby>
Actual results:
The DIR attribute is not recognized; the direction is still left-to-right.
Expected results:
The direction should be right-to-left.
Comment 1•1 year ago
|
||
It seems we look at the container directionality when positioning ruby frames.
This comes from bug 1141931... Cc'ing some people which might have context.
Comment 2•1 year ago
|
||
I think it is because this check that skips rb, rt, rbc, rtc, because none of them is eBidiInlineContainer
, but they should probably have bidi control / override characters appended. (Actually I'm not sure exactly what eBidiInlineContainer
means. There isn't a comment attached.) I suspect replacing frameType == LayoutFrameType::Ruby
with RubyUtils::IsRubyBox(frameType)
would fix this issue, but not 100% sure whether it could break anything else.
I'm surprised that I didn't try this as part of bug 1141931... but indeed none of the reftest covers these cases.
Updated•1 year ago
|
Assignee | ||
Comment 3•1 year ago
|
||
Patch proposed by Xidorn appears to work as expected. Added testcase to WPT.
Updated•1 year ago
|
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bcf052fea828 Handle bidi for rb and rt boxes. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/38788 for changes under testing/web-platform/tests
Comment 6•1 year ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Description
•