summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/layer-creation
diff options
context:
space:
mode:
authorshivamidow@gmail.com <shivamidow@gmail.com>2015-06-15 05:19:51 +0000
committershivamidow@gmail.com <shivamidow@gmail.com>2015-06-15 05:19:51 +0000
commit6b8bd58dda94adaeb55e9f4386ed0638f9158ba3 (patch)
treed120f2189949ed75c07ab7f2584ab83f60974a4b /third_party/WebKit/LayoutTests/compositing/layer-creation
parent1646db17518d6a127215aaa72e4a6cab51096465 (diff)
downloadchromium_src-6b8bd58dda94adaeb55e9f4386ed0638f9158ba3.zip
chromium_src-6b8bd58dda94adaeb55e9f4386ed0638f9158ba3.tar.gz
chromium_src-6b8bd58dda94adaeb55e9f4386ed0638f9158ba3.tar.bz2
Where an ancestor has overflow style, a fixed child needs to be composited.
A block child with fixed style is composited where frameview has an enough long height to scroll. But that does not cover the other case. Where an ancestor of the fixed child has a overflow style but frameview is not scrollable, we don't composite the fixed block. For the result, the fixed child is scrolled according to its ancestor block. We need to composite it in a separate composited layer for the case. BUG=490141 Review URL: https://codereview.chromium.org/1167073002 git-svn-id: svn://svn.chromium.org/blink/trunk@197099 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/compositing/layer-creation')
-rw-r--r--third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt51
-rw-r--r--third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-in-fixed-overflow.html41
2 files changed, 92 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt
new file mode 100644
index 0000000..0244282
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt
@@ -0,0 +1,51 @@
+{
+ "bounds": [800, 600],
+ "children": [
+ {
+ "bounds": [800, 600],
+ "contentsOpaque": true,
+ "drawsContent": true,
+ "children": [
+ {
+ "position": [8, 13],
+ "bounds": [800, 600],
+ "drawsContent": true,
+ "children": [
+ {
+ "bounds": [785, 600],
+ "children": [
+ {
+ "bounds": [785, 1000],
+ "drawsContent": true,
+ "children": [
+ {
+ "children": [
+ {
+ "position": [192, 0],
+ "bounds": [100, 100],
+ "contentsOpaque": true,
+ "drawsContent": true,
+ "backgroundColor": "#FFFF00"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "children": [
+ {
+ "position": [785, 0],
+ "bounds": [15, 600],
+ "drawsContent": true
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
+
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-in-fixed-overflow.html b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-in-fixed-overflow.html
new file mode 100644
index 0000000..95e85dc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-in-fixed-overflow.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<style>
+.fixed {
+ position: fixed;
+}
+.overflow {
+ width: 100%;
+ height: 100%;
+ overflow-y: scroll;
+}
+.yellow {
+ left: 200px;
+ width: 100px;
+ height: 100px;
+ background-color: yellow;
+}
+
+.blue {
+ width: 100px;
+ height: 1000px;
+ background-color: blue;
+}
+</style>
+<div class="overflow fixed">
+ <div class="yellow fixed"></div>
+ <div class="blue"></div>
+</div>
+<pre></pre>
+<script src="../../resources/run-after-layout-and-paint.js"></script>
+<script>
+if (window.testRunner && window.internals) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ internals.settings.setPreferCompositingToLCDTextEnabled(true);
+}
+
+runAfterLayoutAndPaint(function() {
+ if (window.testRunner)
+ document.querySelector('pre').textContent = window.internals.layerTreeAsText(document);
+}, true);
+</script>