-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert recent changes to rendering of <slot>, and some of the corresponding changes to its directionality and language #9880
Conversation
This reverts recent changes to the rendering section for the slot element that I made recently in 1dc4c7557f5a4c879c1ce65b9cb59b91310bbf5 (PR whatwg#9796, fixing whatwg#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.)
I'm interested in feedback from @fantasai on this, since:
For what it's worth, see: the list of WPT tests that were broken by the change
the list of Chromium-internal web tests that were broken by the change
|
This reverts commit 198d41cfd6eac5fd9ee34e6314e34f938b6d31b5. Reason for revert: This reverts a change that was the first of two closely related changes. Given that the other change, in https://crrev.com/c/4973701, turned out to have problems (and I haven't attempted to land it), I've proposed reverting both in the HTML spec at whatwg/html#9880. I'm therefore reverting this (the first half) until the HTML spec discussion is sorted out. Original change's description: > Give <slot> element default unicode-bidi: isolate style. > > This is behind the RuntimeEnabledFeatures::CSSPseudoDirEnabled() flag. > > This implements a part of the behavior described in: > whatwg/html#3699 (comment) > which has been specified in: > whatwg/html#9554 > whatwg/html#9796 > > Bug: 576815 > Change-Id: Ice471838c7251fc69d87abfa723f3eef1a4c455a > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4800075 > Reviewed-by: Chris Harrelson <chrishtr@chromium.org> > Reviewed-by: Di Zhang <dizhangg@chromium.org> > Commit-Queue: David Baron <dbaron@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1214439} Bug: 576815 Change-Id: I0f52b30c345d4962a36a36e5d2651221db96bcde No-Presubmit: true No-Tree-Checks: true No-Try: true
The |
This reverts commit 198d41c. Reason for revert: This reverts a change that was the first of two closely related changes. Given that the other change, in https://crrev.com/c/4973701, turned out to have problems (and I haven't attempted to land it), I've proposed reverting both in the HTML spec at whatwg/html#9880. I'm therefore reverting this (the first half) until the HTML spec discussion is sorted out. Original change's description: > Give <slot> element default unicode-bidi: isolate style. > > This is behind the RuntimeEnabledFeatures::CSSPseudoDirEnabled() flag. > > This implements a part of the behavior described in: > whatwg/html#3699 (comment) > which has been specified in: > whatwg/html#9554 > whatwg/html#9796 > > Bug: 576815 > Change-Id: Ice471838c7251fc69d87abfa723f3eef1a4c455a > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4800075 > Reviewed-by: Chris Harrelson <chrishtr@chromium.org> > Reviewed-by: Di Zhang <dizhangg@chromium.org> > Commit-Queue: David Baron <dbaron@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1214439} Bug: 576815 Change-Id: I0f52b30c345d4962a36a36e5d2651221db96bcde No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4974023 Reviewed-by: Philip Rogers <pdr@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: David Baron <dbaron@chromium.org> Commit-Queue: Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1215009}
This reverts commit 198d41cfd6eac5fd9ee34e6314e34f938b6d31b5. Reason for revert: This reverts a change that was the first of two closely related changes. Given that the other change, in https://crrev.com/c/4973701, turned out to have problems (and I haven't attempted to land it), I've proposed reverting both in the HTML spec at whatwg/html#9880. I'm therefore reverting this (the first half) until the HTML spec discussion is sorted out. Original change's description: > Give <slot> element default unicode-bidi: isolate style. > > This is behind the RuntimeEnabledFeatures::CSSPseudoDirEnabled() flag. > > This implements a part of the behavior described in: > whatwg/html#3699 (comment) > which has been specified in: > whatwg/html#9554 > whatwg/html#9796 > > Bug: 576815 > Change-Id: Ice471838c7251fc69d87abfa723f3eef1a4c455a > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4800075 > Reviewed-by: Chris Harrelson <chrishtr@chromium.org> > Reviewed-by: Di Zhang <dizhangg@chromium.org> > Commit-Queue: David Baron <dbaron@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1214439} Bug: 576815 Change-Id: I0f52b30c345d4962a36a36e5d2651221db96bcde No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4974023 Reviewed-by: Philip Rogers <pdr@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: David Baron <dbaron@chromium.org> Commit-Queue: Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1215009}
This reverts commit 198d41cfd6eac5fd9ee34e6314e34f938b6d31b5. Reason for revert: This reverts a change that was the first of two closely related changes. Given that the other change, in https://crrev.com/c/4973701, turned out to have problems (and I haven't attempted to land it), I've proposed reverting both in the HTML spec at whatwg/html#9880. I'm therefore reverting this (the first half) until the HTML spec discussion is sorted out. Original change's description: > Give <slot> element default unicode-bidi: isolate style. > > This is behind the RuntimeEnabledFeatures::CSSPseudoDirEnabled() flag. > > This implements a part of the behavior described in: > whatwg/html#3699 (comment) > which has been specified in: > whatwg/html#9554 > whatwg/html#9796 > > Bug: 576815 > Change-Id: Ice471838c7251fc69d87abfa723f3eef1a4c455a > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4800075 > Reviewed-by: Chris Harrelson <chrishtr@chromium.org> > Reviewed-by: Di Zhang <dizhangg@chromium.org> > Commit-Queue: David Baron <dbaron@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1214439} Bug: 576815 Change-Id: I0f52b30c345d4962a36a36e5d2651221db96bcde No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4974023 Reviewed-by: Philip Rogers <pdr@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: David Baron <dbaron@chromium.org> Commit-Queue: Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1215009}
So if we're going to remove those rules, should we just remove what I've removed here, remove less (i.e., leave the I think this change just breaks uses of the CSS Also, I checked what that 40% usage number comes from and it (a) doesn't include UA sheets and (b) doesn't include the mapping of HTML presentational attributes. However, I think it probably does count the two internal uses of CSS |
Leaving The downside to removing this is that any use of If your primary concern is UA shadow DOM, for example, we could unset the |
I don't think my primary concern is UA shadow DOM -- I think it's just that UA shadow DOM is much more visible in terms of what I see in web-platform-tests and in Chrome's Web tests. I think it's an issue for any uses of shadow DOM combined with the CSS I'm inclined to remove the use of So it sounds like the additional change I should make here is to remove slot inheriting direction from the shadow root. I'm having trouble thinking of good use cases for |
So in terms of reverting additional pieces:
|
Er, regarding the third point, I think I have to change the rule that
For now I think I'm going to prepare a change that does the first, but I'm certainly open to opinions on this. |
…lot> elements. This changes the way <slot> elements inherit the HTML concepts of direction and language to inherit from their parent, rather than from their shadow root's host. This matches the changes that I'm proposing in: whatwg/html#9880 These changes are all behind flags that are slated to ship in M120: CSSPseudoDir for the direction changes and HTMLLangNewInheritance for the language changes. Bug: 576815, 1490711 Change-Id: I152d8e21e24e77c9359744019b3ab875c2a21727
I also added the change to language inheritance, to keep language inheritance matching directionality inheritance. |
…lot> elements. This changes the way <slot> elements inherit the HTML concepts of direction and language to inherit from their parent, rather than from their shadow root's host. This matches the changes that I'm proposing in: whatwg/html#9880 These changes are all behind flags that are slated to ship in M120: CSSPseudoDir for the direction changes and HTMLLangNewInheritance for the language changes. Bug: 576815, 1490711 Change-Id: I152d8e21e24e77c9359744019b3ab875c2a21727 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4984312 Reviewed-by: Di Zhang <dizhangg@chromium.org> Commit-Queue: David Baron <dbaron@chromium.org> Cr-Commit-Position: refs/heads/main@{#1216286}
…lot> elements. This changes the way <slot> elements inherit the HTML concepts of direction and language to inherit from their parent, rather than from their shadow root's host. This matches the changes that I'm proposing in: whatwg/html#9880 These changes are all behind flags that are slated to ship in M120: CSSPseudoDir for the direction changes and HTMLLangNewInheritance for the language changes. Bug: 576815, 1490711 Change-Id: I152d8e21e24e77c9359744019b3ab875c2a21727 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4984312 Reviewed-by: Di Zhang <dizhangg@chromium.org> Commit-Queue: David Baron <dbaron@chromium.org> Cr-Commit-Position: refs/heads/main@{#1216286}
FYI, what's in the current state of this PR is what I'm currently planning will ship in Chrome 120 (which branches today). That's because my plan is to ship the :dir() pseudo and the changes in #9554 and #9796 in M120, and (as described above) I didn't think this one piece of the changes in #9796 was something we could ship, and I wanted to omit a coherent piece of it (reflected in the current state of this PR) and ship the rest. This is (within reason) changeable in the future if the changes are worthwhile, but I wanted to add a note here so that others knew that it's currently on track to ship. |
…lot> elements. (#42811) This changes the way <slot> elements inherit the HTML concepts of direction and language to inherit from their parent, rather than from their shadow root's host. This matches the changes that I'm proposing in: whatwg/html#9880 These changes are all behind flags that are slated to ship in M120: CSSPseudoDir for the direction changes and HTMLLangNewInheritance for the language changes. Bug: 576815, 1490711 Change-Id: I152d8e21e24e77c9359744019b3ab875c2a21727 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4984312 Reviewed-by: Di Zhang <dizhangg@chromium.org> Commit-Queue: David Baron <dbaron@chromium.org> Cr-Commit-Position: refs/heads/main@{#1216286} Co-authored-by: L. David Baron <dbaron@chromium.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r+ on the lang
-related part of this at https://github.com/web-platform-tests/wpt/pull/42811/files#diff-3e68420ba9732782c4a09ec7119cd7556e9d1aedef5f2bc98f8d7ef92322a4ab — based on having had written (yesterday) and tested a WebKit patch which implemented that lang
part of the spec change that’s being reverted in this PR…
I'm still trying to understand all the ways this would break "This is in order to preserve (by default) the flow of directionality through the light DOM, which would otherwise be interrupted by directionality settings in the shadow DOM". Not saying whether the change is good or bad, just trying to think of the behavior. |
…direction and language for <slot> elements., a=testonly Automatic update from web-platform-tests Revert recent changes to inheritance of direction and language for <slot> elements. (#42811) This changes the way <slot> elements inherit the HTML concepts of direction and language to inherit from their parent, rather than from their shadow root's host. This matches the changes that I'm proposing in: whatwg/html#9880 These changes are all behind flags that are slated to ship in M120: CSSPseudoDir for the direction changes and HTMLLangNewInheritance for the language changes. Bug: 576815, 1490711 Change-Id: I152d8e21e24e77c9359744019b3ab875c2a21727 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4984312 Reviewed-by: Di Zhang <dizhangg@chromium.org> Commit-Queue: David Baron <dbaron@chromium.org> Cr-Commit-Position: refs/heads/main@{#1216286} Co-authored-by: L. David Baron <dbaron@chromium.org> -- wpt-commits: e873a33f5a8564beb3864cb779e0c774aa4816c7 wpt-pr: 42811
…direction and language for <slot> elements., a=testonly Automatic update from web-platform-tests Revert recent changes to inheritance of direction and language for <slot> elements. (#42811) This changes the way <slot> elements inherit the HTML concepts of direction and language to inherit from their parent, rather than from their shadow root's host. This matches the changes that I'm proposing in: whatwg/html#9880 These changes are all behind flags that are slated to ship in M120: CSSPseudoDir for the direction changes and HTMLLangNewInheritance for the language changes. Bug: 576815, 1490711 Change-Id: I152d8e21e24e77c9359744019b3ab875c2a21727 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4984312 Reviewed-by: Di Zhang <dizhanggchromium.org> Commit-Queue: David Baron <dbaronchromium.org> Cr-Commit-Position: refs/heads/main{#1216286} Co-authored-by: L. David Baron <dbaronchromium.org> -- wpt-commits: e873a33f5a8564beb3864cb779e0c774aa4816c7 wpt-pr: 42811 UltraBlame original commit: 741c58ae49f75723489b635e662f1fa8caf9a341
…direction and language for <slot> elements., a=testonly Automatic update from web-platform-tests Revert recent changes to inheritance of direction and language for <slot> elements. (#42811) This changes the way <slot> elements inherit the HTML concepts of direction and language to inherit from their parent, rather than from their shadow root's host. This matches the changes that I'm proposing in: whatwg/html#9880 These changes are all behind flags that are slated to ship in M120: CSSPseudoDir for the direction changes and HTMLLangNewInheritance for the language changes. Bug: 576815, 1490711 Change-Id: I152d8e21e24e77c9359744019b3ab875c2a21727 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4984312 Reviewed-by: Di Zhang <dizhanggchromium.org> Commit-Queue: David Baron <dbaronchromium.org> Cr-Commit-Position: refs/heads/main{#1216286} Co-authored-by: L. David Baron <dbaronchromium.org> -- wpt-commits: e873a33f5a8564beb3864cb779e0c774aa4816c7 wpt-pr: 42811 UltraBlame original commit: 741c58ae49f75723489b635e662f1fa8caf9a341
…direction and language for <slot> elements., a=testonly Automatic update from web-platform-tests Revert recent changes to inheritance of direction and language for <slot> elements. (#42811) This changes the way <slot> elements inherit the HTML concepts of direction and language to inherit from their parent, rather than from their shadow root's host. This matches the changes that I'm proposing in: whatwg/html#9880 These changes are all behind flags that are slated to ship in M120: CSSPseudoDir for the direction changes and HTMLLangNewInheritance for the language changes. Bug: 576815, 1490711 Change-Id: I152d8e21e24e77c9359744019b3ab875c2a21727 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4984312 Reviewed-by: Di Zhang <dizhanggchromium.org> Commit-Queue: David Baron <dbaronchromium.org> Cr-Commit-Position: refs/heads/main{#1216286} Co-authored-by: L. David Baron <dbaronchromium.org> -- wpt-commits: e873a33f5a8564beb3864cb779e0c774aa4816c7 wpt-pr: 42811 UltraBlame original commit: 741c58ae49f75723489b635e662f1fa8caf9a341
…direction and language for <slot> elements., a=testonly Automatic update from web-platform-tests Revert recent changes to inheritance of direction and language for <slot> elements. (#42811) This changes the way <slot> elements inherit the HTML concepts of direction and language to inherit from their parent, rather than from their shadow root's host. This matches the changes that I'm proposing in: whatwg/html#9880 These changes are all behind flags that are slated to ship in M120: CSSPseudoDir for the direction changes and HTMLLangNewInheritance for the language changes. Bug: 576815, 1490711 Change-Id: I152d8e21e24e77c9359744019b3ab875c2a21727 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4984312 Reviewed-by: Di Zhang <dizhangg@chromium.org> Commit-Queue: David Baron <dbaron@chromium.org> Cr-Commit-Position: refs/heads/main@{#1216286} Co-authored-by: L. David Baron <dbaron@chromium.org> -- wpt-commits: e873a33f5a8564beb3864cb779e0c774aa4816c7 wpt-pr: 42811
…direction and language for <slot> elements., a=testonly Automatic update from web-platform-tests Revert recent changes to inheritance of direction and language for <slot> elements. (#42811) This changes the way <slot> elements inherit the HTML concepts of direction and language to inherit from their parent, rather than from their shadow root's host. This matches the changes that I'm proposing in: whatwg/html#9880 These changes are all behind flags that are slated to ship in M120: CSSPseudoDir for the direction changes and HTMLLangNewInheritance for the language changes. Bug: 576815, 1490711 Change-Id: I152d8e21e24e77c9359744019b3ab875c2a21727 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4984312 Reviewed-by: Di Zhang <dizhangg@chromium.org> Commit-Queue: David Baron <dbaron@chromium.org> Cr-Commit-Position: refs/heads/main@{#1216286} Co-authored-by: L. David Baron <dbaron@chromium.org> -- wpt-commits: e873a33f5a8564beb3864cb779e0c774aa4816c7 wpt-pr: 42811
…direction and language for <slot> elements., a=testonly Automatic update from web-platform-tests Revert recent changes to inheritance of direction and language for <slot> elements. (#42811) This changes the way <slot> elements inherit the HTML concepts of direction and language to inherit from their parent, rather than from their shadow root's host. This matches the changes that I'm proposing in: whatwg/html#9880 These changes are all behind flags that are slated to ship in M120: CSSPseudoDir for the direction changes and HTMLLangNewInheritance for the language changes. Bug: 576815, 1490711 Change-Id: I152d8e21e24e77c9359744019b3ab875c2a21727 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4984312 Reviewed-by: Di Zhang <dizhanggchromium.org> Commit-Queue: David Baron <dbaronchromium.org> Cr-Commit-Position: refs/heads/main{#1216286} Co-authored-by: L. David Baron <dbaronchromium.org> -- wpt-commits: e873a33f5a8564beb3864cb779e0c774aa4816c7 wpt-pr: 42811 UltraBlame original commit: 7b03de6bdb3af4238f001a4b2d9016c2add83044
…direction and language for <slot> elements., a=testonly Automatic update from web-platform-tests Revert recent changes to inheritance of direction and language for <slot> elements. (#42811) This changes the way <slot> elements inherit the HTML concepts of direction and language to inherit from their parent, rather than from their shadow root's host. This matches the changes that I'm proposing in: whatwg/html#9880 These changes are all behind flags that are slated to ship in M120: CSSPseudoDir for the direction changes and HTMLLangNewInheritance for the language changes. Bug: 576815, 1490711 Change-Id: I152d8e21e24e77c9359744019b3ab875c2a21727 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4984312 Reviewed-by: Di Zhang <dizhanggchromium.org> Commit-Queue: David Baron <dbaronchromium.org> Cr-Commit-Position: refs/heads/main{#1216286} Co-authored-by: L. David Baron <dbaronchromium.org> -- wpt-commits: e873a33f5a8564beb3864cb779e0c774aa4816c7 wpt-pr: 42811 UltraBlame original commit: 7b03de6bdb3af4238f001a4b2d9016c2add83044
…direction and language for <slot> elements., a=testonly Automatic update from web-platform-tests Revert recent changes to inheritance of direction and language for <slot> elements. (#42811) This changes the way <slot> elements inherit the HTML concepts of direction and language to inherit from their parent, rather than from their shadow root's host. This matches the changes that I'm proposing in: whatwg/html#9880 These changes are all behind flags that are slated to ship in M120: CSSPseudoDir for the direction changes and HTMLLangNewInheritance for the language changes. Bug: 576815, 1490711 Change-Id: I152d8e21e24e77c9359744019b3ab875c2a21727 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4984312 Reviewed-by: Di Zhang <dizhanggchromium.org> Commit-Queue: David Baron <dbaronchromium.org> Cr-Commit-Position: refs/heads/main{#1216286} Co-authored-by: L. David Baron <dbaronchromium.org> -- wpt-commits: e873a33f5a8564beb3864cb779e0c774aa4816c7 wpt-pr: 42811 UltraBlame original commit: 7b03de6bdb3af4238f001a4b2d9016c2add83044
Do we have any data about dir or direction usage in shadow DOM currently? |
I don't. Though my concern here (that led me to want to revert this) is that an element that uses shadow DOM would break the result of setting CSS |
It seems to me you might well specify |
@dbaron Is it an option to just remove the That'd keep the right DOM / I might have misunderstood something tho. |
I guess that'd end up with |
Regarding @annevk's comment:
My intuition is that somebody just trying this would likely stop and think "I wonder if this is also going to affect the light DOM that's slotted into the slots". That said, some people with that thought might consult documentation (in which case recommending against it would help) and some may instead answer the question by testing (where the thing they use to test might be either HTML directionality or CSS directionality, and where documentation wouldn't help). (I also don't think there's a perfect answer here, but I think the approach that I recently landed into the spec that I'm proposing to revert here has too much risk of both current and future compatibility problems. By future compatibility problems, I mean that it means that we're introducing a new compatibility risk that could be an obstacle to converting any existing element to being implemented in terms of Shadow DOM.) Regarding @emilio's comment -- I think it sounds like Emilio answered his own question, but let me know if there's something you still want me (or someone else) to answer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that's fair. I don't really see a good alternative either.
I do think new implementation bugs are needed as the existing ones are resolved.
I filed new implementation bugs for WebKit and Gecko and updated the initial comment. (That was an oversight in #9796!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I can live with this, although this feels a bit unfortunate
These tests are based on the tests previously in https://crrev.com/c/4800075 and https://crrev.com/c/4973701, but are revised to reflect that the HTML spec changes that those changes were implementing have been reverted in whatwg/html#9880 Bug: 576815 Change-Id: Id4536cb39691c2d234113f891f96d7100c7eeea4
These tests are based on the tests previously in https://crrev.com/c/4800075 and https://crrev.com/c/4973701, but are revised to reflect that the HTML spec changes that those changes were implementing have been reverted in whatwg/html#9880 Bug: 576815 Change-Id: Id4536cb39691c2d234113f891f96d7100c7eeea4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5233352 Reviewed-by: Di Zhang <dizhangg@chromium.org> Auto-Submit: David Baron <dbaron@chromium.org> Commit-Queue: Di Zhang <dizhangg@chromium.org> Cr-Commit-Position: refs/heads/main@{#1251783}
These tests are based on the tests previously in https://crrev.com/c/4800075 and https://crrev.com/c/4973701, but are revised to reflect that the HTML spec changes that those changes were implementing have been reverted in whatwg/html#9880 Bug: 576815 Change-Id: Id4536cb39691c2d234113f891f96d7100c7eeea4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5233352 Reviewed-by: Di Zhang <dizhangg@chromium.org> Auto-Submit: David Baron <dbaron@chromium.org> Commit-Queue: Di Zhang <dizhangg@chromium.org> Cr-Commit-Position: refs/heads/main@{#1251783}
These tests are based on the tests previously in https://crrev.com/c/4800075 and https://crrev.com/c/4973701, but are revised to reflect that the HTML spec changes that those changes were implementing have been reverted in whatwg/html#9880 Bug: 576815 Change-Id: Id4536cb39691c2d234113f891f96d7100c7eeea4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5233352 Reviewed-by: Di Zhang <dizhangg@chromium.org> Auto-Submit: David Baron <dbaron@chromium.org> Commit-Queue: Di Zhang <dizhangg@chromium.org> Cr-Commit-Position: refs/heads/main@{#1251783}
…on behavior of <slot> element., a=testonly Automatic update from web-platform-tests Add tests for direction and bidi isolation behavior of <slot> element. These tests are based on the tests previously in https://crrev.com/c/4800075 and https://crrev.com/c/4973701, but are revised to reflect that the HTML spec changes that those changes were implementing have been reverted in whatwg/html#9880 Bug: 576815 Change-Id: Id4536cb39691c2d234113f891f96d7100c7eeea4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5233352 Reviewed-by: Di Zhang <dizhangg@chromium.org> Auto-Submit: David Baron <dbaron@chromium.org> Commit-Queue: Di Zhang <dizhangg@chromium.org> Cr-Commit-Position: refs/heads/main@{#1251783} -- wpt-commits: 41bbcfcc813d99401ca0cacfa392c87d6f18ffca wpt-pr: 44178
…on behavior of <slot> element., a=testonly Automatic update from web-platform-tests Add tests for direction and bidi isolation behavior of <slot> element. These tests are based on the tests previously in https://crrev.com/c/4800075 and https://crrev.com/c/4973701, but are revised to reflect that the HTML spec changes that those changes were implementing have been reverted in whatwg/html#9880 Bug: 576815 Change-Id: Id4536cb39691c2d234113f891f96d7100c7eeea4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5233352 Reviewed-by: Di Zhang <dizhangg@chromium.org> Auto-Submit: David Baron <dbaron@chromium.org> Commit-Queue: Di Zhang <dizhangg@chromium.org> Cr-Commit-Position: refs/heads/main@{#1251783} -- wpt-commits: 41bbcfcc813d99401ca0cacfa392c87d6f18ffca wpt-pr: 44178
…on behavior of <slot> element., a=testonly Automatic update from web-platform-tests Add tests for direction and bidi isolation behavior of <slot> element. These tests are based on the tests previously in https://crrev.com/c/4800075 and https://crrev.com/c/4973701, but are revised to reflect that the HTML spec changes that those changes were implementing have been reverted in whatwg/html#9880 Bug: 576815 Change-Id: Id4536cb39691c2d234113f891f96d7100c7eeea4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5233352 Reviewed-by: Di Zhang <dizhanggchromium.org> Auto-Submit: David Baron <dbaronchromium.org> Commit-Queue: Di Zhang <dizhanggchromium.org> Cr-Commit-Position: refs/heads/main{#1251783} -- wpt-commits: 41bbcfcc813d99401ca0cacfa392c87d6f18ffca wpt-pr: 44178 UltraBlame original commit: 6dc79c28daa8bf6d48215692303e1097aa118baa
…on behavior of <slot> element., a=testonly Automatic update from web-platform-tests Add tests for direction and bidi isolation behavior of <slot> element. These tests are based on the tests previously in https://crrev.com/c/4800075 and https://crrev.com/c/4973701, but are revised to reflect that the HTML spec changes that those changes were implementing have been reverted in whatwg/html#9880 Bug: 576815 Change-Id: Id4536cb39691c2d234113f891f96d7100c7eeea4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5233352 Reviewed-by: Di Zhang <dizhanggchromium.org> Auto-Submit: David Baron <dbaronchromium.org> Commit-Queue: Di Zhang <dizhanggchromium.org> Cr-Commit-Position: refs/heads/main{#1251783} -- wpt-commits: 41bbcfcc813d99401ca0cacfa392c87d6f18ffca wpt-pr: 44178 UltraBlame original commit: 6dc79c28daa8bf6d48215692303e1097aa118baa
These tests are based on the tests previously in https://crrev.com/c/4800075 and https://crrev.com/c/4973701, but are revised to reflect that the HTML spec changes that those changes were implementing have been reverted in whatwg/html#9880 Bug: 576815 Change-Id: Id4536cb39691c2d234113f891f96d7100c7eeea4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5233352 Reviewed-by: Di Zhang <dizhangg@chromium.org> Auto-Submit: David Baron <dbaron@chromium.org> Commit-Queue: Di Zhang <dizhangg@chromium.org> Cr-Commit-Position: refs/heads/main@{#1251783}
This reverts recent changes to the rendering section for the slot element that I made recently in 11dc4c7 (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.)
To match this revert, this also removes the special rule that
slot
elements inherit their directionality from the shadow host.(See WHATWG Working Mode: Changes for more details.)
/dom.html ( diff )
/rendering.html ( diff )