Title: [163388] trunk/Source/WebKit2
- Revision
- 163388
- Author
- [email protected]
- Date
- 2014-02-04 10:41:07 -0800 (Tue, 04 Feb 2014)
Log Message
WK2: Selection callout bar does not scroll with the selection.
https://bugs.webkit.org/show_bug.cgi?id=128142
<rdar://problem/15970812>
Reviewed by Benjamin Poulain.
Adding notifications to WKContentView to all the delegates
for scrolling and zooming to let WKInteractionView about it.
This allows the interaction assistants to hide the callout
while scrolling or zooming and to fade it in again at the end.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewWillBeginZooming:withView:]):
(-[WKWebView scrollViewWillBeginDragging:]):
* UIProcess/API/ios/WKContentView.h:
* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView didFinishScrollTo:]):
(-[WKContentView willStartZoomOrScroll]):
(-[WKContentView didZoomToScale:]):
* UIProcess/API/ios/WKInteractionView.h:
* UIProcess/API/ios/WKInteractionView.mm:
(-[WKInteractionView _willStartScrollingOrZooming]):
(-[WKInteractionView _didEndScrollingOrZooming]):
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView scrollViewWillBeginZooming:withView:]):
(-[WKView scrollViewWillBeginDragging:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (163387 => 163388)
--- trunk/Source/WebKit2/ChangeLog 2014-02-04 18:05:06 UTC (rev 163387)
+++ trunk/Source/WebKit2/ChangeLog 2014-02-04 18:41:07 UTC (rev 163388)
@@ -1,3 +1,32 @@
+2014-02-04 Enrica Casucci <[email protected]>
+
+ WK2: Selection callout bar does not scroll with the selection.
+ https://bugs.webkit.org/show_bug.cgi?id=128142
+ <rdar://problem/15970812>
+
+ Reviewed by Benjamin Poulain.
+
+ Adding notifications to WKContentView to all the delegates
+ for scrolling and zooming to let WKInteractionView about it.
+ This allows the interaction assistants to hide the callout
+ while scrolling or zooming and to fade it in again at the end.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView scrollViewWillBeginZooming:withView:]):
+ (-[WKWebView scrollViewWillBeginDragging:]):
+ * UIProcess/API/ios/WKContentView.h:
+ * UIProcess/API/ios/WKContentView.mm:
+ (-[WKContentView didFinishScrollTo:]):
+ (-[WKContentView willStartZoomOrScroll]):
+ (-[WKContentView didZoomToScale:]):
+ * UIProcess/API/ios/WKInteractionView.h:
+ * UIProcess/API/ios/WKInteractionView.mm:
+ (-[WKInteractionView _willStartScrollingOrZooming]):
+ (-[WKInteractionView _didEndScrollingOrZooming]):
+ * UIProcess/API/ios/WKViewIOS.mm:
+ (-[WKView scrollViewWillBeginZooming:withView:]):
+ (-[WKView scrollViewWillBeginDragging:]):
+
2014-02-04 Tamas Gergely <[email protected]>
Code cleanup: remove leftover occurrence of ENABLE(GESTURE_EVENTS)
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (163387 => 163388)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2014-02-04 18:05:06 UTC (rev 163387)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2014-02-04 18:41:07 UTC (rev 163388)
@@ -271,8 +271,14 @@
{
if (scrollView.pinchGestureRecognizer.state == UIGestureRecognizerStateBegan)
_userHasChangedPageScale = YES;
+ [_contentView willStartZoomOrScroll];
}
+- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
+{
+ [_contentView willStartZoomOrScroll];
+}
+
- (void)_didFinishScroll
{
CGPoint position = [_scrollView convertPoint:[_scrollView contentOffset] toView:_contentView.get()];
Modified: trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.h (163387 => 163388)
--- trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.h 2014-02-04 18:05:06 UTC (rev 163387)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.h 2014-02-04 18:41:07 UTC (rev 163388)
@@ -70,5 +70,6 @@
- (void)didFinishScrollTo:(CGPoint)contentOffset;
- (void)didScrollTo:(CGPoint)contentOffset;
- (void)didZoomToScale:(CGFloat)scale;
+- (void)willStartZoomOrScroll;
@end
Modified: trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm (163387 => 163388)
--- trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm 2014-02-04 18:05:06 UTC (rev 163387)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm 2014-02-04 18:41:07 UTC (rev 163388)
@@ -215,6 +215,7 @@
_page->didFinishScrolling(contentOffset);
[self _updateViewExposedRect];
[self _updateFixedPositionRect];
+ [_interactionView _didEndScrollingOrZooming];
}
- (void)didScrollTo:(CGPoint)contentOffset
@@ -225,11 +226,17 @@
_page->scrollingCoordinatorProxy()->scrollPositionChangedViaDelegatedScrolling(_page->scrollingCoordinatorProxy()->rootScrollingNodeID(), roundedIntPoint(contentOffset));
}
+- (void)willStartZoomOrScroll
+{
+ [_interactionView _willStartScrollingOrZooming];
+}
+
- (void)didZoomToScale:(CGFloat)scale
{
_page->didFinishZooming(scale);
[self _updateViewExposedRect];
[self _updateFixedPositionRect];
+ [_interactionView _didEndScrollingOrZooming];
}
#pragma mark Internal
Modified: trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.h (163387 => 163388)
--- trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.h 2014-02-04 18:05:06 UTC (rev 163387)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.h 2014-02-04 18:41:07 UTC (rev 163388)
@@ -63,6 +63,7 @@
- (void)_attemptClickAtLocation:(CGPoint)location;
- (void)_updatePositionInformation;
- (void)_performAction:(WebKit::WKSheetActions)action;
-
+- (void)_willStartScrollingOrZooming;
+- (void)_didEndScrollingOrZooming;
@property (readonly, nonatomic) WebKit::InteractionInformationAtPosition positionInformation;
@end
Modified: trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm (163387 => 163388)
--- trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm 2014-02-04 18:05:06 UTC (rev 163387)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm 2014-02-04 18:41:07 UTC (rev 163388)
@@ -679,6 +679,18 @@
[_actionSheetAssistant updateSheetPosition];
}
+- (void)_willStartScrollingOrZooming
+{
+ [_webSelectionAssistant willStartScrollingOrZoomingPage];
+ [_textSelectionAssistant willStartScrollingOverflow];
+}
+
+- (void)_didEndScrollingOrZooming
+{
+ [_webSelectionAssistant didEndScrollingOrZoomingPage];
+ [_textSelectionAssistant didEndScrollingOverflow];
+}
+
- (UIView *)inputAccessoryView
{
if (!_isEditable)
Modified: trunk/Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm (163387 => 163388)
--- trunk/Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm 2014-02-04 18:05:06 UTC (rev 163387)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm 2014-02-04 18:41:07 UTC (rev 163388)
@@ -191,8 +191,14 @@
{
if (scrollView.pinchGestureRecognizer.state == UIGestureRecognizerStateBegan)
_userHasChangedPageScale = YES;
+ [_contentView willStartZoomOrScroll];
}
+- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
+{
+ [_contentView willStartZoomOrScroll];
+}
+
- (void)_didFinishScroll
{
CGPoint position = [_scrollView convertPoint:[_scrollView contentOffset] toView:_contentView.get()];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes