Title: [171467] branches/safari-600.1-branch/Source
Revision
171467
Author
[email protected]
Date
2014-07-23 01:42:20 -0700 (Wed, 23 Jul 2014)

Log Message

Merged r171370.  <rdar://problem/16721055>

Modified Paths

Diff

Modified: branches/safari-600.1-branch/Source/WebCore/ChangeLog (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebCore/ChangeLog	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebCore/ChangeLog	2014-07-23 08:42:20 UTC (rev 171467)
@@ -1,5 +1,28 @@
 2014-07-23  Lucas Forschler  <[email protected]>
 
+        Merge r171370
+
+    2014-07-22  Enrica Casucci  <[email protected]>
+
+            REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track scrolling.
+            https://bugs.webkit.org/show_bug.cgi?id=135180
+            <rdar://problem/16721055>
+
+            Reviewed by Simon Fraser.
+
+            AsyncScrollingCoordinator will force a selection update on iOS
+            when scrolling terminates in an overflow scroll.
+
+            * loader/EmptyClients.h:
+            * page/EditorClient.h:
+            * page/scrolling/AsyncScrollingCoordinator.cpp:
+            (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
+            * page/scrolling/ScrollingTree.h:
+            (WebCore::ScrollingTree::scrollingTreeNodeWillStartScroll):
+            (WebCore::ScrollingTree::scrollingTreeNodeDidEndScroll):
+
+2014-07-23  Lucas Forschler  <[email protected]>
+
         Merge r171355
 
     2014-07-21  Sam Weinig  <[email protected]>

Modified: branches/safari-600.1-branch/Source/WebCore/loader/EmptyClients.h (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebCore/loader/EmptyClients.h	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebCore/loader/EmptyClients.h	2014-07-23 08:42:20 UTC (rev 171467)
@@ -471,6 +471,7 @@
     virtual bool doTextFieldCommandFromEvent(Element*, KeyboardEvent*) override { return false; }
     virtual void textWillBeDeletedInTextField(Element*) override { }
     virtual void textDidChangeInTextArea(Element*) override { }
+    virtual void overflowScrollPositionChanged() override { }
 
 #if PLATFORM(IOS)
     virtual void startDelayingAndCoalescingContentChangeNotifications() override { }

Modified: branches/safari-600.1-branch/Source/WebCore/page/EditorClient.h (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebCore/page/EditorClient.h	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebCore/page/EditorClient.h	2014-07-23 08:42:20 UTC (rev 171467)
@@ -119,6 +119,7 @@
     virtual bool doTextFieldCommandFromEvent(Element*, KeyboardEvent*) = 0;
     virtual void textWillBeDeletedInTextField(Element*) = 0;
     virtual void textDidChangeInTextArea(Element*) = 0;
+    virtual void overflowScrollPositionChanged() = 0;
 
 #if PLATFORM(IOS)
     virtual void startDelayingAndCoalescingContentChangeNotifications() = 0;

Modified: branches/safari-600.1-branch/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp	2014-07-23 08:42:20 UTC (rev 171467)
@@ -28,6 +28,7 @@
 #if ENABLE(ASYNC_SCROLLING)
 #include "AsyncScrollingCoordinator.h"
 
+#include "EditorClient.h"
 #include "Frame.h"
 #include "FrameView.h"
 #include "GraphicsLayer.h"
@@ -308,6 +309,8 @@
         scrollableArea->setIsUserScroll(scrollingLayerPositionAction == SyncScrollingLayerPosition);
         scrollableArea->scrollToOffsetWithoutAnimation(scrollPosition);
         scrollableArea->setIsUserScroll(false);
+        if (scrollingLayerPositionAction == SetScrollingLayerPosition)
+            m_page->editorClient()->overflowScrollPositionChanged();
     }
 }
 

Modified: branches/safari-600.1-branch/Source/WebCore/page/scrolling/ScrollingTree.h (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebCore/page/scrolling/ScrollingTree.h	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebCore/page/scrolling/ScrollingTree.h	2014-07-23 08:42:20 UTC (rev 171467)
@@ -93,6 +93,8 @@
 #if PLATFORM(IOS)
     virtual FloatRect fixedPositionRect() = 0;
     virtual void scrollingTreeNodeWillStartPanGesture() { }
+    virtual void scrollingTreeNodeWillStartScroll() { }
+    virtual void scrollingTreeNodeDidEndScroll() { }
 #endif
 
     bool isPointInNonFastScrollableRegion(IntPoint);

Modified: branches/safari-600.1-branch/Source/WebKit/mac/ChangeLog (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit/mac/ChangeLog	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit/mac/ChangeLog	2014-07-23 08:42:20 UTC (rev 171467)
@@ -1,5 +1,19 @@
 2014-07-23  Lucas Forschler  <[email protected]>
 
+        Merge r171370
+
+    2014-07-22  Enrica Casucci  <[email protected]>
+
+            REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track scrolling.
+            https://bugs.webkit.org/show_bug.cgi?id=135180
+            <rdar://problem/16721055>
+
+            Reviewed by Simon Fraser.
+
+            * WebCoreSupport/WebEditorClient.h:
+
+2014-07-23  Lucas Forschler  <[email protected]>
+
         Merge r171345
 
     2014-07-22  Jeremy Jones  <[email protected]>

Modified: branches/safari-600.1-branch/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h	2014-07-23 08:42:20 UTC (rev 171467)
@@ -132,6 +132,7 @@
     virtual bool doTextFieldCommandFromEvent(WebCore::Element*, WebCore::KeyboardEvent*) override;
     virtual void textWillBeDeletedInTextField(WebCore::Element*) override;
     virtual void textDidChangeInTextArea(WebCore::Element*) override;
+    virtual void overflowScrollPositionChanged() override { };
 
 #if PLATFORM(IOS)
     virtual void startDelayingAndCoalescingContentChangeNotifications() override;

Modified: branches/safari-600.1-branch/Source/WebKit2/ChangeLog (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/ChangeLog	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/ChangeLog	2014-07-23 08:42:20 UTC (rev 171467)
@@ -1,5 +1,58 @@
 2014-07-23  Lucas Forschler  <[email protected]>
 
+        Merge r171370
+
+    2014-07-22  Enrica Casucci  <[email protected]>
+
+            REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track scrolling.
+            https://bugs.webkit.org/show_bug.cgi?id=135180
+            <rdar://problem/16721055>
+
+            Reviewed by Simon Fraser.
+
+            Adds notifications to the WKContentView to know when scrolling starts and ends
+            in an overflow scroll. When scrolling starts, we hide the selection and we restore
+            it when scrolling ends, though not before the selection information in the editor
+            state has been updated.
+            It also adds a new method to the EditorClient class to force the
+            selection update when scrolling is completed.
+
+            * UIProcess/PageClient.h:
+            * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
+            * UIProcess/Scrolling/RemoteScrollingTree.cpp:
+            (WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartScroll):
+            (WebKit::RemoteScrollingTree::scrollingTreeNodeDidEndScroll):
+            * UIProcess/Scrolling/RemoteScrollingTree.h:
+            * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
+            * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
+            (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
+            (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
+            (-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]):
+            (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollWillStart):
+            (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollDidEnd):
+            * UIProcess/WebPageProxy.h:
+            * UIProcess/ios/PageClientImplIOS.h:
+            * UIProcess/ios/PageClientImplIOS.mm:
+            (WebKit::PageClientImpl::overflowScrollWillStartScroll):
+            (WebKit::PageClientImpl::overflowScrollDidEndScroll):
+            * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
+            (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll):
+            (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll):
+            * UIProcess/ios/WKContentViewInteraction.h:
+            * UIProcess/ios/WKContentViewInteraction.mm:
+            (-[WKContentView _overflowScrollingWillBegin]):
+            (-[WKContentView _overflowScrollingDidEnd]):
+            (-[WKContentView _updateChangedSelection]):
+            * UIProcess/ios/WebPageProxyIOS.mm:
+            (WebKit::WebPageProxy::overflowScrollWillStartScroll):
+            (WebKit::WebPageProxy::overflowScrollDidEndScroll):
+            * WebProcess/WebCoreSupport/WebEditorClient.h:
+            * WebProcess/WebCoreSupport/WebEditorClient.cpp:
+            * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
+            (WebKit::WebEditorClient::updateSelection):
+
+2014-07-23  Lucas Forschler  <[email protected]>
+
         Merge r171368
 
     2014-07-22  Benjamin Poulain  <[email protected]>

Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/PageClient.h (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/PageClient.h	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/PageClient.h	2014-07-23 08:42:20 UTC (rev 171467)
@@ -273,6 +273,8 @@
     virtual WebCore::FloatSize contentsSize() const = 0;
     virtual void overflowScrollViewWillStartPanGesture() = 0;
     virtual void overflowScrollViewDidScroll() = 0;
+    virtual void overflowScrollWillStartScroll() = 0;
+    virtual void overflowScrollDidEndScroll() = 0;
     virtual void didFinishDrawingPagesToPDF(const IPC::DataReference&) = 0;
     virtual Vector<String> mimeTypesWithCustomContentProviders() = 0;
 

Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h	2014-07-23 08:42:20 UTC (rev 171467)
@@ -75,6 +75,8 @@
 #if PLATFORM(IOS)
     WebCore::FloatRect customFixedPositionRect() const;
     void scrollingTreeNodeWillStartPanGesture();
+    void scrollingTreeNodeWillStartScroll();
+    void scrollingTreeNodeDidEndScroll();
 #endif
 
 private:

Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp	2014-07-23 08:42:20 UTC (rev 171467)
@@ -87,6 +87,17 @@
 {
     m_scrollingCoordinatorProxy.scrollingTreeNodeWillStartPanGesture();
 }
+    
+void RemoteScrollingTree::scrollingTreeNodeWillStartScroll()
+{
+    m_scrollingCoordinatorProxy.scrollingTreeNodeWillStartScroll();
+}
+
+void RemoteScrollingTree::scrollingTreeNodeDidEndScroll()
+{
+    m_scrollingCoordinatorProxy.scrollingTreeNodeDidEndScroll();
+}
+
 #endif
 
 void RemoteScrollingTree::scrollingTreeNodeDidScroll(ScrollingNodeID nodeID, const FloatPoint& scrollPosition, SetOrSyncScrollingLayerPosition scrollingLayerPositionAction)

Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h	2014-07-23 08:42:20 UTC (rev 171467)
@@ -59,6 +59,8 @@
 #if PLATFORM(IOS)
     virtual WebCore::FloatRect fixedPositionRect() override;
     virtual void scrollingTreeNodeWillStartPanGesture() override;
+    virtual void scrollingTreeNodeWillStartScroll() override;
+    virtual void scrollingTreeNodeDidEndScroll() override;
 #endif
 
     virtual PassRefPtr<WebCore::ScrollingTreeNode> createScrollingTreeNode(WebCore::ScrollingNodeType, WebCore::ScrollingNodeID) override;

Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h	2014-07-23 08:42:20 UTC (rev 171467)
@@ -40,6 +40,8 @@
     static PassRefPtr<ScrollingTreeOverflowScrollingNodeIOS> create(WebCore::ScrollingTree&, WebCore::ScrollingNodeID);
     virtual ~ScrollingTreeOverflowScrollingNodeIOS();
 
+    void overflowScrollWillStart();
+    void overflowScrollDidEnd();
     void overflowScrollViewWillStartPanGesture();
     void scrollViewDidScroll(const WebCore::FloatPoint&, bool inUserInteration);
 

Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm	2014-07-23 08:42:20 UTC (rev 171467)
@@ -70,6 +70,7 @@
 
     if (scrollView.panGestureRecognizer.state == UIGestureRecognizerStateBegan)
         _scrollingTreeNode->overflowScrollViewWillStartPanGesture();
+    _scrollingTreeNode->overflowScrollWillStart();
 }
 
 - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)willDecelerate
@@ -77,6 +78,7 @@
     if (_inUserInteraction && !willDecelerate) {
         _inUserInteraction = NO;
         _scrollingTreeNode->scrollViewDidScroll(scrollView.contentOffset, _inUserInteraction);
+        _scrollingTreeNode->overflowScrollDidEnd();
     }
 }
 
@@ -85,6 +87,7 @@
     if (_inUserInteraction) {
         _inUserInteraction = NO;
         _scrollingTreeNode->scrollViewDidScroll(scrollView.contentOffset, _inUserInteraction);
+        _scrollingTreeNode->overflowScrollDidEnd();
     }
 }
 
@@ -232,6 +235,16 @@
         child->updateLayersAfterAncestorChange(*this, fixedPositionRect, scrollDelta);
 }
 
+void ScrollingTreeOverflowScrollingNodeIOS::overflowScrollWillStart()
+{
+    scrollingTree().scrollingTreeNodeWillStartScroll();
+}
+
+void ScrollingTreeOverflowScrollingNodeIOS::overflowScrollDidEnd()
+{
+    scrollingTree().scrollingTreeNodeDidEndScroll();
+}
+
 void ScrollingTreeOverflowScrollingNodeIOS::overflowScrollViewWillStartPanGesture()
 {
     scrollingTree().scrollingTreeNodeWillStartPanGesture();

Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/WebPageProxy.h (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/WebPageProxy.h	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/WebPageProxy.h	2014-07-23 08:42:20 UTC (rev 171467)
@@ -390,6 +390,8 @@
     WebCore::FloatRect computeCustomFixedPositionRect(const WebCore::FloatRect& unobscuredContentRect, double displayedContentScale, UnobscuredRectConstraint = UnobscuredRectConstraint::Unconstrained) const;
     void overflowScrollViewWillStartPanGesture();
     void overflowScrollViewDidScroll();
+    void overflowScrollWillStartScroll();
+    void overflowScrollDidEndScroll();
 
     void dynamicViewportSizeUpdate(const WebCore::FloatSize& minimumLayoutSize, const WebCore::FloatSize& minimumLayoutSizeForMinimalUI, const WebCore::FloatSize& maximumUnobscuredSize, const WebCore::FloatRect& targetExposedContentRect, const WebCore::FloatRect& targetUnobscuredRect, const WebCore::FloatRect& targetUnobscuredRectInScrollViewCoordinates, double targetScale, int32_t deviceOrientation);
     void synchronizeDynamicViewportUpdate();

Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h	2014-07-23 08:42:20 UTC (rev 171467)
@@ -147,6 +147,9 @@
     virtual void zoomToRect(WebCore::FloatRect, double minimumScale, double maximumScale) override;
     virtual void overflowScrollViewWillStartPanGesture() override;
     virtual void overflowScrollViewDidScroll() override;
+    virtual void overflowScrollWillStartScroll() override;
+    virtual void overflowScrollDidEndScroll() override;
+
     virtual void didFinishDrawingPagesToPDF(const IPC::DataReference&) override;
 
     // Auxiliary Client Creation

Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm	2014-07-23 08:42:20 UTC (rev 171467)
@@ -645,6 +645,16 @@
     [m_contentView _didScroll];
 }
 
+void PageClientImpl::overflowScrollWillStartScroll()
+{
+    [m_contentView _overflowScrollingWillBegin];
+}
+
+void PageClientImpl::overflowScrollDidEndScroll()
+{
+    [m_contentView _overflowScrollingDidEnd];
+}
+
 void PageClientImpl::didFinishDrawingPagesToPDF(const IPC::DataReference& pdfData)
 {
     RetainPtr<CFDataRef> data = "" pdfData.data(), pdfData.size()));

Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm	2014-07-23 08:42:20 UTC (rev 171467)
@@ -103,6 +103,16 @@
     m_webPageProxy.overflowScrollViewWillStartPanGesture();
 }
 
+void RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll()
+{
+    m_webPageProxy.overflowScrollWillStartScroll();
+}
+    
+void RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll()
+{
+    m_webPageProxy.overflowScrollDidEndScroll();
+}
+
 } // namespace WebKit
 
 

Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h	2014-07-23 08:42:20 UTC (rev 171467)
@@ -137,6 +137,7 @@
     BOOL _potentialTapInProgress;
     BOOL _hasTapHighlightForPotentialTap;
     BOOL _selectionNeedsUpdate;
