-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix NeedsLayoutTreeUpdateForNodeIncludingDisplayLocked
This patch makes NeedsLayoutTreeUpdateForNodeIncludingDisplayLocked consider nodes which aren't in the flat tree. Fixed: 1251931 Change-Id: I00382a6950f0f019f61f4e4bc43c5339146b6a2f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3184902 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#934798}
- Loading branch information
1 parent
d1a5b4c
commit 1b3124b
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
css/css-contain/content-visibility/document-element-computed-style.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,18 @@ | ||
<!DOCTYPE html> | ||
<html style="display:none"> | ||
|
||
<link rel=author href="mailto:jarhar@chromium.org"> | ||
<link rel=help href="https://bugs.chromium.org/p/chromium/issues/detail?id=1251931"> | ||
|
||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
|
||
<div style="content-visibility:hidden"></div> | ||
|
||
<script> | ||
test(() => { | ||
document.documentElement.offsetTop; | ||
document.documentElement.style.display = "block"; | ||
assert_equals(getComputedStyle(document.documentElement).color, 'rgb(0, 0, 0)'); | ||
}, `Verifies that ComputedStyle gets updated when the documentElement's style is dirtied in the presence of content-visibility.`); | ||
</script> |
14 changes: 14 additions & 0 deletions
14
css/css-contain/content-visibility/slot-content-visibility-16-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,14 @@ | ||
<!DOCTYPE html> | ||
<link rel=author href="mailto:jarhar@chromium.org"> | ||
<link rel=help href="https://bugs.chromium.org/p/chromium/issues/detail?id=1251931"> | ||
|
||
<div> | ||
<template shadowroot=open></template> | ||
<span id="outside"></span> | ||
</div> | ||
<div style="content-visibility:hidden"></div> | ||
<script> | ||
getComputedStyle(outside).color; | ||
outside.style.color = "green"; | ||
getComputedStyle(outside).color; | ||
</script> |
21 changes: 21 additions & 0 deletions
21
css/css-contain/content-visibility/slot-content-visibility-17-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,21 @@ | ||
<!DOCTYPE html> | ||
<link rel=author href="mailto:jarhar@chromium.org"> | ||
<link rel=help href="https://bugs.chromium.org/p/chromium/issues/detail?id=1251931"> | ||
|
||
<style> | ||
.a + .b { color: green } | ||
</style> | ||
<div id="host"> | ||
<div> | ||
<div> | ||
<div id="a"></div><div id="b" class="b"></div> | ||
</div> | ||
</div> | ||
</div> | ||
<div style="content-visibility:hidden"></div> | ||
<script> | ||
host.attachShadow({mode:"open"}); | ||
document.body.offsetTop; | ||
a.className = "a"; | ||
getComputedStyle(b).color; | ||
</script> |