Closed
Bug 1302734
Opened 8 years ago
Closed 8 years ago
unicode-bidi:plaintext is not supported in vertical writing modes
Categories
(Core :: Layout: Block and Inline, defect)
Core
Layout: Block and Inline
Tracking
()
RESOLVED
FIXED
mozilla51
Tracking | Status | |
---|---|---|
firefox51 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
Details
(Keywords: dev-doc-complete)
Attachments
(2 files)
5.88 KB,
patch
|
dholbert
:
review+
|
Details | Diff | Splinter Review |
2.76 KB,
patch
|
dholbert
:
review+
|
Details | Diff | Splinter Review |
When an element has the CSS property unicode-bidi:plaintext, its directionality is supposed to be "calculated without considering its parent bidirectional state or the value of the direction property"[1,2].
We support this for bidi content in horizontal writing mode; however, in vertical modes we seem to ignore unicode-bidi:plaintext, and the element's 'direction' property continues to be used.
Testcases coming....
[1] https://developer.mozilla.org/en/docs/Web/CSS/unicode-bidi#Values
[2] https://drafts.csswg.org/css-writing-modes-3/#valdef-unicode-bidi-plaintext
Assignee | ||
Comment 1•8 years ago
|
||
Here are some reftests for this; 4 of the 6 testcases currently fail, because of unicode-bidi:plaintext being ignored. (The other two are just sanity-tests to check that explicitly setting the direction has the expected effect.)
Attachment #8791211 -
Flags: review?(dholbert)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•8 years ago
|
||
In nsIFrame::GetWritingMode, we have a special case to handle unicode-bidi:plaintext, but this is used only for horizontal writing mode:
https://dxr.mozilla.org/mozilla-central/rev/82d0a583a9a39bf0b0000bccbf6d5c9ec2596bcc/layout/generic/nsFrame.cpp#1118-1122
I can't see any good reason for this restriction, so I'm going to try simply removing it and see what breaks.......
Assignee | ||
Comment 3•8 years ago
|
||
AFAICS, there's no good reason for this limitation. I think it dates from the early days of writing-mode support, when we didn't implement bidi reordering for vertical modes, but that's no longer the case. Try run, to check for unexpected side-effects: https://treeherder.mozilla.org/#/jobs?repo=try&revision=76cd41615fe3.
Attachment #8791219 -
Flags: review?(dholbert)
Comment 4•8 years ago
|
||
Comment on attachment 8791211 [details] [diff] [review]
Add reftests for unicode-bidi:plaintext in vertical writing mode
Review of attachment 8791211 [details] [diff] [review]:
-----------------------------------------------------------------
r=me on the tests, with one typo (I think) fixed
::: layout/reftests/writing-mode/1302734-bidi-plaintext-2d.html
@@ +8,5 @@
> + writing-mode: vertical-rl;
> +}
> +</style>
> +<!-- unicode-bidi:plaintext should resolve to LTR, ignoring the direction property -->
> +<div style="direction:ltr; unicode-bidi:plaintext;">‏x</div>
Nit: in the comment here, I believe you meant to say RTL (not LTR).
Attachment #8791211 -
Flags: review?(dholbert) → review+
Comment 5•8 years ago
|
||
Comment on attachment 8791219 [details] [diff] [review]
Don't restrict unicode-bidi:plaintext support to horizontal writing mode
Review of attachment 8791219 [details] [diff] [review]:
-----------------------------------------------------------------
r=me
Attachment #8791219 -
Flags: review?(dholbert) → review+
Assignee | ||
Comment 6•8 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #4)
> Nit: in the comment here, I believe you meant to say RTL (not LTR).
Indeed, thanks for catching!
Assignee | ||
Comment 7•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1aff840555e1a2a05accb90eee2739a75fb7b9b0
Bug 1302734 - Add reftests for unicode-bidi:plaintext in vertical writing mode. r=dholbert
https://hg.mozilla.org/integration/mozilla-inbound/rev/726bf8b82211f088f64a750edf7cfc4a7199f162
Bug 1302734 - Don't restrict unicode-bidi:plaintext support to horizontal writing mode. r=dholbert
Comment 8•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1aff840555e1
https://hg.mozilla.org/mozilla-central/rev/726bf8b82211
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Updated•8 years ago
|
Keywords: dev-doc-needed
Comment 9•8 years ago
|
||
Added a note in the support table of
https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi#Browser_compatibility
and in
https://developer.mozilla.org/en-US/Firefox/Releases/51#CSS
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•