REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track...
authorenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Jul 2014 23:28:37 +0000 (23:28 +0000)
committerenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Jul 2014 23:28:37 +0000 (23:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135180
<rdar://problem/16721055>

Reviewed by Simon Fraser.

Source/WebCore:
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):

Source/WebKit/mac:
* WebCoreSupport/WebEditorClient.h:

Source/WebKit2:
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171370 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/EditorClient.h
Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
Source/WebCore/page/scrolling/ScrollingTree.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebEditorClient.h
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h
Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp
Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h
Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h
Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/ios/PageClientImplIOS.h
Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm
Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h
Source/WebKit2/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm

index 8860431..0072c66 100644 (file)
@@ -1,3 +1,22 @@
+2014-07-22  Enrica Casucci  <enrica@apple.com>
+
+        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-22  Myles C. Maxfield  <mmaxfield@apple.com>
 
         [Mac] Cocoa throws exception when the return type of NSAccessibilityLinkedUIElementsAttribute is not an array
index 7829c14..68670c7 100644 (file)
@@ -471,6 +471,7 @@ public:
     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 { }
index 8f4d3cf..d2f5ced 100644 (file)
@@ -119,6 +119,7 @@ public:
     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;
index 648093a..b61991c 100644 (file)
@@ -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 @@ void AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll(ScrollingNo
         scrollableArea->setIsUserScroll(scrollingLayerPositionAction == SyncScrollingLayerPosition);
         scrollableArea->scrollToOffsetWithoutAnimation(scrollPosition);
         scrollableArea->setIsUserScroll(false);
+        if (scrollingLayerPositionAction == SetScrollingLayerPosition)
+            m_page->editorClient()->overflowScrollPositionChanged();
     }
 }
 
index 68e00ec..81f4e78 100644 (file)
@@ -93,6 +93,8 @@ public:
 #if PLATFORM(IOS)
     virtual FloatRect fixedPositionRect() = 0;
     virtual void scrollingTreeNodeWillStartPanGesture() { }
+    virtual void scrollingTreeNodeWillStartScroll() { }
+    virtual void scrollingTreeNodeDidEndScroll() { }
 #endif
 
     bool isPointInNonFastScrollableRegion(IntPoint);
index 5084ef7..8fd1739 100644 (file)
@@ -1,3 +1,13 @@
+2014-07-22  Enrica Casucci  <enrica@apple.com>
+
+        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-22  Jeremy Jones  <jeremyj@apple.com>
 
         Don't create new UIWindow for video fullscreen.
index 603b558..2fc2b9c 100644 (file)
@@ -132,6 +132,7 @@ private:
     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;
index fea50e3..5281c26 100644 (file)
@@ -1,3 +1,52 @@
+2014-07-22  Enrica Casucci  <enrica@apple.com>
+
+        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-22  Benjamin Poulain  <bpoulain@apple.com>
 
         [iOS][WK2] WebPageProxy should not do anything when responding to an animated resize is the page is not in a valid state
index 479e0cc..a67addc 100644 (file)
@@ -273,6 +273,8 @@ public:
     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;
 
index 1fd072f..91be7a1 100644 (file)
@@ -75,6 +75,8 @@ public:
 #if PLATFORM(IOS)
     WebCore::FloatRect customFixedPositionRect() const;
     void scrollingTreeNodeWillStartPanGesture();
+    void scrollingTreeNodeWillStartScroll();
+    void scrollingTreeNodeDidEndScroll();
 #endif
 
 private:
index ab9b16b..41ab7c5 100644 (file)
@@ -87,6 +87,17 @@ void RemoteScrollingTree::scrollingTreeNodeWillStartPanGesture()
 {
     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)
index df3442a..49fa8ca 100644 (file)
@@ -59,6 +59,8 @@ private:
 #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;
index c3f53f7..a9588c4 100644 (file)
@@ -40,6 +40,8 @@ public:
     static PassRefPtr<ScrollingTreeOverflowScrollingNodeIOS> create(WebCore::ScrollingTree&, WebCore::ScrollingNodeID);
     virtual ~ScrollingTreeOverflowScrollingNodeIOS();
 
+    void overflowScrollWillStart();
+    void overflowScrollDidEnd();
     void overflowScrollViewWillStartPanGesture();
     void scrollViewDidScroll(const WebCore::FloatPoint&, bool inUserInteration);
 
