Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Side by Side Diff: third_party/WebKit/LayoutTests/compositing/overflow-trumps-transform-style.html

Issue 2065233002: Force flattening for elements with non-initial value of opacity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix assert. (overflow needs to be adjusted prior to querying used transform-style) Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style>
3 #root {
4 transform-style: preserve-3d;
5 }
2 6
3 <html> 7 #transparent {
4 <head> 8 overflow: hidden;
5 <style> 9 width: 100px;
6 .box { 10 height: 100px;
7 height: 100px; 11 background: red;
8 width: 100px; 12 transform: translate3d(0,0,30px);
9 margin: 10px; 13 transform-style: preserve-3d;
10 background-color: blue; 14 }
11 }
12 </style>
13 <script>
14 if (window.testRunner)
15 testRunner.dumpAsText();
16 15
17 function dumpResults() 16 #child1 {
18 { 17 width: 100px;
19 var results = document.getElementById('layers'); 18 height: 100px;
20 19 background: green;
21 // Check the computed value. 20 transform: translate3d(50px,0,-20px);
22 results.innerText = window.getComputedStyle(document.getElementById('box1' )).webkitTransformStyle + '\n'; 21 }
23 results.innerText += window.getComputedStyle(document.getElementById('box2 ')).webkitTransformStyle + '\n'; 22
24 23 #child2 {
25 if (window.testRunner) 24 width: 80px;
26 results.innerText += window.internals.layerTreeAsText(document); 25 height: 80px;
27 } 26 background: black;
28 window.addEventListener('load', dumpResults, false); 27 transform: translate3d(35px,-60px,-30px);
29 </script> 28 }
30 </head> 29
31 <body> 30 #sibling {
32 <div class="box" id="box1" style="transform: translateZ(1px); -webkit-transform- style: preserve-3d"></div> 31 width: 100px;
33 <div class="box" id="box2" style="transform: translateZ(1px); -webkit-transform- style: preserve-3d; overflow: hidden"></div> 32 height: 100px;
34 <pre id="layers">Layer tree goes here in DRT</pre> 33 background: blue;
35 </body> 34 transform: translate3d(25px,-50px,20px);
36 </html> 35 }
36 </style>
37 <div id="root">
38 <div id="transparent">
39 <div id="child1"></div>
40 <div id="child2"></div>
41 </div>
42 <div id="sibling"></div>
43 </div>
44 The purpose of this test is to verify that overflow clipping forces the used val ue of
45 transform-style to be flat. The rendered result should be the same as if
46 transform-style:preserve-3d was not specified on the clipping element.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698