Bug 1126163: Adjust image-object-position-with-background-1-ref.html to crop its replaced elems with overflow:hidden div, instead of downscaling them. r=seth
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 27 Jan 2015 17:12:33 -0800
changeset 239532 53f5af7b9bf0c3ef628cbff92e8a6d052f89d1bc
parent 239531 1c324316ea7a505bc200d2d207e9b513e6c1ffa4
child 239533 774ff21aecb3cc882d2fd53317fc1f4aa5d7109a
push id500
push userjoshua.m.grant@gmail.com
push dateThu, 29 Jan 2015 01:48:36 +0000
reviewersseth
bugs1126163
milestone38.0a1
Bug 1126163: Adjust image-object-position-with-background-1-ref.html to crop its replaced elems with overflow:hidden div, instead of downscaling them. r=seth
layout/reftests/image/image-object-position-with-background-1-ref.html
--- a/layout/reftests/image/image-object-position-with-background-1-ref.html
+++ b/layout/reftests/image/image-object-position-with-background-1-ref.html
@@ -2,26 +2,41 @@
 <!--
      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">
+      .crop {
+        /* Wrapper-div to simulate the cropping that happens in
+           the testcase. (In the testcase, "object-position" pushes
+           the image's destination rect off towards the bottom-right,
+           and crops it to the content-box.) */
+        height: 32px;
+        width: 32px;
+        overflow: hidden;
+        margin-bottom: 2px;
+      }
       .test {
         background: salmon;
         padding-top: 5px;
         padding-left: 5px;
-        width: 27px;
-        height: 27px;
         display: block;
-        margin-bottom: 2px;
       }
     </style>
   </head>
   <body>
-    <img    class="test"    src="blue-32x32.png">
-    <embed  class="test"    src="blue-32x32.png">
-    <object class="test"   data="blue-32x32.png"></object>
-    <video  class="test" poster="blue-32x32.png"></video>
+    <div class="crop">
+      <img    class="test"    src="blue-32x32.png">
+    </div>
+    <div class="crop">
+      <embed  class="test"    src="blue-32x32.png">
+    </div>
+    <div class="crop">
+      <object class="test"   data="blue-32x32.png"></object>
+    </div>
+    <div class="crop">
+      <video  class="test" poster="blue-32x32.png"></video>
+    </div>
   </body>
 </html>