From 565b3f75501f5d443a9b8880d4bda7b8b720686e Mon Sep 17 00:00:00 2001 From: Miyoung Shin Date: Wed, 19 Jan 2022 23:50:04 -0800 Subject: [PATCH] Resolve a slot element's directionality from the flattened tree This CL applies the new agreements for a 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] https://github.com/whatwg/html/issues/7299 [2] https://github.com/whatwg/html/issues/3699#issuecomment-988890095 [3] https://github.com/web-platform-tests/wpt/pull/29820 Bug: 1236384 Change-Id: I43ca7351fc4d65dd4f72fe4f9627ffa5382e5c20 --- .../global-attributes/dir-slots-directionality.tentative.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/dom/elements/global-attributes/dir-slots-directionality.tentative.html b/html/dom/elements/global-attributes/dir-slots-directionality.tentative.html index 1f0dc07f8ef5c1..851fd2edba7398 100644 --- a/html/dom/elements/global-attributes/dir-slots-directionality.tentative.html +++ b/html/dom/elements/global-attributes/dir-slots-directionality.tentative.html @@ -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');