forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't add %-height descendants outside the containing block chain.
A video element creates some children (flexboxes, etc.), and the video ought to be their containing "block" for all purposes, but LayoutVideo is not a LayoutBlock (it's LayoutReplaced), so it doesn't really work. Make sure that we don't skip upwards and escape from the innards of the video element and start adding percentage descendants to blocks that are not in the containing block chain of the video (the video may be out-of-flow positioned). Bug: 965032 Change-Id: Ic9fdb7b9dcff5724b9488d85dfafc9c87f4bee62 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1622806 Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Christian Biesinger <cbiesinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#662821}
- Loading branch information
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...d_party/blink/web_tests/fast/replaced/abspos-percentage-height-video-inline-fc-crash.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<div contenteditable></div> <!-- Trigger legacy layout for the entire document. --> | ||
<div id="container" style="position:relative; width:110px;"> | ||
<div style="float:left; width:100px; height:100px;"> | ||
<div></div> | ||
<video style="position:absolute; height:1%;"></video> | ||
</div> | ||
</div> | ||
<script src="../../resources/testharness.js"></script> | ||
<script src="../../resources/testharnessreport.js"></script> | ||
<script> | ||
test(()=> { | ||
document.documentElement.offsetTop; | ||
container.style.width = "111px"; | ||
}, "did not crash"); | ||
</script> |