Skip to content

Commit

Permalink
Bug 1860834 [wpt PR 42717] - Give <slot> element default unicode-bidi…
Browse files Browse the repository at this point in the history
…: 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:
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}

--

wpt-commits: a79306e06659bde55be85c3af5c1d7d4a51c0cbd
wpt-pr: 42717
  • Loading branch information
dbaron authored and moz-wptsync-bot committed Nov 6, 2023
1 parent 8b892fa commit 7e3492a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!DOCTYPE html>
<title>HTML Rendering: slot element has unicode-bidi: isolate</title>
<link rel="author" title="L. David Baron" href="https://dbaron.org/">
<link rel="author" title="Google" href="http://www.google.com/">

<div style="unicode-bidi: bidi-override; direction: ltr;">&#x5D0;-&#x5D1;</div>

<div>isolate</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<title>HTML Rendering: slot element has unicode-bidi: isolate</title>
<link rel="author" title="L. David Baron" href="https://dbaron.org/">
<link rel="author" title="Google" href="http://www.google.com/">
<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#bidi-rendering">
<link rel="help" href="https://github.com/whatwg/html/pull/9796">
<link rel="match" href="slot-isolate-001-ref.html">

<div>&#x5D0;-<span id="e">&#x5D1;</span></div>

<div id="v"></div>

<script>

let e = document.getElementById("e");
let root = e.attachShadow({mode: "open"});
// use display:inline to override default display:contents
root.innerHTML = "<slot style='display:inline'>\u05D2</slot>";
let val = getComputedStyle(root.querySelector("slot")).unicodeBidi;
document.getElementById("v").innerText = val;

</script>

0 comments on commit 7e3492a

Please sign in to comment.