[CSS Regions] scrollIntoView for elements flowed into regions
authorstavila@adobe.com <stavila@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Feb 2014 10:33:26 +0000 (10:33 +0000)
committerstavila@adobe.com <stavila@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Feb 2014 10:33:26 +0000 (10:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=129151

Reviewed by Mihnea Ovidenie.

Added tests for scrollIntoView on elements flowed inside regions.

* fast/regions/scroll-into-view-expected.html: Added.
* fast/regions/scroll-into-view-relative-expected.html: Added.
* fast/regions/scroll-into-view-relative.html: Added.
* fast/regions/scroll-into-view.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/fast/regions/scroll-into-view-expected.html [new file with mode: 0644]
LayoutTests/fast/regions/scroll-into-view-relative-expected.html [new file with mode: 0644]
LayoutTests/fast/regions/scroll-into-view-relative.html [new file with mode: 0644]
LayoutTests/fast/regions/scroll-into-view.html [new file with mode: 0644]

index f6a268235f3876a02bd511f9568e1fc7017d68fe..6c84ab5e8093bb69f578d5fd9d4648d43fcbb1b0 100644 (file)
@@ -1,3 +1,17 @@
+2014-02-25  Radu Stavila  <stavila@adobe.com>
+
+        [CSS Regions] scrollIntoView for elements flowed into regions
+        https://bugs.webkit.org/show_bug.cgi?id=129151
+
+        Reviewed by Mihnea Ovidenie.
+
+        Added tests for scrollIntoView on elements flowed inside regions.
+
+        * fast/regions/scroll-into-view-expected.html: Added.
+        * fast/regions/scroll-into-view-relative-expected.html: Added.
+        * fast/regions/scroll-into-view-relative.html: Added.
+        * fast/regions/scroll-into-view.html: Added.
+
 2014-02-25  Mihai Tica  <mitica@adobe.com>
 
         [CSS Blending] -webkit-mix-blend-mode should force transform-style: flat.
diff --git a/LayoutTests/fast/regions/scroll-into-view-expected.html b/LayoutTests/fast/regions/scroll-into-view-expected.html
new file mode 100644 (file)
index 0000000..326e1c8
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+
+<script type="text/javascript">
+    if (window.testRunner)
+        testRunner.waitUntilDone();
+
+    function onLoad()
+    {
+        setTimeout(
+            function()
+            {
+                var content = document.getElementById("content");
+                content.scrollIntoView(true);
+
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            },
+            0);
+    }
+</script>
+
+<style>
+    #region {
+        border: 4px solid brown;
+        padding: 5px;
+        position: relative;
+        top: 800px;
+    }
+
+    #content {
+        border: 2px solid green;
+        width: 210px;
+        height: 150px;
+        padding: 3px;
+    }
+</style>
+
+<body onload="onLoad()">
+    <div id="region">
+        <div id="content">
+            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <span style="color:brown"><b>THE END</b></span>.
+        </div>
+    </div>
+</body>
\ No newline at end of file
diff --git a/LayoutTests/fast/regions/scroll-into-view-relative-expected.html b/LayoutTests/fast/regions/scroll-into-view-relative-expected.html
new file mode 100644 (file)
index 0000000..222ddfc
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+
+<script type="text/javascript">
+    if (window.testRunner)
+        testRunner.waitUntilDone();
+
+    function onLoad()
+    {
+        setTimeout(
+            function()
+            {
+                var content = document.getElementById("content");
+                content.scrollIntoView(true);
+
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            },
+            0);
+    }
+</script>
+
+<style>
+    #region {
+        border: 4px solid brown;
+        padding: 5px;
+        position: relative;
+        top: 800px;
+    }
+
+    #content {
+        border: 2px solid green;
+        width: 210px;
+        height: 150px;
+        padding: 3px;
+        position: relative;
+        top: 200px;
+    }
+</style>
+
+<body onload="onLoad()">
+    <div id="region">
+        <div id="content">
+            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <span style="color:brown"><b>THE END</b></span>.
+        </div>
+    </div>
+</body>
\ No newline at end of file
diff --git a/LayoutTests/fast/regions/scroll-into-view-relative.html b/LayoutTests/fast/regions/scroll-into-view-relative.html
new file mode 100644 (file)
index 0000000..59c1dc2
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+
+<script type="text/javascript">
+    if (window.testRunner)
+        testRunner.waitUntilDone();
+
+    function onLoad()
+    {
+        setTimeout(
+            function()
+            {
+                var content = document.getElementById("content");
+                content.scrollIntoView(true);
+
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            },
+            0);
+    }
+</script>
+
+<style>
+    #region {
+        -webkit-flow-from: flow;
+        border: 4px solid brown;
+        padding: 5px;
+        position: relative;
+        top: 800px;
+    }
+
+    #content {
+        -webkit-flow-into: flow;
+        border: 2px solid green;
+        width: 210px;
+        height: 150px;
+        padding: 3px;
+        position: relative;
+        top: 200px;
+    }
+</style>
+
+<body onload="onLoad()">
+    <div id="region"></div>
+
+    <div id="content">
+        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <span style="color:brown"><b>THE END</b></span>.
+    </div>
+
+</body>
\ No newline at end of file
diff --git a/LayoutTests/fast/regions/scroll-into-view.html b/LayoutTests/fast/regions/scroll-into-view.html
new file mode 100644 (file)
index 0000000..7b7a2d8
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+
+<script type="text/javascript">
+    if (window.testRunner)
+        testRunner.waitUntilDone();
+
+    function onLoad()
+    {
+        setTimeout(
+            function()
+            {
+                var content = document.getElementById("content");
+                content.scrollIntoView(true);
+
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            },
+            0);
+    }
+</script>
+
+<style>
+    #region {
+        -webkit-flow-from: flow;
+        border: 4px solid brown;
+        padding: 5px;
+        position: relative;
+        top: 800px;
+    }
+
+    #content {
+        -webkit-flow-into: flow;
+        border: 2px solid green;
+        width: 210px;
+        height: 150px;
+        padding: 3px;
+    }
+</style>
+
+<body onload="onLoad()">
+    <div id="region"></div>
+
+    <div id="content">
+        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <span style="color:brown"><b>THE END</b></span>.
+    </div>
+
+</body>
\ No newline at end of file