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

Unified Diff: LayoutTests/compositing/fixed-position-opaque-compositing.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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/compositing/fixed-position-opaque-compositing.html
diff --git a/LayoutTests/compositing/fixed-position-opaque-compositing.html b/LayoutTests/compositing/fixed-position-opaque-compositing.html
new file mode 100644
index 0000000000000000000000000000000000000000..ed2dc0b8cb31a2754955f86c8a257bc6f5eb2916
--- /dev/null
+++ b/LayoutTests/compositing/fixed-position-opaque-compositing.html
@@ -0,0 +1,77 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ body {
+ margin: 0;
+ background-color: #fff;
+ height: 2000px;
+ }
+
+ .Box {
+ width: 200px;
+ height: 200px;
+ position: fixed;
+ top: 0;
+ }
+
+ .Box-opaque {
+ background-color: green;
+ left: 0;
+ }
+ .Box-transparent {
+ background-color: rgba(255, 0, 0, 0.99);
+ left: 250px;
+ }
+
+ .Box-overflow, .Box-overflowHidden {
+ background-color: green;
+ top: 250px;
+ width: 25px;
+ height: 25px;
+ }
+ .Box-overflow {
+ background-color: red;
+ left: 0;
+ }
+ .Box-overflowHidden {
+ left: 100px;
+ overflow: hidden;
+ }
+
+ .Box-overflow-child {
+ width: 50px;
+ height: 50px;
+ }
+ </style>
+
+ <script>
+ window.addEventListener('load', function() {
+ if (window.testRunner && window.internals) {
+ window.testRunner.setCustomTextOutput(window.internals.layerTreeAsText(document));
+ }
+ })
+ </script>
+</head>
+<body>
+ <!-- SHOULD composite -->
+ <div class="Box Box-opaque"></div>
+
+ <!-- This box is slightly transparent; SHOULD not composite -->
+ <div class="Box Box-transparent"></div>
+
+ <!-- This has text overflow; SHOULD NOT composite -->
+ <div class="Box Box-overflow">
+ <div class="Box-overflow-child">
+ This is some overflowing text
+ </div>
+ </div>
+
+ <!-- This has text overflow but hides it; SHOULD composite -->
+ <div class="Box Box-overflowHidden">
+ <div class="Box-overflow-child">
+ This is some overflowing text
+ </div>
+ </div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698