WebKit Bugzilla
Attachment 368234 Details for
Bug 197280
: Add more tests for ios programmatic 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
bug-197280-20190425160508.patch (text/plain), 9.06 KB, created by
Frédéric Wang (:fredw)
on 2019-04-25 07:05:09 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2019-04-25 07:05:09 PDT
Size:
9.06 KB
patch
obsolete
>Subversion Revision: 244643 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index ac5e47c14f8ff50df3d0042085daff8c7fb4fc44..0becabf7be507481c0288c2119ac44751e271d94 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,22 @@ >+2019-03-29 Frederic Wang <fwang@igalia.com> >+ >+ Add more tests for ios programmatic iframe scrolling with fixed/sticky layers >+ https://bugs.webkit.org/show_bug.cgi?id=197280 >+ >+ 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/programmatic-scroll-iframe-010-expected.html: Added. >+ * fast/scrolling/ios/programmatic-scroll-iframe-010.html: Added. >+ * fast/scrolling/ios/programmatic-scroll-iframe-011-expected.html: Added. >+ * fast/scrolling/ios/programmatic-scroll-iframe-011.html: Added. >+ * fast/scrolling/ios/programmatic-scroll-iframe-012-expected.html: Added. >+ * fast/scrolling/ios/programmatic-scroll-iframe-012.html: Added. >+ > 2019-04-25 Antti Koivisto <antti@apple.com> > > Visited link hash should be computed only once >diff --git a/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-010-expected.html b/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-010-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..9b86f0a738afe9f79496db14558508edd901e2ed >--- /dev/null >+++ b/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-010-expected.html >@@ -0,0 +1,12 @@ >+<!DOCTYPE html> >+<html> >+ <head> >+ <title>Programmatic scrolling of iframe</title> >+ <meta name="viewport" content="width=device-width, initial-scale=1"> >+ </head> >+ <body> >+ <p>This test passes if you see a green square.</p> >+ <div style="position: absolute; top: 3em; width: 100px; height: 100px; background: green;"> >+ </div> >+ </body> >+</html> >diff --git a/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-010.html b/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-010.html >new file mode 100644 >index 0000000000000000000000000000000000000000..563876f5dfc5983da7c63bbb9dd35f4eebd7280d >--- /dev/null >+++ b/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-010.html >@@ -0,0 +1,41 @@ >+<!DOCTYPE html> >+<html> >+ <head> >+ <title>Programmatic scrolling of iframe</title> >+ <meta name="viewport" content="width=device-width, initial-scale=1"> >+ <script> >+ if (window.testRunner) >+ testRunner.waitUntilDone(); >+ if (window.internals) >+ internals.settings.setAsyncFrameScrollingEnabled(true); >+ >+ function runTest() { >+ // This checks scrolling behavior for position "fixed". >+ document.getElementById("positionFixed").contentWindow.window.scrollTo(100, 100); >+ >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ } >+ </script> >+ <style> >+ iframe { >+ float: left; >+ background: linear-gradient(135deg, red, orange); >+ border: 0; >+ height: 100px; >+ width: 100px; >+ overflow: none; >+ } >+ </style> >+ </head> >+ <body> >+ <p>This test passes if you see a green square.</p> >+ <div style="position: absolute; top: 3em; width: 100px; height: 100px; background: green;"> >+ <iframe id="positionFixed" scrolling="yes" srcdoc=" >+ <body style='margin: 0; width: 200px; height: 200px'> >+ <div style='position: fixed; width: 100px; height: 100px; background: green;'></div> >+ </body>" onload="runTest()"> >+ </iframe> >+ </div> >+ </body> >+</html> >diff --git a/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-011-expected.html b/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-011-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..9b86f0a738afe9f79496db14558508edd901e2ed >--- /dev/null >+++ b/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-011-expected.html >@@ -0,0 +1,12 @@ >+<!DOCTYPE html> >+<html> >+ <head> >+ <title>Programmatic scrolling of iframe</title> >+ <meta name="viewport" content="width=device-width, initial-scale=1"> >+ </head> >+ <body> >+ <p>This test passes if you see a green square.</p> >+ <div style="position: absolute; top: 3em; width: 100px; height: 100px; background: green;"> >+ </div> >+ </body> >+</html> >diff --git a/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-011.html b/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-011.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2eff48a8b590232d54121dc6b4c75ca287528ee9 >--- /dev/null >+++ b/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-011.html >@@ -0,0 +1,43 @@ >+<!DOCTYPE html> >+<html> >+ <head> >+ <title>Programmatic scrolling of iframe</title> >+ <meta name="viewport" content="width=device-width, initial-scale=1"> >+ <script> >+ if (window.testRunner) >+ testRunner.waitUntilDone(); >+ if (window.internals) >+ internals.settings.setAsyncFrameScrollingEnabled(true); >+ >+ function runTest() { >+ // This checks scrolling behavior for position "sticky". >+ document.getElementById("positionStickyBegin").contentWindow.window.scrollTo(0, 50); >+ >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ } >+ </script> >+ <style> >+ iframe { >+ float: left; >+ background: linear-gradient(135deg, red, orange); >+ border: 0; >+ height: 100px; >+ width: 100px; >+ overflow: none; >+ } >+ </style> >+ </head> >+ <body> >+ <p>This test passes if you see a green square.</p> >+ <div style="position: absolute; top: 3em; width: 100px; height: 100px; background: green;"> >+ <iframe id="positionStickyBegin" scrolling="yes" srcdoc=" >+ <body style='margin: 0; width: 200px; height: 300px'> >+ <div style='height: 50px'></div> >+ <div style='width: 100px; height: 50px; background: green;'></div> >+ <div style='position: -webkit-sticky; position: sticky; left: 0px; top: 0px; width: 100px; height: 50px; background: green;'></div> >+ </body>" onload="runTest()"> >+ </iframe> >+ </div> >+ </body> >+</html> >diff --git a/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-012-expected.html b/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-012-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..9b86f0a738afe9f79496db14558508edd901e2ed >--- /dev/null >+++ b/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-012-expected.html >@@ -0,0 +1,12 @@ >+<!DOCTYPE html> >+<html> >+ <head> >+ <title>Programmatic scrolling of iframe</title> >+ <meta name="viewport" content="width=device-width, initial-scale=1"> >+ </head> >+ <body> >+ <p>This test passes if you see a green square.</p> >+ <div style="position: absolute; top: 3em; width: 100px; height: 100px; background: green;"> >+ </div> >+ </body> >+</html> >diff --git a/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-012.html b/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-012.html >new file mode 100644 >index 0000000000000000000000000000000000000000..29452f796d527834c648c05000b3752dec2108ca >--- /dev/null >+++ b/LayoutTests/fast/scrolling/ios/programmatic-scroll-iframe-012.html >@@ -0,0 +1,42 @@ >+<!DOCTYPE html> >+<html> >+ <head> >+ <title>Programmatic scrolling of iframe</title> >+ <meta name="viewport" content="width=device-width, initial-scale=1"> >+ <script> >+ if (window.testRunner) >+ testRunner.waitUntilDone(); >+ if (window.internals) >+ internals.settings.setAsyncFrameScrollingEnabled(true); >+ >+ function runTest() { >+ // This checks scrolling behavior for position "sticky". >+ document.getElementById("positionStickyEnd").contentWindow.window.scrollTo(0, 150); >+ >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ } >+ </script> >+ <style> >+ iframe { >+ float: left; >+ background: linear-gradient(135deg, red, orange); >+ border: 0; >+ height: 100px; >+ width: 100px; >+ overflow: none; >+ } >+ </style> >+ </head> >+ <body> >+ <p>This test passes if you see a green square.</p> >+ <div style="position: absolute; top: 3em; width: 100px; height: 100px; background: green;"> >+ <iframe id="positionStickyEnd" scrolling="yes" srcdoc=" >+ <body style='margin: 0; width: 200px; height: 300px'> >+ <div style='height: 100px'></div> >+ <div style='position: -webkit-sticky; position: sticky; left: 0px; top: 0px; width: 100px; height: 100px; background: green;'></div> >+ </body>" onload="runTest()"> >+ </iframe> >+ </div> >+ </body> >+</html>
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 197280
: 368234