Index: LayoutTests/compositing/geometry/clip-with-shadow.html |
diff --git a/LayoutTests/compositing/geometry/clip.html b/LayoutTests/compositing/geometry/clip-with-shadow.html |
similarity index 67% |
copy from LayoutTests/compositing/geometry/clip.html |
copy to LayoutTests/compositing/geometry/clip-with-shadow.html |
index 4732e1b89f03d75ad3d6c4476e8f6df036ad25af..50b464602be2b6c4fa68fcdfcd1da8f5c626c4d5 100644 |
--- a/LayoutTests/compositing/geometry/clip.html |
+++ b/LayoutTests/compositing/geometry/clip-with-shadow.html |
@@ -1,9 +1,17 @@ |
<!DOCTYPE html> |
+<!-- Test CSS clip and shadow with composited layers. Left and right sides |
+ should have the same shape. In old code where this caused a bug, |
+ crbug.com/246728, shadows cause a slightly different code path than |
+ clip.html without shadow. In this test, the clip is still larger than the |
+ shadow's extent; The composited layer should not clamp to the shadow's |
+ extent (1 pixel), it should include the full extent of the clip as well (5 |
+ pixels). --> |
+ |
<html> |
<head> |
<style type="text/css" media="screen"> |
- |
+ |
.box { |
position: absolute; |
width: 100px; |
@@ -11,9 +19,10 @@ |
top: 20px; |
left: 20px; |
background-color: gray; |
+ -webkit-box-shadow: 1px 1px 1px 1px gray; |
clip: rect(-5px, 105px, 105px, -5px); |
} |
- |
+ |
.inner { |
position: relative; |
width: 120px; |
@@ -22,11 +31,11 @@ |
left: -10px; |
background-color: rgba(0, 0, 0, 0.2); |
} |
- |
+ |
.composited { |
-webkit-transform: translateZ(1px); |
} |
- |
+ |
p { |
margin-top: 140px; |
} |
@@ -36,7 +45,7 @@ |
testRunner.dumpAsText(); |
testRunner.waitUntilDone(); |
} |
- |
+ |
function doTest() { |
if (window.testRunner) { |
document.getElementById('layers').innerText = window.internals.layerTreeAsText(document); |
@@ -57,10 +66,9 @@ |
<div class="composited inner"> |
</div> |
</div> |
- |
- <p>Test CSS clip with composited layers. Left and right sides should look the same.</p> |
+ |
<pre id="layers"> |
- In DRT, layer tree goes here. |
+<!-- In DRT, layer tree goes here. --> |
</pre> |
</body> |
</html> |