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

Side by Side Diff: third_party/WebKit/LayoutTests/compositing/squashing/dont-squash-with-scale-transform.html

Issue 1835833005: Don't squash layers with non-translation transforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <style>
4 .scale-transform {
5 transform: scale(0.75);
6 }
7 .translate-transform {
8 transform: translateX(5px);
9 }
10 </style>
11 <div style="will-change: transform; width: 200px; height: 200px; background: lig htgray;"></div>
12 <div class="scale-transform" style="position: absolute; width: 200px; height: 20 0px; top: 100px; left: 100px; background: lightblue"></div>
13 <div class="translate-transform" style="position: absolute; width: 200px; height : 200px; top: 100px; left: 100px; background: lightblue"></div>
14 <script>
15 if (window.testRunner)
16 testRunner.dumpAsText();
17 onload = function() {
18 if (window.internals) {
19 var layers = JSON.parse(internals.layerTreeAsText(document, internals.LA YER_TREE_INCLUDES_DEBUG_INFO));
20
21 // The scale-transform layer can't be squashed
22 assert_true(layers.children[0].children[1].children[0].compositingReason s[1] == "Layer was separately composited because it could not be squashed.");
23 assert_true(layers.children[0].children[1].children[0].squashingDisallow edReasons[0] == "Cannot squash layers with transforms that are not identity or t ranslation.");
24
25 // ...but the translate-transform one can.
26 assert_true(layers.children[0].children[1].children[1].compositingReason s[0] == "Secondary layer, home for a group of squashable content");
27 }
28 };
29 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698