-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "VT: Remove containment requirement."
This reverts commit e554cf3. Reason for revert: Decided against this feature for now. Original change's description: > VT: Remove containment requirement. > > This patch removes the containment requirement from view-transitions. > > This is to align with proposed resolution > w3c/csswg-drafts#7882 > > R=khushalsagar@chromium.org, bokan@chromium.org > > Fixed: 1409491 > Change-Id: Iad0eb54c8d2de503f209a58a9f438e586fcd6a36 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4188811 > Reviewed-by: David Bokan <bokan@chromium.org> > Reviewed-by: Khushal Sagar <khushalsagar@chromium.org> > Commit-Queue: Vladimir Levin <vmpstr@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1096187} Change-Id: Id0b58230eb372a96aa1f1dff2e7d84e2f297219f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4192788 Commit-Queue: Vladimir Levin <vmpstr@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#1096273}
- Loading branch information
Showing
36 changed files
with
252 additions
and
3 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
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 |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
background: blue; | ||
} | ||
.shared { | ||
contain: layout; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
background: green; | ||
} | ||
.shared { | ||
contain: layout; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
|
||
<style> | ||
div { | ||
contain: layout; | ||
position: absolute; | ||
top: 50px; | ||
width: 100px; | ||
|
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
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
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
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
38 changes: 38 additions & 0 deletions
38
...s/external/wpt/css/css-view-transitions/no-containment-on-new-element-mid-transition.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> | ||
<title>View transitions: transition skipped if no containment on new element after animation started</title> | ||
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/"> | ||
<link rel="author" href="mailto:khushalsagar@chromium.org"> | ||
|
||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
|
||
<style> | ||
div { | ||
width: 100px; | ||
height: 100px; | ||
background: blue; | ||
view-transition-name: target; | ||
contain: paint; | ||
} | ||
|
||
html::view-transition-group(target) { | ||
animation-duration: 300s; | ||
} | ||
</style> | ||
|
||
<div id=first></div> | ||
|
||
<script> | ||
promise_test(async t => { | ||
assert_implements(document.startViewTransition, "Missing document.startViewTransition"); | ||
return new Promise(async (resolve, reject) => { | ||
let transition = document.startViewTransition(); | ||
await transition.updateCallbackDone; | ||
await transition.ready; | ||
|
||
transition.finished.then(resolve, reject); | ||
first.style.contain = "none"; | ||
}); | ||
}, "new element becoming uncontained should skip the transition"); | ||
</script> |
3 changes: 3 additions & 0 deletions
3
...ternal/wpt/css/css-view-transitions/no-containment-on-new-element-mid-transition.html.ini
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,3 @@ | ||
[no-containment-on-new-element-mid-transition.html] | ||
[new element becoming uncontained should skip the transition] | ||
expected: FAIL |
47 changes: 47 additions & 0 deletions
47
.../blink/web_tests/external/wpt/css/css-view-transitions/no-containment-on-new-element.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,47 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<title>View transitions: transition skipped if no containment on new element</title> | ||
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/"> | ||
<link rel="author" href="mailto:khushalsagar@chromium.org"> | ||
|
||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
|
||
<style> | ||
div { | ||
width: 100px; | ||
height: 100px; | ||
background: blue; | ||
view-transition-name: target; | ||
contain: paint; | ||
} | ||
</style> | ||
|
||
<div id=first></div> | ||
|
||
<script> | ||
promise_test(async t => { | ||
assert_implements(document.startViewTransition, "Missing document.startViewTransition"); | ||
return new Promise(async (resolve, reject) => { | ||
let transition = document.startViewTransition(() => { | ||
first.style.contain = "none"; | ||
}); | ||
|
||
let readyRejected = false; | ||
transition.ready.then(reject, () => { readyRejected = true; }); | ||
|
||
let updateCallbackDone = false; | ||
transition.updateCallbackDone.then(() => { updateCallbackDone = true; }, reject); | ||
transition.finished.then(() => { | ||
assert_true(readyRejected, "ready not rejected"); | ||
assert_true(updateCallbackDone, "dom not updated"); | ||
|
||
if (window.getComputedStyle(first).contain == "none") | ||
resolve(); | ||
else | ||
reject("dom update callback did not run"); | ||
|
||
}, reject); | ||
}); | ||
}, "uncontained new element should skip the transition"); | ||
</script> |
3 changes: 3 additions & 0 deletions
3
...nk/web_tests/external/wpt/css/css-view-transitions/no-containment-on-new-element.html.ini
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,3 @@ | ||
[no-containment-on-new-element.html] | ||
[uncontained new element should skip the transition] | ||
expected: FAIL |
46 changes: 46 additions & 0 deletions
46
.../blink/web_tests/external/wpt/css/css-view-transitions/no-containment-on-old-element.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,46 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<title>View transitions: transition skipped if no containment on old element</title> | ||
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/"> | ||
<link rel="author" href="mailto:khushalsagar@chromium.org"> | ||
|
||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
|
||
<style> | ||
div { | ||
width: 100px; | ||
height: 100px; | ||
background: blue; | ||
view-transition-name: target; | ||
} | ||
</style> | ||
|
||
<div id=first></div> | ||
|
||
<script> | ||
promise_test(async t => { | ||
assert_implements(document.startViewTransition, "Missing document.startViewTransition"); | ||
return new Promise(async (resolve, reject) => { | ||
let transition = document.startViewTransition(() => { | ||
first.style.contain = "paint"; | ||
}); | ||
|
||
let readyRejected = false; | ||
transition.ready.then(reject, () => { readyRejected = true; }); | ||
|
||
let updateCallbackDone = false; | ||
transition.updateCallbackDone.then(() => { updateCallbackDone = true; }, reject); | ||
transition.finished.then(() => { | ||
assert_true(readyRejected, "ready not rejected"); | ||
assert_true(updateCallbackDone, "dom not updated"); | ||
|
||
if (window.getComputedStyle(first).contain == "paint") | ||
resolve(); | ||
else | ||
reject("dom update callback did not run"); | ||
|
||
}, reject); | ||
}); | ||
}, "uncontained old element should skip the transition"); | ||
</script> |
3 changes: 3 additions & 0 deletions
3
...nk/web_tests/external/wpt/css/css-view-transitions/no-containment-on-old-element.html.ini
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,3 @@ | ||
[no-containment-on-old-element.html] | ||
[uncontained old element should skip the transition] | ||
expected: FAIL |
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
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 |
---|---|---|
|
@@ -28,6 +28,9 @@ | |
color: red; | ||
} | ||
|
||
div { | ||
contain: layout; | ||
} | ||
</style> | ||
<div id="target"></div> | ||
<div id="target2"></div> | ||
|
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 |
---|---|---|
|
@@ -28,6 +28,10 @@ | |
color: red; | ||
} | ||
|
||
#target { | ||
contain: layout; | ||
} | ||
|
||
</style> | ||
<div id="target"></div> | ||
|
||
|
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 |
---|---|---|
|
@@ -28,6 +28,10 @@ | |
color: red; | ||
} | ||
|
||
#target { | ||
contain: layout; | ||
} | ||
|
||
</style> | ||
<div id="target"></div> | ||
|
||
|
Oops, something went wrong.