forked from web-platform-tests/wpt
-
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.
Nested view transitions: support view-transition-group: nearest/normal
Parse nearest/normal as keywords, and use a StyleViewTransitionGroup struct to store the result. Rely on a stack while capturing elements hierarchically, to correctly resolve "view-transition-group: nearest". Also use that stack instead of element ancestry for computing explicit names. Bug: 347947051 Change-Id: If06d2a6ff266013f4a46a492191c31e4a66111c8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5752182 Reviewed-by: Khushal Sagar <[email protected]> Commit-Queue: Noam Rosenthal <[email protected]> Cr-Commit-Position: refs/heads/main@{#1338320}
- Loading branch information
Showing
5 changed files
with
79 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html class=reftest-wait> | ||
<title>Nearest should match direct parent</title> | ||
<meta name=fuzzy content="maxDifference=0-255; totalPixels=0-515"> | ||
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/"> | ||
<link rel="match" href="nested-ref.html"> | ||
<link rel=stylesheet href="resources/compute-common.css"></link> | ||
<script src="/common/reftest-wait.js"></script> | ||
<script src="resources/compute-test.js"></script> | ||
<body> | ||
<div class="green"> | ||
<div> | ||
<div class="test nearest-ref"></article> | ||
</div> | ||
</div> | ||
</body> |
18 changes: 18 additions & 0 deletions
18
css/css-view-transitions/nested/nearest-ignores-nearest-name.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 class=reftest-wait> | ||
<title>Nearest should not match a group called "nearest"</title> | ||
<meta name=fuzzy content="maxDifference=0-255; totalPixels=0-515"> | ||
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/"> | ||
<link rel="match" href="nested-ref.html"> | ||
<link rel=stylesheet href="resources/compute-common.css"></link> | ||
<script src="/common/reftest-wait.js"></script> | ||
<script src="resources/compute-test.js"></script> | ||
<body> | ||
<div style="view-transition-name: nearest"> | ||
<div class="green"> | ||
<div> | ||
<div class="test nearest-ref"></article> | ||
</div> | ||
</div> | ||
</div> | ||
</body> |
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 class=reftest-wait> | ||
<title>Nearest should match non-direct ancestor</title> | ||
<meta name=fuzzy content="maxDifference=0-255; totalPixels=0-515"> | ||
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/"> | ||
<link rel="match" href="nested-ref.html"> | ||
<link rel=stylesheet href="resources/compute-common.css"></link> | ||
<script src="/common/reftest-wait.js"></script> | ||
<script src="resources/compute-test.js"></script> | ||
<body> | ||
<div class="red"> | ||
<div class="green"> | ||
<div> | ||
<div class="test nearest-ref"></article> | ||
</div> | ||
</div> | ||
</div> | ||
</body> |
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> | ||
<html class="reftest-wait no-match"> | ||
<title>view-transition: normal should behave like having no group</title> | ||
<meta name=fuzzy content="maxDifference=0-255; totalPixels=0-515"> | ||
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/"> | ||
<link rel="match" href="nested-ref.html"> | ||
<link rel=stylesheet href="resources/compute-common.css"></link> | ||
<script src="/common/reftest-wait.js"></script> | ||
<script src="resources/compute-test.js"></script> | ||
<body> | ||
<div class="normal"> | ||
<div> | ||
<div class="test normal-ref"></article> | ||
</div> | ||
</div> | ||
</body> |
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