Title: [240535] trunk/LayoutTests
Revision
240535
Author
[email protected]
Date
2019-01-25 17:40:20 -0800 (Fri, 25 Jan 2019)

Log Message

Add a scrolling tree test that toggles scrollability on an intermediate iframe
https://bugs.webkit.org/show_bug.cgi?id=193849

Reviewed by Dean Jackson.

* platform/ios-wk2/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt: Added.
* scrollingcoordinator/scrolling-tree/resources/scroll-toggling-frame.html: Added.
* scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt: Added.
* scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (240534 => 240535)


--- trunk/LayoutTests/ChangeLog	2019-01-26 01:06:51 UTC (rev 240534)
+++ trunk/LayoutTests/ChangeLog	2019-01-26 01:40:20 UTC (rev 240535)
@@ -1,3 +1,15 @@
+2019-01-25  Simon Fraser  <[email protected]>
+
+        Add a scrolling tree test that toggles scrollability on an intermediate iframe
+        https://bugs.webkit.org/show_bug.cgi?id=193849
+
+        Reviewed by Dean Jackson.
+
+        * platform/ios-wk2/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt: Added.
+        * scrollingcoordinator/scrolling-tree/resources/scroll-toggling-frame.html: Added.
+        * scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt: Added.
+        * scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling.html: Added.
+
 2019-01-25  Truitt Savell  <[email protected]>
 
         Remove expectation for inspector/css/createStyleSheet.html as test appears to be passing. 

Added: trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt (0 => 240535)


--- trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt	2019-01-26 01:40:20 UTC (rev 240535)
@@ -0,0 +1,102 @@
+
+Scrolling tree on non-scrollable
+
+
+(Frame scrolling node
+  (scrollable area size 800 600)
+  (contents size 800 645)
+  (scrollable area parameters 
+    (horizontal scroll elasticity 1)
+    (vertical scroll elasticity 1)
+    (horizontal scrollbar mode 0)
+    (vertical scrollbar mode 0))
+  (visual viewport enabled 1)
+  (layout viewport at (0,0) size 800x600)
+  (min layout viewport origin (0,0))
+  (max layout viewport origin (0,45))
+  (behavior for fixed 0)
+  (children 1
+    (Frame scrolling node
+      (scrollable area size 600 500)
+      (contents size 600 1024)
+      (scrollable area parameters 
+        (horizontal scroll elasticity 1)
+        (vertical scroll elasticity 1)
+        (horizontal scrollbar mode 0)
+        (vertical scrollbar mode 0))
+      (visual viewport enabled 1)
+      (layout viewport at (0,0) size 600x500)
+      (min layout viewport origin (0,0))
+      (max layout viewport origin (0,524))
+      (behavior for fixed 0)
+      (children 1
+        (Frame scrolling node
+          (scrollable area size 500 400)
+          (contents size 500 1024)
+          (scrollable area parameters 
+            (horizontal scroll elasticity 1)
+            (vertical scroll elasticity 1)
+            (horizontal scrollbar mode 0)
+            (vertical scrollbar mode 0))
+          (visual viewport enabled 1)
+          (layout viewport at (0,0) size 500x400)
+          (min layout viewport origin (0,0))
+          (max layout viewport origin (0,624))
+          (behavior for fixed 0)
+        )
+      )
+    )
+  )
+)
+
+Scrolling tree on scrollable
+
+
+(Frame scrolling node
+  (scrollable area size 800 600)
+  (contents size 800 1333)
+  (scrollable area parameters 
+    (horizontal scroll elasticity 1)
+    (vertical scroll elasticity 1)
+    (horizontal scrollbar mode 0)
+    (vertical scrollbar mode 0))
+  (visual viewport enabled 1)
+  (layout viewport at (0,0) size 800x600)
+  (min layout viewport origin (0,0))
+  (max layout viewport origin (0,733))
+  (behavior for fixed 0)
+  (children 1
+    (Frame scrolling node
+      (scrollable area size 600 500)
+      (contents size 600 500)
+      (scrollable area parameters 
+        (horizontal scroll elasticity 1)
+        (vertical scroll elasticity 1)
+        (horizontal scrollbar mode 0)
+        (vertical scrollbar mode 0))
+      (visual viewport enabled 1)
+      (layout viewport at (0,0) size 600x500)
+      (min layout viewport origin (0,0))
+      (max layout viewport origin (0,0))
+      (behavior for fixed 0)
+      (children 1
+        (Frame scrolling node
+          (scrollable area size 500 400)
+          (contents size 500 1024)
+          (scrollable area parameters 
+            (horizontal scroll elasticity 1)
+            (vertical scroll elasticity 1)
+            (horizontal scrollbar mode 0)
+            (vertical scrollbar mode 0))
+          (visual viewport enabled 1)
+          (layout viewport at (0,0) size 500x400)
+          (min layout viewport origin (0,0))
+          (max layout viewport origin (0,624))
+          (behavior for fixed 0)
+        )
+      )
+    )
+  )
+)
+
+

