2011-06-23 Adrienne Walker <enne@google.com>
authorenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jun 2011 23:13:55 +0000 (23:13 +0000)
committerenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jun 2011 23:13:55 +0000 (23:13 +0000)
        Reviewed by Simon Fraser.

        Incorrect RenderLayer transforms on overflow RTL pages
        https://bugs.webkit.org/show_bug.cgi?id=60741

        Add a number of composited positioning tests on pages with dir=rtl.
        The reference images are all identical to what the non-composited path
        generates.

        The overflow-scrolled tests on Safari do not generate the right images
        due to bug 63284, but the layer tree is correct so they are not
        skipped.

        * compositing/rtl/rtl-absolute-expected.png: Added.
        * compositing/rtl/rtl-absolute-expected.txt: Added.
        * compositing/rtl/rtl-absolute-overflow-expected.png: Added.
        * compositing/rtl/rtl-absolute-overflow-expected.txt: Added.
        * compositing/rtl/rtl-absolute-overflow-scrolled-expected.png: Added.
        * compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt: Added.
        * compositing/rtl/rtl-absolute-overflow-scrolled.html: Added.
        * compositing/rtl/rtl-absolute-overflow.html: Added.
        * compositing/rtl/rtl-absolute.html: Added.
        * compositing/rtl/rtl-fixed-expected.png: Added.
        * compositing/rtl/rtl-fixed-expected.txt: Added.
        * compositing/rtl/rtl-fixed-overflow-expected.png: Added.
        * compositing/rtl/rtl-fixed-overflow-expected.txt: Added.
        * compositing/rtl/rtl-fixed-overflow-scrolled-expected.png: Added.
        * compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt: Added.
        * compositing/rtl/rtl-fixed-overflow-scrolled.html: Added.
        * compositing/rtl/rtl-fixed-overflow.html: Added.
        * compositing/rtl/rtl-fixed.html: Added.
        * compositing/rtl/rtl-iframe-absolute-expected.png: Added.
        * compositing/rtl/rtl-iframe-absolute-expected.txt: Added.
        * compositing/rtl/rtl-iframe-absolute-overflow-expected.png: Added.
        * compositing/rtl/rtl-iframe-absolute-overflow-expected.txt: Added.
        * compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.png: Added.
        * compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt: Added.
        * compositing/rtl/rtl-iframe-absolute-overflow-scrolled.html: Added.
        * compositing/rtl/rtl-iframe-absolute-overflow.html: Added.
        * compositing/rtl/rtl-iframe-absolute.html: Added.
        * compositing/rtl/rtl-iframe-fixed-expected.png: Added.
        * compositing/rtl/rtl-iframe-fixed-expected.txt: Added.
        * compositing/rtl/rtl-iframe-fixed-overflow-expected.png: Added.
        * compositing/rtl/rtl-iframe-fixed-overflow-expected.txt: Added.
        * compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.png: Added.
        * compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt: Added.
        * compositing/rtl/rtl-iframe-fixed-overflow-scrolled.html: Added.
        * compositing/rtl/rtl-iframe-fixed-overflow.html: Added.
        * compositing/rtl/rtl-iframe-fixed.html: Added.
        * compositing/rtl/rtl-iframe-relative-expected.png: Added.
        * compositing/rtl/rtl-iframe-relative-expected.txt: Added.
        * compositing/rtl/rtl-iframe-relative.html: Added.
        * compositing/rtl/rtl-relative-expected.png: Added.
        * compositing/rtl/rtl-relative-expected.txt: Added.
        * compositing/rtl/rtl-relative.html: Added.
        * compositing/rtlclipping/rtl-absolute-overflow-scrolled-expected.png: Added.
        * compositing/rtlclipping/rtl-absolute-overflow-scrolled-expected.txt: Added.
        * compositing/rtlclipping/rtl-absolute-overflow-scrolled.html: Added.
        * platform/chromium/test_expectations.txt:
        * platform/mac/Skipped:
2011-06-23  Adrienne Walker  <enne@google.com>

        Reviewed by Simon Fraser.

        Incorrect RenderLayer transforms on overflow RTL pages
        https://bugs.webkit.org/show_bug.cgi?id=60741

        Fix positioning of the root graphics layer for RTL pages.  The fact
        that the left side of the page is negative for pages with overflow is
        not taken into account when calculating the position.  This negative
        value ends up being double-counted for the root graphics layer (once
        in the position and once in the offset) and it shifts child layers
        into the wrong place.

        Tests: compositing/rtl/rtl-absolute-overflow-scrolled.html
               compositing/rtl/rtl-absolute-overflow.html
               compositing/rtl/rtl-absolute.html
               compositing/rtl/rtl-fixed-overflow-scrolled.html
               compositing/rtl/rtl-fixed-overflow.html
               compositing/rtl/rtl-fixed.html
               compositing/rtl/rtl-iframe-absolute-overflow-scrolled.html
               compositing/rtl/rtl-iframe-absolute-overflow.html
               compositing/rtl/rtl-iframe-absolute.html
               compositing/rtl/rtl-iframe-fixed-overflow-scrolled.html
               compositing/rtl/rtl-iframe-fixed-overflow.html
               compositing/rtl/rtl-iframe-fixed.html
               compositing/rtl/rtl-iframe-relative.html
               compositing/rtl/rtl-relative.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@89632 268f45cc-cd09-0410-ab3c-d52691b4dbfc

