From 126ec5c4084a8b661091742ed9e9a0c03793fcf2 Mon Sep 17 00:00:00 2001 From: Miyoung Shin Date: Wed, 10 Mar 2021 22:18:21 -0800 Subject: [PATCH] Fix the wrong directionality of slots After the CL that introduced the cache of the directionality of the element at https://crrev.com/c/2666349, Slots have a wrong directionality, and this CL supplements additionally as follows: - Resolve the directionality and propagate it to descendant if the slot element or it's parent has dir=auto - Propagate the directionality to the assigned nodes if the slot element has a valid dir attribute - Resolve the directionality if the assigned node or its parent have dir=auto - Resolve the directionality when the assigned node is a text node Bug: 1185781 Change-Id: I9c3bba672f3c9580a1c687539cb3215b0f4f2f66 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2744562 Commit-Queue: Miyoung Shin Reviewed-by: Mason Freed Reviewed-by: Rune Lillesveen Cr-Commit-Position: refs/heads/master@{#861868} --- .../dir-slots-directionality.tentative.html | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 html/dom/elements/global-attributes/dir-slots-directionality.tentative.html diff --git a/html/dom/elements/global-attributes/dir-slots-directionality.tentative.html b/html/dom/elements/global-attributes/dir-slots-directionality.tentative.html new file mode 100644 index 00000000000000..851fd2edba7398 --- /dev/null +++ b/html/dom/elements/global-attributes/dir-slots-directionality.tentative.html @@ -0,0 +1,38 @@ + +HTML Test: dir=auto|rtl with slots, and direction should be RTL + + + + + + +
+
+ +
اختبر
+
+