Added: trunk/LayoutTests/scrollingcoordinator/scrolling-tree/resources/scroll-toggling-frame.html (0 => 240535)


--- trunk/LayoutTests/scrollingcoordinator/scrolling-tree/resources/scroll-toggling-frame.html	                        (rev 0)
+++ trunk/LayoutTests/scrollingcoordinator/scrolling-tree/resources/scroll-toggling-frame.html	2019-01-26 01:40:20 UTC (rev 240535)
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <style>
+        body {
+            height: 1000px;
+        }
+        body.changed {
+            height: auto;
+        }
+        iframe {
+            width: 500px;
+            height: 400px;
+            background-color: #FFFFC1;
+            box-shadow: 0 0 10px black;
+            border: 2px solid black;
+        }
+    </style>
+    <script>
+        window.addEventListener('load', () => {
+            requestAnimationFrame(() => {
+                document.body.classList.add('changed');
+                parent.subFrameBecameNonScrollable();
+
+                requestAnimationFrame(() => {
+                    document.body.classList.remove('changed');
+                    parent.subFrameBecameScrollable();
+                });
+            });
+        }, false);
+    </script>
+</head>
+<body>
+    <p>Middle frame</p>
+    <iframe srcdoc="
+        <style>
+            body { height: 1000px; }
+        </style>
+        <p>Inner frame</p>">
+    </iframe>
+</body>
+</html>

Added: trunk/LayoutTests/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt (0 => 240535)