+    BOOL _shouldRestoreSelection;
     BOOL _usingGestureForSelection;
     BOOL _inspectorNodeSearchEnabled;
     BOOL _didAccessoryTabInitiateFocus;
@@ -174,6 +175,8 @@
 - (void)_willStartScrollingOrZooming;
 - (void)_didScroll;
 - (void)_didEndScrollingOrZooming;
+- (void)_overflowScrollingWillBegin;
+- (void)_overflowScrollingDidEnd;
 - (void)_didUpdateBlockSelectionWithTouch:(WebKit::SelectionTouch)touch withFlags:(WebKit::SelectionFlags)flags growThreshold:(CGFloat)growThreshold shrinkThreshold:(CGFloat)shrinkThreshold;
 - (void)_showPlaybackTargetPicker:(BOOL)hasVideo fromRect:(const WebCore::IntRect&)elementRect;
 - (void)_showRunOpenPanel:(WebKit::WebOpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener;

Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2014-07-23 08:42:20 UTC (rev 171467)
@@ -654,6 +654,25 @@
     [self _cancelInteraction];
 }
 
+- (void)_overflowScrollingWillBegin
+{
+    [_webSelectionAssistant willStartScrollingOverflow];
+    [_textSelectionAssistant willStartScrollingOverflow];    
+}
+
+- (void)_overflowScrollingDidEnd
+{
+    // If scrolling ends before we've received a selection update,
+    // we postpone showing the selection until the update is received.
+    if (!_selectionNeedsUpdate) {
+        _shouldRestoreSelection = YES;
+        return;
+    }
+    [self _updateChangedSelection];
+    [_webSelectionAssistant didEndScrollingOverflow];
+    [_textSelectionAssistant didEndScrollingOverflow];
+}
+
 - (BOOL)_requiresKeyboardWhenFirstResponder
 {
     // FIXME: We should add the logic to handle keyboard visibility during focus redirects.
@@ -2609,6 +2628,11 @@
     } else if (!_page->editorState().isContentEditable)
         [_webSelectionAssistant selectionChanged];
     _selectionNeedsUpdate = NO;
