Skip to content

Commit fc4f94d

Browse files
lilleschromium-wpt-export-bot
authored andcommitted
Render ::backdrop for replaced <object> elements
The <object> element is blocked from rendering children if it is rendered as a replaced element. However, ::backdrop is rendered as a sibling in the top layer. This worked a lot of the time in Blink, because the first time we create the ::backdrop, we typically don't know yet what the <object> will render as, but doing mutations on the <object> while rendered in the top layer, including the anchor() style recalculations during layout, we would know what the layout object type is and incorrectly stop rendering the ::backdrop. Bug: 436811729 Change-Id: I94157ea2112dfd980ee25c83c7c284eaa857e3e2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6827402 Reviewed-by: Anders Hartvoll Ruud <[email protected]> Commit-Queue: Rune Lillesveen <[email protected]> Cr-Commit-Position: refs/heads/main@{#1498171}
1 parent b41aac6 commit fc4f94d

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<title>CSS Position Test: Replaced &lt;object&gt; renders ::backdrop in top layer</title>
3+
<link rel="help" href="https://drafts.csswg.org/css-position-4/#backdrop">
4+
<link rel="match" href="/css/reference/green.html">
5+
<style>
6+
object.green::backdrop { background-color: green; visibility: visible; }
7+
object { visibility: hidden; }
8+
</style>
9+
<object id="pop" popover="auto"></object>
10+
<script>
11+
pop.showPopover();
12+
pop.className = "green";
13+
</script>

css/reference/green.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<!DOCTYPE html>
2+
<title>CSS Test Reference</title>
3+
<body style="background-color:green"></body>

0 commit comments

Comments
 (0)