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

Side by Side Diff: LayoutTests/compositing/repaint/fixed-pos-inside-composited-intermediate-layer.html

Issue 1298493003: Currently we only composite fixed position elements if we are on High DPI devices. This fix allows … Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove similarity check Created 5 years, 3 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 <html> 2 <html>
3 3
4 <head> 4 <head>
5 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> 5 <script src="../../fast/repaint/resources/text-based-repaint.js"></script>
6 <style> 6 <style>
7 7
8 .compositedBehind { 8 .compositedBehind {
9 width: 500px; 9 width: 500px;
10 height: 500px; 10 height: 500px;
11 transform: translatez(0); 11 transform: translatez(0);
12 background-color: cyan; 12 background-color: cyan;
13 } 13 }
14 14
15 .containerOverlapsComposited { 15 .containerOverlapsComposited {
16 position: absolute; 16 position: absolute;
17 z-index: 2; /* Creates a stacking context so that the fixed-pos layer is conta ined instead of a sibling */ 17 z-index: 2; /* Creates a stacking context so that the fixed-pos layer is conta ined instead of a sibling */
18 top: 20px; 18 top: 20px;
19 left: 20px; 19 left: 20px;
20 width: 100px; 20 width: 100px;
21 height: 30000px; 21 height: 30000px;
22 background-color: green; 22 background-color: green;
23 } 23 }
24 24
25 .fixed { 25 .fixed {
26 position: fixed; 26 position: fixed;
27 top: 45px; 27 top: 45px;
28 left: 45px; 28 left: 45px;
29 background-color: lime; 29 background-color: rgba(0, 255, 0, 0.99);
30 width: 50px; 30 width: 50px;
31 height: 50px; 31 height: 50px;
32 } 32 }
33 33
34 </style> 34 </style>
35 35
36 <script> 36 <script>
37 if (window.internals) { 37 if (window.internals) {
38 /* Note carefully, compositing for fixed position is _disabled_ here */ 38 /* Note carefully, compositing for fixed position is _disabled_ here */
39 internals.settings.setPreferCompositingToLCDTextEnabled(false); 39 internals.settings.setPreferCompositingToLCDTextEnabled(false);
(...skipping 17 matching lines...) Expand all
57 never repainted, and it appeared to scroll along with the composited cont ainer. 57 never repainted, and it appeared to scroll along with the composited cont ainer.
58 --> 58 -->
59 <div class="compositedBehind"> </div> 59 <div class="compositedBehind"> </div>
60 60
61 <div class="containerOverlapsComposited"> 61 <div class="containerOverlapsComposited">
62 <div class="fixed"></div> 62 <div class="fixed"></div>
63 </div> 63 </div>
64 </body> 64 </body>
65 65
66 </html> 66 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698