47 files changed:
LayoutTests/ChangeLog
LayoutTests/compositing/rtl/rtl-absolute-expected.png [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-absolute-expected.txt [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-absolute-overflow-expected.png [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-absolute-overflow-expected.txt [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled-expected.png [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled.html [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-absolute-overflow.html [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-absolute.html [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-fixed-expected.png [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-fixed-expected.txt [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-fixed-overflow-expected.png [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-fixed-overflow-expected.txt [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled-expected.png [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled.html [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-fixed-overflow.html [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-fixed.html [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-absolute-expected.png [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-absolute-expected.txt [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-expected.png [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-expected.txt [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.png [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-scrolled.html [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow.html [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-absolute.html [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-fixed-expected.png [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-fixed-expected.txt [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-expected.png [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-expected.txt [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.png [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-scrolled.html [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow.html [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-fixed.html [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-relative-expected.png [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-relative-expected.txt [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-iframe-relative.html [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-relative-expected.png [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-relative-expected.txt [new file with mode: 0644]
LayoutTests/compositing/rtl/rtl-relative.html [new file with mode: 0644]
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/mac/Skipped
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerBacking.cpp

index d82e734..bea5667 100644 (file)
@@ -1,3 +1,66 @@
+2011-06-23  Adrienne Walker  <enne@google.com>
+
+        Reviewed by Simon Fraser.
+
+        Incorrect RenderLayer transforms on overflow RTL pages
+        https://bugs.webkit.org/show_bug.cgi?id=60741
+
+        Add a number of composited positioning tests on pages with dir=rtl.
+        The reference images are all identical to what the non-composited path
+        generates.
+
+        The overflow-scrolled tests on Safari do not generate the right images
+        due to bug 63284, but the layer tree is correct so they are not
+        skipped.
+
+        * compositing/rtl/rtl-absolute-expected.png: Added.
+        * compositing/rtl/rtl-absolute-expected.txt: Added.
+        * compositing/rtl/rtl-absolute-overflow-expected.png: Added.
+        * compositing/rtl/rtl-absolute-overflow-expected.txt: Added.
+        * compositing/rtl/rtl-absolute-overflow-scrolled-expected.png: Added.
+        * compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt: Added.
+        * compositing/rtl/rtl-absolute-overflow-scrolled.html: Added.
+        * compositing/rtl/rtl-absolute-overflow.html: Added.
+        * compositing/rtl/rtl-absolute.html: Added.
+        * compositing/rtl/rtl-fixed-expected.png: Added.
+        * compositing/rtl/rtl-fixed-expected.txt: Added.
+        * compositing/rtl/rtl-fixed-overflow-expected.png: Added.
+        * compositing/rtl/rtl-fixed-overflow-expected.txt: Added.
+        * compositing/rtl/rtl-fixed-overflow-scrolled-expected.png: Added.
+        * compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt: Added.
+        * compositing/rtl/rtl-fixed-overflow-scrolled.html: Added.
+        * compositing/rtl/rtl-fixed-overflow.html: Added.
+        * compositing/rtl/rtl-fixed.html: Added.
+        * compositing/rtl/rtl-iframe-absolute-expected.png: Added.
+        * compositing/rtl/rtl-iframe-absolute-expected.txt: Added.
+        * compositing/rtl/rtl-iframe-absolute-overflow-expected.png: Added.
+        * compositing/rtl/rtl-iframe-absolute-overflow-expected.txt: Added.
+        * compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.png: Added.
+        * compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt: Added.
+        * compositing/rtl/rtl-iframe-absolute-overflow-scrolled.html: Added.
+        * compositing/rtl/rtl-iframe-absolute-overflow.html: Added.
+        * compositing/rtl/rtl-iframe-absolute.html: Added.
+        * compositing/rtl/rtl-iframe-fixed-expected.png: Added.
+        * compositing/rtl/rtl-iframe-fixed-expected.txt: Added.
+        * compositing/rtl/rtl-iframe-fixed-overflow-expected.png: Added.
+        * compositing/rtl/rtl-iframe-fixed-overflow-expected.txt: Added.
+        * compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.png: Added.
+        * compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt: Added.
+        * compositing/rtl/rtl-iframe-fixed-overflow-scrolled.html: Added.
+        * compositing/rtl/rtl-iframe-fixed-overflow.html: Added.
+        * compositing/rtl/rtl-iframe-fixed.html: Added.
+        * compositing/rtl/rtl-iframe-relative-expected.png: Added.
+        * compositing/rtl/rtl-iframe-relative-expected.txt: Added.
+        * compositing/rtl/rtl-iframe-relative.html: Added.
+        * compositing/rtl/rtl-relative-expected.png: Added.
+        * compositing/rtl/rtl-relative-expected.txt: Added.
+        * compositing/rtl/rtl-relative.html: Added.
+        * compositing/rtlclipping/rtl-absolute-overflow-scrolled-expected.png: Added.
+        * compositing/rtlclipping/rtl-absolute-overflow-scrolled-expected.txt: Added.
+        * compositing/rtlclipping/rtl-absolute-overflow-scrolled.html: Added.
+        * platform/chromium/test_expectations.txt:
+        * platform/mac/Skipped:
+
 2011-06-23  Jessie Berlin  <jberlin@apple.com>
 
         compositing/tiling/huge-layer* flakey
diff --git a/LayoutTests/compositing/rtl/rtl-absolute-expected.png b/LayoutTests/compositing/rtl/rtl-absolute-expected.png
new file mode 100644 (file)
index 0000000..9ea844f
Binary files /dev/null and b/LayoutTests/compositing/rtl/rtl-absolute-expected.png differ
diff --git a/LayoutTests/compositing/rtl/rtl-absolute-expected.txt b/LayoutTests/compositing/rtl/rtl-absolute-expected.txt
new file mode 100644 (file)
index 0000000..bdcf0c4
--- /dev/null
@@ -0,0 +1,16 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 50.00 50.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/compositing/rtl/rtl-absolute-overflow-expected.png b/LayoutTests/compositing/rtl/rtl-absolute-overflow-expected.png
new file mode 100644 (file)
index 0000000..9ea844f
Binary files /dev/null and b/LayoutTests/compositing/rtl/rtl-absolute-overflow-expected.png differ
diff --git a/LayoutTests/compositing/rtl/rtl-absolute-overflow-expected.txt b/LayoutTests/compositing/rtl/rtl-absolute-overflow-expected.txt
new file mode 100644 (file)
index 0000000..eb2a505
--- /dev/null
@@ -0,0 +1,17 @@
+(GraphicsLayer
+  (position -208.00 0.00)
+  (bounds 1008.00 1016.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 1008.00 1016.00)
+      (children 1
+        (GraphicsLayer
+          (position 258.00 50.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled-expected.png b/LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled-expected.png
new file mode 100644 (file)
index 0000000..9ea844f
Binary files /dev/null and b/LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled-expected.png differ
diff --git a/LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt b/LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt
new file mode 100644 (file)
index 0000000..424ff37
--- /dev/null
@@ -0,0 +1,17 @@
+(GraphicsLayer
+  (position -208.00 0.00)
+  (bounds 1008.00 1016.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 1008.00 1016.00)
+      (children 1
+        (GraphicsLayer
+          (position 51.00 50.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled.html b/LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled.html
new file mode 100644 (file)
index 0000000..9f3b034
--- /dev/null
@@ -0,0 +1,66 @@
+<html>
+<head>
+<style>
+    body {
+        direction: rtl;
+        overflow: hidden;
+    }
+
+    .positioned {
+        position: absolute;
+        top: 50px;
+        left: 50px;
+        width: 100px;
+        height: 100px;
+    }
+
+    #indicator {
+        background-color: red;
+    }
+
+    #layer {
+        -webkit-transform:translateZ(0);
+        background-color: green;
+    }
+
+    #root {
+        width: 1000px;
+        height: 1000px;
+    }
+
+    #layertree {
+        position: absolute;
+        top: 10000px;
+        left: 0px;
+    }
+</style>
+<script>
+    function doTest() {
+        if (window.layoutTestController) {
+            layoutTestController.waitUntilDone();
+            layoutTestController.dumpAsText(true);
+        }
+
+        // The far left coordinate of the document varies by window width.
+        var offset = document.body.clientWidth - document.body.scrollWidth + 1;
+        document.getElementById('layer').style.left = offset + 50;
+        document.getElementById('indicator').style.left = offset + 50;
+
+        window.setTimeout(function() {
+            window.scrollTo(offset, 0);
+            if (window.layoutTestController) {
+                document.getElementById('layertree').innerText = layoutTestController.layerTreeAsText();
+                layoutTestController.notifyDone();
+            }
+        }, 0);
+    }
+    window.addEventListener('load', doTest, false);
+</script>
+<body>
+    <div id="root"></div>
+    <div class="positioned" id="indicator"></div>
+    <div class="positioned" id="layer"></div>
+
+    <pre id="layertree"></pre>
+</body>
+</html>
diff --git a/LayoutTests/compositing/rtl/rtl-absolute-overflow.html b/LayoutTests/compositing/rtl/rtl-absolute-overflow.html
new file mode 100644 (file)
index 0000000..852d21f
--- /dev/null
@@ -0,0 +1,53 @@
+<html>
+<head>
+<style>
+    body {
+        direction: rtl;
+        overflow: hidden;
+    }
+
+    .positioned {
+        position: absolute;
+        top: 50px;
+        left: 50px;
+        width: 100px;
+        height: 100px;
+    }
+
+    .indicator {
+        background-color: red;
+    }
+
+    .layer {
+        -webkit-transform:translateZ(0);
+        background-color: green;
+    }
+
+    #root {
+        width: 1000px;
+        height: 1000px;
+    }
+
+    #layertree {
+        position: absolute;
+        top: 10000px;
+        left: 0px;
+    }
+</style>
+<script>
+    function doTest() {
+        if (window.layoutTestController) {
+            document.getElementById('layertree').innerText = layoutTestController.layerTreeAsText();
+            layoutTestController.dumpAsText(true);
+        }
+    }
+    window.addEventListener('load', doTest, false);
+</script>
+<body>
+    <div id="root"></div>
+    <div class="positioned indicator"></div>
+    <div class="positioned layer"></div>
+
+    <pre id="layertree"></pre>
+</body>
+</html>
diff --git a/LayoutTests/compositing/rtl/rtl-absolute.html b/LayoutTests/compositing/rtl/rtl-absolute.html
new file mode 100644 (file)
index 0000000..7582475
--- /dev/null
@@ -0,0 +1,47 @@
+<html>
+<head>
+<style>
+    body {
+        direction: rtl;
+        overflow: hidden;
+    }
+
+    .positioned {
+        position: absolute;
+        top: 50px;
+        left: 50px;
+        width: 100px;
+        height: 100px;
+    }
+
+    .indicator {
+        background-color: red;
+    }
+
+    .layer {
+        -webkit-transform:translateZ(0);
+        background-color: green;
+    }
+
+    #layertree {
+        position: absolute;
+        top: 10000px;
+        left: 0px;
+    }
+</style>
+<script>
+    function doTest() {
+        if (window.layoutTestController) {
+            document.getElementById('layertree').innerText = layoutTestController.layerTreeAsText();
+            layoutTestController.dumpAsText(true);
+        }
+    }
+    window.addEventListener('load', doTest, false);
+</script>
+<body>
+    <div class="positioned indicator"></div>
+    <div class="positioned layer"></div>
+
+    <pre id="layertree"></pre>
+</body>
+</html>
diff --git a/LayoutTests/compositing/rtl/rtl-fixed-expected.png b/LayoutTests/compositing/rtl/rtl-fixed-expected.png
new file mode 100644 (file)
index 0000000..9ea844f
Binary files /dev/null and b/LayoutTests/compositing/rtl/rtl-fixed-expected.png differ
diff --git a/LayoutTests/compositing/rtl/rtl-fixed-expected.txt b/LayoutTests/compositing/rtl/rtl-fixed-expected.txt
new file mode 100644 (file)
index 0000000..bdcf0c4
--- /dev/null
@@ -0,0 +1,16 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 50.00 50.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/compositing/rtl/rtl-fixed-overflow-expected.png b/LayoutTests/compositing/rtl/rtl-fixed-overflow-expected.png
new file mode 100644 (file)
index 0000000..9ea844f
Binary files /dev/null and b/LayoutTests/compositing/rtl/rtl-fixed-overflow-expected.png differ
diff --git a/LayoutTests/compositing/rtl/rtl-fixed-overflow-expected.txt b/LayoutTests/compositing/rtl/rtl-fixed-overflow-expected.txt
new file mode 100644 (file)
index 0000000..eb2a505
--- /dev/null
@@ -0,0 +1,17 @@
+(GraphicsLayer
+  (position -208.00 0.00)
+  (bounds 1008.00 1016.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 1008.00 1016.00)
+      (children 1
+        (GraphicsLayer
+          (position 258.00 50.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled-expected.png b/LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled-expected.png
new file mode 100644 (file)
index 0000000..9ea844f
Binary files /dev/null and b/LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled-expected.png differ
diff --git a/LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt b/LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt
new file mode 100644 (file)
index 0000000..424ff37
--- /dev/null
@@ -0,0 +1,17 @@
+(GraphicsLayer
+  (position -208.00 0.00)
+  (bounds 1008.00 1016.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 1008.00 1016.00)
+      (children 1
+        (GraphicsLayer
+          (position 51.00 50.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled.html b/LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled.html
new file mode 100644 (file)
index 0000000..8088ce1
--- /dev/null
@@ -0,0 +1,64 @@
+<html>
+<head>
+<style>
+    body {
+        direction: rtl;
+        overflow: hidden;
+    }
+
+    .positioned {
+        position: fixed;
+        top: 50px;
+        left: 50px;
+        width: 100px;
+        height: 100px;
+    }
+
+    .indicator {
+        background-color: red;
+    }
+
+    .layer {
+        -webkit-transform:translateZ(0);
+        background-color: green;
+    }
+
+    #root {
+        width: 1000px;
+        height: 1000px;
+    }
+
+    #layertree {
+        position: absolute;
+        top: 10000px;
+        left: 0px;
+    }
+</style>
+<script>
+    function doTest() {
+        if (window.layoutTestController) {
+            layoutTestController.waitUntilDone();
+            layoutTestController.dumpAsText(true);
+        }
+
+        // The far left coordinate of the document varies by window width.
+        var offset = document.body.clientWidth - document.body.scrollWidth + 1;
+
+        window.setTimeout(function() {
+            window.scrollTo(offset, 0);
+            if (window.layoutTestController) {
+                document.getElementById('layertree').innerText = layoutTestController.layerTreeAsText();
+                layoutTestController.notifyDone();
+            }
+        }, 0);
+    }
+    window.addEventListener('load', doTest, false);
+</script>
+<body>
+    <div id="root"></div>
+    <div class="positioned indicator"></div>
+    <div class="positioned layer"></div>
+
+    <pre id="layertree"></pre>
+</body>
+</html>
diff --git a/LayoutTests/compositing/rtl/rtl-fixed-overflow.html b/LayoutTests/compositing/rtl/rtl-fixed-overflow.html
new file mode 100644 (file)
index 0000000..569ef91
--- /dev/null
@@ -0,0 +1,53 @@
+<html>
+<head>
+<style>
+    body {
+        direction: rtl;
+        overflow: hidden;
+    }
+
+    .positioned {
+        position: fixed;
+        top: 50px;
+        left: 50px;
+        width: 100px;
+        height: 100px;
+    }
+
+    .indicator {
+        background-color: red;
+    }
+
+    .layer {
+        -webkit-transform:translateZ(0);
+        background-color: green;
+    }
+
+    #root {
+        width: 1000px;
+        height: 1000px;
+    }
+
+    #layertree {
+        position: absolute;
+        top: 10000px;
+        left: 0px;
+    }
+</style>
+<script>
+    function doTest() {
+        if (window.layoutTestController) {
+            document.getElementById('layertree').innerText = layoutTestController.layerTreeAsText();
+            layoutTestController.dumpAsText(true);
+        }
+    }
+    window.addEventListener('load', doTest, false);
+</script>
+<body>
+    <div id="root"></div>
+    <div class="positioned indicator"></div>
+    <div class="positioned layer"></div>
+
+    <pre id="layertree"></pre>
+</body>
+</html>
diff --git a/LayoutTests/compositing/rtl/rtl-fixed.html b/LayoutTests/compositing/rtl/rtl-fixed.html
new file mode 100644 (file)
index 0000000..b0de666
--- /dev/null
@@ -0,0 +1,47 @@
+<html>
+<head>
+<style>
+    body {
+        direction: rtl;
+        overflow: hidden;
+    }
+
+    .positioned {
+        position: fixed;
+        top: 50px;
+        left: 50px;
+        width: 100px;
+        height: 100px;
+    }
+
+    .indicator {
+        background-color: red;
+    }
+
+    .layer {
+        -webkit-transform:translateZ(0);
+        background-color: green;
+    }
+
+    #layertree {
+        position: absolute;
+        top: 10000px;
+        left: 0px;
+    }
+</style>
+<script>
+    function doTest() {
+        if (window.layoutTestController) {
+            document.getElementById('layertree').innerText = layoutTestController.layerTreeAsText();
+            layoutTestController.dumpAsText(true);
+        }
+    }
+    window.addEventListener('load', doTest, false);
+</script>
+<body>
+    <div class="positioned indicator"></div>
+    <div class="positioned layer"></div>
+
+    <pre id="layertree"></pre>
+</body>
+</html>
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-absolute-expected.png b/LayoutTests/compositing/rtl/rtl-iframe-absolute-expected.png
new file mode 100644 (file)
index 0000000..9ea844f
Binary files /dev/null and b/LayoutTests/compositing/rtl/rtl-iframe-absolute-expected.png differ
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-absolute-expected.txt b/LayoutTests/compositing/rtl/rtl-iframe-absolute-expected.txt
new file mode 100644 (file)
index 0000000..ae39989
--- /dev/null
@@ -0,0 +1,46 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (bounds 400.00 400.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (children 1
+                (GraphicsLayer
+                  (bounds 400.00 400.00)
+                  (children 1
+                    (GraphicsLayer
+                      (children 1
+                        (GraphicsLayer
+                          (bounds 400.00 10733.00)
+                          (children 1
+                            (GraphicsLayer
+                              (bounds 400.00 10733.00)
+                              (drawsContent 1)
+                              (children 1
+                                (GraphicsLayer
+                                  (position 50.00 50.00)
+                                  (bounds 100.00 100.00)
+                                  (drawsContent 1)
+                                )
+                              )
+                            )
+                          )
+                        )
+                      )
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-expected.png b/LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-expected.png
new file mode 100644 (file)
index 0000000..9ea844f
Binary files /dev/null and b/LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-expected.png differ
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-expected.txt b/LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-expected.txt
new file mode 100644 (file)
index 0000000..5fb0796
--- /dev/null
@@ -0,0 +1,47 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (bounds 400.00 400.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (children 1
+                (GraphicsLayer
+                  (bounds 400.00 400.00)
+                  (children 1
+                    (GraphicsLayer
+                      (children 1
+                        (GraphicsLayer
+                          (position -608.00 0.00)
+                          (bounds 1008.00 10749.00)
+                          (children 1
+                            (GraphicsLayer
+                              (bounds 1008.00 10749.00)
+                              (drawsContent 1)
+                              (children 1
+                                (GraphicsLayer
+                                  (position 658.00 50.00)
+                                  (bounds 100.00 100.00)
+                                  (drawsContent 1)
+                                )
+                              )
+                            )
+                          )
+                        )
+                      )
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.png b/LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.png
new file mode 100644 (file)
index 0000000..9ea844f
Binary files /dev/null and b/LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.png differ
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt b/LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt
new file mode 100644 (file)
index 0000000..54bf407
--- /dev/null
@@ -0,0 +1,47 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (bounds 400.00 400.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (children 1
+                (GraphicsLayer
+                  (bounds 400.00 400.00)
+                  (children 1
+                    (GraphicsLayer
+                      (children 1
+                        (GraphicsLayer
+                          (position -608.00 0.00)
+                          (bounds 1008.00 1016.00)
+                          (children 1
+                            (GraphicsLayer
+                              (bounds 1008.00 1016.00)
+                              (drawsContent 1)
+                              (children 1
+                                (GraphicsLayer
+                                  (position 51.00 50.00)
+                                  (bounds 100.00 100.00)
+                                  (drawsContent 1)
+                                )
+                              )
+                            )
+                          )
+                        )
+                      )
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-scrolled.html b/LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow-scrolled.html
new file mode 100644 (file)
index 0000000..08e2c15
--- /dev/null
@@ -0,0 +1,37 @@
+<html>
+<head>
+<style>
+    body {
+        overflow: hidden;
+    }
+
+    iframe {
+        position: absolute;
+        top: 0px;
+        left: 0px;
+        width: 400px;
+        height: 400px;
+        border: none;
+    }
+
+    #layertree {
+        position: absolute;
+        top: 10000px;
+        left: 0px;
+    }
+</style>
+<script>
+    function doTest() {
+        if (window.layoutTestController) {
+            document.getElementById('layertree').innerText = layoutTestController.layerTreeAsText();
+            layoutTestController.dumpAsText(true);
+        }
+    }
+    window.addEventListener('load', doTest, false);
+</script>
+<body>
+    <iframe src="rtl-absolute-overflow-scrolled.html"></iframe>
+
+    <pre id="layertree"></pre>
+</body>
+</html>
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow.html b/LayoutTests/compositing/rtl/rtl-iframe-absolute-overflow.html
new file mode 100644 (file)
index 0000000..759b03f
--- /dev/null
@@ -0,0 +1,37 @@
+<html>
+<head>
+<style>
+    body {
+        overflow: hidden;
+    }
+
+    iframe {
+        position: absolute;
+        top: 0px;
+        left: 0px;
+        width: 400px;
+        height: 400px;
+        border: none;
+    }
+
+    #layertree {
+        position: absolute;
+        top: 10000px;
+        left: 0px;
+    }
+</style>
+<script>
+    function doTest() {
+        if (window.layoutTestController) {
+            document.getElementById('layertree').innerText = layoutTestController.layerTreeAsText();
+            layoutTestController.dumpAsText(true);
+        }
+    }
+    window.addEventListener('load', doTest, false);
+</script>
+<body>
+    <iframe src="rtl-absolute-overflow.html"></iframe>
+
+    <pre id="layertree"></pre>
+</body>
+</html>
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-absolute.html b/LayoutTests/compositing/rtl/rtl-iframe-absolute.html
new file mode 100644 (file)
index 0000000..e871e84
--- /dev/null
@@ -0,0 +1,37 @@
+<html>
+<head>
+<style>
+    body {
+        overflow: hidden;
+    }
+
+    iframe {
+        position: absolute;
+        top: 0px;
+        left: 0px;
+        width: 400px;
+        height: 400px;
+        border: none;
+    }
+
+    #layertree {
+        position: absolute;
+        top: 10000px;
+        left: 0px;
+    }
+</style>
+<script>
+    function doTest() {
+        if (window.layoutTestController) {
+            document.getElementById('layertree').innerText = layoutTestController.layerTreeAsText();
+            layoutTestController.dumpAsText(true);
+        }
+    }
+    window.addEventListener('load', doTest, false);
+</script>
+<body>
+    <iframe src="rtl-absolute.html"></iframe>
+
+    <pre id="layertree"></pre>
+</body>
+</html>
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-fixed-expected.png b/LayoutTests/compositing/rtl/rtl-iframe-fixed-expected.png
new file mode 100644 (file)
index 0000000..9ea844f
Binary files /dev/null and b/LayoutTests/compositing/rtl/rtl-iframe-fixed-expected.png differ
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-fixed-expected.txt b/LayoutTests/compositing/rtl/rtl-iframe-fixed-expected.txt
new file mode 100644 (file)
index 0000000..ae39989
--- /dev/null
@@ -0,0 +1,46 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (bounds 400.00 400.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (children 1
+                (GraphicsLayer
+                  (bounds 400.00 400.00)
+                  (children 1
+                    (GraphicsLayer
+                      (children 1
+                        (GraphicsLayer
+                          (bounds 400.00 10733.00)
+                          (children 1
+                            (GraphicsLayer
+                              (bounds 400.00 10733.00)
+                              (drawsContent 1)
+                              (children 1
+                                (GraphicsLayer
+                                  (position 50.00 50.00)
+                                  (bounds 100.00 100.00)
+                                  (drawsContent 1)
+                                )
+                              )
+                            )
+                          )
+                        )
+                      )
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-expected.png b/LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-expected.png
new file mode 100644 (file)
index 0000000..9ea844f
Binary files /dev/null and b/LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-expected.png differ
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-expected.txt b/LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-expected.txt
new file mode 100644 (file)
index 0000000..5fb0796
--- /dev/null
@@ -0,0 +1,47 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (bounds 400.00 400.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (children 1
+                (GraphicsLayer
+                  (bounds 400.00 400.00)
+                  (children 1
+                    (GraphicsLayer
+                      (children 1
+                        (GraphicsLayer
+                          (position -608.00 0.00)
+                          (bounds 1008.00 10749.00)
+                          (children 1
+                            (GraphicsLayer
+                              (bounds 1008.00 10749.00)
+                              (drawsContent 1)
+                              (children 1
+                                (GraphicsLayer
+                                  (position 658.00 50.00)
+                                  (bounds 100.00 100.00)
+                                  (drawsContent 1)
+                                )
+                              )
+                            )
+                          )
+                        )
+                      )
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.png b/LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.png
new file mode 100644 (file)
index 0000000..9ea844f
Binary files /dev/null and b/LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.png differ
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt b/LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt
new file mode 100644 (file)
index 0000000..9f2d20b
--- /dev/null
@@ -0,0 +1,47 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (bounds 400.00 400.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (children 1
+                (GraphicsLayer
+                  (bounds 400.00 400.00)
+                  (children 1
+                    (GraphicsLayer
+                      (children 1
+                        (GraphicsLayer
+                          (position -608.00 0.00)
+                          (bounds 1008.00 1016.00)
+                          (children 1
+                            (GraphicsLayer
+                              (bounds 1008.00 1016.00)
+                              (drawsContent 1)
+                              (children 1
+                                (GraphicsLayer
+                                  (position 658.00 50.00)
+                                  (bounds 100.00 100.00)
+                                  (drawsContent 1)
+                                )
+                              )
+                            )
+                          )
+                        )
+                      )
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-scrolled.html b/LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow-scrolled.html
new file mode 100644 (file)
index 0000000..d2bc038
--- /dev/null
@@ -0,0 +1,37 @@
+<html>
+<head>
+<style>
+    body {
+        overflow: hidden;
+    }
+
+    iframe {
+        position: absolute;
+        top: 0px;
+        left: 0px;
+        width: 400px;
+        height: 400px;
+        border: none;
+    }
+
+    #layertree {
+        position: absolute;
+        top: 10000px;
+        left: 0px;
+    }
+</style>
+<script>
+    function doTest() {
+        if (window.layoutTestController) {
+            document.getElementById('layertree').innerText = layoutTestController.layerTreeAsText();
+            layoutTestController.dumpAsText(true);
+        }
+    }
+    window.addEventListener('load', doTest, false);
+</script>
+<body>
+    <iframe src="rtl-fixed-overflow-scrolled.html"></iframe>
+
+    <pre id="layertree"></pre>
+</body>
+</html>
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow.html b/LayoutTests/compositing/rtl/rtl-iframe-fixed-overflow.html
new file mode 100644 (file)
index 0000000..33f1f20
--- /dev/null
@@ -0,0 +1,37 @@
+<html>
+<head>
+<style>
+    body {
+        overflow: hidden;
+    }
+
+    iframe {
+        position: absolute;
+        top: 0px;
+        left: 0px;
+        width: 400px;
+        height: 400px;
+        border: none;
+    }
+
+    #layertree {
+        position: absolute;
+        top: 10000px;
+        left: 0px;
+    }
+</style>
+<script>
+    function doTest() {
+        if (window.layoutTestController) {
+            document.getElementById('layertree').innerText = layoutTestController.layerTreeAsText();
+            layoutTestController.dumpAsText(true);
+        }
+    }
+    window.addEventListener('load', doTest, false);
+</script>
+<body>
+    <iframe src="rtl-fixed-overflow.html"></iframe>
+
+    <pre id="layertree"></pre>
+</body>
+</html>
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-fixed.html b/LayoutTests/compositing/rtl/rtl-iframe-fixed.html
new file mode 100644 (file)
index 0000000..cd6939c
--- /dev/null
@@ -0,0 +1,37 @@
+<html>
+<head>
+<style>
+    body {
+        overflow: hidden;
+    }
+
+    iframe {
+        position: absolute;
+        top: 0px;
+        left: 0px;
+        width: 400px;
+        height: 400px;
+        border: none;
+    }
+
+    #layertree {
+        position: absolute;
+        top: 10000px;
+        left: 0px;
+    }
+</style>
+<script>
+    function doTest() {
+        if (window.layoutTestController) {
+            document.getElementById('layertree').innerText = layoutTestController.layerTreeAsText();
+            layoutTestController.dumpAsText(true);
+        }
+    }
+    window.addEventListener('load', doTest, false);
+</script>
+<body>
+    <iframe src="rtl-fixed.html"></iframe>
+
+    <pre id="layertree"></pre>
+</body>
+</html>
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-relative-expected.png b/LayoutTests/compositing/rtl/rtl-iframe-relative-expected.png
new file mode 100644 (file)
index 0000000..489c909
Binary files /dev/null and b/LayoutTests/compositing/rtl/rtl-iframe-relative-expected.png differ
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-relative-expected.txt b/LayoutTests/compositing/rtl/rtl-iframe-relative-expected.txt
new file mode 100644 (file)
index 0000000..0e83865
--- /dev/null
@@ -0,0 +1,46 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (bounds 400.00 400.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (children 1
+                (GraphicsLayer
+                  (bounds 400.00 400.00)
+                  (children 1
+                    (GraphicsLayer
+                      (children 1
+                        (GraphicsLayer
+                          (bounds 400.00 10733.00)
+                          (children 1
+                            (GraphicsLayer
+                              (bounds 400.00 10733.00)
+                              (drawsContent 1)
+                              (children 1
+                                (GraphicsLayer
+                                  (position 242.00 58.00)
+                                  (bounds 100.00 100.00)
+                                  (drawsContent 1)
+                                )
+                              )
+                            )
+                          )
+                        )
+                      )
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/compositing/rtl/rtl-iframe-relative.html b/LayoutTests/compositing/rtl/rtl-iframe-relative.html
new file mode 100644 (file)
index 0000000..6518475
--- /dev/null
@@ -0,0 +1,47 @@
+<html>
+<head>
+<style>
+    body {
+        overflow: hidden;
+    }
+
+    iframe {
+        position: absolute;
+        top: 0px;
+        left: 0px;
+        width: 400px;
+        height: 400px;
+        border: none;
+    }
+
+    #indicator {
+        position: absolute;
+        top: 58px;
+        left: 242px;
+        width: 100px;
+        height: 100px;
+        background-color: red;
+    }
+
+    #layertree {
+        position: absolute;
+        top: 10000px;
+        left: 0px;
+    }
+</style>
+<script>
+    function doTest() {
+        if (window.layoutTestController) {
+            document.getElementById('layertree').innerText = layoutTestController.layerTreeAsText();
+            layoutTestController.dumpAsText(true);
+        }
+    }
+    window.addEventListener('load', doTest, false);
+</script>
+<body>
+    <div id="indicator"></div>
+    <iframe src="rtl-relative.html"></iframe>
+
+    <pre id="layertree"></pre>
+</body>
+</html>
diff --git a/LayoutTests/compositing/rtl/rtl-relative-expected.png b/LayoutTests/compositing/rtl/rtl-relative-expected.png
new file mode 100644 (file)
index 0000000..b0c9864
Binary files /dev/null and b/LayoutTests/compositing/rtl/rtl-relative-expected.png differ
diff --git a/LayoutTests/compositing/rtl/rtl-relative-expected.txt b/LayoutTests/compositing/rtl/rtl-relative-expected.txt
new file mode 100644 (file)
index 0000000..c9daf41
--- /dev/null
@@ -0,0 +1,16 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 642.00 58.00)
+          (bounds 100.00 100.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/compositing/rtl/rtl-relative.html b/LayoutTests/compositing/rtl/rtl-relative.html
new file mode 100644 (file)
index 0000000..37b1b1b
--- /dev/null
@@ -0,0 +1,49 @@
+<html>
+<head>
+<style>
+    body {
+        direction: rtl;
+        overflow: hidden;
+    }
+
+    #indicator {
+        position: absolute;
+        top: 58px;
+        left: 642px;
+        width: 100px;
+        height: 100px;
+        background-color: red;
+    }
+
+    #layer {
+        -webkit-transform:translateZ(0);
+        position: relative;
+        top: 50px;
+        right: 50px;
+        width: 100px;
+        height: 100px;
+        background-color: green;
+    }
+
+    #layertree {
+        position: absolute;
+        top: 10000px;
+        left: 0px;
+    }
+</style>
+<script>
+    function doTest() {
+        if (window.layoutTestController) {
+            document.getElementById('layertree').innerText = layoutTestController.layerTreeAsText();
+            layoutTestController.dumpAsText(true);
+        }
+    }
+    window.addEventListener('load', doTest, false);
+</script>
+<body>
+    <div id="indicator"></div>
+    <div id="layer"></div>
+
+    <pre id="layertree"></pre>
+</body>
+</html>
index ab651d6..8077868 100644 (file)
@@ -3942,6 +3942,15 @@ BUGRNIWA MAC : editing/selection/vertical-rl-ltr-extend-line-forward-br.html = I
 BUGRNIWA MAC : editing/selection/vertical-rl-ltr-extend-line-forward-p.html = IMAGE PASS
 BUGRNIWA MAC : editing/selection/vertical-rl-ltr-extend-line-forward-wrap.html = IMAGE PASS
 
+// Broken because Chromium disables compositing for RTL pages
+BUGWK56591 GPU : compositing/rtl/rtl-absolute-overflow-scrolled.html = TEXT
+BUGWK56591 GPU : compositing/rtl/rtl-absolute-overflow.html = TEXT
+BUGWK56591 GPU : compositing/rtl/rtl-absolute.html = TEXT
+BUGWK56591 GPU : compositing/rtl/rtl-fixed-overflow-scrolled.html = TEXT
+BUGWK56591 GPU : compositing/rtl/rtl-fixed-overflow.html = TEXT
+BUGWK56591 GPU : compositing/rtl/rtl-fixed.html = TEXT
+BUGWK56591 GPU : compositing/rtl/rtl-relative.html = TEXT
+
 BUGCR86714 MAC GPU : compositing/tiling/huge-layer-resize.html = CRASH
 BUGCR86714 MAC GPU : media/video-controls-rendering.html = IMAGE CRASH
 BUGCR86714 MAC GPU : media/video-zoom.html = IMAGE CRASH
index b6e1ea8..4bcbdcc 100644 (file)
@@ -368,3 +368,12 @@ css3/flexbox
 
 # JSC does not support setIsolatedWorldSecurityOrigin (http://webkit.org/b/61540)
 http/tests/security/isolatedWorld/cross-origin-xhr.html
+
+# https://bugs.webkit.org/show_bug.cgi?id=63282 layerTreeAsText doesn't work for iframes
+compositing/rtl/rtl-iframe-absolute-overflow-scrolled.html
+compositing/rtl/rtl-iframe-absolute-overflow.html
+compositing/rtl/rtl-iframe-absolute.html
+compositing/rtl/rtl-iframe-fixed-overflow-scrolled.html
+compositing/rtl/rtl-iframe-fixed-overflow.html
+compositing/rtl/rtl-iframe-fixed.html
+compositing/rtl/rtl-iframe-relative.html
index 1f205db..a1f0626 100644 (file)
@@ -1,3 +1,35 @@
+2011-06-23  Adrienne Walker  <enne@google.com>
+
+        Reviewed by Simon Fraser.
+
+        Incorrect RenderLayer transforms on overflow RTL pages
+        https://bugs.webkit.org/show_bug.cgi?id=60741
+
+        Fix positioning of the root graphics layer for RTL pages.  The fact
+        that the left side of the page is negative for pages with overflow is
+        not taken into account when calculating the position.  This negative
+        value ends up being double-counted for the root graphics layer (once
+        in the position and once in the offset) and it shifts child layers
+        into the wrong place.
+
+        Tests: compositing/rtl/rtl-absolute-overflow-scrolled.html
+               compositing/rtl/rtl-absolute-overflow.html
+               compositing/rtl/rtl-absolute.html
+               compositing/rtl/rtl-fixed-overflow-scrolled.html
+               compositing/rtl/rtl-fixed-overflow.html
+               compositing/rtl/rtl-fixed.html
+               compositing/rtl/rtl-iframe-absolute-overflow-scrolled.html
+               compositing/rtl/rtl-iframe-absolute-overflow.html
+               compositing/rtl/rtl-iframe-absolute.html
+               compositing/rtl/rtl-iframe-fixed-overflow-scrolled.html
+               compositing/rtl/rtl-iframe-fixed-overflow.html
+               compositing/rtl/rtl-iframe-fixed.html
+               compositing/rtl/rtl-iframe-relative.html
+               compositing/rtl/rtl-relative.html
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
+
 2011-06-23  Emil A Eklund  <eae@chromium.org>
 
         Reviewed by Eric Seidel.
index 3634784..1e1848e 100644 (file)
@@ -377,8 +377,12 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
         // position relative to it.
         IntRect clippingBox = clipBox(toRenderBox(compAncestor->renderer()));
         graphicsLayerParentLocation = clippingBox.location();
-    } else
+    } else if (compAncestor)
         graphicsLayerParentLocation = ancestorCompositingBounds.location();
+    else {
+        ASSERT(m_owningLayer->isRootLayer());
+        graphicsLayerParentLocation = localCompositingBounds.location();
+    }
     
     if (compAncestor && m_ancestorClippingLayer) {
         // Call calculateRects to get the backgroundRect which is what is used to clip the contents of this