mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
Backed out changeset d1864ee9f2b2 (bug 1110950) for R5 Test failures on a CLOSED TREE
This commit is contained in:
parent
4cbe68a2d5
commit
e05b528ddb
@ -1,24 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<style type="text/css">
|
||||
div.limeRect {
|
||||
width: 50px;
|
||||
height: 30px;
|
||||
background: lime;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="limeRect"></div>
|
||||
<div class="limeRect"></div>
|
||||
<div class="limeRect"></div>
|
||||
<div class="limeRect"></div>
|
||||
</body>
|
||||
</html>
|
@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<!--
|
||||
This testcase ensures that we repaint correctly when "object-fit" is
|
||||
adjusted on a replaced element with SVG content. We start with
|
||||
"object-fit: contain", which lets some of the red background show through
|
||||
as we fit the SVG's square aspect-ratio into the wide rectangular
|
||||
container elements. We then change dynamically to "object-fit: cover",
|
||||
which should scale our SVG content to cover each replaced element's
|
||||
content-box. No red should ultimately be visible in the reftest snapshot.
|
||||
-->
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<style type="text/css">
|
||||
embed, img, object, video {
|
||||
object-fit: contain;
|
||||
background: red;
|
||||
width: 50px;
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function go() {
|
||||
var elemsToTweak = ["embed", "img", "object", "video"];
|
||||
elemsToTweak.forEach(tweakElemObjectFit);
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
function tweakElemObjectFit(tagName) {
|
||||
var elem = document.getElementsByTagName(tagName)[0];
|
||||
elem.style.objectFit = "cover";
|
||||
}
|
||||
document.addEventListener("MozReftestInvalidate", go);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<embed src="500.svg">
|
||||
<img src="500.svg">
|
||||
<object data="500.svg"></object>
|
||||
<video poster="500.svg"></video>
|
||||
</body>
|
||||
</html>
|
@ -1,24 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<style type="text/css">
|
||||
div.limeRect {
|
||||
width: 50px;
|
||||
height: 30px;
|
||||
background: lime;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="limeRect"></div>
|
||||
<div class="limeRect"></div>
|
||||
<div class="limeRect"></div>
|
||||
<div class="limeRect"></div>
|
||||
</body>
|
||||
</html>
|
@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<!--
|
||||
This testcase ensures that we repaint correctly when "object-position" is
|
||||
adjusted on a replaced element with SVG content. We start with
|
||||
"object-position: 10px 15px", which lets a strip of the red background
|
||||
show through on the top and left edges. We then change dynamically to
|
||||
"object-position: 0 0", which (given our "object-fit: fill" value) lets
|
||||
the SVG image fill each replaced element without any uncovered edges.
|
||||
-->
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<style type="text/css">
|
||||
embed, img, object, video {
|
||||
object-fit: fill;
|
||||
object-position: 10px 15px;
|
||||
background: red;
|
||||
width: 50px;
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function go() {
|
||||
var elemsToTweak = ["embed", "img", "object", "video"];
|
||||
elemsToTweak.forEach(tweakElemObjectFit);
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
function tweakElemObjectFit(tagName) {
|
||||
var elem = document.getElementsByTagName(tagName)[0];
|
||||
elem.style.objectPosition = "0 0";
|
||||
}
|
||||
document.addEventListener("MozReftestInvalidate", go);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<embed src="500.svg">
|
||||
<img src="500.svg">
|
||||
<object data="500.svg"></object>
|
||||
<video poster="500.svg"></video>
|
||||
</body>
|
||||
</html>
|
@ -12,10 +12,8 @@ random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == sync-image-switch-1c.htm
|
||||
random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == sync-image-switch-1d.html sync-image-switch-1-ref.html # bug 855050 for WinXP
|
||||
|
||||
# Tests for "object-fit" & "object-position"
|
||||
test-pref(layout.css.object-fit-and-position.enabled,true) == image-object-fit-dyn-1.html image-object-fit-dyn-1-ref.html
|
||||
test-pref(layout.css.object-fit-and-position.enabled,true) == image-object-fit-with-background-1.html image-object-fit-with-background-1-ref.html
|
||||
test-pref(layout.css.object-fit-and-position.enabled,true) == image-object-fit-with-background-2.html image-object-fit-with-background-2-ref.html
|
||||
test-pref(layout.css.object-fit-and-position.enabled,true) == image-object-position-dyn-1.html image-object-position-dyn-1-ref.html
|
||||
test-pref(layout.css.object-fit-and-position.enabled,true) == image-object-position-with-background-1.html image-object-position-with-background-1-ref.html
|
||||
test-pref(layout.css.object-fit-and-position.enabled,true) == image-object-position-with-background-2.html image-object-position-with-background-2-ref.html
|
||||
|
||||
|
@ -1489,18 +1489,11 @@ nsChangeHint nsStylePosition::CalcDifference(const nsStylePosition& aOther) cons
|
||||
{
|
||||
nsChangeHint hint = nsChangeHint(0);
|
||||
|
||||
// Changes to "z-index" require a repaint.
|
||||
if (mZIndex != aOther.mZIndex) {
|
||||
NS_UpdateHint(hint, nsChangeHint_RepaintFrame);
|
||||
}
|
||||
|
||||
// Changes to "object-fit" & "object-position" require a repaint. They
|
||||
// may also require a reflow, if we have a nsSubDocumentFrame, so that we
|
||||
// can adjust the size & position of the subdocument.
|
||||
if (mObjectFit != aOther.mObjectFit ||
|
||||
// Changes to "z-index", "object-fit", & "object-position" require a repaint.
|
||||
if (mZIndex != aOther.mZIndex ||
|
||||
mObjectFit != aOther.mObjectFit ||
|
||||
mObjectPosition != aOther.mObjectPosition) {
|
||||
NS_UpdateHint(hint, NS_CombineHint(nsChangeHint_RepaintFrame,
|
||||
nsChangeHint_NeedReflow));
|
||||
NS_UpdateHint(hint, nsChangeHint_RepaintFrame);
|
||||
}
|
||||
|
||||
if (mOrder != aOther.mOrder) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user