--- trunk/LayoutTests/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling-expected.txt	2019-01-26 01:40:20 UTC (rev 240535)
@@ -0,0 +1,107 @@
+
+Scrolling tree on non-scrollable
+
+
+(Frame scrolling node
+  (scrollable area size 785 600)
+  (contents size 785 640)
+  (scrollable area parameters 
+    (horizontal scroll elasticity 2)
+    (vertical scroll elasticity 2)
+    (horizontal scrollbar mode 0)
+    (vertical scrollbar mode 0)
+    (has enabled vertical scrollbar 1))
+  (visual viewport enabled 1)
+  (layout viewport at (0,0) size 785x600)
+  (min layout viewport origin (0,0))
+  (max layout viewport origin (0,40))
+  (behavior for fixed 0)
+  (children 1
+    (Frame scrolling node
+      (scrollable area size 585 500)
+      (contents size 585 1024)
+      (scrollable area parameters 
+        (horizontal scroll elasticity 0)
+        (vertical scroll elasticity 0)
+        (horizontal scrollbar mode 0)
+        (vertical scrollbar mode 0)
+        (has enabled vertical scrollbar 1))
+      (visual viewport enabled 1)
+      (layout viewport at (0,0) size 585x500)
+      (min layout viewport origin (0,0))
+      (max layout viewport origin (0,524))
+      (behavior for fixed 0)
+      (children 1
+        (Frame scrolling node
+          (scrollable area size 485 400)
+          (contents size 485 1024)
+          (scrollable area parameters 
+            (horizontal scroll elasticity 0)
+            (vertical scroll elasticity 0)
+            (horizontal scrollbar mode 0)
+            (vertical scrollbar mode 0)
+            (has enabled vertical scrollbar 1))
+          (visual viewport enabled 1)
+          (layout viewport at (0,0) size 485x400)
+          (min layout viewport origin (0,0))
+          (max layout viewport origin (0,624))
+          (behavior for fixed 0)
+        )
+      )
+    )
+  )
+)
+
+Scrolling tree on scrollable
+
+
+(Frame scrolling node
+  (scrollable area size 785 600)
+  (contents size 785 1421)
+  (scrollable area parameters 
+    (horizontal scroll elasticity 2)
+    (vertical scroll elasticity 2)
+    (horizontal scrollbar mode 0)
+    (vertical scrollbar mode 0)
+    (has enabled vertical scrollbar 1))
+  (visual viewport enabled 1)
+  (layout viewport at (0,0) size 785x600)
+  (min layout viewport origin (0,0))
+  (max layout viewport origin (0,821))
+  (behavior for fixed 0)
+  (children 1
+    (Frame scrolling node
+      (scrollable area size 600 500)
+      (contents size 600 500)
+      (scrollable area parameters 
+        (horizontal scroll elasticity 0)
+        (vertical scroll elasticity 0)
+        (horizontal scrollbar mode 0)
+        (vertical scrollbar mode 0))
+      (visual viewport enabled 1)
+      (layout viewport at (0,0) size 600x500)
+      (min layout viewport origin (0,0))
+      (max layout viewport origin (0,0))
+      (behavior for fixed 0)
+      (children 1
+        (Frame scrolling node
+          (scrollable area size 485 400)
+          (contents size 485 1024)
+          (scrollable area parameters 
+            (horizontal scroll elasticity 0)
+            (vertical scroll elasticity 0)
+            (horizontal scrollbar mode 0)
+            (vertical scrollbar mode 0)
+            (has enabled vertical scrollbar 1))
+          (visual viewport enabled 1)
+          (layout viewport at (0,0) size 485x400)
+          (min layout viewport origin (0,0))
+          (max layout viewport origin (0,624))
+          (behavior for fixed 0)
+        )
+      )
+    )
+  )
+)
+
+

Added: trunk/LayoutTests/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling.html (0 => 240535)


--- trunk/LayoutTests/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling.html	                        (rev 0)
+++ trunk/LayoutTests/scrollingcoordinator/scrolling-tree/toggle-coordinated-frame-scrolling.html	2019-01-26 01:40:20 UTC (rev 240535)
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Checks the scrolling tree afterr an intermediate frame becomes non-scrollable.</title>
+    <script>
+      if (window.testRunner) {
+          testRunner.dumpAsText();
+          testRunner.waitUntilDone();
+      }
+
+      if (window.internals)
+          window.internals.settings.setAsyncFrameScrollingEnabled(true);
+
+      function subFrameBecameNonScrollable()
+      {
+          if (window.internals)
+              document.getElementById('scrollingTree1').innerText = window.internals.scrollingStateTreeAsText() + "\n";
+      }
+
+      function subFrameBecameScrollable()
+      {
+          if (window.internals)
+              document.getElementById('scrollingTree2').innerText = window.internals.scrollingStateTreeAsText() + "\n";
+
+          if (window.testRunner)
+              testRunner.notifyDone();
+      }
+    </script>
+    <style>
+      iframe {
+          margin: 20px;
+          width: 600px;
+          height: 500px;
+          background-color: silver;
+          box-shadow: 0 0 10px black;
+          border: 2px solid black;
+      }
+    </style>
+  </head>
+  <body>
+    <iframe src=""
+    </iframe>
+    <p>Scrolling tree on non-scrollable</p>
+<pre id="scrollingTree1"></pre>
+    <p>Scrolling tree on scrollable</p>
+<pre id="scrollingTree2"></pre>
+  </body>
+</html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to