mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 05:39:41 +02:00
The code was trying to assert that we had frames constructed for all the nodes in the parent chain, but we don't bail out in the !GetContentInsertionFrameFor(aContainer) in the case that it's a children element, because they actually have no insertion frame, though their children do. Move the LazyFC check after the insertion point check. That makes the previous check work on the insertion point of the child, which makes it sound. This also fixes bug 1410020, and with it a Shadow DOM test-case that was failing because we had two sibling assigned to two different <slot>s, and the second one wasn't getting properly flagged, and thus the second sibling never got a frame. The other two test failures in this test are an event dispatch failure, where the position of the target is not what the test expects (we don't account for margin and padding). Filed that as bug 1450027. Also, added a test for which we have wrong layout without these patches, and that crashes with "Called Servo_Element_IsDisplayNone" with the first patch of this bug applied but not this one, due to the bogus check mentioned above. MozReview-Commit-ID: 6OeaVrZhTDv
29 lines
919 B
HTML
29 lines
919 B
HTML
<!doctype html>
|
|
<meta charset="utf-8">
|
|
<title>CSS Scoping Module Level 1 - Dynamic mutations to both shadow root and shadow host subtrees</title>
|
|
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
|
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
|
<link rel="help" href="https://bugzil.la/1303605">
|
|
<link rel="match" href="reference/green-box.html"/>
|
|
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
|
<style>
|
|
#host {
|
|
width: 100px;
|
|
height: 100px;
|
|
background: red;
|
|
}
|
|
|
|
#host > div {
|
|
width: 100px;
|
|
height: 50px;
|
|
background: green;
|
|
}
|
|
</style>
|
|
<div id="host"></div>
|
|
<script>
|
|
let root = host.attachShadow({ mode: "open" });
|
|
document.body.offsetTop;
|
|
|
|
root.innerHTML = `<slot name="slot1"></slot><slot name="slot2"></slot>`;
|
|
host.innerHTML = `<div slot="slot1"></div><div slot="slot2"></div>`;
|
|
</script>
|