Closed Bug 1819726 Opened 1 year ago Closed 1 year ago

DIR attribute in RB and RT is ignored.

Categories

(Core :: Layout: Ruby, defect, P3)

defect

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: aprilop, Assigned: jfkthame)

Details

Attachments

(2 files)

Attached file ruby-direction.html

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.

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.

Severity: -- → S3
Priority: -- → P3

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.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Patch proposed by Xidorn appears to work as expected. Added testcase to WPT.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
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
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: