From 2e75ecf411ff1bd58d4b2d8da1b0cfaa01498c6d Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Wed, 25 Oct 2023 09:30:04 -0400 Subject: [PATCH 1/3] Revert recent changes to rendering of . This reverts recent changes to the rendering section for the slot element that I made recently in 1dc4c7557f5a4c879c1ce65b9cb59b91310bbf5 (PR #9796, fixing #3699). These changes had specified that all slot elements, even those without a dir attribute, specify the direction and unicode-bidi properties. When I attempted to implement these changes, I discovered that they broke a significant number of web-platform-tests, due to a pattern that makes me suspect they would pose a compatibility problem. In particular, specifying the CSS direction property for all slot elements breaks inheritance of CSS direction into slotted elements, including those in user-agent shadow DOM. (This makes a clearly visible change when elements are implemented in terms of user-agent shadow DOM, which probably is not intended.) While I realize that the recommended practice is to specify the HTML dir attribute rather than the CSS direction property, I believe the CSS direction property is used enough that this is not acceptable. (https://chromestatus.com/metrics/css/timeline/popularity/3 says the property is used on around 40% of page loads. While the number of interesting uses is probably substantially lower, it's also probably still significant.) --- source | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source b/source index 7289a9999c8..658c1931e86 100644 --- a/source +++ b/source @@ -130240,16 +130240,15 @@ br[clear=all i], br[clear=both i] { clear: both; }
@namespace "http://www.w3.org/1999/xhtml";
 
-[dir]:dir(ltr), slot:dir(ltr), bdi:dir(ltr), input[type=tel i]:dir(ltr) { direction: ltr; }
-[dir]:dir(rtl), slot:dir(rtl), bdi:dir(rtl) { direction: rtl; }
+[dir]:dir(ltr), bdi:dir(ltr), input[type=tel i]:dir(ltr) { direction: ltr; }
+[dir]:dir(rtl), bdi:dir(rtl) { direction: rtl; }
 
 address, blockquote, center, div, figure, figcaption, footer, form, header, hr,
 legend, listing, main, p, plaintext, pre, summary, xmp, article, aside, h1, h2,
 h3, h4, h5, h6, hgroup, nav, section, search, table, caption, colgroup, col,
 thead, tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu, ol, ul, li, bdi, output,
-slot, [dir=ltr i], [dir=rtl i], [dir=auto i] {
-  unicode-bidi: isolate; 
+[dir=ltr i], [dir=rtl i], [dir=auto i] {
+  unicode-bidi: isolate; 
 }
 
 bdo, bdo[dir] { unicode-bidi: isolate-override; } 

From 632d29ee3dac219d582831a484c512d7a164b16b Mon Sep 17 00:00:00 2001
From: "L. David Baron" 
Date: Thu, 26 Oct 2023 09:31:24 -0400
Subject: [PATCH 2/3] Make corresponding changes to slot directionality.

---
 source | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/source b/source
index 658c1931e86..f9f2928c106 100644
--- a/source
+++ b/source
@@ -13685,7 +13685,8 @@ Transport Protocol">HTTP</abbr> today.</p>