WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
0001-Bug-155198-IFrame-is-resized-incorrectly-on-orientat.patch (text/plain), 5.74 KB, created by
Frédéric Wang Nélar
on 2018-02-16 07:48:24 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frédéric Wang Nélar
Created:
2018-02-16 07:48:24 PST
Size:
5.74 KB
patch
obsolete
>From 1e91dd99480ae904d9985cd4ba4d8c1bbd680b15 Mon Sep 17 00:00:00 2001 >From: Frederic Wang <fwang@igalia.com> >Date: Fri, 16 Feb 2018 16:46:46 +0100 >Subject: [PATCH] Bug 155198 - IFrame is resized incorrectly on orientation > change > >--- > LayoutTests/ChangeLog | 13 ++++ > ...ze-iframe-after-orientation-change-expected.txt | 8 +++ > .../resize-iframe-after-orientation-change.html | 82 ++++++++++++++++++++++ > 3 files changed, 103 insertions(+) > create mode 100644 LayoutTests/fast/events/ios/rotation/resize-iframe-after-orientation-change-expected.txt > create mode 100644 LayoutTests/fast/events/ios/rotation/resize-iframe-after-orientation-change.html > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 3abf85ae242..d7ded6752c9 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2018-02-16 Frederic Wang <fwang@igalia.com> >+ >+ IFrame is resized incorrectly on orientation change >+ https://bugs.webkit.org/show_bug.cgi?id=155198 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a non-regression test to verify that iframes are properly resized after orientation >+ changes. This bug happened in iOS 10.0 but not in trunk. >+ >+ * fast/events/ios/rotation/resize-iframe-after-orientation-change-expected.txt: Added. >+ * fast/events/ios/rotation/resize-iframe-after-orientation-change.html: Added. >+ > 2018-02-16 Frederic Wang <fwang@igalia.com> > > [iOS] Adjust layer hierarchy to handle frame scrolling >diff --git a/LayoutTests/fast/events/ios/rotation/resize-iframe-after-orientation-change-expected.txt b/LayoutTests/fast/events/ios/rotation/resize-iframe-after-orientation-change-expected.txt >new file mode 100644 >index 00000000000..c41d96b2773 >--- /dev/null >+++ b/LayoutTests/fast/events/ios/rotation/resize-iframe-after-orientation-change-expected.txt >@@ -0,0 +1,8 @@ >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+PASS document.getElementById("frame").scrollWidth is outer.scrollWidth >+PASS document.getElementById("frame").contentDocument.getElementById("inner").scrollWidth is outer.scrollWidth >+Each time the viewport is resized, the outer div (green), iframe (orange) and inner div (pink) should take the full viewport width: >+ >+ >diff --git a/LayoutTests/fast/events/ios/rotation/resize-iframe-after-orientation-change.html b/LayoutTests/fast/events/ios/rotation/resize-iframe-after-orientation-change.html >new file mode 100644 >index 00000000000..5e9eefd389c >--- /dev/null >+++ b/LayoutTests/fast/events/ios/rotation/resize-iframe-after-orientation-change.html >@@ -0,0 +1,82 @@ >+<!DOCTYPE html> >+<html> >+ <head> >+ <meta charset="utf-8"/> >+ <meta name="viewport" content="width=device-width"/> >+ <title>Resize iframe after orientation change</title> >+ <style type="text/css"> >+ body, div, iframe { >+ margin: 0; >+ padding: 0; >+ border: 0; >+ overflow: hidden; >+ } >+ </style> >+ <script src="../../../../resources/js-test.js"></script> >+ <script> >+ if (window.testRunner) { >+ testRunner.waitUntilDone(); >+ testRunner.dumpAsText(); >+ } >+ function rotateDevice(orientation) >+ { >+ return new Promise(resolve => { >+ testRunner.runUIScript(` >+ (function() { >+ uiController.simulateRotation('${orientation}', function() { >+ uiController.doAfterVisibleContentRectUpdate(function () { >+ uiController.uiScriptComplete(); >+ }) >+ }); >+ })();`, resolve); >+ }); >+ } >+ >+ async function runTest() { >+ if (!window.testRunner || !testRunner.runUIScript) >+ return; >+ await rotateDevice('landscape-right'); >+ await rotateDevice('portrait'); >+ var output = document.getElementById("output"); >+ var outer = document.getElementById("outer"); >+ shouldBe('document.getElementById("frame").scrollWidth', 'outer.scrollWidth'); >+ shouldBe('document.getElementById("frame").contentDocument.getElementById("inner").scrollWidth', 'outer.scrollWidth'); >+ testRunner.notifyDone(); >+ } >+ </script> >+ </head> >+ <body> >+ <p>Each time the viewport is resized, the outer div (green), >+ iframe (orange) and inner div (pink) should take the full viewport >+ width:</p> >+ <div id="outer" style="width: 100%; height: 200px; >+ border-top: 5px solid lightgreen; >+ border-bottom: 5px solid lightgreen; >+ background: linear-gradient(to right, cyan, blue)"> >+ <iframe id="frame" onload="runTest()" style="width: 100%; height: 100px; >+ border-top: 5px solid orange; >+ border-bottom: 5px solid orange; >+ background: linear-gradient(to right, cyan, blue)" >+ srcdoc=" >+ <html> >+ <head> >+ <meta name='viewport' content='width=device-width'/> >+ <script type='text/javascript'> >+ window.addEventListener('resize', function() { >+ document.getElementById('inner').style.width = >+ window.innerWidth + 'px'; >+ }); >+ </script> >+ </head> >+ <body style='margin: 0; padding: 0; overflow: hidden;'> >+ <div id='inner' >+ style='width: 50px; height: 50px; >+ border-top: 5px solid pink; >+ border-bottom: 5px solid pink; >+ background: linear-gradient(to right, cyan, blue)'> >+ </div> >+ </body> >+ </html>"></iframe> >+ </div> >+ </body> >+</html> >-- >2.14.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
Flags:
tonikitoo
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 155198
:
300208
|
300209
| 334041