Skip to content

Commit

Permalink
Reland "VT: Remove containment requirement."
Browse files Browse the repository at this point in the history
This reverts commit f2820f7b99c149d989dee94c1b23c791a7b5f387.

This was reverted earlier to wait for CSSWG feedback. The resolution
aligns with the behaviour in this patch.

w3c/csswg-drafts#8139

Original change's description:
> Revert "VT: Remove containment requirement."
>
> This reverts commit e554cf340761c4b11e0da4d0c98b1b58f9189cbd.
>
> 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}

Change-Id: I3da1ee9d5e00b2a9470b99b5f69704fc9b4d0105
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4233087
Commit-Queue: Vladimir Levin <vmpstr@chromium.org>
Commit-Queue: Khushal Sagar <khushalsagar@chromium.org>
Auto-Submit: Khushal Sagar <khushalsagar@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102856}
  • Loading branch information
khushalsagar authored and marcoscaceres committed Mar 28, 2023
1 parent 9ecbbbf commit 3360bc9
Show file tree
Hide file tree
Showing 35 changed files with 116 additions and 213 deletions.
1 change: 0 additions & 1 deletion css/css-view-transitions/3d-transform-incoming-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
background: blue;
}
.shared {
contain: layout;
width: 100px;
height: 100px;
}
Expand Down
2 changes: 0 additions & 2 deletions css/css-view-transitions/3d-transform-incoming.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
}
.shared {
view-transition-name: shared;
contain: layout;
width: 100px;
height: 100px;
}
Expand All @@ -34,7 +33,6 @@
width: 10px;
height: 10px;
background: red;
contain: layout;
}

::view-transition-group(hidden) { animation-duration: 300s; }
Expand Down
1 change: 0 additions & 1 deletion css/css-view-transitions/3d-transform-outgoing-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
background: green;
}
.shared {
contain: layout;
width: 100px;
height: 100px;
}
Expand Down
2 changes: 0 additions & 2 deletions css/css-view-transitions/3d-transform-outgoing.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
}
.shared {
view-transition-name: shared;
contain: layout;
width: 100px;
height: 100px;
}
Expand All @@ -35,7 +34,6 @@
width: 10px;
height: 10px;
background: red;
contain: layout;
}

::view-transition-group(hidden) { animation-duration: 300s; }
Expand Down
1 change: 0 additions & 1 deletion css/css-view-transitions/css-tags-paint-order-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

<style>
div {
contain: layout;
position: absolute;
top: 50px;
width: 100px;
Expand Down
1 change: 0 additions & 1 deletion css/css-view-transitions/css-tags-paint-order.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

<script src="/common/reftest-wait.js"></script>
<style>
div { contain: layout; }
#one {
background: green;
width: 100px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
padding: 0;

view-transition-name: dialog;
contain: layout;

outline: none;
}

Expand All @@ -28,7 +26,6 @@
background: grey;

view-transition-name: backdrop;
contain: layout;
}

.hidden {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
padding: 0;

view-transition-name: dialog;
contain: layout;

outline: none;
}

Expand All @@ -28,7 +26,6 @@
background: grey;

view-transition-name: backdrop;
contain: layout;
}

.hidden {
Expand Down
2 changes: 0 additions & 2 deletions css/css-view-transitions/element-with-overflow.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@
height: 10px;
view-transition-name: hidden;
background: green;
contain: layout;
}

.target {
width: 100px;
height: 100px;
background: lightblue;
contain: layout;
view-transition-name: target;
}
.inner {
Expand Down
45 changes: 45 additions & 0 deletions css/css-view-transitions/named-element-with-fix-pos-child-new.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html class=reftest-wait>
<title>View transitions: element with fixed position descendant</title>
<link rel="help" href="https://github.com/WICG/view-transitions">
<link rel="author" href="mailto:khushalsagar@chromium.org">
<link rel="match" href="named-element-with-fix-pos-child-ref.html">
<script src="/common/reftest-wait.js"></script>
<style>
.target {
width: 100px;
height: 100px;
background: blue;
view-transition-name: target;
}
.child {
width: 100px;
height: 100px;
position: fixed;
top: 150px;
left: 150px;
background: grey;
}

html::view-transition-group(target) { animation-duration: 300s; }
html::view-transition-old(target) { animation: unset; opacity: 0; }
html::view-transition-new(target) {
animation: unset;
opacity: 1;
}
</style>

<div class=target>
<div class=child></div>
</div>

<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");

async function runTest() {
document.startViewTransition(() =>
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));
}
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
</script>

45 changes: 45 additions & 0 deletions css/css-view-transitions/named-element-with-fix-pos-child-old.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html class=reftest-wait>
<title>View transitions: element with fixed position descendant</title>
<link rel="help" href="https://github.com/WICG/view-transitions">
<link rel="author" href="mailto:khushalsagar@chromium.org">
<link rel="match" href="named-element-with-fix-pos-child-ref.html">
<script src="/common/reftest-wait.js"></script>
<style>
.target {
width: 100px;
height: 100px;
background: blue;
view-transition-name: target;
}
.child {
width: 100px;
height: 100px;
position: fixed;
top: 150px;
left: 150px;
background: grey;
}

html::view-transition-group(target) { animation-duration: 300s; }
html::view-transition-new(target) { animation: unset; opacity: 0; }
html::view-transition-old(target) {
animation: unset;
opacity: 1;
}
</style>

<div class=target>
<div class=child></div>
</div>

<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");

async function runTest() {
document.startViewTransition(() =>
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));
}
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
</script>

26 changes: 26 additions & 0 deletions css/css-view-transitions/named-element-with-fix-pos-child-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<title>View transitions: element with fixed position descendant (ref)</title>
<link rel="help" href="https://github.com/WICG/view-transitions">
<link rel="author" href="mailto:khushalsagar@chromium.org">
<style>
.target {
width: 100px;
height: 100px;
background: blue;
view-transition-name: target;
}
.child {
width: 100px;
height: 100px;
position: fixed;
top: 150px;
left: 150px;
background: grey;
}
</style>

<div class=target>
<div class=child></div>
</div>

Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
contain: paint;
border: 1px solid black;
}
.source {
contain: layout;
}
#target {
background: red;
position: absolute;
Expand Down
1 change: 0 additions & 1 deletion css/css-view-transitions/new-content-object-fit-fill.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
width: 10px;
height: 10px;
view-transition-name: hidden;
contain: layout;
}

html::view-transition-group(target) {
Expand Down
1 change: 0 additions & 1 deletion css/css-view-transitions/new-content-object-fit-none.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
width: 10px;
height: 10px;
view-transition-name: hidden;
contain: layout;
}

html::view-transition-group(target) {
Expand Down

This file was deleted.

47 changes: 0 additions & 47 deletions css/css-view-transitions/no-containment-on-new-element.html

This file was deleted.

46 changes: 0 additions & 46 deletions css/css-view-transitions/no-containment-on-old-element.html

This file was deleted.

1 change: 0 additions & 1 deletion css/css-view-transitions/old-content-object-fit-fill.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
width: 10px;
height: 10px;
view-transition-name: hidden;
contain: layout;
}

html::view-transition-group(target) {
Expand Down
Loading

0 comments on commit 3360bc9

Please sign in to comment.