WebKit Bugzilla
Attachment 368235 Details for
Bug 196394
: Add more tests for ios iframe scrolling with fixed/sticky layers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
0001-Bug-196394-Add-more-tests-for-ios-iframe-scrolling-w.patch (text/plain), 7.73 KB, created by
Frédéric Wang (:fredw)
on 2019-04-25 07:20:21 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2019-04-25 07:20:21 PDT
Size:
7.73 KB
patch
obsolete
>From 663adcde9d28cc79121dfa27719b3ce4db6df21a Mon Sep 17 00:00:00 2001 >From: Frederic Wang <fwang@igalia.com> >Date: Thu, 25 Apr 2019 16:13:27 +0200 >Subject: [PATCH xserver] Bug 196394 - Add more tests for ios iframe scrolling > with fixed/sticky layers > >--- > LayoutTests/ChangeLog | 17 ++++++ > .../ios/scroll-iframe-005-expected.html | 19 +++++++ > .../fast/scrolling/ios/scroll-iframe-005.html | 51 ++++++++++++++++++ > .../ios/scroll-iframe-006-expected.html | 19 +++++++ > .../fast/scrolling/ios/scroll-iframe-006.html | 52 +++++++++++++++++++ > 5 files changed, 158 insertions(+) > create mode 100644 LayoutTests/fast/scrolling/ios/scroll-iframe-005-expected.html > create mode 100644 LayoutTests/fast/scrolling/ios/scroll-iframe-005.html > create mode 100644 LayoutTests/fast/scrolling/ios/scroll-iframe-006-expected.html > create mode 100644 LayoutTests/fast/scrolling/ios/scroll-iframe-006.html > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 0becabf7be5..83dc124e6e0 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,20 @@ >+2019-03-29 Frederic Wang <fwang@igalia.com> >+ >+ Add more tests for iOS iframe scrolling with fixed/sticky layers >+ https://bugs.webkit.org/show_bug.cgi?id=196394 >+ >+ This commit adds iOS tests for scrolling iframes containing fixed/sticky layers. They are >+ extracted from earlier experimental patches for iOS frame scrolling but failed with the >+ alternative patches initially landed in bug 193539 and follow-up bugs. They now pass again >+ on trunk, so we can finally import them. >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/scrolling/ios/scroll-iframe-005-expected.html: Added. >+ * fast/scrolling/ios/scroll-iframe-005.html: Added. >+ * fast/scrolling/ios/scroll-iframe-006-expected.html: Added. >+ * fast/scrolling/ios/scroll-iframe-006.html: Added. >+ > 2019-03-29 Frederic Wang <fwang@igalia.com> > > Add more tests for ios programmatic iframe scrolling with fixed/sticky layers >diff --git a/LayoutTests/fast/scrolling/ios/scroll-iframe-005-expected.html b/LayoutTests/fast/scrolling/ios/scroll-iframe-005-expected.html >new file mode 100644 >index 00000000000..e46b93b3494 >--- /dev/null >+++ b/LayoutTests/fast/scrolling/ios/scroll-iframe-005-expected.html >@@ -0,0 +1,19 @@ >+<!DOCTYPE html> >+<html >+ <head> >+ <title>Scrolling of iframe</title> >+ <style> >+ .testdiv { >+ float: left; >+ background: green; >+ border: 0; >+ height: 100px; >+ width: 100px; >+ } >+ </style> >+ </head> >+ <body> >+ <p>This test passes if you see a green square.</p> >+ <div class="testdiv"></div> >+ </body> >+</html> >diff --git a/LayoutTests/fast/scrolling/ios/scroll-iframe-005.html b/LayoutTests/fast/scrolling/ios/scroll-iframe-005.html >new file mode 100644 >index 00000000000..3ef04712d84 >--- /dev/null >+++ b/LayoutTests/fast/scrolling/ios/scroll-iframe-005.html >@@ -0,0 +1,51 @@ >+<!DOCTYPE html> >+<html> >+ <head> >+ <title>Scrolling of iframe</title> >+ <meta name="viewport" content="width=device-width, initial-scale=1"> >+ <script src="../../../resources/basic-gestures.js"></script> >+ <script type="text/javascript"> >+ if (window.testRunner) >+ testRunner.waitUntilDone(); >+ if (window.internals) >+ internals.settings.setAsyncFrameScrollingEnabled(true); >+ >+ function centerOf(id) >+ { >+ var frameBox = document.getElementById(id).getBoundingClientRect(); >+ return { x: frameBox.left + frameBox.width / 2, y: frameBox.top + frameBox.height / 2 }; >+ } >+ >+ async function runTest() { >+ if (!window.testRunner || !testRunner.runUIScript) >+ return; >+ >+ // This checks scrolling to the location of the green square. >+ var c = centerOf("positionFixed"); >+ await touchAndDragFromPointToPoint(c.x, c.y, c.x - 150, c.y - 150); >+ await liftUpAtPoint(c.x - 150, c.y - 150); >+ >+ // Wait for scrolling to stabilize and for scrollbars to disappear. >+ setTimeout(() => {testRunner.notifyDone(); }, 1000); >+ } >+ </script> >+ <style> >+ iframe { >+ float: left; >+ background: linear-gradient(135deg, red, orange); >+ border: 0; >+ height: 100px; >+ width: 100px; >+ } >+ </style> >+ </head> >+ <body> >+ <p>This test passes if you see a green square.</p> >+ <iframe id="positionFixed" scrolling="yes" srcdoc=" >+ <body style='position: relative; margin: 0; width: 300px; height: 300px'> >+ <div style='position: fixed; width: 100px; height: 50px; background: green;'></div> >+ <div style='position: absolute; bottom: 0px; right: 0px; width: 100px; height: 50px; background: green;'></div> >+ </body>" onload="runTest()"> >+ </iframe> >+ </body> >+</html> >diff --git a/LayoutTests/fast/scrolling/ios/scroll-iframe-006-expected.html b/LayoutTests/fast/scrolling/ios/scroll-iframe-006-expected.html >new file mode 100644 >index 00000000000..e46b93b3494 >--- /dev/null >+++ b/LayoutTests/fast/scrolling/ios/scroll-iframe-006-expected.html >@@ -0,0 +1,19 @@ >+<!DOCTYPE html> >+<html >+ <head> >+ <title>Scrolling of iframe</title> >+ <style> >+ .testdiv { >+ float: left; >+ background: green; >+ border: 0; >+ height: 100px; >+ width: 100px; >+ } >+ </style> >+ </head> >+ <body> >+ <p>This test passes if you see a green square.</p> >+ <div class="testdiv"></div> >+ </body> >+</html> >diff --git a/LayoutTests/fast/scrolling/ios/scroll-iframe-006.html b/LayoutTests/fast/scrolling/ios/scroll-iframe-006.html >new file mode 100644 >index 00000000000..d933e6ae717 >--- /dev/null >+++ b/LayoutTests/fast/scrolling/ios/scroll-iframe-006.html >@@ -0,0 +1,52 @@ >+<!DOCTYPE html> >+<html> >+ <head> >+ <title>Scrolling of iframe</title> >+ <meta name="viewport" content="width=device-width, initial-scale=1"> >+ <script src="../../../resources/basic-gestures.js"></script> >+ <script type="text/javascript"> >+ if (window.testRunner) >+ testRunner.waitUntilDone(); >+ if (window.internals) >+ internals.settings.setAsyncFrameScrollingEnabled(true); >+ >+ function centerOf(id) >+ { >+ var frameBox = document.getElementById(id).getBoundingClientRect(); >+ return { x: frameBox.left + frameBox.width / 2, y: frameBox.top + frameBox.height / 2 }; >+ } >+ >+ async function runTest() { >+ if (!window.testRunner || !testRunner.runUIScript) >+ return; >+ >+ // This checks scrolling to the location of the green square >+ var c = centerOf("positionSticky"); >+ await touchAndDragFromPointToPoint(c.x, c.y, c.x, c.y - 150); >+ await liftUpAtPoint(c.x, c.y - 150); >+ >+ // Wait for scrolling to stabilize and for scrollbars to disappear. >+ setTimeout(() => {testRunner.notifyDone(); }, 1000); >+ } >+ </script> >+ <style> >+ iframe { >+ float: left; >+ background: linear-gradient(135deg, red, orange); >+ border: 0; >+ height: 100px; >+ width: 100px; >+ } >+ </style> >+ </head> >+ <body> >+ <p>This test passes if you see a green square.</p> >+ <iframe id="positionSticky" scrolling="yes" srcdoc=" >+ <body style='position: relative; margin: 0; width: 300px; height: 300px'> >+ <div style='height: 100px'></div> >+ <div style='position: -webkit-sticky; position: sticky; left: 0px; top: 0px; width: 100px; height: 50px; background: green;'></div> >+ <div style='position: absolute; bottom: 0px; width: 100px; height: 50px; background: green;'></div> >+ </body>" onload="runTest()"> >+ </iframe> >+ </body> >+</html> >-- >2.20.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 196394
:
366262
|
366274
| 368235 |
368236