index 08447bf..c3650f0 100644 (file)
@@ -70,6 +70,7 @@ using namespace WebCore;
 
     if (scrollView.panGestureRecognizer.state == UIGestureRecognizerStateBegan)
         _scrollingTreeNode->overflowScrollViewWillStartPanGesture();
+    _scrollingTreeNode->overflowScrollWillStart();
 }
 
 - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)willDecelerate
@@ -77,6 +78,7 @@ using namespace WebCore;
     if (_inUserInteraction && !willDecelerate) {
         _inUserInteraction = NO;
         _scrollingTreeNode->scrollViewDidScroll(scrollView.contentOffset, _inUserInteraction);
+        _scrollingTreeNode->overflowScrollDidEnd();
     }
 }
 
@@ -85,6 +87,7 @@ using namespace WebCore;
     if (_inUserInteraction) {
         _inUserInteraction = NO;
         _scrollingTreeNode->scrollViewDidScroll(scrollView.contentOffset, _inUserInteraction);
+        _scrollingTreeNode->overflowScrollDidEnd();
     }
 }
 
@@ -232,6 +235,16 @@ void ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll(const Fl
         child->updateLayersAfterAncestorChange(*this, fixedPositionRect, scrollDelta);
 }
 
+void ScrollingTreeOverflowScrollingNodeIOS::overflowScrollWillStart()
+{
+    scrollingTree().scrollingTreeNodeWillStartScroll();
+}
+
+void ScrollingTreeOverflowScrollingNodeIOS::overflowScrollDidEnd()
+{
+    scrollingTree().scrollingTreeNodeDidEndScroll();
+}
+
 void ScrollingTreeOverflowScrollingNodeIOS::overflowScrollViewWillStartPanGesture()
 {
     scrollingTree().scrollingTreeNodeWillStartPanGesture();
index 0d4e003..fa3d008 100644 (file)
@@ -390,6 +390,8 @@ public:
     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();
index 460abd0..d047c9a 100644 (file)
@@ -147,6 +147,9 @@ private:
     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
index 13e007f..2583c75 100644 (file)
@@ -645,6 +645,16 @@ void PageClientImpl::overflowScrollViewDidScroll()
     [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 = adoptCF(CFDataCreate(kCFAllocatorDefault, pdfData.data(), pdfData.size()));
index 2859039..4cdd779 100644 (file)
@@ -103,6 +103,16 @@ void RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartPanGesture()
     m_webPageProxy.overflowScrollViewWillStartPanGesture();
 }
 
+void RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll()
+{
+    m_webPageProxy.overflowScrollWillStartScroll();
+}
+    
+void RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll()
+{
+    m_webPageProxy.overflowScrollDidEndScroll();
+}
+
 } // namespace WebKit
 
 
index 0db9b02..c9632b7 100644 (file)
@@ -137,6 +137,7 @@ struct WKAutoCorrectionData {
     BOOL _potentialTapInProgress;
     BOOL _hasTapHighlightForPotentialTap;
     BOOL _selectionNeedsUpdate;
+    BOOL _shouldRestoreSelection;
     BOOL _usingGestureForSelection;
     BOOL _inspectorNodeSearchEnabled;
     BOOL _didAccessoryTabInitiateFocus;
@@ -174,6 +175,8 @@ struct WKAutoCorrectionData {
 - (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;
index 7a25f4a..e9bf9ea 100644 (file)
@@ -654,6 +654,25 @@ static NSValue *nsSizeForTapHighlightBorderRadius(WebCore::IntSize borderRadius)
     [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 @@ static UITextAutocapitalizationType toUITextAutocapitalize(WebAutocapitalizeType
     } 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
index c6b3dbd..b5a54a6 100644 (file)
@@ -251,6 +251,16 @@ void WebPageProxy::overflowScrollViewDidScroll()
     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())
index bb14273..140761b 100644 (file)
@@ -339,6 +339,13 @@ void WebEditorClient::textDidChangeInTextArea(Element* element)
     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();
index 145d49b..0968784 100644 (file)
@@ -90,6 +90,7 @@ private:
     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;
index 5a82f69..e27c2c1 100644 (file)
@@ -134,6 +134,11 @@ int WebEditorClient::pasteboardChangeCount()
     return 0;
 }
 
+void WebEditorClient::overflowScrollPositionChanged()
+{
+    m_page->didChangeSelection();
+}
+
 } // namespace WebKit
 
 #endif // PLATFORM(IOS)