Skip to content

Commit

Permalink
Resolve a slot element's directionality from the flattened tree
Browse files Browse the repository at this point in the history
This CL applies the new agreements for a <slot> element on the
standards meeting[1][2].
 - Resolve the slot element's directionality from the flattened tree
 - Apply one exception that the slot element's directionality should
   be the same as a shadow host's directionality if the slot element
   has a dir=auto attribute and has no slotted content.

This CL adds the unit tests on blink and WPT tests will be added on [3].

[1] whatwg/html#7299
[2] whatwg/html#3699 (comment)
[3] #29820

Bug: 1236384
Change-Id: I43ca7351fc4d65dd4f72fe4f9627ffa5382e5c20
  • Loading branch information
MyidShin authored and chromium-wpt-export-bot committed Jan 20, 2022
1 parent ee6da9d commit 1dacbe0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
test(() => {
assert_equals(getComputedStyle(host1.firstChild).direction, "rtl");
assert_equals(getComputedStyle(root2.querySelector("span")).direction, "rtl");
assert_equals(getComputedStyle(host3).direction, "ltr");
assert_equals(getComputedStyle(host3).direction, "rtl");
assert_equals(getComputedStyle(root4.querySelector("span")).direction, "rtl");
assert_equals(getComputedStyle(root5.querySelector("span")).direction, "rtl");
}, 'Slots: Directionality');
Expand Down

0 comments on commit 1dacbe0

Please sign in to comment.