forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DL: Ensure SimplifiedLayout handles DL elements without processing ch…
…ildren This patch ensures that when we're doing a simplified layout, we consider that children might be dirty due to being blocked by a display lock. We skip layout out the children, and also loosen a DCHECK to allow for display locked elements to enter the simplified layout code path. [email protected], [email protected], [email protected] Bug: 978166 Change-Id: I4c79c49c0dd470e06b4cbd5091b5d8125d1cf4a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1675228 Reviewed-by: Ian Kilpatrick <[email protected]> Commit-Queue: vmpstr <[email protected]> Cr-Commit-Position: refs/heads/master@{#672568}
- Loading branch information
Showing
6 changed files
with
145 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
29 changes: 29 additions & 0 deletions
29
...blink/web_tests/wpt_internal/display-lock/lock-after-append/flex-with-child-lock-ref.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,29 @@ | ||
<!doctype HTML> | ||
<html> | ||
<meta charset="utf8"> | ||
<title>Display Locking: flex layout with child lock (reference)</title> | ||
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]"> | ||
<link rel="help" href="https://github.com/WICG/display-locking"> | ||
|
||
<style> | ||
#flexer { | ||
display: flex; | ||
width: 200px; | ||
height: 300px; | ||
background: lightgreen; | ||
} | ||
#container { | ||
background: lightblue; | ||
} | ||
#sizer { | ||
width: 123px; | ||
height: 234px; | ||
} | ||
</style> | ||
|
||
<div id="flexer"> | ||
<div id="container"> | ||
<div id="sizer"></div> | ||
</div> | ||
</div> | ||
|
38 changes: 38 additions & 0 deletions
38
...rty/blink/web_tests/wpt_internal/display-lock/lock-after-append/flex-with-child-lock.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,38 @@ | ||
<!doctype HTML> | ||
<html class="reftest-wait"> | ||
<meta charset="utf8"> | ||
<title>Display Locking: flex layout with child lock</title> | ||
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]"> | ||
<link rel="help" href="https://github.com/WICG/display-locking"> | ||
<link rel="match" href="flex-with-child-lock-ref.html"> | ||
<script src="/common/reftest-wait.js"></script> | ||
|
||
<style> | ||
#flexer { | ||
display: flex; | ||
width: 200px; | ||
height: 300px; | ||
background: lightgreen; | ||
} | ||
#container { | ||
contain: style layout; | ||
background: lightblue; | ||
} | ||
</style> | ||
|
||
<div id="flexer"> | ||
<div id="container"> | ||
<div></div> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
async function runTest() { | ||
const container = document.getElementById("container"); | ||
await container.displayLock.acquire({ timeout: Infinity, size: [123, 234] }); | ||
takeScreenshot(); | ||
} | ||
|
||
window.onload = runTest; | ||
</script> | ||
</html> |
31 changes: 31 additions & 0 deletions
31
.../web_tests/wpt_internal/display-lock/lock-after-append/flex-with-descendant-lock-ref.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,31 @@ | ||
<!doctype HTML> | ||
<html> | ||
<meta charset="utf8"> | ||
<title>Display Locking: flex layout with descendant lock (reference)</title> | ||
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]"> | ||
<link rel="help" href="https://github.com/WICG/display-locking"> | ||
|
||
<style> | ||
#flexer { | ||
display: flex; | ||
width: 200px; | ||
height: 300px; | ||
background: lightgreen; | ||
} | ||
#container { | ||
background: lightblue; | ||
} | ||
#sizer { | ||
width: 123px; | ||
height: 234px; | ||
} | ||
</style> | ||
|
||
<div id="flexer"> | ||
<div> | ||
<div id="container"> | ||
<div id="sizer"></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
40 changes: 40 additions & 0 deletions
40
...link/web_tests/wpt_internal/display-lock/lock-after-append/flex-with-descendant-lock.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,40 @@ | ||
<!doctype HTML> | ||
<html class="reftest-wait"> | ||
<meta charset="utf8"> | ||
<title>Display Locking: flex layout with descendant lock</title> | ||
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]"> | ||
<link rel="help" href="https://github.com/WICG/display-locking"> | ||
<link rel="match" href="flex-with-descendant-lock-ref.html"> | ||
<script src="/common/reftest-wait.js"></script> | ||
|
||
<style> | ||
#flexer { | ||
display: flex; | ||
width: 200px; | ||
height: 300px; | ||
background: lightgreen; | ||
} | ||
#container { | ||
contain: style layout; | ||
background: lightblue; | ||
} | ||
</style> | ||
|
||
<div id="flexer"> | ||
<div> | ||
<div id="container"> | ||
<div></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
async function runTest() { | ||
const container = document.getElementById("container"); | ||
await container.displayLock.acquire({ timeout: Infinity, size: [123, 234] }); | ||
takeScreenshot(); | ||
} | ||
|
||
window.onload = runTest; | ||
</script> | ||
</html> |