зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1564653 [wpt PR 17536] - Recalculate descendant styles when display changes to custom layout, a=testonly
Automatic update from web-platform-tests Recalculate descendant styles when display changes to custom layout Previously this only happened if the old display was custom layout, but not when changing from a standard display to a custom one. This was a typo, the same condition was checked twice for old_style, but the second occurrence should check new_style instead. The change matters when there are inline children that should be blockified by the custom layout, without the patch they would remain inline. BUG=978990 TEST=external/wpt/css/css-layout-api/layout-child-inlines-dynamic.https.html Change-Id: I73bcf679209dd4bc4a0d7a49f4345ee699bbf37e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1678484 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Oriol Brufau <obrufau@igalia.com> Cr-Commit-Position: refs/heads/master@{#672718} -- wpt-commits: b26fcfbbc09d2fb3bfa1b9bbc643f7d4ffb971b0 wpt-pr: 17536
This commit is contained in:
Родитель
9136514d9d
Коммит
7830783795
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Layout API: Dynamic blockification of inline children</title>
|
||||
<link rel="author" href="mailto:obrufau@igalia.com" title="Oriol Brufau">
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#layout-children" title="4.1. Layout Children">
|
||||
<meta name="assert" content="This test checks that inline children are correctly blockified or unblockified when the display of the parent changes dynamically." />
|
||||
|
||||
<style>
|
||||
#wrapper {
|
||||
display: layout(foo);
|
||||
}
|
||||
#test {
|
||||
display: inline;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="wrapper">
|
||||
<div id="test">Lorem ipsum</div>
|
||||
</div>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/worklet-reftest.js"></script>
|
||||
<script>
|
||||
promise_test(async function() {
|
||||
await importWorklet(CSS.layoutWorklet, {url: 'support/layout-child-worklet.js'});
|
||||
|
||||
const wrapper = document.getElementById("wrapper");
|
||||
const test = document.getElementById("test");
|
||||
|
||||
assert_equals(getComputedStyle(test).display, "block", "The child should have been blockified by the custom layout");
|
||||
|
||||
wrapper.style.display = "block";
|
||||
assert_equals(getComputedStyle(test).display, "inline", "The child should no longer be blockified in block layout");
|
||||
|
||||
wrapper.style.display = "";
|
||||
assert_equals(getComputedStyle(test).display, "block", "The child should have been blockified again");
|
||||
});
|
||||
</script>
|
Загрузка…
Ссылка в новой задаче