From 630cec1bf72957298ec4cd1bce49b4f305335195 Mon Sep 17 00:00:00 2001 From: Miyoung Shin Date: Thu, 16 Dec 2021 07:22:06 -0800 Subject: [PATCH] Resolve a slot element's directionality from the flattened tree This CL applies the new agreements for a elelement 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');