Diff
Modified: trunk/Source/WebCore/ChangeLog (176752 => 176753)
--- trunk/Source/WebCore/ChangeLog 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebCore/ChangeLog 2014-12-03 21:53:36 UTC (rev 176753)
@@ -1,3 +1,18 @@
+2014-12-03 Tim Horton <[email protected]>
+
+ Keyboard input should be disabled in the preview popover
+ https://bugs.webkit.org/show_bug.cgi?id=139219
+ <rdar://problem/19052381>
+
+ Reviewed by Anders Carlsson.
+
+ * page/ChromeClient.h:
+ (WebCore::ChromeClient::shouldDispatchFakeMouseMoveEvents):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
+ Allow ChromeClient to disable the dispatch of "fake" mouseMove events
+ that happens during scrolling.
+
2014-12-03 Antti Koivisto <[email protected]>
Remove genericFamily enum from FontDescription
Modified: trunk/Source/WebCore/page/ChromeClient.h (176752 => 176753)
--- trunk/Source/WebCore/page/ChromeClient.h 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebCore/page/ChromeClient.h 2014-12-03 21:53:36 UTC (rev 176753)
@@ -446,6 +446,8 @@
virtual bool hasRelevantSelectionServices(bool /* isTextOnly */) const { return false; }
#endif
+ virtual bool shouldDispatchFakeMouseMoveEvents() const { return true; }
+
protected:
virtual ~ChromeClient() { }
};
Modified: trunk/Source/WebCore/page/EventHandler.cpp (176752 => 176753)
--- trunk/Source/WebCore/page/EventHandler.cpp 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2014-12-03 21:53:36 UTC (rev 176753)
@@ -2904,6 +2904,11 @@
if (!m_frame.settings().deviceSupportsMouse())
return;
+ if (Page* page = m_frame.page()) {
+ if (!page->chrome().client().shouldDispatchFakeMouseMoveEvents())
+ return;
+ }
+
// If the content has ever taken longer than fakeMouseMoveShortInterval we
// reschedule the timer and use a longer time. This will cause the content
// to receive these moves only after the user is done scrolling, reducing
Modified: trunk/Source/WebKit2/ChangeLog (176752 => 176753)
--- trunk/Source/WebKit2/ChangeLog 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebKit2/ChangeLog 2014-12-03 21:53:36 UTC (rev 176753)
@@ -1,3 +1,87 @@
+2014-12-03 Tim Horton <[email protected]>
+
+ Keyboard input should be disabled in the preview popover
+ https://bugs.webkit.org/show_bug.cgi?id=139219
+ <rdar://problem/19052381>
+
+ Reviewed by Anders Carlsson.
+
+ Make sure that keyboard input, Quick Look, etc. are blocked in preview popovers
+ and WKThumbnailViews. Also block the fake mouseMove events that originate in
+ the Web process upon scrolling, because we were missing those despite blocking
+ ordinary mouseMove events.
+
+ * UIProcess/API/Cocoa/WKViewPrivate.h:
+ * UIProcess/API/mac/WKView.mm:
+ Rename _ignoresNonWheelMouseEvents to _ignoresNonWheelEvents, because it will
+ apply not only to mouse events but also key events, Quick Look events, menu
+ preparation events, swipe events, etc.
+
+ Add _ignoresAllEvents, which means the same thing as _ignoresNonWheelEvents
+ with the addition of ignoring scrollWheel events.
+
+ (-[WKView scrollWheel:]):
+ (-[WKView swipeWithEvent:]):
+ (-[WKView mouseMoved:]):
+ (-[WKView mouseDown:]):
+ (-[WKView mouseUp:]):
+ (-[WKView mouseDragged:]):
+ Adjust to the new name.
+
+ (-[WKView performKeyEquivalent:]):
+ (-[WKView keyUp:]):
+ (-[WKView keyDown:]):
+ (-[WKView flagsChanged:]):
+ (-[WKView quickLookWithEvent:]):
+ (-[WKView prepareForMenu:withEvent:]):
+ (-[WKView willOpenMenu:withEvent:]):
+ (-[WKView didCloseMenu:withEvent:]):
+ Block all of these events as well as those we were previously blocking.
+
+ (-[WKView _setIgnoresAllEvents:]):
+ (-[WKView _setIgnoresNonWheelMouseEvents:]):
+ (-[WKView _setIgnoresNonWheelEvents:]):
+ (-[WKView _ignoresNonWheelEvents]):
+ (-[WKView _ignoresAllEvents]):
+ * UIProcess/API/mac/WKViewInternal.h:
+ Adjust to the new names and the addition of ignoresAllEvents.
+
+ * UIProcess/mac/WKActionMenuController.mm:
+ (-[WKPagePreviewViewController loadView]):
+ Adjust to the new name.
+
+ (-[WKActionMenuController prepareForMenu:withEvent:]):
+ Move bailing from prepareForMenu: up to WKView.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _ignoresNonWheelEvents]):
+ (-[WKWebView _setIgnoresNonWheelEvents:]):
+ (-[WKWebView _ignoresNonWheelMouseEvents]): Deleted.
+ (-[WKWebView _setIgnoresNonWheelMouseEvents:]): Deleted.
+ * UIProcess/API/Cocoa/WKWebViewInternal.h:
+ Adjust to the new name (without "mouse" in it).
+
+ * UIProcess/API/Cocoa/_WKThumbnailView.mm:
+ (-[_WKThumbnailView _viewWasUnparented]):
+ (-[_WKThumbnailView _viewWasParented]):
+ Explicitly tell WKView to disable event handling while thumbnailed,
+ instead of having WKView special-case thumbnail views internally.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::setShouldDispatchFakeMouseMoveEvents):
+ * UIProcess/WebPageProxy.h:
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::shouldDispatchFakeMouseMoveEvents):
+ * WebProcess/WebCoreSupport/WebChromeClient.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::WebPage):
+ * WebProcess/WebPage/WebPage.h:
+ (WebKit::WebPage::shouldDispatchFakeMouseMoveEvents):
+ (WebKit::WebPage::setShouldDispatchFakeMouseMoveEvents):
+ * WebProcess/WebPage/WebPage.messages.in:
+ Plumb shouldDispatchFakeMouseMoveEvents from the UI process to the Web process
+ and through to WebKit2's ChromeClient implementation.
+
2014-12-03 Anders Carlsson <[email protected]>
Remove ENABLE_UI_PROCESS_STORAGE define, it's always 1.
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h (176752 => 176753)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h 2014-12-03 21:53:36 UTC (rev 176753)
@@ -81,7 +81,8 @@
@property (readonly, getter=isUsingUISideCompositing) BOOL usingUISideCompositing;
@property (readwrite) BOOL allowsMagnification;
@property (readwrite) double magnification;
-@property (readwrite, setter=_setIgnoresNonWheelMouseEvents:) BOOL _ignoresNonWheelMouseEvents;
+@property (readwrite, setter=_setIgnoresNonWheelEvents:) BOOL _ignoresNonWheelEvents;
+@property (readwrite, setter=_setIgnoresAllEvents:) BOOL _ignoresAllEvents;
@property (readwrite) BOOL allowsBackForwardNavigationGestures;
@property (nonatomic, setter=_setTopContentInset:) CGFloat _topContentInset;
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (176752 => 176753)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2014-12-03 21:53:36 UTC (rev 176753)
@@ -1583,14 +1583,14 @@
[_wkView setMagnification:magnification centeredAtPoint:NSPointFromCGPoint(point)];
}
-- (BOOL)_ignoresNonWheelMouseEvents
+- (BOOL)_ignoresNonWheelEvents
{
- return [_wkView _ignoresNonWheelMouseEvents];
+ return [_wkView _ignoresNonWheelEvents];
}
-- (void)_setIgnoresNonWheelMouseEvents:(BOOL)ignoresNonWheelMouseEvents
+- (void)_setIgnoresNonWheelEvents:(BOOL)ignoresNonWheelEvents
{
- [_wkView _setIgnoresNonWheelMouseEvents:ignoresNonWheelMouseEvents];
+ [_wkView _setIgnoresNonWheelEvents:ignoresNonWheelEvents];
}
#endif
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h (176752 => 176753)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h 2014-12-03 21:53:36 UTC (rev 176753)
@@ -99,7 +99,7 @@
@property (nonatomic, readonly) UIEdgeInsets _computedContentInset;
#else
-@property (nonatomic, setter=_setIgnoresNonWheelMouseEvents:) BOOL _ignoresNonWheelMouseEvents;
+@property (nonatomic, setter=_setIgnoresNonWheelEvents:) BOOL _ignoresNonWheelEvents;
#endif
@end
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKThumbnailView.mm (176752 => 176753)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKThumbnailView.mm 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKThumbnailView.mm 2014-12-03 21:53:36 UTC (rev 176753)
@@ -80,6 +80,7 @@
- (void)_viewWasUnparented
{
[_wkView _setThumbnailView:nil];
+ [_wkView _setIgnoresAllEvents:NO];
self.layer.contents = nil;
_lastSnapshotScale = NAN;
@@ -97,6 +98,7 @@
[self _requestSnapshotIfNeeded];
[_wkView _setThumbnailView:self];
+ [_wkView _setIgnoresAllEvents:YES];
}
- (void)_requestSnapshotIfNeeded
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (176752 => 176753)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2014-12-03 21:53:36 UTC (rev 176753)
@@ -247,7 +247,8 @@
std::unique_ptr<ViewGestureController> _gestureController;
BOOL _allowsMagnification;
- BOOL _ignoresNonWheelMouseEvents;
+ BOOL _ignoresNonWheelEvents;
+ BOOL _ignoresAllEvents;
BOOL _allowsBackForwardNavigationGestures;
RetainPtr<CALayer> _rootLayer;
@@ -1104,29 +1105,6 @@
// Events
-- (BOOL)_shouldIgnoreMouseEvents
-{
- // FIXME: This check is surprisingly specific. Are there any other cases where we need to block mouse events?
- // Do we actually need to in thumbnail view? And if we do, what about non-mouse events?
-#if WK_API_ENABLED
- if (_data->_thumbnailView)
- return YES;
-#endif
-
- // -scrollWheel: uses -_shouldIgnoreWheelEvents, so for all other event types it is correct to use this.
- return _data->_ignoresNonWheelMouseEvents;
-}
-
-- (BOOL)_shouldIgnoreWheelEvents
-{
-#if WK_API_ENABLED
- if (_data->_thumbnailView)
- return YES;
-#endif
-
- return NO;
-}
-
// Override this so that AppKit will send us arrow keys as key down events so we can
// support them via the key bindings mechanism.
- (BOOL)_wantsKeyDownForEvent:(NSEvent *)event
@@ -1149,7 +1127,7 @@
#define NATIVE_MOUSE_EVENT_HANDLER(Selector) \
- (void)Selector:(NSEvent *)theEvent \
{ \
- if (self._shouldIgnoreMouseEvents) \
+ if (_data->_ignoresNonWheelEvents) \
return; \
if (NSTextInputContext *context = [self inputContext]) { \
[context handleEvent:theEvent completionHandler:^(BOOL handled) { \
@@ -1169,7 +1147,7 @@
#define NATIVE_MOUSE_EVENT_HANDLER(Selector) \
- (void)Selector:(NSEvent *)theEvent \
{ \
- if (self._shouldIgnoreMouseEvents) \
+ if (_data->_ignoresNonWheelEvents) \
return; \
if ([[self inputContext] handleEvent:theEvent]) { \
LOG(TextInput, "%s was handled by text input context", String(#Selector).substring(0, String(#Selector).find("Internal")).ascii().data()); \
@@ -1206,7 +1184,7 @@
- (void)scrollWheel:(NSEvent *)event
{
- if ([self _shouldIgnoreWheelEvents])
+ if (_data->_ignoresAllEvents)
return;
// Work around <rdar://problem/19086993> by always clearing the active text indicator on scroll.
@@ -1224,7 +1202,7 @@
- (void)swipeWithEvent:(NSEvent *)event
{
- if (self._shouldIgnoreMouseEvents)
+ if (_data->_ignoresNonWheelEvents)
return;
if (!_data->_allowsBackForwardNavigationGestures) {
@@ -1242,7 +1220,7 @@
- (void)mouseMoved:(NSEvent *)event
{
- if (self._shouldIgnoreMouseEvents)
+ if (_data->_ignoresNonWheelEvents)
return;
// When a view is first responder, it gets mouse moved events even when the mouse is outside its visible rect.
@@ -1254,7 +1232,7 @@
- (void)mouseDown:(NSEvent *)event
{
- if (self._shouldIgnoreMouseEvents)
+ if (_data->_ignoresNonWheelEvents)
return;
[self _setMouseDownEvent:event];
@@ -1270,7 +1248,7 @@
- (void)mouseUp:(NSEvent *)event
{
- if (self._shouldIgnoreMouseEvents)
+ if (_data->_ignoresNonWheelEvents)
return;
[self _setMouseDownEvent:nil];
@@ -1279,7 +1257,7 @@
- (void)mouseDragged:(NSEvent *)event
{
- if (self._shouldIgnoreMouseEvents)
+ if (_data->_ignoresNonWheelEvents)
return;
if (_data->_ignoringMouseDraggedEvents)
@@ -2182,6 +2160,9 @@
- (BOOL)performKeyEquivalent:(NSEvent *)event
{
+ if (_data->_ignoresNonWheelEvents)
+ return NO;
+
// There's a chance that responding to this event will run a nested event loop, and
// fetching a new event might release the old one. Retaining and then autoreleasing
// the current event prevents that from causing a problem inside WebKit or AppKit code.
@@ -2219,6 +2200,9 @@
- (void)keyUp:(NSEvent *)theEvent
{
+ if (_data->_ignoresNonWheelEvents)
+ return;
+
LOG(TextInput, "keyUp:%p %@", theEvent, theEvent);
// We don't interpret the keyUp event, as this breaks key bindings (see <https://bugs.webkit.org/show_bug.cgi?id=130100>).
_data->_page->handleKeyboardEvent(NativeWebKeyboardEvent(theEvent, false, Vector<KeypressCommand>()));
@@ -2226,6 +2210,9 @@
- (void)keyDown:(NSEvent *)theEvent
{
+ if (_data->_ignoresNonWheelEvents)
+ return;
+
LOG(TextInput, "keyDown:%p %@%s", theEvent, theEvent, (theEvent == _data->_keyDownEventBeingResent) ? " (re-sent)" : "");
// There's a chance that responding to this event will run a nested event loop, and
@@ -2261,6 +2248,9 @@
- (void)flagsChanged:(NSEvent *)theEvent
{
+ if (_data->_ignoresNonWheelEvents)
+ return;
+
LOG(TextInput, "flagsChanged:%p %@", theEvent, theEvent);
// There's a chance that responding to this event will run a nested event loop, and
@@ -2833,6 +2823,9 @@
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
- (void)quickLookWithEvent:(NSEvent *)event
{
+ if (_data->_ignoresNonWheelEvents)
+ return;
+
NSPoint locationInViewCoordinates = [self convertPoint:[event locationInWindow] fromView:nil];
_data->_page->performDictionaryLookupAtLocation(FloatPoint(locationInViewCoordinates.x, locationInViewCoordinates.y));
}
@@ -3698,16 +3691,31 @@
- (void)prepareForMenu:(NSMenu *)menu withEvent:(NSEvent *)event
{
+ if (_data->_ignoresNonWheelEvents) {
+ [menu cancelTracking];
+ return;
+ }
+
[_data->_actionMenuController prepareForMenu:menu withEvent:event];
}
- (void)willOpenMenu:(NSMenu *)menu withEvent:(NSEvent *)event
{
+ if (_data->_ignoresNonWheelEvents) {
+ [menu cancelTracking];
+ return;
+ }
+
[_data->_actionMenuController willOpenMenu:menu withEvent:event];
}
- (void)didCloseMenu:(NSMenu *)menu withEvent:(NSEvent *)event
{
+ if (_data->_ignoresNonWheelEvents) {
+ [menu cancelTracking];
+ return;
+ }
+
[_data->_actionMenuController didCloseMenu:menu withEvent:event];
}
@@ -4010,16 +4018,37 @@
return _data->_allowsBackForwardNavigationGestures;
}
+- (void)_setIgnoresAllEvents:(BOOL)ignoresAllEvents
+{
+ _data->_ignoresAllEvents = ignoresAllEvents;
+ [self _setIgnoresNonWheelEvents:ignoresAllEvents];
+}
+
+// Forward _setIgnoresNonWheelMouseEvents to _setIgnoresNonWheelEvents to avoid breaking existing clients.
- (void)_setIgnoresNonWheelMouseEvents:(BOOL)ignoresNonWheelMouseEvents
{
- _data->_ignoresNonWheelMouseEvents = ignoresNonWheelMouseEvents;
+ [self _setIgnoresNonWheelEvents:ignoresNonWheelMouseEvents];
}
-- (BOOL)_ignoresNonWheelMouseEvents
+- (void)_setIgnoresNonWheelEvents:(BOOL)ignoresNonWheelEvents
{
- return _data->_ignoresNonWheelMouseEvents;
+ if (_data->_ignoresNonWheelEvents == ignoresNonWheelEvents)
+ return;
+
+ _data->_ignoresNonWheelEvents = ignoresNonWheelEvents;
+ _data->_page->setShouldDispatchFakeMouseMoveEvents(!ignoresNonWheelEvents);
}
+- (BOOL)_ignoresNonWheelEvents
+{
+ return _data->_ignoresNonWheelEvents;
+}
+
+- (BOOL)_ignoresAllEvents
+{
+ return _data->_ignoresAllEvents;
+}
+
- (void)_dispatchSetTopContentInset
{
if (!_data->_didScheduleSetTopContentInset)
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h (176752 => 176753)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h 2014-12-03 21:53:36 UTC (rev 176753)
@@ -110,8 +110,6 @@
- (void)_setSuppressVisibilityUpdates:(BOOL)suppressVisibilityUpdates;
- (BOOL)_suppressVisibilityUpdates;
-- (BOOL)_shouldIgnoreMouseEvents;
-
- (void)_didFirstVisuallyNonEmptyLayoutForMainFrame;
- (void)_didFinishLoadForMainFrame;
- (void)_didSameDocumentNavigationForMainFrame:(WebKit::SameDocumentNavigationType)type;
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (176752 => 176753)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2014-12-03 21:53:36 UTC (rev 176753)
@@ -5342,4 +5342,9 @@
}
#endif
+void WebPageProxy::setShouldDispatchFakeMouseMoveEvents(bool shouldDispatchFakeMouseMoveEvents)
+{
+ m_process->send(Messages::WebPage::SetShouldDispatchFakeMouseMoveEvents(shouldDispatchFakeMouseMoveEvents), m_pageID);
+}
+
} // namespace WebKit
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (176752 => 176753)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2014-12-03 21:53:36 UTC (rev 176753)
@@ -947,6 +947,8 @@
#endif
void getGuessesForWord(const String& word, const String& context, Vector<String>& guesses);
+ void setShouldDispatchFakeMouseMoveEvents(bool);
+
private:
WebPageProxy(PageClient&, WebProcessProxy&, uint64_t pageID, const WebPageConfiguration&);
void platformInitialize();
Modified: trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm (176752 => 176753)
--- trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-12-03 21:53:36 UTC (rev 176753)
@@ -147,7 +147,7 @@
_previewView = [_delegate pagePreviewViewController:self viewForPreviewingURL:_url.get() initialFrameSize:defaultFrame.size];
if (!_previewView) {
RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:defaultFrame]);
- [webView _setIgnoresNonWheelMouseEvents:YES];
+ [webView _setIgnoresNonWheelEvents:YES];
if (_url) {
NSURLRequest *request = [NSURLRequest requestWithURL:_url.get()];
[webView loadRequest:request];
@@ -253,11 +253,6 @@
if (menu != _wkView.actionMenu)
return;
- if (_wkView._shouldIgnoreMouseEvents) {
- [menu cancelTracking];
- return;
- }
-
[self dismissActionMenuPopovers];
_eventLocationInView = [_wkView convertPoint:event.locationInWindow fromView:nil];
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (176752 => 176753)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2014-12-03 21:53:36 UTC (rev 176753)
@@ -1080,7 +1080,11 @@
{
return (isTextOnly && WebProcess::shared().hasSelectionServices()) || WebProcess::shared().hasRichContentServices();
}
-
#endif
+bool WebChromeClient::shouldDispatchFakeMouseMoveEvents() const
+{
+ return m_page->shouldDispatchFakeMouseMoveEvents();
+}
+
} // namespace WebKit
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (176752 => 176753)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h 2014-12-03 21:53:36 UTC (rev 176753)
@@ -309,6 +309,8 @@
virtual bool hasRelevantSelectionServices(bool isTextOnly) const override;
#endif
+ virtual bool shouldDispatchFakeMouseMoveEvents() const override;
+
String m_cachedToolTip;
mutable RefPtr<WebFrame> m_cachedFrameSetLargestFrame;
mutable bool m_cachedMainFrameHasHorizontalScrollbar;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (176752 => 176753)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2014-12-03 21:53:36 UTC (rev 176753)
@@ -334,6 +334,7 @@
, m_systemWebGLPolicy(WebGLAllowCreation)
#endif
, m_mainFrameProgressCompleted(false)
+ , m_shouldDispatchFakeMouseMoveEvents(true)
{
ASSERT(m_pageID);
// FIXME: This is a non-ideal location for this Setting and
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (176752 => 176753)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2014-12-03 21:53:36 UTC (rev 176753)
@@ -861,6 +861,8 @@
void didChangeScrollOffsetForFrame(WebCore::Frame*);
void setMainFrameProgressCompleted(bool completed) { m_mainFrameProgressCompleted = completed; }
+ bool shouldDispatchFakeMouseMoveEvents() const { return m_shouldDispatchFakeMouseMoveEvents; }
+
private:
WebPage(uint64_t pageID, const WebPageCreationParameters&);
@@ -1082,6 +1084,8 @@
void dataDetectorsDidHideUI(WebCore::PageOverlay::PageOverlayID);
#endif
+ void setShouldDispatchFakeMouseMoveEvents(bool dispatch) { m_shouldDispatchFakeMouseMoveEvents = dispatch; }
+
uint64_t m_pageID;
std::unique_ptr<WebCore::Page> m_page;
@@ -1326,6 +1330,7 @@
#endif
bool m_mainFrameProgressCompleted;
+ bool m_shouldDispatchFakeMouseMoveEvents;
};
} // namespace WebKit
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (176752 => 176753)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2014-12-03 21:45:34 UTC (rev 176752)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2014-12-03 21:53:36 UTC (rev 176753)
@@ -410,4 +410,6 @@
DataDetectorsDidChangeUI(WebCore::PageOverlay::PageOverlayID pageOverlay)
DataDetectorsDidHideUI(WebCore::PageOverlay::PageOverlayID pageOverlay)
#endif
+
+ SetShouldDispatchFakeMouseMoveEvents(bool shouldDispatchFakeMouseMoveEvents)
}