Diff
Modified: trunk/LayoutTests/ChangeLog (202159 => 202160)
--- trunk/LayoutTests/ChangeLog 2016-06-17 05:19:29 UTC (rev 202159)
+++ trunk/LayoutTests/ChangeLog 2016-06-17 06:23:26 UTC (rev 202160)
@@ -1,3 +1,18 @@
+2016-06-16 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r202147.
+ https://bugs.webkit.org/show_bug.cgi?id=158867
+
+ Broke scrolling tests on iOS Simulator (Requested by ap on
+ #webkit).
+
+ Reverted changeset:
+
+ "Focus event dispatched in iframe causes parent document to
+ scroll incorrectly"
+ https://bugs.webkit.org/show_bug.cgi?id=158629
+ http://trac.webkit.org/changeset/202147
+
2016-06-16 Benjamin Poulain <[email protected]>
:in-range & :out-of-range CSS pseudo-classes shouldn't match disabled or readonly inputs
Deleted: trunk/LayoutTests/fast/forms/ios/focus-input-in-iframe-expected.txt (202159 => 202160)
--- trunk/LayoutTests/fast/forms/ios/focus-input-in-iframe-expected.txt 2016-06-17 05:19:29 UTC (rev 202159)
+++ trunk/LayoutTests/fast/forms/ios/focus-input-in-iframe-expected.txt 2016-06-17 06:23:26 UTC (rev 202160)
@@ -1,7 +0,0 @@
-Tests zooming into a text input on tap.
-
-Click to focus input
-
-tap location { x: 20.000, y: 62.000 }
-scale 1.455
-visibleRect { left: 0.000, top: 1201.976, width: 219.979, height: 329.968 }
Deleted: trunk/LayoutTests/fast/forms/ios/focus-input-in-iframe.html (202159 => 202160)
--- trunk/LayoutTests/fast/forms/ios/focus-input-in-iframe.html 2016-06-17 05:19:29 UTC (rev 202159)
+++ trunk/LayoutTests/fast/forms/ios/focus-input-in-iframe.html 2016-06-17 06:23:26 UTC (rev 202160)
@@ -1,48 +0,0 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
-
-<html>
-<head>
- <meta name="viewport" content="initial-scale=0.5">
- <style>
- button {
- display: block;
- }
- iframe {
- margin-top: 800px;
- }
- </style>
-
- <script src=""
- <script>
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- if (window.internals)
- internals.settings.setFrameFlatteningEnabled(true);
-
- function buttonClicked()
- {
- document.getElementById('frame').contentDocument.getElementById('input').focus();
- }
-
- function doTest()
- {
- testZoomAfterTap(document.getElementById('target'), 10, 10);
- }
-
- window.addEventListener('load', doTest, false);
- </script>
-</head>
-<body>
-
-<p>Tests zooming into a text input on tap.</p>
-<button id="target" _onclick_="buttonClicked()">Click to focus input</button>
-
-<iframe id="frame" srcdoc="<style>input { margin: 400px 20px; }</style>
-<input id='input' type='text'>
-"></iframe>
-
-</body>
-</html>
Deleted: trunk/LayoutTests/fast/forms/ios/programmatic-focus-input-in-iframe-expected.txt (202159 => 202160)
--- trunk/LayoutTests/fast/forms/ios/programmatic-focus-input-in-iframe-expected.txt 2016-06-17 05:19:29 UTC (rev 202159)
+++ trunk/LayoutTests/fast/forms/ios/programmatic-focus-input-in-iframe-expected.txt 2016-06-17 06:23:26 UTC (rev 202160)
@@ -1,4 +0,0 @@
-Tests that a programmatic focus should not scroll into view
-
-PASS: page did not scroll.
-
Deleted: trunk/LayoutTests/fast/forms/ios/programmatic-focus-input-in-iframe.html (202159 => 202160)
--- trunk/LayoutTests/fast/forms/ios/programmatic-focus-input-in-iframe.html 2016-06-17 05:19:29 UTC (rev 202159)
+++ trunk/LayoutTests/fast/forms/ios/programmatic-focus-input-in-iframe.html 2016-06-17 06:23:26 UTC (rev 202160)
@@ -1,57 +0,0 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
-
-<html>
-<head>
- <meta name="viewport" content="initial-scale=0.5">
- <style>
- button {
- display: block;
- }
- iframe {
- margin-top: 800px;
- }
- </style>
-
- <script>
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- if (window.internals)
- internals.settings.setFrameFlatteningEnabled(true);
-
- function pageDidScroll()
- {
- document.getElementById('result').textContent = 'FAIL: page scrolled to ' + document.scrollingElement.scrollTop;
- }
-
- function doTest()
- {
- window.setTimeout(function() {
- document.getElementById('frame').contentDocument.getElementById('input').focus();
- }, 0);
-
- // Wait for any scroll to happen.
- window.setTimeout(function() {
- if (window.testRunner)
- testRunner.notifyDone();
- }, 100);
- }
-
- window.addEventListener('load', doTest, false);
- </script>
-</head>
-<body _onscroll_="pageDidScroll()">
-
-<p>Tests that a programmatic focus should not scroll into view</p>
-<div id="result">
- PASS: page did not scroll.
-</div>
-
-<iframe id="frame" srcdoc="<style>input { margin: 400px 20px; }</style>
-<input id='input' type='text'>
-"></iframe>
-
-</body>
-</html>
Modified: trunk/Source/WebCore/ChangeLog (202159 => 202160)
--- trunk/Source/WebCore/ChangeLog 2016-06-17 05:19:29 UTC (rev 202159)
+++ trunk/Source/WebCore/ChangeLog 2016-06-17 06:23:26 UTC (rev 202160)
@@ -1,3 +1,18 @@
+2016-06-16 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r202147.
+ https://bugs.webkit.org/show_bug.cgi?id=158867
+
+ Broke scrolling tests on iOS Simulator (Requested by ap on
+ #webkit).
+
+ Reverted changeset:
+
+ "Focus event dispatched in iframe causes parent document to
+ scroll incorrectly"
+ https://bugs.webkit.org/show_bug.cgi?id=158629
+ http://trac.webkit.org/changeset/202147
+
2016-06-16 Benjamin Poulain <[email protected]>
:in-range & :out-of-range CSS pseudo-classes shouldn't match disabled or readonly inputs
Modified: trunk/Source/WebCore/dom/Element.cpp (202159 => 202160)
--- trunk/Source/WebCore/dom/Element.cpp 2016-06-17 05:19:29 UTC (rev 202159)
+++ trunk/Source/WebCore/dom/Element.cpp 2016-06-17 06:23:26 UTC (rev 202160)
@@ -2245,8 +2245,6 @@
}
cancelFocusAppearanceUpdate();
-
- SelectionRevealMode revealMode = SelectionRevealMode::Reveal;
#if PLATFORM(IOS)
// Focusing a form element triggers animation in UIKit to scroll to the right position.
// Calling updateFocusAppearance() would generate an unnecessary call to ScrollView::setScrollPosition(),
@@ -2254,9 +2252,13 @@
FrameView* view = document().view();
bool isFormControl = view && is<HTMLFormControlElement>(*this);
if (isFormControl)
- revealMode = SelectionRevealMode::DoNotReveal;
+ view->setProhibitsScrolling(true);
#endif
- updateFocusAppearance(restorePreviousSelection ? SelectionRestorationMode::Restore : SelectionRestorationMode::SetDefault, revealMode);
+ updateFocusAppearance(restorePreviousSelection ? SelectionRestorationMode::Restore : SelectionRestorationMode::SetDefault);
+#if PLATFORM(IOS)
+ if (isFormControl)
+ view->setProhibitsScrolling(false);
+#endif
}
void Element::updateFocusAppearanceAfterAttachIfNeeded()
Modified: trunk/Source/WebCore/history/CachedPage.cpp (202159 => 202160)
--- trunk/Source/WebCore/history/CachedPage.cpp 2016-06-17 05:19:29 UTC (rev 202159)
+++ trunk/Source/WebCore/history/CachedPage.cpp 2016-06-17 06:23:26 UTC (rev 202160)
@@ -77,18 +77,25 @@
m_cachedMainFrame->open();
// Restore the focus appearance for the focused element.
- // FIXME: Right now we don't support pages with frames in the b/f cache. This may need to be tweaked when we add support for that.
+ // FIXME: Right now we don't support pages w/ frames in the b/f cache. This may need to be tweaked when we add support for that.
Document* focusedDocument = page.focusController().focusedOrMainFrame().document();
if (Element* element = focusedDocument->focusedElement()) {
- SelectionRevealMode revealMode = SelectionRevealMode::Reveal;
#if PLATFORM(IOS)
// We don't want focused nodes changing scroll position when restoring from the cache
// as it can cause ugly jumps before we manage to restore the cached position.
page.mainFrame().selection().suppressScrolling();
- revealMode = SelectionRevealMode::DoNotReveal;
+
+ bool hadProhibitsScrolling = false;
+ FrameView* frameView = page.mainFrame().view();
+ if (frameView) {
+ hadProhibitsScrolling = frameView->prohibitsScrolling();
+ frameView->setProhibitsScrolling(true);
+ }
#endif
- element->updateFocusAppearance(SelectionRestorationMode::Restore, revealMode);
+ element->updateFocusAppearance(SelectionRestorationMode::Restore);
#if PLATFORM(IOS)
+ if (frameView)
+ frameView->setProhibitsScrolling(hadProhibitsScrolling);
page.mainFrame().selection().restoreScrolling();
#endif
}