-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
css: Upstream object-view-box tests to wpt.
Move all object-view-box tests from wpt internal to the external repo in preparation to ship the feature. This is a completely mechanical move. Bug: 1303102 Change-Id: I09ff132606cee1097643d1fa64e54fc42ff352ad Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3655380 Commit-Queue: Khushal Sagar <khushalsagar@chromium.org> Reviewed-by: Stephen Chenney <schenney@chromium.org> Cr-Commit-Position: refs/heads/main@{#1006009}
- Loading branch information
1 parent
0de2c3a
commit 3f3ed3c
Showing
82 changed files
with
3,670 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
css/css-images/object-view-box-contain-intrinsic-size-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,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<title>CSS object-view-box on an element with contain-intrinsic-size : ref</title> | ||
<link rel="author" href="mailto:khushalsagar@chromium.org"> | ||
<link rel="help" href="https://drafts.csswg.org/css-images-4/#the-object-view-box"> | ||
|
||
<style> | ||
.default { | ||
object-fit: fill; | ||
width: 100px; | ||
height: 200px; | ||
position: relative; | ||
top: -100px; | ||
left: -50px; | ||
clip-path: inset(101px 0px 0px 51px); | ||
} | ||
</style> | ||
<img class="default" src="support/exif-orientation-6-ru.jpg"></img> |
20 changes: 20 additions & 0 deletions
20
css/css-images/object-view-box-contain-intrinsic-size.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,20 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<title>CSS object-view-box on an element with contain-intrinsic-size</title> | ||
<link rel="author" href="mailto:khushalsagar@chromium.org"> | ||
<link rel="match" href="object-view-box-contain-intrinsic-size-ref.html"> | ||
<link rel="help" href="https://drafts.csswg.org/css-images-4/#the-object-view-box"> | ||
|
||
<style> | ||
.default { | ||
/* Paint the yellow box at the bottom right corner. The box should be sized | ||
based on |contain-intrinsic-size| but the painted content is based on the | ||
view box. */ | ||
object-view-box: inset(50px 0px 0px 25px); | ||
object-fit: fill; | ||
contain: size; | ||
contain-intrinsic-size: 50px 100px; | ||
clip-path: inset(1px 0px 0px 1px); | ||
} | ||
</style> | ||
<img class="default" src="support/exif-orientation-6-ru.jpg"></img> |
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,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<title>CSS object-view-box with empty bounds : ref</title> | ||
<link rel="author" href="mailto:khushalsagar@chromium.org"> | ||
<link rel="help" href="https://drafts.csswg.org/css-images-4/#the-object-view-box"> | ||
|
||
<style> | ||
.default { | ||
object-fit: fill; | ||
background-color: black; | ||
} | ||
</style> | ||
<img class="default" src="support/exif-orientation-6-ru.jpg"></img> |
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,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<title>CSS object-view-box with empty bounds</title> | ||
<link rel="author" href="mailto:khushalsagar@chromium.org"> | ||
<link rel="match" href="object-view-box-empty-bounds-ref.html"> | ||
<link rel="help" href="https://drafts.csswg.org/css-images-4/#the-object-view-box"> | ||
|
||
<style> | ||
.default { | ||
object-view-box: inset(50px 0px 50px 0px); | ||
object-fit: fill; | ||
background-color: black; | ||
} | ||
</style> | ||
<img class="default" src="support/exif-orientation-6-ru.jpg"></img> |
69 changes: 69 additions & 0 deletions
69
css/css-images/object-view-box-fit-contain-canvas-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,69 @@ | ||
<!-- This is an autogen file. Run support/generate_object_view_box_tests.py to update --> | ||
<!DOCTYPE html> | ||
<title>CSS object-view-box with object-fit:contain (ref)</title> | ||
<link rel="author" href="mailto:khushalsagar@chromium.org"> | ||
<script src="support/testHelper.js"></script> | ||
<link rel="help" href="https://drafts.csswg.org/css-images-4/#the-object-view-box"> | ||
|
||
<body> | ||
<style> | ||
div { | ||
margin: 5px; | ||
} | ||
|
||
video { | ||
object-fit: fill; | ||
} | ||
|
||
.container_view_box_subset { | ||
width: 50px; | ||
height: 100px; | ||
overflow: clip; | ||
display: inline-block; | ||
background-color: grey; | ||
} | ||
.view_box_subset { | ||
position: relative; | ||
top: -25px; | ||
} | ||
|
||
.container_view_box_subset_with_position { | ||
width: 50px; | ||
height: 100px; | ||
overflow: clip; | ||
display: inline-block; | ||
background-color: grey; | ||
} | ||
.view_box_subset_with_position { | ||
position: relative; | ||
top: -50px; | ||
} | ||
|
||
.container_view_box_subset_with_scaling { | ||
width: 100px; | ||
height: 200px; | ||
overflow: clip; | ||
display: inline-block; | ||
background-color: grey; | ||
} | ||
.view_box_subset_with_scaling { | ||
position: relative; | ||
top: 25px; | ||
left: 25px; | ||
width: 100px; | ||
height: 200px; | ||
} | ||
</style> | ||
<div class="container_view_box_subset"> | ||
<canvas class="view_box_subset"></canvas> | ||
</div> | ||
<div class="container_view_box_subset_with_position"> | ||
<canvas class="view_box_subset_with_position"></canvas> | ||
</div> | ||
<div class="container_view_box_subset_with_scaling"> | ||
<canvas class="view_box_subset_with_scaling"></canvas> | ||
</div> | ||
</body> | ||
<script> | ||
populateElements(""); | ||
</script> |
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,50 @@ | ||
<!-- This is an autogen file. Run support/generate_object_view_box_tests.py to update --> | ||
<!DOCTYPE html> | ||
<html> | ||
<title>CSS object-view-box with object-fit:contain</title> | ||
<link rel="author" href="mailto:khushalsagar@chromium.org"> | ||
<link rel="match" href="object-view-box-fit-contain-canvas-ref.html"> | ||
<script src="support/testHelper.js"></script> | ||
<link rel="help" href="https://drafts.csswg.org/css-images-4/#the-object-view-box"> | ||
|
||
<body> | ||
<style> | ||
.view_box_subset { | ||
object-view-box: inset(50px 0px 0px 0px); | ||
object-fit: contain; | ||
width: 50px; | ||
height: 100px; | ||
background-color: grey; | ||
margin: 5px; | ||
} | ||
|
||
.view_box_subset_with_position { | ||
object-view-box: inset(50px 0px 0px 0px); | ||
object-fit: contain; | ||
width: 50px; | ||
height: 100px; | ||
background-color: grey; | ||
margin: 5px; | ||
|
||
object-position: 0% 0%; | ||
background-color: grey; | ||
} | ||
|
||
.view_box_subset_with_scaling { | ||
object-view-box: inset(50px 0px 0px 0px); | ||
object-fit: contain; | ||
background-color: grey; | ||
margin: 5px; | ||
|
||
width: 100px; | ||
height: 200px; | ||
object-position: 25px 125px; | ||
} | ||
</style> | ||
<canvas class="view_box_subset"></canvas> | ||
<canvas class="view_box_subset_with_position"></canvas> | ||
<canvas class="view_box_subset_with_scaling"></canvas> | ||
</body> | ||
<script> | ||
populateElements(""); | ||
</script> |
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,69 @@ | ||
<!-- This is an autogen file. Run support/generate_object_view_box_tests.py to update --> | ||
<!DOCTYPE html> | ||
<title>CSS object-view-box with object-fit:contain (ref)</title> | ||
<link rel="author" href="mailto:khushalsagar@chromium.org"> | ||
<script src="support/testHelper.js"></script> | ||
<link rel="help" href="https://drafts.csswg.org/css-images-4/#the-object-view-box"> | ||
|
||
<body> | ||
<style> | ||
div { | ||
margin: 5px; | ||
} | ||
|
||
video { | ||
object-fit: fill; | ||
} | ||
|
||
.container_view_box_subset { | ||
width: 50px; | ||
height: 100px; | ||
overflow: clip; | ||
display: inline-block; | ||
background-color: grey; | ||
} | ||
.view_box_subset { | ||
position: relative; | ||
top: -25px; | ||
} | ||
|
||
.container_view_box_subset_with_position { | ||
width: 50px; | ||
height: 100px; | ||
overflow: clip; | ||
display: inline-block; | ||
background-color: grey; | ||
} | ||
.view_box_subset_with_position { | ||
position: relative; | ||
top: -50px; | ||
} | ||
|
||
.container_view_box_subset_with_scaling { | ||
width: 100px; | ||
height: 200px; | ||
overflow: clip; | ||
display: inline-block; | ||
background-color: grey; | ||
} | ||
.view_box_subset_with_scaling { | ||
position: relative; | ||
top: 25px; | ||
left: 25px; | ||
width: 100px; | ||
height: 200px; | ||
} | ||
</style> | ||
<div class="container_view_box_subset"> | ||
<img class="view_box_subset"></img> | ||
</div> | ||
<div class="container_view_box_subset_with_position"> | ||
<img class="view_box_subset_with_position"></img> | ||
</div> | ||
<div class="container_view_box_subset_with_scaling"> | ||
<img class="view_box_subset_with_scaling"></img> | ||
</div> | ||
</body> | ||
<script> | ||
populateElements("support/exif-orientation-6-ru.jpg"); | ||
</script> |
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,50 @@ | ||
<!-- This is an autogen file. Run support/generate_object_view_box_tests.py to update --> | ||
<!DOCTYPE html> | ||
<html> | ||
<title>CSS object-view-box with object-fit:contain</title> | ||
<link rel="author" href="mailto:khushalsagar@chromium.org"> | ||
<link rel="match" href="object-view-box-fit-contain-img-ref.html"> | ||
<script src="support/testHelper.js"></script> | ||
<link rel="help" href="https://drafts.csswg.org/css-images-4/#the-object-view-box"> | ||
|
||
<body> | ||
<style> | ||
.view_box_subset { | ||
object-view-box: inset(50px 0px 0px 0px); | ||
object-fit: contain; | ||
width: 50px; | ||
height: 100px; | ||
background-color: grey; | ||
margin: 5px; | ||
} | ||
|
||
.view_box_subset_with_position { | ||
object-view-box: inset(50px 0px 0px 0px); | ||
object-fit: contain; | ||
width: 50px; | ||
height: 100px; | ||
background-color: grey; | ||
margin: 5px; | ||
|
||
object-position: 0% 0%; | ||
background-color: grey; | ||
} | ||
|
||
.view_box_subset_with_scaling { | ||
object-view-box: inset(50px 0px 0px 0px); | ||
object-fit: contain; | ||
background-color: grey; | ||
margin: 5px; | ||
|
||
width: 100px; | ||
height: 200px; | ||
object-position: 25px 125px; | ||
} | ||
</style> | ||
<img class="view_box_subset"></img> | ||
<img class="view_box_subset_with_position"></img> | ||
<img class="view_box_subset_with_scaling"></img> | ||
</body> | ||
<script> | ||
populateElements("support/exif-orientation-6-ru.jpg"); | ||
</script> |
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,69 @@ | ||
<!-- This is an autogen file. Run support/generate_object_view_box_tests.py to update --> | ||
<!DOCTYPE html> | ||
<title>CSS object-view-box with object-fit:contain (ref)</title> | ||
<link rel="author" href="mailto:khushalsagar@chromium.org"> | ||
<script src="support/testHelper.js"></script> | ||
<link rel="help" href="https://drafts.csswg.org/css-images-4/#the-object-view-box"> | ||
|
||
<body> | ||
<style> | ||
div { | ||
margin: 5px; | ||
} | ||
|
||
video { | ||
object-fit: fill; | ||
} | ||
|
||
.container_view_box_subset { | ||
width: 50px; | ||
height: 100px; | ||
overflow: clip; | ||
display: inline-block; | ||
background-color: grey; | ||
} | ||
.view_box_subset { | ||
position: relative; | ||
top: -25px; | ||
} | ||
|
||
.container_view_box_subset_with_position { | ||
width: 50px; | ||
height: 100px; | ||
overflow: clip; | ||
display: inline-block; | ||
background-color: grey; | ||
} | ||
.view_box_subset_with_position { | ||
position: relative; | ||
top: -50px; | ||
} | ||
|
||
.container_view_box_subset_with_scaling { | ||
width: 100px; | ||
height: 200px; | ||
overflow: clip; | ||
display: inline-block; | ||
background-color: grey; | ||
} | ||
.view_box_subset_with_scaling { | ||
position: relative; | ||
top: 25px; | ||
left: 25px; | ||
width: 100px; | ||
height: 200px; | ||
} | ||
</style> | ||
<div class="container_view_box_subset"> | ||
<img class="view_box_subset"></img> | ||
</div> | ||
<div class="container_view_box_subset_with_position"> | ||
<img class="view_box_subset_with_position"></img> | ||
</div> | ||
<div class="container_view_box_subset_with_scaling"> | ||
<img class="view_box_subset_with_scaling"></img> | ||
</div> | ||
</body> | ||
<script> | ||
populateElements("support/blue-green-red-yellow-50x100.svg"); | ||
</script> |
Oops, something went wrong.