+    if (_shouldRestoreSelection) {
+        [_webSelectionAssistant didEndScrollingOverflow];
+        [_textSelectionAssistant didEndScrollingOverflow];
+        _shouldRestoreSelection = NO;
+    }
 }
 
 - (void)_showPlaybackTargetPicker:(BOOL)hasVideo fromRect:(const IntRect&)elementRect

Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm	2014-07-23 08:42:20 UTC (rev 171467)
@@ -251,6 +251,16 @@
     m_pageClient.overflowScrollViewDidScroll();
 }
 
+void WebPageProxy::overflowScrollWillStartScroll()
+{
+    m_pageClient.overflowScrollWillStartScroll();
+}
+
+void WebPageProxy::overflowScrollDidEndScroll()
+{
+    m_pageClient.overflowScrollDidEndScroll();
+}
+
 void WebPageProxy::dynamicViewportSizeUpdate(const FloatSize& minimumLayoutSize, const WebCore::FloatSize& minimumLayoutSizeForMinimalUI, const WebCore::FloatSize& maximumUnobscuredSize, const FloatRect& targetExposedContentRect, const FloatRect& targetUnobscuredRect, const FloatRect& targetUnobscuredRectInScrollViewCoordinates,  double targetScale, int32_t deviceOrientation)
 {
     if (!isValid())

Modified: branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp	2014-07-23 08:42:20 UTC (rev 171467)
@@ -339,6 +339,13 @@
     m_page->injectedBundleFormClient().textDidChangeInTextArea(m_page, toHTMLTextAreaElement(element), webFrame);
 }
 
