Commit Graph
5 Commits
Author SHA1 Message Date
Mason Freed d93fca2a71 Bug 1881366 [wpt PR 44718] - Fix up bdo behavior with unicode-bidi property, a=testonly
Automatic update from web-platform-tests
Fix up bdo behavior with unicode-bidi property

See the predecessor CLs [1][2] which fixed up other elements. This
CL updates the bdo element UA stylesheet and some management code
in html_element.cc.

In particular, this CL makes the following changes to html.css:

add this:
  [dir=ltr i], [dir=rtl i], [dir=auto i] {
    unicode-bidi: isolate;
  }

and then replace this:
  bdo {
    unicode-bidi: bidi-override;
  }
with this:
  bdo, bdo[dir] {
    unicode-bidi: isolate-override;
  }

That is per spec:
https://html.spec.whatwg.org/multipage/rendering.html#bidi-rendering

Several tests had to be updated to match bdo's isolate-override
behavior.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/5240082
[2] https://chromium-review.googlesource.com/c/chromium/src/+/5260610

Bug: 1520671
Change-Id: Ic596a83974c01740d455a30f95a0fe28e9f73fa9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5262983
Reviewed-by: David Baron <[email protected]>
Auto-Submit: Mason Freed <[email protected]>
Commit-Queue: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1264627}

--

wpt-commits: 16aaaefa887d10254730d0f0410c3583172a80dc
wpt-pr: 44718
2024-03-01 20:09:59 +00:00
Mason Freed 3294376e0e Bug 1876835 [wpt PR 44235] - Add unicode-bidi UA stylesheet rules, a=testonly
Automatic update from web-platform-tests
Add unicode-bidi UA stylesheet rules

Per spec:

  https://html.spec.whatwg.org/multipage/rendering.html#bidi-rendering

this should be in the UA stylesheet:

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, [dir=ltr i], [dir=rtl i], [dir=auto i] {
  unicode-bidi: isolate;
}

To avoid breakage, I just added the elements, and not the [dir]
related rules, nor did I change the <bdo> rules.

Firefox and WebKit are both making the same change:
https://bugzilla.mozilla.org/show_bug.cgi?id=1874033
https://bugs.webkit.org/show_bug.cgi?id=267887

The stylesheet change interacts with the code at [1], and that code
also handles some of the cases such as [dir=auto] and bdi/bdo.
I will clean up some of the code at [1] in a followup CL.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/html_element.cc;l=344-363;drc=20fecf94cc2226674dfefd698e96d8d44485b19c

Fixed: 1520671
Change-Id: Icaa32061efc59d963942b0629327bb596ac224ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5240082
Auto-Submit: Mason Freed <[email protected]>
Reviewed-by: David Baron <[email protected]>
Commit-Queue: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1255819}

--

wpt-commits: 53f8b53fd98f27cdbea27f21d7ca5dc4c3f6fa58
wpt-pr: 44235
2024-02-09 08:26:06 +00:00
L. David Baron 8c356c0f00 Bug 1876401 [wpt PR 44178] - Add tests for direction and bidi isolation 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
https://github.com/whatwg/html/pull/9880

Bug: 576815
Change-Id: Id4536cb39691c2d234113f891f96d7100c7eeea4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5233352
Reviewed-by: Di Zhang <[email protected]>
Auto-Submit: David Baron <[email protected]>
Commit-Queue: Di Zhang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1251783}

--

wpt-commits: 41bbcfcc813d99401ca0cacfa392c87d6f18ffca
wpt-pr: 44178
2024-01-28 09:59:25 +00:00
David Baron e0f07658af Bug 1861071 [wpt PR 42746] - Revert "Give <slot> element default unicode-bidi: isolate style.", a=testonly
Automatic update from web-platform-tests
Revert "Give <slot> element default unicode-bidi: isolate style."

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 https://github.com/whatwg/html/pull/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:
> https://github.com/whatwg/html/issues/3699#issuecomment-951423468
> which has been specified in:
> https://github.com/whatwg/html/pull/9554
> https://github.com/whatwg/html/pull/9796
>
> Bug: 576815
> Change-Id: Ice471838c7251fc69d87abfa723f3eef1a4c455a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4800075
> Reviewed-by: Chris Harrelson <[email protected]>
> Reviewed-by: Di Zhang <[email protected]>
> Commit-Queue: David Baron <[email protected]>
> 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 <[email protected]>
Bot-Commit: Rubber Stamper <[email protected]>
Auto-Submit: David Baron <[email protected]>
Commit-Queue: Philip Rogers <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1215009}

--

wpt-commits: 8cc01fc73b14dcbc92109574c26d85b25f5cfba0
wpt-pr: 42746
2023-11-06 09:06:28 +00:00
L. David Baron 4457fcca40 Bug 1860834 [wpt PR 42717] - Give <slot> element default unicode-bidi: isolate style., a=testonly
Automatic update from web-platform-tests
Give <slot> element default unicode-bidi: isolate style.

This is behind the RuntimeEnabledFeatures::CSSPseudoDirEnabled() flag.

This implements a part of the behavior described in:
https://github.com/whatwg/html/issues/3699#issuecomment-951423468
which has been specified in:
https://github.com/whatwg/html/pull/9554
https://github.com/whatwg/html/pull/9796

Bug: 576815
Change-Id: Ice471838c7251fc69d87abfa723f3eef1a4c455a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4800075
Reviewed-by: Chris Harrelson <[email protected]>
Reviewed-by: Di Zhang <[email protected]>
Commit-Queue: David Baron <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1214439}

--

wpt-commits: a79306e06659bde55be85c3af5c1d7d4a51c0cbd
wpt-pr: 42717
2023-11-06 09:06:08 +00:00