VT: Make object-view-box an unexposed detail of the implementation

This patch removes object-view-box style and makes it an internal
detail.

R=khushalsagar@chromium.org

Fixed: 1428951
Change-Id: I9f79bf3fc261897e08ab515103fd9a443763256d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4389682
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: Vladimir Levin <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1125038}
diff --git a/css/css-view-transitions/content-with-object-view-box-ref.html b/css/css-view-transitions/content-with-object-view-box-ref.html
new file mode 100644
index 0000000..7aa2014
--- /dev/null
+++ b/css/css-view-transitions/content-with-object-view-box-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<title>View transitions: capture elements with object view box on the pseudo (ref)</title>
+<link rel="help" href="https://github.com/WICG/view-transitions">
+<link rel="author" href="mailto:vmpstr@chromium.org">
+<style>
+body { background: pink }
+#target {
+  position: relative;
+  top: 93.75px;
+  left: 71px;
+  background: green;
+  width: 143px;
+  height: 125px;
+}
+</style>
+<div id=target></div>
diff --git a/css/css-view-transitions/new-content-changes-overflow-ref.html b/css/css-view-transitions/new-content-changes-overflow-ref.html
new file mode 100644
index 0000000..5f75909
--- /dev/null
+++ b/css/css-view-transitions/new-content-changes-overflow-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<title>View transitions: capture elements and then change overflow (ref)</title>
+<link rel="help" href="https://github.com/WICG/view-transitions">
+<link rel="author" href="mailto:vmpstr@chromium.org">
+<style>
+body { background: pink }
+#target {
+  position: relative;
+  background: green;
+  width: 100px;
+  height: 100px;
+  view-transition-name: target;
+}
+#child {
+  background: blue;
+  position: relative;
+  top: 20px;
+  left: 30px;
+  width: 50px;
+  height: 100px;
+}
+#child.large {
+  height: 200px;
+}
+</style>
+
+<div id=target><div id=child class=large></div></div>
diff --git a/css/css-view-transitions/new-content-changes-overflow.html b/css/css-view-transitions/new-content-changes-overflow.html
new file mode 100644
index 0000000..a8e2fa8
--- /dev/null
+++ b/css/css-view-transitions/new-content-changes-overflow.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<meta name="timeout" content="long">
+<html class=reftest-wait>
+<title>View transitions: capture elements and then change overflow</title>
+<link rel="help" href="https://github.com/WICG/view-transitions">
+<link rel="author" href="mailto:vmpstr@chromium.org">
+<link rel="match" href="new-content-changes-overflow-ref.html">
+<script src="/common/reftest-wait.js"></script>
+<style>
+#target {
+  position: relative;
+  background: green;
+  width: 100px;
+  height: 100px;
+  view-transition-name: target;
+}
+#child {
+  background: blue;
+  position: relative;
+  top: 20px;
+  left: 30px;
+  width: 50px;
+  height: 100px;
+}
+#child.large {
+  height: 200px;
+}
+
+html::view-transition-group(*) { animation-duration: 300s; }
+html::view-transition-new(*) { animation: unset; opacity: 1; }
+html::view-transition-old(*) { animation: unset; opacity: 0; }
+html::view-transition-group(root) { animation: unset; opacity: 0; }
+html::view-transition { background: pink; }
+</style>
+
+<div id=target><div id=child></div></div>
+<script>
+failIfNot(document.startViewTransition, "Missing document.startViewTransition");
+
+async function runTest() {
+  document.startViewTransition().ready.then(() => {
+    requestAnimationFrame(() => {
+      requestAnimationFrame(() => {
+        child.classList.add("large");
+        requestAnimationFrame(takeScreenshot);
+      });
+    });
+  });
+}
+onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
+</script>
+
+
diff --git a/css/css-view-transitions/new-content-with-object-view-box.html b/css/css-view-transitions/new-content-with-object-view-box.html
new file mode 100644
index 0000000..47917e9
--- /dev/null
+++ b/css/css-view-transitions/new-content-with-object-view-box.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<meta name="timeout" content="long">
+<html class=reftest-wait>
+<title>View transitions: capture elements with object view box on the pseudo</title>
+<link rel="help" href="https://github.com/WICG/view-transitions">
+<link rel="author" href="mailto:vmpstr@chromium.org">
+<link rel="match" href="content-with-object-view-box-ref.html">
+<script src="/common/reftest-wait.js"></script>
+<style>
+#target {
+  position: relative;
+  top: 100px;
+  left: 100px;
+  background: green;
+  width: 100px;
+  height: 100px;
+  view-transition-name: target;
+}
+
+html::view-transition-group(*) { animation-duration: 300s; }
+html::view-transition-new(*) {
+  object-view-box: inset(5px 10px 15px 20px);
+  /* Set explicit width height so that we can check the object view box math */
+  width: 100px;
+  height: 100px;
+  animation: unset;
+  opacity: 1;
+}
+html::view-transition-old(*) { animation: unset; opacity: 0; }
+html::view-transition-group(root) { animation: unset; opacity: 0; }
+html::view-transition { background: pink; }
+</style>
+<div id=target></div>
+<script>
+failIfNot(document.startViewTransition, "Missing document.startViewTransition");
+
+async function runTest() {
+  document.startViewTransition().ready.then(takeScreenshot);
+}
+onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
+</script>
+
diff --git a/css/css-view-transitions/old-content-with-object-view-box.html b/css/css-view-transitions/old-content-with-object-view-box.html
new file mode 100644
index 0000000..f24c8e6
--- /dev/null
+++ b/css/css-view-transitions/old-content-with-object-view-box.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<meta name="timeout" content="long">
+<html class=reftest-wait>
+<title>View transitions: capture elements with object view box on the pseudo</title>
+<link rel="help" href="https://github.com/WICG/view-transitions">
+<link rel="author" href="mailto:vmpstr@chromium.org">
+<link rel="match" href="content-with-object-view-box-ref.html">
+<script src="/common/reftest-wait.js"></script>
+<style>
+#target {
+  position: relative;
+  top: 100px;
+  left: 100px;
+  background: green;
+  width: 100px;
+  height: 100px;
+  view-transition-name: target;
+}
+
+html::view-transition-group(*) { animation-duration: 300s; }
+html::view-transition-old(*) {
+  object-view-box: inset(5px 10px 15px 20px);
+  /* Need to specify explicit dimensions since view box changes intrinsic size */
+  width: 100px;
+  height: 100px;
+  animation: unset;
+  opacity: 1;
+}
+html::view-transition-new(*) { animation: unset; opacity: 0; }
+html::view-transition-group(root) { animation: unset; opacity: 0; }
+html::view-transition { background: pink; }
+</style>
+<div id=target></div>
+<script>
+failIfNot(document.startViewTransition, "Missing document.startViewTransition");
+
+async function runTest() {
+  document.startViewTransition().ready.then(takeScreenshot);
+}
+onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
+</script>
+
diff --git a/css/css-view-transitions/pseudo-computed-style-stays-in-sync-with-new-element.html b/css/css-view-transitions/pseudo-computed-style-stays-in-sync-with-new-element.html
index 576b752..0a34a4b 100644
--- a/css/css-view-transitions/pseudo-computed-style-stays-in-sync-with-new-element.html
+++ b/css/css-view-transitions/pseudo-computed-style-stays-in-sync-with-new-element.html
@@ -34,7 +34,7 @@
     first.style.filter = "blur(5px)";
     viewbox = window.getComputedStyle(
       document.documentElement, "::view-transition-new(target)").objectViewBox;
-    assert_not_equals(viewbox, "none", "incorrect viewbox " + viewbox);
+    assert_equals(viewbox, "none", "incorrect viewbox " + viewbox);
 
     transition.finished.then(resolve, reject);
   });