mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
layout: Add initial support for bidirectional text (BiDi) (#33148)
This adds supports for right-to-left text assigning bidi levels to all line items when necessary. This includes support for the `dir` attribute as well as corresponding CSS properties like `unicode-bidi`. It only implements right-to-left rendering for inline layout at the moment and doesn't include support for `dir=auto`. Because of missing features, this causes quite a few tests to start failing, as references become incorrect due to right-to-left rendering being active in some cases, but not others (before it didn't exist at all). Analysis of most of the new failures: ``` - /css/css-flexbox/gap-001-rtl.html /css/css-flexbox/gap-004-rtl.html - Require implementing BiDi in Flexbox, because the start and end inline margins are opposite the order of items. - /css/CSS2/bidi-text/direction-applies-to-*.xht /css/CSS2/bidi-text/direction-applies-to-002.xht /css/CSS2/bidi-text/direction-applies-to-003.xht /css/CSS2/bidi-text/direction-applies-to-004.xht - Broken due to a bug in tables, not allocating the right amount of width for a column. - /css/css-lists/inline-list.html - This fails because we wrongly insert a soft wrap opportunity between the start of an inline box and its first content. - /css/css-text/bidi/bidi-lines-001.html /css/css-text/bidi/bidi-lines-002.html /css/CSS2/text/bidi-flag-emoji.html - We do not fully support unicode-bidi: plaintext - /css/css-text/text-align/text-align-end-010.html /css/css-text/text-align/text-align-justify-006.html /css/css-text/text-align/text-align-start-010.html /html/dom/elements/global-attributes/* - We do not support dir=auto yet. - /css/css-text/white-space/tab-bidi-001.html - Servo doesn't support tab stops - /css/CSS2/positioning/abspos-block-level-001.html /css/css-text/word-break/word-break-normal-ar-000.html - Do not yet support RTL layout in block - /css/css-text/white-space/pre-wrap-018.html - Even in RTL contexts, spaces at the end of the line must hang and not be reordered - /css/css-text/white-space/trailing-space-and-text-alignment-rtl-002.html - We are letting spaces hang with white-space: pre, but they shouldn't hang. ``` Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
This commit is contained in:
parent
65bd5a3b99
commit
56280c6242
189 changed files with 547 additions and 762 deletions
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-EN-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-EN-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-EN-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-EN-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-EN-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-EN-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-N-EN-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-N-EN-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-N-EN-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-N-EN-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-N-EN-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-N-EN-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-N-EN.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-N-EN.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-N-EN.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-N-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-N-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-N-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-N-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-N-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-N-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-contained-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-contained-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-bdi-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-bdi-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-contained-bdi-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-bdi-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-bdi-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-contained-bdi-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-dir-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-dir-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-contained-dir-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-dir-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-dir-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-contained-dir-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-contained-dir_auto-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-contained-dir_auto-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-script-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-script-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-contained-script-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-script-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-script-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-contained-script-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-style-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-style-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-contained-style-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-style-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-style-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-contained-style-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-textarea-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-textarea-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-contained-textarea-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-textarea-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-contained-textarea-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-contained-textarea-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-EN-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-EN-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-EN-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-EN-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-EN-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-EN-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-N-EN-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-N-EN-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-N-EN-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-N-EN-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-N-EN-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-N-EN-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-N-EN.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-N-EN.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-N-EN.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-N-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-N-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-N-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-N-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-N-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-N-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-EN-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-EN-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-script-EN-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-EN-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-EN-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-script-EN-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-script-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-script-N-EN-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-script-N-EN-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-N-EN.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-N-EN.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-script-N-EN.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-N-L.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-N-L.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-script-N-L.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-N-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-N-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-script-N-R.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-R.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-input-script-R.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-input-script-R.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir_auto-isolate.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-pre-N-EN.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-pre-N-EN.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-pre-N-EN.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-textarea-N-EN.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-textarea-N-EN.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-textarea-N-EN.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-textarea-script-N-EN.html.ini
vendored
Normal file
2
tests/wpt/meta/html/dom/elements/global-attributes/dir_auto-textarea-script-N-EN.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dir_auto-textarea-script-N-EN.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-001a.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-001b.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-001c.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-002a.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-002c.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-004a.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-004b.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-004c.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-005a.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-005b.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-005c.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-006a.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-006c.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-008a.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-008b.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-008c.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-009a.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-009b.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[dir-isolation-009c.html]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue