WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
ROLLOUT of r202243
bug-158972-20160620200623.patch (text/plain), 32.60 KB, created by
WebKit Commit Bot
on 2016-06-20 20:06:30 PDT
(
hide
)
Description:
ROLLOUT of r202243
Filename:
MIME Type:
Creator:
WebKit Commit Bot
Created:
2016-06-20 20:06:30 PDT
Size:
32.60 KB
patch
obsolete
>Subversion Revision: 202262 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index caf8f53c988c993ee177492095e903bac65040a5..620888fa21e2039872c14365218520c7c5bf2832 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2016-06-20 Commit Queue <commit-queue@webkit.org> >+ >+ Unreviewed, rolling out r202243. >+ https://bugs.webkit.org/show_bug.cgi?id=158972 >+ >+ Broke Windows build and iOS tests (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/202243 >+ > 2016-06-20 Chris Dumez <cdumez@apple.com> > > Simplify / Optimize DataDetector's searchForLinkRemovingExistingDDLinks() >diff --git a/Source/WebKit/mac/ChangeLog b/Source/WebKit/mac/ChangeLog >index 4e2686125b111f370f50ee5126e8c73614576b12..1fa0c17c4bc73d29116ef965d140df4f93a9fde7 100644 >--- a/Source/WebKit/mac/ChangeLog >+++ b/Source/WebKit/mac/ChangeLog >@@ -1,3 +1,18 @@ >+2016-06-20 Commit Queue <commit-queue@webkit.org> >+ >+ Unreviewed, rolling out r202243. >+ https://bugs.webkit.org/show_bug.cgi?id=158972 >+ >+ Broke Windows build and iOS tests (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/202243 >+ > 2016-06-20 Simon Fraser <simon.fraser@apple.com> > > Focus event dispatched in iframe causes parent document to scroll incorrectly >diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog >index e73506c079154cdfbaa442309b7cbb84cf62cbdc..c878486c9ec250648bc96e12f6d25e89ed79b897 100644 >--- a/Source/WebKit2/ChangeLog >+++ b/Source/WebKit2/ChangeLog >@@ -1,3 +1,18 @@ >+2016-06-20 Commit Queue <commit-queue@webkit.org> >+ >+ Unreviewed, rolling out r202243. >+ https://bugs.webkit.org/show_bug.cgi?id=158972 >+ >+ Broke Windows build and iOS tests (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/202243 >+ > 2016-06-20 Brent Fulgham <bfulgham@apple.com> > > Allow Spotlight suggestions to be read by any process >diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h >index 57276beed6a0c682a0a0e73ecb966c2e2dd2ac3d..8ffdd4c3be486758d06ec477bbb91b5a3102cb42 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -282,6 +282,11 @@ enum class SelectionRestorationMode { > SetDefault, > }; > >+enum class SelectionRevealMode { >+ Reveal, >+ DoNotReveal >+}; >+ > enum class HttpEquivPolicy { > Enabled, > DisabledBySettings, >diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp >index b8be71cc7f99f4da6cf0b188dc839156ccc1fa63..4806929d2599ae72420a4c7fa898b8f2d3c2124b 100644 >--- a/Source/WebCore/dom/Element.cpp >+++ b/Source/WebCore/dom/Element.cpp >@@ -639,9 +639,9 @@ void Element::scrollIntoView(bool alignToTop) > LayoutRect bounds = renderer()->anchorRect(); > // Align to the top / bottom and to the closest edge. > if (alignToTop) >- renderer()->scrollRectToVisible(SelectionRevealMode::Reveal, bounds, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignTopAlways); >+ renderer()->scrollRectToVisible(bounds, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignTopAlways); > else >- renderer()->scrollRectToVisible(SelectionRevealMode::Reveal, bounds, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignBottomAlways); >+ renderer()->scrollRectToVisible(bounds, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignBottomAlways); > } > > void Element::scrollIntoViewIfNeeded(bool centerIfNeeded) >@@ -653,9 +653,9 @@ void Element::scrollIntoViewIfNeeded(bool centerIfNeeded) > > LayoutRect bounds = renderer()->anchorRect(); > if (centerIfNeeded) >- renderer()->scrollRectToVisible(SelectionRevealMode::Reveal, bounds, ScrollAlignment::alignCenterIfNeeded, ScrollAlignment::alignCenterIfNeeded); >+ renderer()->scrollRectToVisible(bounds, ScrollAlignment::alignCenterIfNeeded, ScrollAlignment::alignCenterIfNeeded); > else >- renderer()->scrollRectToVisible(SelectionRevealMode::Reveal, bounds, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded); >+ renderer()->scrollRectToVisible(bounds, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded); > } > > void Element::scrollIntoViewIfNotVisible(bool centerIfNotVisible) >@@ -667,9 +667,9 @@ void Element::scrollIntoViewIfNotVisible(bool centerIfNotVisible) > > LayoutRect bounds = renderer()->anchorRect(); > if (centerIfNotVisible) >- renderer()->scrollRectToVisible(SelectionRevealMode::Reveal, bounds, ScrollAlignment::alignCenterIfNotVisible, ScrollAlignment::alignCenterIfNotVisible); >+ renderer()->scrollRectToVisible(bounds, ScrollAlignment::alignCenterIfNotVisible, ScrollAlignment::alignCenterIfNotVisible); > else >- renderer()->scrollRectToVisible(SelectionRevealMode::Reveal, bounds, ScrollAlignment::alignToEdgeIfNotVisible, ScrollAlignment::alignToEdgeIfNotVisible); >+ renderer()->scrollRectToVisible(bounds, ScrollAlignment::alignToEdgeIfNotVisible, ScrollAlignment::alignToEdgeIfNotVisible); > } > > void Element::scrollByUnits(int units, ScrollGranularity granularity) >@@ -2245,18 +2245,20 @@ void Element::focus(bool restorePreviousSelection, FocusDirection direction) > } > > 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(), > // which would jump us around during this animation. See <rdar://problem/6699741>. >- bool isFormControl = is<HTMLFormControlElement>(*this); >+ FrameView* view = document().view(); >+ bool isFormControl = view && is<HTMLFormControlElement>(*this); > if (isFormControl) >- revealMode = SelectionRevealMode::RevealUpToMainFrame; >+ view->setProhibitsScrolling(true); >+#endif >+ updateFocusAppearance(restorePreviousSelection ? SelectionRestorationMode::Restore : SelectionRestorationMode::SetDefault); >+#if PLATFORM(IOS) >+ if (isFormControl) >+ view->setProhibitsScrolling(false); > #endif >- >- updateFocusAppearance(restorePreviousSelection ? SelectionRestorationMode::Restore : SelectionRestorationMode::SetDefault, revealMode); > } > > void Element::updateFocusAppearanceAfterAttachIfNeeded() >@@ -2288,10 +2290,11 @@ void Element::updateFocusAppearance(SelectionRestorationMode, SelectionRevealMod > > if (frame->selection().shouldChangeSelection(newSelection)) { > frame->selection().setSelection(newSelection, FrameSelection::defaultSetSelectionOptions(), Element::defaultFocusTextStateChangeIntent()); >- frame->selection().revealSelection(revealMode); >+ if (revealMode == SelectionRevealMode::Reveal) >+ frame->selection().revealSelection(); > } >- } else if (renderer() && !renderer()->isWidget()) >- renderer()->scrollRectToVisible(revealMode, renderer()->anchorRect()); >+ } else if (renderer() && !renderer()->isWidget() && revealMode == SelectionRevealMode::Reveal) >+ renderer()->scrollRectToVisible(renderer()->anchorRect()); > } > > void Element::blur() >diff --git a/Source/WebCore/dom/Element.h b/Source/WebCore/dom/Element.h >index 30e053e19c1997f8482b3a427e1c63d9f623ccf4..b31023bf83d7822ef990ae8e863c321ca2e8cf34 100644 >--- a/Source/WebCore/dom/Element.h >+++ b/Source/WebCore/dom/Element.h >@@ -60,12 +60,6 @@ enum SpellcheckAttributeState { > SpellcheckAttributeDefault > }; > >-enum class SelectionRevealMode { >- Reveal, >- RevealUpToMainFrame, // Scroll overflow and iframes, but not the main frame. >- DoNotReveal >-}; >- > class Element : public ContainerNode { > public: > static Ref<Element> create(const QualifiedName&, Document&); >diff --git a/Source/WebCore/editing/Editor.cpp b/Source/WebCore/editing/Editor.cpp >index cd7ff537afedcc5b6bc952dc7e9c99b402dac66f..f6663301643031358540fb74c1250786f7c7535b 100644 >--- a/Source/WebCore/editing/Editor.cpp >+++ b/Source/WebCore/editing/Editor.cpp >@@ -1204,7 +1204,7 @@ bool Editor::insertTextWithoutSendingTextEvent(const String& text, bool selectIn > // Reveal the current selection > if (Frame* editedFrame = document->frame()) > if (Page* page = editedFrame->page()) >- page->focusController().focusedOrMainFrame().selection().revealSelection(SelectionRevealMode::Reveal, ScrollAlignment::alignCenterIfNeeded); >+ page->focusController().focusedOrMainFrame().selection().revealSelection(ScrollAlignment::alignCenterIfNeeded); > } > } > >@@ -2799,7 +2799,7 @@ void Editor::revealSelectionAfterEditingOperation(const ScrollAlignment& alignme > if (m_ignoreCompositionSelectionChange) > return; > >- m_frame.selection().revealSelection(SelectionRevealMode::Reveal, alignment, revealExtentOption); >+ m_frame.selection().revealSelection(alignment, revealExtentOption); > } > > void Editor::setIgnoreCompositionSelectionChange(bool ignore, RevealSelection shouldRevealExistingSelection) >@@ -3147,7 +3147,7 @@ RefPtr<Range> Editor::findStringAndScrollToVisible(const String& target, Range* > if (!nextMatch) > return nullptr; > >- nextMatch->firstNode()->renderer()->scrollRectToVisible(SelectionRevealMode::Reveal, nextMatch->absoluteBoundingBox(), >+ nextMatch->firstNode()->renderer()->scrollRectToVisible(nextMatch->absoluteBoundingBox(), > ScrollAlignment::alignCenterIfNeeded, ScrollAlignment::alignCenterIfNeeded); > > return nextMatch; >diff --git a/Source/WebCore/editing/FrameSelection.cpp b/Source/WebCore/editing/FrameSelection.cpp >index 33834ad096e81822516e7813b2b80dc9bb26e2d4..a56e6b7d56126794071d0fbb59df1b49ff7f0d49 100644 >--- a/Source/WebCore/editing/FrameSelection.cpp >+++ b/Source/WebCore/editing/FrameSelection.cpp >@@ -127,6 +127,7 @@ FrameSelection::FrameSelection(Frame* frame) > #if PLATFORM(IOS) > , m_updateAppearanceEnabled(false) > , m_caretBlinks(true) >+ , m_scrollingSuppressCount(0) > #endif > { > if (shouldAlwaysUseDirectionalSelection(m_frame)) >@@ -387,7 +388,7 @@ void FrameSelection::updateAndRevealSelection(const AXTextStateChangeIntent& int > else > alignment = m_alwaysAlignCursorOnScrollWhenRevealingSelection ? ScrollAlignment::alignTopAlways : ScrollAlignment::alignToEdgeIfNeeded; > >- revealSelection(SelectionRevealMode::Reveal, alignment, RevealExtent); >+ revealSelection(alignment, RevealExtent); > } > > notifyAccessibilityForSelectionChange(intent); >@@ -2289,11 +2290,8 @@ HTMLFormElement* FrameSelection::currentForm() const > return scanForForm(start); > } > >-void FrameSelection::revealSelection(SelectionRevealMode revealMode, const ScrollAlignment& alignment, RevealExtentOption revealExtentOption) >+void FrameSelection::revealSelection(const ScrollAlignment& alignment, RevealExtentOption revealExtentOption) > { >- if (revealMode == SelectionRevealMode::DoNotReveal) >- return; >- > LayoutRect rect; > > switch (m_selection.selectionType()) { >@@ -2314,7 +2312,7 @@ void FrameSelection::revealSelection(SelectionRevealMode revealMode, const Scrol > if (RenderLayer* layer = start.deprecatedNode()->renderer()->enclosingLayer()) { > if (!m_scrollingSuppressCount) { > layer->setAdjustForIOSCaretWhenScrolling(true); >- layer->scrollRectToVisible(revealMode, rect, alignment, alignment); >+ layer->scrollRectToVisible(rect, alignment, alignment); > layer->setAdjustForIOSCaretWhenScrolling(false); > updateAppearance(); > if (m_frame->page()) >@@ -2325,7 +2323,7 @@ void FrameSelection::revealSelection(SelectionRevealMode revealMode, const Scrol > // FIXME: This code only handles scrolling the startContainer's layer, but > // the selection rect could intersect more than just that. > // See <rdar://problem/4799899>. >- if (start.deprecatedNode()->renderer()->scrollRectToVisible(revealMode, rect, alignment, alignment)) >+ if (start.deprecatedNode()->renderer()->scrollRectToVisible(rect, alignment, alignment)) > updateAppearance(); > #endif > } >diff --git a/Source/WebCore/editing/FrameSelection.h b/Source/WebCore/editing/FrameSelection.h >index f78f8725263626cc52ad14003be1c4f14bab8c08..95ac3774b802450db9d8ffed979dd238d05f5e1d 100644 >--- a/Source/WebCore/editing/FrameSelection.h >+++ b/Source/WebCore/editing/FrameSelection.h >@@ -28,7 +28,6 @@ > > #include "AXTextStateChangeIntent.h" > #include "EditingStyle.h" >-#include "Element.h" > #include "IntRect.h" > #include "LayoutRect.h" > #include "Range.h" >@@ -267,7 +266,7 @@ public: > > WEBCORE_EXPORT HTMLFormElement* currentForm() const; > >- WEBCORE_EXPORT void revealSelection(SelectionRevealMode = SelectionRevealMode::Reveal, const ScrollAlignment& = ScrollAlignment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent); >+ WEBCORE_EXPORT void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent); > WEBCORE_EXPORT void setSelectionFromNone(); > > bool shouldShowBlockCursor() const { return m_shouldShowBlockCursor; } >@@ -351,7 +350,7 @@ private: > bool m_updateAppearanceEnabled : 1; > bool m_caretBlinks : 1; > Color m_caretColor; >- int m_scrollingSuppressCount { 0 }; >+ int m_scrollingSuppressCount; > #endif > }; > >diff --git a/Source/WebCore/html/HTMLInputElement.cpp b/Source/WebCore/html/HTMLInputElement.cpp >index 023ac3390f2bda2b753f7abb8306939a4d36f052..526c2ef51e738143266dcb631e27c3aef18e14d9 100644 >--- a/Source/WebCore/html/HTMLInputElement.cpp >+++ b/Source/WebCore/html/HTMLInputElement.cpp >@@ -404,8 +404,8 @@ void HTMLInputElement::updateFocusAppearance(SelectionRestorationMode restoratio > select(Element::defaultFocusTextStateChangeIntent()); > else > restoreCachedSelection(); >- if (document().frame()) >- document().frame()->selection().revealSelection(revealMode); >+ if (document().frame() && revealMode == SelectionRevealMode::Reveal) >+ document().frame()->selection().revealSelection(); > } else > HTMLTextFormControlElement::updateFocusAppearance(restorationMode, revealMode); > } >diff --git a/Source/WebCore/html/HTMLTextAreaElement.cpp b/Source/WebCore/html/HTMLTextAreaElement.cpp >index f92108aca6f1d8a3d9cedacdb0b8082ddf382c8d..255bed67972842de343b2e660b13e3b55c6bb97d 100644 >--- a/Source/WebCore/html/HTMLTextAreaElement.cpp >+++ b/Source/WebCore/html/HTMLTextAreaElement.cpp >@@ -260,8 +260,8 @@ void HTMLTextAreaElement::updateFocusAppearance(SelectionRestorationMode restora > } else > restoreCachedSelection(Element::defaultFocusTextStateChangeIntent()); > >- if (document().frame()) >- document().frame()->selection().revealSelection(revealMode); >+ if (document().frame() && revealMode == SelectionRevealMode::Reveal) >+ document().frame()->selection().revealSelection(); > } > > void HTMLTextAreaElement::defaultEventHandler(Event* event) >diff --git a/Source/WebCore/page/ContextMenuController.cpp b/Source/WebCore/page/ContextMenuController.cpp >index 394bb2c519a67157ceed8aeea6f58f1c78f28146..ef22e526bbbbb4c548b94a01fe389337763384a6 100644 >--- a/Source/WebCore/page/ContextMenuController.cpp >+++ b/Source/WebCore/page/ContextMenuController.cpp >@@ -372,7 +372,7 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuAction action, co > ASSERT(document); > RefPtr<ReplaceSelectionCommand> command = ReplaceSelectionCommand::create(*document, createFragmentFromMarkup(*document, title, ""), replaceOptions); > applyCommand(command); >- frame->selection().revealSelection(SelectionRevealMode::Reveal, ScrollAlignment::alignToEdgeIfNeeded); >+ frame->selection().revealSelection(ScrollAlignment::alignToEdgeIfNeeded); > } > break; > } >diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp >index a311db0edc4e6b1d5d5526dce8be6f5aa09bba01..106aebff0cbe9ed41ddd3a34104f91d90fa3fe67 100644 >--- a/Source/WebCore/page/FrameView.cpp >+++ b/Source/WebCore/page/FrameView.cpp >@@ -3050,11 +3050,11 @@ void FrameView::scrollToAnchor() > // Scroll nested layers and frames to reveal the anchor. > // Align to the top and to the closest side (this matches other browsers). > if (anchorNode->renderer()->style().isHorizontalWritingMode()) >- anchorNode->renderer()->scrollRectToVisible(SelectionRevealMode::Reveal, rect, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignTopAlways); >+ anchorNode->renderer()->scrollRectToVisible(rect, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignTopAlways); > else if (anchorNode->renderer()->style().isFlippedBlocksWritingMode()) >- anchorNode->renderer()->scrollRectToVisible(SelectionRevealMode::Reveal, rect, ScrollAlignment::alignRightAlways, ScrollAlignment::alignToEdgeIfNeeded); >+ anchorNode->renderer()->scrollRectToVisible(rect, ScrollAlignment::alignRightAlways, ScrollAlignment::alignToEdgeIfNeeded); > else >- anchorNode->renderer()->scrollRectToVisible(SelectionRevealMode::Reveal, rect, ScrollAlignment::alignLeftAlways, ScrollAlignment::alignToEdgeIfNeeded); >+ anchorNode->renderer()->scrollRectToVisible(rect, ScrollAlignment::alignLeftAlways, ScrollAlignment::alignToEdgeIfNeeded); > > if (AXObjectCache* cache = frame().document()->existingAXObjectCache()) > cache->handleScrolledToAnchor(anchorNode.get()); >diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp >index fa0a15ac06472926b215f9d5c7eb741d185476db..929014ce9bfd632f56e17db44560493fa34c1e5e 100644 >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -80,7 +80,6 @@ > #include "HitTestRequest.h" > #include "HitTestResult.h" > #include "Logging.h" >-#include "MainFrame.h" > #include "NoEventDispatchAssertion.h" > #include "OverflowEvent.h" > #include "OverlapTestRequestClient.h" >@@ -2491,7 +2490,7 @@ bool RenderLayer::allowsCurrentScroll() const > return box->hasHorizontalOverflow() || box->hasVerticalOverflow(); > } > >-void RenderLayer::scrollRectToVisible(SelectionRevealMode revealMode, const LayoutRect& rect, const ScrollAlignment& alignX, const ScrollAlignment& alignY) >+void RenderLayer::scrollRectToVisible(const LayoutRect& rect, const ScrollAlignment& alignX, const ScrollAlignment& alignY) > { > LOG_WITH_STREAM(Scrolling, stream << "Layer " << this << " scrollRectToVisible " << rect); > >@@ -2551,9 +2550,6 @@ void RenderLayer::scrollRectToVisible(SelectionRevealMode revealMode, const Layo > parentLayer = nullptr; > } > } else { >- if (revealMode == SelectionRevealMode::RevealUpToMainFrame && frameView.frame().isMainFrame()) >- return; >- > #if !PLATFORM(IOS) > LayoutRect viewRect = frameView.visibleContentRect(); > LayoutRect visibleRectRelativeToDocument = viewRect; >@@ -2578,7 +2574,7 @@ void RenderLayer::scrollRectToVisible(SelectionRevealMode revealMode, const Layo > } > > if (parentLayer) >- parentLayer->scrollRectToVisible(revealMode, newRect, alignX, alignY); >+ parentLayer->scrollRectToVisible(newRect, alignX, alignY); > } > > void RenderLayer::updateCompositingLayersAfterScroll() >@@ -2671,7 +2667,7 @@ LayoutRect RenderLayer::getRectToExpose(const LayoutRect &visibleRect, const Lay > void RenderLayer::autoscroll(const IntPoint& position) > { > IntPoint currentDocumentPosition = renderer().view().frameView().windowToContents(position); >- scrollRectToVisible(SelectionRevealMode::Reveal, LayoutRect(currentDocumentPosition, LayoutSize(1, 1)), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded); >+ scrollRectToVisible(LayoutRect(currentDocumentPosition, LayoutSize(1, 1)), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded); > } > > bool RenderLayer::canResize() const >diff --git a/Source/WebCore/rendering/RenderLayer.h b/Source/WebCore/rendering/RenderLayer.h >index ee932929121b9b956c2b7f5c8501e0e805339c62..ce190bf174abd751ada7a94fb4d2a5e7b6862403 100644 >--- a/Source/WebCore/rendering/RenderLayer.h >+++ b/Source/WebCore/rendering/RenderLayer.h >@@ -205,7 +205,7 @@ public: > > void availableContentSizeChanged(AvailableSizeChangeReason) override; > >- void scrollRectToVisible(SelectionRevealMode, const LayoutRect&, const ScrollAlignment& alignX, const ScrollAlignment& alignY); >+ void scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX, const ScrollAlignment& alignY); > > LayoutRect getRectToExpose(const LayoutRect& visibleRect, const LayoutRect& visibleRectRelativeToDocument, const LayoutRect& exposeRect, const ScrollAlignment& alignX, const ScrollAlignment& alignY); > >diff --git a/Source/WebCore/rendering/RenderObject.cpp b/Source/WebCore/rendering/RenderObject.cpp >index 1b9cbb8711a27edd1025174c1552ff60f21e4926..cbd2e64b5b3ef2b44f12cfe58e171d093d132dcb 100644 >--- a/Source/WebCore/rendering/RenderObject.cpp >+++ b/Source/WebCore/rendering/RenderObject.cpp >@@ -358,16 +358,13 @@ RenderLayer* RenderObject::enclosingLayer() const > return nullptr; > } > >-bool RenderObject::scrollRectToVisible(SelectionRevealMode revealMode, const LayoutRect& rect, const ScrollAlignment& alignX, const ScrollAlignment& alignY) >+bool RenderObject::scrollRectToVisible(const LayoutRect& rect, const ScrollAlignment& alignX, const ScrollAlignment& alignY) > { >- if (revealMode == SelectionRevealMode::DoNotReveal) >- return false; >- > RenderLayer* enclosingLayer = this->enclosingLayer(); > if (!enclosingLayer) > return false; > >- enclosingLayer->scrollRectToVisible(revealMode, rect, alignX, alignY); >+ enclosingLayer->scrollRectToVisible(rect, alignX, alignY); > return true; > } > >diff --git a/Source/WebCore/rendering/RenderObject.h b/Source/WebCore/rendering/RenderObject.h >index 7d7c298a81a64f172063efd7827d0a4ed3a4ce56..8474cbb3c5769580ff93b47d18b47c9e0305f82b 100644 >--- a/Source/WebCore/rendering/RenderObject.h >+++ b/Source/WebCore/rendering/RenderObject.h >@@ -155,7 +155,7 @@ public: > WEBCORE_EXPORT RenderLayer* enclosingLayer() const; > > // Scrolling is a RenderBox concept, however some code just cares about recursively scrolling our enclosing ScrollableArea(s). >- WEBCORE_EXPORT bool scrollRectToVisible(SelectionRevealMode, const LayoutRect&, const ScrollAlignment& alignX = ScrollAlignment::alignCenterIfNeeded, const ScrollAlignment& alignY = ScrollAlignment::alignCenterIfNeeded); >+ WEBCORE_EXPORT bool scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX = ScrollAlignment::alignCenterIfNeeded, const ScrollAlignment& alignY = ScrollAlignment::alignCenterIfNeeded); > > // Convenience function for getting to the nearest enclosing box of a RenderObject. > RenderBox& enclosingBox() const; >diff --git a/Source/WebKit/mac/WebView/WebFrame.mm b/Source/WebKit/mac/WebView/WebFrame.mm >index 90a1bcce08210d034ad925c3c4b3a4301773140f..9cbf30913339c2664bb76a6b542b9ebe5261304f 100644 >--- a/Source/WebKit/mac/WebView/WebFrame.mm >+++ b/Source/WebKit/mac/WebView/WebFrame.mm >@@ -717,12 +717,12 @@ static inline WebDataSource *dataSource(DocumentLoader* loader) > > if (startNode && startNode->renderer()) { > #if !PLATFORM(IOS) >- startNode->renderer()->scrollRectToVisible(SelectionRevealMode::Reveal, enclosingIntRect(rangeRect), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded); >+ startNode->renderer()->scrollRectToVisible(enclosingIntRect(rangeRect), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded); > #else > RenderLayer* layer = startNode->renderer()->enclosingLayer(); > if (layer) { > layer->setAdjustForIOSCaretWhenScrolling(true); >- startNode->renderer()->scrollRectToVisible(SelectionRevealMode::Reveal, enclosingIntRect(rangeRect), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded); >+ startNode->renderer()->scrollRectToVisible(enclosingIntRect(rangeRect), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded); > layer->setAdjustForIOSCaretWhenScrolling(false); > _private->coreFrame->selection().setCaretRectNeedsUpdate(); > _private->coreFrame->selection().updateAppearance(); >@@ -741,7 +741,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader) > RenderLayer* layer = startNode->renderer()->enclosingLayer(); > if (layer) { > layer->setAdjustForIOSCaretWhenScrolling(true); >- startNode->renderer()->scrollRectToVisible(SelectionRevealMode::Reveal, enclosingIntRect(rangeRect), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded); >+ startNode->renderer()->scrollRectToVisible(enclosingIntRect(rangeRect), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded); > layer->setAdjustForIOSCaretWhenScrolling(false); > > Frame *coreFrame = core(self); >@@ -1375,7 +1375,7 @@ static WebFrameLoadType toWebFrameLoadType(FrameLoadType frameLoadType) > { > WebCore::Frame *frame = core(self); > RevealExtentOption revealExtentOption = revealExtent ? RevealExtent : DoNotRevealExtent; >- frame->selection().revealSelection(SelectionRevealMode::Reveal, ScrollAlignment::alignToEdgeIfNeeded, revealExtentOption); >+ frame->selection().revealSelection(ScrollAlignment::alignToEdgeIfNeeded, revealExtentOption); > } > > - (void)resetSelection >diff --git a/Source/WebKit/mac/WebView/WebHTMLView.mm b/Source/WebKit/mac/WebView/WebHTMLView.mm >index ff41bdda4b88297a499a83dffe2c686197a0545e..7ef1a30a9a0b5a337441ddeaa76db7be7fbb75ab 100644 >--- a/Source/WebKit/mac/WebView/WebHTMLView.mm >+++ b/Source/WebKit/mac/WebView/WebHTMLView.mm >@@ -3146,7 +3146,7 @@ WEBCORE_COMMAND(toggleUnderline) > COMMAND_PROLOGUE > > if (Frame* coreFrame = core([self _frame])) >- coreFrame->selection().revealSelection(SelectionRevealMode::Reveal, ScrollAlignment::alignCenterAlways); >+ coreFrame->selection().revealSelection(ScrollAlignment::alignCenterAlways); > } > > #if !PLATFORM(IOS) >@@ -5345,7 +5345,7 @@ static PassRefPtr<KeyboardEvent> currentKeyboardEvent(Frame* coreFrame) > COMMAND_PROLOGUE > > if (Frame* coreFrame = core([self _frame])) >- coreFrame->selection().revealSelection(SelectionRevealMode::Reveal, ScrollAlignment::alignCenterAlways); >+ coreFrame->selection().revealSelection(ScrollAlignment::alignCenterAlways); > } > > #if !PLATFORM(IOS) >diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp >index fffd3d0f585a0b60e38e776eafde38a04080240d..45b8170a7413952fef84fee95629c8935cfe0bb0 100644 >--- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp >@@ -2396,7 +2396,7 @@ bool WebPage::scrollBy(uint32_t scrollDirection, uint32_t scrollGranularity) > void WebPage::centerSelectionInVisibleArea() > { > Frame& frame = m_page->focusController().focusedOrMainFrame(); >- frame.selection().revealSelection(SelectionRevealMode::Reveal, ScrollAlignment::alignCenterAlways); >+ frame.selection().revealSelection(ScrollAlignment::alignCenterAlways); > m_findController.showFindIndicatorInSelection(); > } > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 84077cef055a15a3b21f152594bfb02201e8a967..cc213c62eda5e1b2c2a6d447b39370701e9425d6 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,18 @@ >+2016-06-20 Commit Queue <commit-queue@webkit.org> >+ >+ Unreviewed, rolling out r202243. >+ https://bugs.webkit.org/show_bug.cgi?id=158972 >+ >+ Broke Windows build and iOS tests (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/202243 >+ > 2016-06-20 Zalan Bujtas <zalan@apple.com> > > Set the end position on the placeholder BidiRun properly. >diff --git a/LayoutTests/fast/forms/ios/focus-input-in-iframe-expected.txt b/LayoutTests/fast/forms/ios/focus-input-in-iframe-expected.txt >deleted file mode 100644 >index f5a2ebd2ffab7139942e2cd76ee7b63b20c76fce..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/ios/focus-input-in-iframe-expected.txt >+++ /dev/null >@@ -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 } >diff --git a/LayoutTests/fast/forms/ios/focus-input-in-iframe.html b/LayoutTests/fast/forms/ios/focus-input-in-iframe.html >deleted file mode 100644 >index c3712def0ae85ff531b20b7f416d5b853f398a54..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/ios/focus-input-in-iframe.html >+++ /dev/null >@@ -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="resources/zooming-test-utils.js"></script> >- <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> >diff --git a/LayoutTests/fast/forms/ios/programmatic-focus-input-in-iframe-expected.txt b/LayoutTests/fast/forms/ios/programmatic-focus-input-in-iframe-expected.txt >deleted file mode 100644 >index 4eef465861ef0702486f7dde50a0de298f18c203..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/ios/programmatic-focus-input-in-iframe-expected.txt >+++ /dev/null >@@ -1,4 +0,0 @@ >-Tests that a programmatic focus should not scroll into view >- >-PASS: page did not scroll. >- >diff --git a/LayoutTests/fast/forms/ios/programmatic-focus-input-in-iframe.html b/LayoutTests/fast/forms/ios/programmatic-focus-input-in-iframe.html >deleted file mode 100644 >index 6edb5fa453924eb0d3385051cfdbaaad484c013c..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/ios/programmatic-focus-input-in-iframe.html >+++ /dev/null >@@ -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>
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 158972
: 281704