+#if !PLATFORM(IOS)
+void WebEditorClient::overflowScrollPositionChanged()
+{
+    notImplemented();
+}
+#endif
+
 static bool getActionTypeForKeyEvent(KeyboardEvent* event, WKInputFieldActionType& type)
 {
     String key = event->keyIdentifier();

Modified: branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h	2014-07-23 08:42:20 UTC (rev 171467)
@@ -90,6 +90,7 @@
     virtual bool doTextFieldCommandFromEvent(WebCore::Element*, WebCore::KeyboardEvent*) override;
     virtual void textWillBeDeletedInTextField(WebCore::Element*) override;
     virtual void textDidChangeInTextArea(WebCore::Element*) override;
+    virtual void overflowScrollPositionChanged() override;
 
 #if PLATFORM(COCOA)
     virtual NSString *userVisibleString(NSURL *) override;

Modified: branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm (171466 => 171467)


--- branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm	2014-07-23 08:36:44 UTC (rev 171466)
+++ branches/safari-600.1-branch/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm	2014-07-23 08:42:20 UTC (rev 171467)
@@ -134,6 +134,11 @@
     return 0;
 }
 
+void WebEditorClient::overflowScrollPositionChanged()
+{
+    m_page->didChangeSelection();
+}
+
 } // namespace WebKit
 
 #endif // PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to