Commit 0e266701 authored by Khushal's avatar Khushal Committed by moz-wptsync-bot
Browse files

Bug 1770198 [wpt PR 34129] - css: Upstream object-view-box tests to wpt., a=testonly

Automatic update from web-platform-tests
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: default avatarStephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1006009}

--

wpt-commits: 3f3ed3ca626d4e066fd12fd6413f08e07929d467
wpt-pr: 34129
parent d35708c0
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
<!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 −0
Original line number Diff line number Diff line
<!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>
+13 −0
Original line number Diff line number Diff line
<!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>
+15 −0
Original line number Diff line number Diff line
<!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 −0
Original line number Diff line number Diff line
<!-- 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>
Loading