Diff
Modified: trunk/LayoutTests/ChangeLog (182955 => 182956)
--- trunk/LayoutTests/ChangeLog 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/LayoutTests/ChangeLog 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1,3 +1,20 @@
+2015-04-17 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, rolling out r182912 and r182920.
+ https://bugs.webkit.org/show_bug.cgi?id=143881
+
+ Build breakage in some configurations (Requested by ap on
+ #webkit).
+
+ Reverted changesets:
+
+ "Force mouse events should go through normal mouse event
+ handling code paths"
+ https://bugs.webkit.org/show_bug.cgi?id=143749
+ http://trac.webkit.org/changeset/182912
+
+ http://trac.webkit.org/changeset/182920
+
2015-04-17 Marcos Chavarría Teijeiro <chavarria1...@gmail.com>
[GTK] Gardening 17th April.
Deleted: trunk/LayoutTests/fast/events/mouse-force-changed-expected.txt (182955 => 182956)
--- trunk/LayoutTests/fast/events/mouse-force-changed-expected.txt 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/LayoutTests/fast/events/mouse-force-changed-expected.txt 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1 +0,0 @@
-Success! The mouseforcechanged event was dispatched.
Deleted: trunk/LayoutTests/fast/events/mouse-force-changed.html (182955 => 182956)
--- trunk/LayoutTests/fast/events/mouse-force-changed.html 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/LayoutTests/fast/events/mouse-force-changed.html 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1,43 +0,0 @@
-<html>
-<head>
-<style>
-#forceSensor {
- width: 200px;
- height: 200px;
- border: 2px solid black;
-}
-</style>
-<script>
-
-function forceChanged()
-{
- var console = document.getElementById("console");
- console.innerHTML = "Success! The mouseforcechanged event was dispatched.";
- testRunner.notifyDone();
-}
-
-function startTest()
-{
- var forceSensor = document.getElementById("forceSensor");
- forceSensor.addEventListener("webkitmouseforcechanged", forceChanged, false);
-
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- if (window.eventSender) {
- eventSender.mouseMoveTo(100, 100);
- eventSender.mouseForceChanged(1.5);
- }
-}
-</script>
-</head>
-
-<body _onload_="startTest()">
-
-<div id="forceSensor"></div>
-<pre id="console">Failed. This test must be run in the test harness.</pre>
-
-</body>
-</html>
\ No newline at end of file
Deleted: trunk/LayoutTests/fast/events/mouse-force-down-expected.txt (182955 => 182956)
--- trunk/LayoutTests/fast/events/mouse-force-down-expected.txt 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/LayoutTests/fast/events/mouse-force-down-expected.txt 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1 +0,0 @@
-Success! The mouseforcedown event was dispatched.
Deleted: trunk/LayoutTests/fast/events/mouse-force-down.html (182955 => 182956)
--- trunk/LayoutTests/fast/events/mouse-force-down.html 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/LayoutTests/fast/events/mouse-force-down.html 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1,43 +0,0 @@
-<html>
-<head>
-<style>
-#forceSensor {
- width: 200px;
- height: 200px;
- border: 2px solid black;
-}
-</style>
-<script>
-
-function forceDown()
-{
- var console = document.getElementById("console");
- console.innerHTML = "Success! The mouseforcedown event was dispatched.";
- testRunner.notifyDone();
-}
-
-function startTest()
-{
- var forceSensor = document.getElementById("forceSensor");
- forceSensor.addEventListener("webkitmouseforcedown", forceDown, false);
-
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- if (window.eventSender) {
- eventSender.mouseMoveTo(100, 100);
- eventSender.mouseForceDown();
- }
-}
-</script>
-</head>
-
-<body _onload_="startTest()">
-
-<div id="forceSensor"></div>
-<pre id="console">Failed. This test must be run in the test harness.</pre>
-
-</body>
-</html>
\ No newline at end of file
Deleted: trunk/LayoutTests/fast/events/mouse-force-up-expected.txt (182955 => 182956)
--- trunk/LayoutTests/fast/events/mouse-force-up-expected.txt 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/LayoutTests/fast/events/mouse-force-up-expected.txt 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1 +0,0 @@
-Success! The mouseforceup event was dispatched.
Deleted: trunk/LayoutTests/fast/events/mouse-force-up.html (182955 => 182956)
--- trunk/LayoutTests/fast/events/mouse-force-up.html 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/LayoutTests/fast/events/mouse-force-up.html 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1,44 +0,0 @@
-<html>
-<head>
-<style>
-#forceSensor {
- width: 200px;
- height: 200px;
- border: 2px solid black;
-}
-</style>
-<script>
-
-function forceUp()
-{
- var console = document.getElementById("console");
- console.innerHTML = "Success! The mouseforceup event was dispatched.";
- testRunner.notifyDone();
-}
-
-function startTest()
-{
- var forceSensor = document.getElementById("forceSensor");
- forceSensor.addEventListener("webkitmouseforceup", forceUp, false);
-
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- if (window.eventSender) {
- eventSender.mouseMoveTo(100, 100);
- eventSender.mouseForceDown();
- eventSender.mouseForceUp();
- }
-}
-</script>
-</head>
-
-<body _onload_="startTest()">
-
-<div id="forceSensor"></div>
-<pre id="console">Failed. This test must be run in the test harness.</pre>
-
-</body>
-</html>
\ No newline at end of file
Modified: trunk/LayoutTests/platform/efl/TestExpectations (182955 => 182956)
--- trunk/LayoutTests/platform/efl/TestExpectations 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/LayoutTests/platform/efl/TestExpectations 2015-04-17 17:33:21 UTC (rev 182956)
@@ -68,11 +68,6 @@
animations/trigger-container-scroll-simple.html [ Skip ]
animations/trigger-container-scroll-boundaries.html [ Skip ]
-# No support for force events
-fast/events/mouse-force-changed.html [ Skip ]
-fast/events/mouse-force-down.html [ Skip ]
-fast/events/mouse-force-up.html [ Skip ]
-
# ----------------------------------------
# Tests which also fail in other platforms
# ----------------------------------------
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (182955 => 182956)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2015-04-17 17:33:21 UTC (rev 182956)
@@ -638,11 +638,6 @@
webkit.org/b/143703 fast/forms/listbox-visible-size.html [ Failure ]
-# No support for force events
-fast/events/mouse-force-changed.html [ Skip ]
-fast/events/mouse-force-down.html [ Skip ]
-fast/events/mouse-force-up.html [ Skip ]
-
#////////////////////////////////////////////////////////////////////////////////////////
# End of Expected failures
#////////////////////////////////////////////////////////////////////////////////////////
Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (182955 => 182956)
--- trunk/LayoutTests/platform/ios-simulator/TestExpectations 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations 2015-04-17 17:33:21 UTC (rev 182956)
@@ -204,11 +204,6 @@
http/tests/local/fileapi/send-dragged-file.html
http/tests/local/fileapi/send-sliced-dragged-file.html
-# No support for force events
-fast/events/mouse-force-changed.html [ Skip ]
-fast/events/mouse-force-down.html [ Skip ]
-fast/events/mouse-force-up.html [ Skip ]
-
###
# Known failures
##
Modified: trunk/LayoutTests/platform/mac-mavericks/TestExpectations (182955 => 182956)
--- trunk/LayoutTests/platform/mac-mavericks/TestExpectations 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/LayoutTests/platform/mac-mavericks/TestExpectations 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1,7 +1,2 @@
# https://bugs.webkit.org/show_bug.cgi?id=143258
http/tests/cache/disk-cache/disk-cache-validation-back-navigation-policy.html
-
-# No support for force events
-fast/events/mouse-force-changed.html [ Skip ]
-fast/events/mouse-force-down.html [ Skip ]
-fast/events/mouse-force-up.html [ Skip ]
Modified: trunk/LayoutTests/platform/win/TestExpectations (182955 => 182956)
--- trunk/LayoutTests/platform/win/TestExpectations 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/LayoutTests/platform/win/TestExpectations 2015-04-17 17:33:21 UTC (rev 182956)
@@ -603,11 +603,6 @@
animations/trigger-container-scroll-simple.html [ Skip ]
animations/trigger-container-scroll-boundaries.html [ Skip ]
-# No support for force events
-fast/events/mouse-force-changed.html [ Skip ]
-fast/events/mouse-force-down.html [ Skip ]
-fast/events/mouse-force-up.html [ Skip ]
-
################################################################################
########### End Missing Functionality Prevents Testing ##############
################################################################################
Modified: trunk/Source/WebCore/ChangeLog (182955 => 182956)
--- trunk/Source/WebCore/ChangeLog 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebCore/ChangeLog 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1,3 +1,20 @@
+2015-04-17 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, rolling out r182912 and r182920.
+ https://bugs.webkit.org/show_bug.cgi?id=143881
+
+ Build breakage in some configurations (Requested by ap on
+ #webkit).
+
+ Reverted changesets:
+
+ "Force mouse events should go through normal mouse event
+ handling code paths"
+ https://bugs.webkit.org/show_bug.cgi?id=143749
+ http://trac.webkit.org/changeset/182912
+
+ http://trac.webkit.org/changeset/182920
+
2015-04-17 Said Abou-Hallawa <sabouhall...@apple.com>
Fix review comments for https://bugs.webkit.org/show_bug.cgi?id=143590
Modified: trunk/Source/WebCore/dom/Document.cpp (182955 => 182956)
--- trunk/Source/WebCore/dom/Document.cpp 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebCore/dom/Document.cpp 2015-04-17 17:33:21 UTC (rev 182956)
@@ -3966,22 +3966,6 @@
return nullptr;
}
-bool Document::hasListenerTypeForEventType(PlatformEvent::Type eventType) const
-{
- switch (eventType) {
- case PlatformEvent::MouseForceChanged:
- return m_listenerTypes & Document::FORCECHANGED_LISTENER;
- case PlatformEvent::MouseForceDown:
- return m_listenerTypes & Document::FORCEDOWN_LISTENER;
- case PlatformEvent::MouseForceUp:
- return m_listenerTypes & Document::FORCEUP_LISTENER;
- case PlatformEvent::MouseScroll:
- return m_listenerTypes & Document::SCROLL_LISTENER;
- default:
- return false;
- }
-}
-
void Document::addListenerTypeIfNeeded(const AtomicString& eventType)
{
if (eventType == eventNames().DOMSubtreeModifiedEvent)
Modified: trunk/Source/WebCore/dom/Document.h (182955 => 182956)
--- trunk/Source/WebCore/dom/Document.h 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebCore/dom/Document.h 2015-04-17 17:33:21 UTC (rev 182956)
@@ -38,7 +38,6 @@
#include "FontSelector.h"
#include "MutationObserver.h"
#include "PageVisibilityState.h"
-#include "PlatformEvent.h"
#include "PlatformScreen.h"
#include "ReferrerPolicy.h"
#include "Region.h"
@@ -781,7 +780,6 @@
};
bool hasListenerType(ListenerType listenerType) const { return (m_listenerTypes & listenerType); }
- bool hasListenerTypeForEventType(PlatformEvent::Type) const;
void addListenerTypeIfNeeded(const AtomicString& eventType);
bool hasMutationObserversOfType(MutationObserver::MutationType type) const
Modified: trunk/Source/WebCore/dom/Element.cpp (182955 => 182956)
--- trunk/Source/WebCore/dom/Element.cpp 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebCore/dom/Element.cpp 2015-04-17 17:33:21 UTC (rev 182956)
@@ -244,19 +244,11 @@
return computeEditability(UserSelectAllIsAlwaysNonEditable, ShouldUpdateStyle::Update) != Editability::ReadOnly;
}
-static bool isForceEvent(const PlatformMouseEvent& platformEvent)
-{
- return platformEvent.type() == PlatformEvent::MouseForceChanged || platformEvent.type() == PlatformEvent::MouseForceDown || platformEvent.type() == PlatformEvent::MouseForceUp;
-}
-
bool Element::dispatchMouseEvent(const PlatformMouseEvent& platformEvent, const AtomicString& eventType, int detail, Element* relatedTarget)
{
if (isDisabledFormControl())
return false;
- if (isForceEvent(platformEvent) && !document().hasListenerTypeForEventType(platformEvent.type()))
- return false;
-
RefPtr<MouseEvent> mouseEvent = MouseEvent::create(eventType, document().defaultView(), platformEvent, detail, relatedTarget);
if (mouseEvent->type().isEmpty())
@@ -2261,6 +2253,54 @@
return false;
}
+void Element::dispatchMouseForceChanged(float force)
+{
+ if (!document().hasListenerType(Document::FORCECHANGED_LISTENER))
+ return;
+
+ Frame* frame = document().frame();
+ if (!frame)
+ return;
+
+ PlatformMouseEvent platformMouseEvent(frame->eventHandler().lastKnownMousePosition(), frame->eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime(), force);
+ RefPtr<MouseEvent> mouseForceChangedEvent = MouseEvent::create(eventNames().webkitmouseforcechangedEvent, document().defaultView(), platformMouseEvent, 0, nullptr);
+
+ mouseForceChangedEvent->setTarget(this);
+ dispatchEvent(mouseForceChangedEvent);
+}
+
+void Element::dispatchMouseForceDown()
+{
+ if (!document().hasListenerType(Document::FORCEDOWN_LISTENER))
+ return;
+
+ Frame* frame = document().frame();
+ if (!frame)
+ return;
+
+ PlatformMouseEvent platformMouseEvent(frame->eventHandler().lastKnownMousePosition(), frame->eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime(), ForceAtForceClick);
+ RefPtr<MouseEvent> mouseForceDownEvent = MouseEvent::create(eventNames().webkitmouseforcedownEvent, document().defaultView(), platformMouseEvent, 0, nullptr);
+
+ mouseForceDownEvent->setTarget(this);
+ dispatchEvent(mouseForceDownEvent);
+}
+
+void Element::dispatchMouseForceUp()
+{
+ if (!document().hasListenerType(Document::FORCEUP_LISTENER))
+ return;
+
+ Frame* frame = document().frame();
+ if (!frame)
+ return;
+
+ PlatformMouseEvent platformMouseEvent(frame->eventHandler().lastKnownMousePosition(), frame->eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime(), ForceAtForceClick);
+ RefPtr<MouseEvent> mouseForceUpEvent = MouseEvent::create(eventNames().webkitmouseforceupEvent, document().defaultView(), platformMouseEvent, 0, nullptr);
+
+ mouseForceUpEvent->setTarget(this);
+ dispatchEvent(mouseForceUpEvent);
+}
+
void Element::dispatchMouseForceClick()
{
if (!document().hasListenerType(Document::FORCECLICK_LISTENER))
@@ -2300,6 +2340,18 @@
return false;
}
+void Element::dispatchMouseForceChanged(float)
+{
+}
+
+void Element::dispatchMouseForceDown()
+{
+}
+
+void Element::dispatchMouseForceUp()
+{
+}
+
void Element::dispatchMouseForceClick()
{
}
Modified: trunk/Source/WebCore/dom/Element.h (182955 => 182956)
--- trunk/Source/WebCore/dom/Element.h 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebCore/dom/Element.h 2015-04-17 17:33:21 UTC (rev 182956)
@@ -469,6 +469,9 @@
virtual void dispatchBlurEvent(RefPtr<Element>&& newFocusedElement);
WEBCORE_EXPORT bool dispatchMouseForceWillBegin();
+ WEBCORE_EXPORT void dispatchMouseForceChanged(float force);
+ WEBCORE_EXPORT void dispatchMouseForceDown();
+ WEBCORE_EXPORT void dispatchMouseForceUp();
WEBCORE_EXPORT void dispatchMouseForceClick();
WEBCORE_EXPORT void dispatchMouseForceCancelled();
Modified: trunk/Source/WebCore/page/EventHandler.cpp (182955 => 182956)
--- trunk/Source/WebCore/page/EventHandler.cpp 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2015-04-17 17:33:21 UTC (rev 182956)
@@ -2104,33 +2104,6 @@
return swallowMouseUpEvent || swallowClickEvent || swallowMouseReleaseEvent;
}
-#if ENABLE(MOUSE_FORCE_EVENTS)
-bool EventHandler::handleMouseForceEvent(const PlatformMouseEvent& event)
-{
- RefPtr<FrameView> protector(m_frame.view());
-
- setLastKnownMousePosition(event);
-
- HitTestRequest::HitTestRequestType hitType = HitTestRequest::DisallowShadowContent | HitTestRequest::Active;
-
- HitTestRequest request(hitType);
- MouseEventWithHitTestResults mouseEvent = prepareMouseEvent(request, event);
-
- bool swallowedEvent = !dispatchMouseEvent(eventNames().webkitmouseforcechangedEvent, mouseEvent.targetNode(), false, 0, event, false);
- if (event.type() == PlatformEvent::MouseForceDown)
- swallowedEvent |= !dispatchMouseEvent(eventNames().webkitmouseforcedownEvent, mouseEvent.targetNode(), false, 0, event, false);
- if (event.type() == PlatformEvent::MouseForceUp)
- swallowedEvent |= !dispatchMouseEvent(eventNames().webkitmouseforceupEvent, mouseEvent.targetNode(), false, 0, event, false);
-
- return swallowedEvent;
-}
-#else
-bool EventHandler::handleMouseForceEvent(const PlatformMouseEvent& )
-{
- return false;
-}
-#endif // #if ENABLE(MOUSE_FORCE_EVENTS)
-
bool EventHandler::handlePasteGlobalSelection(const PlatformMouseEvent& platformMouseEvent)
{
// If the event was a middle click, attempt to copy global selection in after
Modified: trunk/Source/WebCore/page/EventHandler.h (182955 => 182956)
--- trunk/Source/WebCore/page/EventHandler.h 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebCore/page/EventHandler.h 2015-04-17 17:33:21 UTC (rev 182956)
@@ -202,7 +202,6 @@
WEBCORE_EXPORT bool handleMousePressEvent(const PlatformMouseEvent&);
bool handleMouseMoveEvent(const PlatformMouseEvent&, HitTestResult* hoveredNode = 0, bool _onlyUpdateScrollbars_ = false);
WEBCORE_EXPORT bool handleMouseReleaseEvent(const PlatformMouseEvent&);
- bool handleMouseForceEvent(const PlatformMouseEvent&);
WEBCORE_EXPORT bool handleWheelEvent(const PlatformWheelEvent&);
void defaultWheelEventHandler(Node*, WheelEvent*);
bool handlePasteGlobalSelection(const PlatformMouseEvent&);
Modified: trunk/Source/WebCore/platform/PlatformEvent.h (182955 => 182956)
--- trunk/Source/WebCore/platform/PlatformEvent.h 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebCore/platform/PlatformEvent.h 2015-04-17 17:33:21 UTC (rev 182956)
@@ -43,9 +43,6 @@
MouseMoved,
MousePressed,
MouseReleased,
- MouseForceChanged,
- MouseForceDown,
- MouseForceUp,
MouseScroll,
// PlatformWheelEvent
Modified: trunk/Source/WebCore/replay/UserInputBridge.cpp (182955 => 182956)
--- trunk/Source/WebCore/replay/UserInputBridge.cpp 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebCore/replay/UserInputBridge.cpp 2015-04-17 17:33:21 UTC (rev 182956)
@@ -147,11 +147,6 @@
return m_page.mainFrame().eventHandler().passMouseMovedEventToScrollbars(mouseEvent);
}
-bool UserInputBridge::handleMouseForceEvent(const PlatformMouseEvent& mouseEvent, InputSource)
-{
- return m_page.mainFrame().eventHandler().handleMouseForceEvent(mouseEvent);
-}
-
bool UserInputBridge::handleKeyEvent(const PlatformKeyboardEvent& keyEvent, InputSource inputSource)
{
#if ENABLE(WEB_REPLAY)
Modified: trunk/Source/WebCore/replay/UserInputBridge.h (182955 => 182956)
--- trunk/Source/WebCore/replay/UserInputBridge.h 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebCore/replay/UserInputBridge.h 2015-04-17 17:33:21 UTC (rev 182956)
@@ -78,7 +78,6 @@
WEBCORE_EXPORT bool handleMouseReleaseEvent(const PlatformMouseEvent&, InputSource source = InputSource::User);
WEBCORE_EXPORT bool handleMouseMoveEvent(const PlatformMouseEvent&, InputSource source = InputSource::User);
WEBCORE_EXPORT bool handleMouseMoveOnScrollbarEvent(const PlatformMouseEvent&, InputSource source = InputSource::User);
- WEBCORE_EXPORT bool handleMouseForceEvent(const PlatformMouseEvent&, InputSource = InputSource::User);
WEBCORE_EXPORT bool handleWheelEvent(const PlatformWheelEvent&, InputSource source = InputSource::User);
WEBCORE_EXPORT bool handleKeyEvent(const PlatformKeyboardEvent&, InputSource source = InputSource::User);
WEBCORE_EXPORT bool handleAccessKeyEvent(const PlatformKeyboardEvent&, InputSource source = InputSource::User);
Modified: trunk/Source/WebKit2/ChangeLog (182955 => 182956)
--- trunk/Source/WebKit2/ChangeLog 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebKit2/ChangeLog 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1,3 +1,20 @@
+2015-04-17 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, rolling out r182912 and r182920.
+ https://bugs.webkit.org/show_bug.cgi?id=143881
+
+ Build breakage in some configurations (Requested by ap on
+ #webkit).
+
+ Reverted changesets:
+
+ "Force mouse events should go through normal mouse event
+ handling code paths"
+ https://bugs.webkit.org/show_bug.cgi?id=143749
+ http://trac.webkit.org/changeset/182912
+
+ http://trac.webkit.org/changeset/182920
+
2015-04-17 Antti Koivisto <an...@apple.com>
Network Cache: Read resource record and body in parallel
Modified: trunk/Source/WebKit2/Shared/NativeWebMouseEvent.h (182955 => 182956)
--- trunk/Source/WebKit2/Shared/NativeWebMouseEvent.h 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebKit2/Shared/NativeWebMouseEvent.h 2015-04-17 17:33:21 UTC (rev 182956)
@@ -49,7 +49,7 @@
class NativeWebMouseEvent : public WebMouseEvent {
public:
#if USE(APPKIT)
- NativeWebMouseEvent(NSEvent *, NSEvent *lastPressureEvent, NSView *);
+ NativeWebMouseEvent(NSEvent *, NSEvent *pressureEvent, NSView *);
#elif PLATFORM(GTK)
NativeWebMouseEvent(const NativeWebMouseEvent&);
NativeWebMouseEvent(GdkEvent*, int);
Modified: trunk/Source/WebKit2/Shared/WebEvent.h (182955 => 182956)
--- trunk/Source/WebKit2/Shared/WebEvent.h 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebKit2/Shared/WebEvent.h 2015-04-17 17:33:21 UTC (rev 182956)
@@ -58,9 +58,6 @@
MouseDown,
MouseUp,
MouseMove,
- MouseForceChanged,
- MouseForceDown,
- MouseForceUp,
// WebWheelEvent
Wheel,
Modified: trunk/Source/WebKit2/Shared/WebEventConversion.cpp (182955 => 182956)
--- trunk/Source/WebKit2/Shared/WebEventConversion.cpp 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebKit2/Shared/WebEventConversion.cpp 2015-04-17 17:33:21 UTC (rev 182956)
@@ -48,18 +48,6 @@
m_type = WebCore::PlatformEvent::MouseMoved;
m_force = webEvent.force();
break;
- case WebEvent::MouseForceChanged:
- m_type = WebCore::PlatformEvent::MouseForceChanged;
- m_force = webEvent.force();
- break;
- case WebEvent::MouseForceDown:
- m_type = WebCore::PlatformEvent::MouseForceDown;
- m_force = WebCore::ForceAtForceClick;
- break;
- case WebEvent::MouseForceUp:
- m_type = WebCore::PlatformEvent::MouseForceUp;
- m_force = WebCore::ForceAtForceClick;
- break;
default:
ASSERT_NOT_REACHED();
}
Modified: trunk/Source/WebKit2/Shared/mac/NativeWebMouseEventMac.mm (182955 => 182956)
--- trunk/Source/WebKit2/Shared/mac/NativeWebMouseEventMac.mm 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebKit2/Shared/mac/NativeWebMouseEventMac.mm 2015-04-17 17:33:21 UTC (rev 182956)
@@ -32,8 +32,8 @@
namespace WebKit {
-NativeWebMouseEvent::NativeWebMouseEvent(NSEvent *event, NSEvent *lastPressureEvent, NSView *view)
- : WebMouseEvent(WebEventFactory::createWebMouseEvent(event, lastPressureEvent, view))
+NativeWebMouseEvent::NativeWebMouseEvent(NSEvent *event, NSEvent *pressureEvent, NSView *view)
+ : WebMouseEvent(WebEventFactory::createWebMouseEvent(event, pressureEvent, view))
, m_nativeEvent(event)
{
}
Modified: trunk/Source/WebKit2/Shared/mac/WebEventFactory.h (182955 => 182956)
--- trunk/Source/WebKit2/Shared/mac/WebEventFactory.h 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebKit2/Shared/mac/WebEventFactory.h 2015-04-17 17:33:21 UTC (rev 182956)
@@ -42,7 +42,7 @@
class WebEventFactory {
public:
#if USE(APPKIT)
- static WebMouseEvent createWebMouseEvent(NSEvent *, NSEvent *lastPressureEvent, NSView *windowView);
+ static WebMouseEvent createWebMouseEvent(NSEvent *, NSEvent *pressureEvent, NSView *windowView);
static WebWheelEvent createWebWheelEvent(NSEvent *, NSView *windowView);
static WebKeyboardEvent createWebKeyboardEvent(NSEvent *, bool handledByInputMethod, const Vector<WebCore::KeypressCommand>&);
static bool shouldBeHandledAsContextClick(const WebCore::PlatformMouseEvent&);
Modified: trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm (182955 => 182956)
--- trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm 2015-04-17 17:33:21 UTC (rev 182956)
@@ -76,9 +76,6 @@
case NSOtherMouseUp:
case NSOtherMouseDragged:
return WebMouseEvent::MiddleButton;
-#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
- case NSEventTypePressure:
-#endif
case NSMouseEntered:
case NSMouseExited:
return currentMouseButton();
@@ -159,57 +156,51 @@
static NSPoint globalPointForEvent(NSEvent *event)
{
switch ([event type]) {
-#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
- case NSEventTypePressure:
-#endif
- case NSLeftMouseDown:
- case NSLeftMouseDragged:
- case NSLeftMouseUp:
- case NSMouseEntered:
- case NSMouseExited:
- case NSMouseMoved:
- case NSOtherMouseDown:
- case NSOtherMouseDragged:
- case NSOtherMouseUp:
- case NSRightMouseDown:
- case NSRightMouseDragged:
- case NSRightMouseUp:
- case NSScrollWheel:
- return globalPoint([event locationInWindow], [event window]);
- default:
- return NSZeroPoint;
+ case NSLeftMouseDown:
+ case NSLeftMouseDragged:
+ case NSLeftMouseUp:
+ case NSMouseEntered:
+ case NSMouseExited:
+ case NSMouseMoved:
+ case NSOtherMouseDown:
+ case NSOtherMouseDragged:
+ case NSOtherMouseUp:
+ case NSRightMouseDown:
+ case NSRightMouseDragged:
+ case NSRightMouseUp:
+ case NSScrollWheel:
+ return globalPoint([event locationInWindow], [event window]);
+ default:
+ return NSZeroPoint;
}
}
static NSPoint pointForEvent(NSEvent *event, NSView *windowView)
{
switch ([event type]) {
-#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
- case NSEventTypePressure:
-#endif
- case NSLeftMouseDown:
- case NSLeftMouseDragged:
- case NSLeftMouseUp:
- case NSMouseEntered:
- case NSMouseExited:
- case NSMouseMoved:
- case NSOtherMouseDown:
- case NSOtherMouseDragged:
- case NSOtherMouseUp:
- case NSRightMouseDown:
- case NSRightMouseDragged:
- case NSRightMouseUp:
- case NSScrollWheel: {
- // Note: This will have its origin at the bottom left of the window unless windowView is flipped.
- // In those cases, the Y coordinate gets flipped by Widget::convertFromContainingWindow.
- NSPoint location = [event locationInWindow];
- if (windowView)
- location = [windowView convertPoint:location fromView:nil];
- return location;
+ case NSLeftMouseDown:
+ case NSLeftMouseDragged:
+ case NSLeftMouseUp:
+ case NSMouseEntered:
+ case NSMouseExited:
+ case NSMouseMoved:
+ case NSOtherMouseDown:
+ case NSOtherMouseDragged:
+ case NSOtherMouseUp:
+ case NSRightMouseDown:
+ case NSRightMouseDragged:
+ case NSRightMouseUp:
+ case NSScrollWheel: {
+ // Note: This will have its origin at the bottom left of the window unless windowView is flipped.
+ // In those cases, the Y coordinate gets flipped by Widget::convertFromContainingWindow.
+ NSPoint location = [event locationInWindow];
+ if (windowView)
+ location = [windowView convertPoint:location fromView:nil];
+ return location;
+ }
+ default:
+ return NSZeroPoint;
}
- default:
- return NSZeroPoint;
- }
}
static WebWheelEvent::Phase phaseForEvent(NSEvent *event)
@@ -367,40 +358,25 @@
return (static_cast<NSMenuType>(event.menuTypeForEvent()) == NSMenuTypeContextMenu);
}
-WebMouseEvent WebEventFactory::createWebMouseEvent(NSEvent *event, NSEvent *lastPressureEvent, NSView *windowView)
+WebMouseEvent WebEventFactory::createWebMouseEvent(NSEvent *event, NSEvent *pressureEvent, NSView *windowView)
{
NSPoint position = pointForEvent(event, windowView);
NSPoint globalPosition = globalPointForEvent(event);
- WebEvent::Type type = mouseEventTypeForEvent(event);
-#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
- if ([event type] == NSEventTypePressure) {
- // Since AppKit doesn't send mouse events for force down or force up, we have to use the current pressure
- // event and lastPressureEvent to detect if this is MouseForceDown, MouseForceUp, or just MouseForceChanged.
- if (lastPressureEvent.stage == 1 && event.stage == 2)
- type = WebEvent::MouseForceDown;
- else if (lastPressureEvent.stage == 2 && event.stage == 1)
- type = WebEvent::MouseForceUp;
- else
- type = WebEvent::MouseForceChanged;
- }
-#endif
+ WebEvent::Type type = mouseEventTypeForEvent(event);
+ WebMouseEvent::Button button = mouseButtonForEvent(event);
+ float deltaX = [event deltaX];
+ float deltaY = [event deltaY];
+ float deltaZ = [event deltaZ];
+ int clickCount = clickCountForEvent(event);
+ WebEvent::Modifiers modifiers = modifiersForEvent(event);
+ double timestamp = eventTimeStampSince1970(event);
+ int eventNumber = [event eventNumber];
+ int menuTypeForEvent = typeForEvent(event);
- WebMouseEvent::Button button = mouseButtonForEvent(event);
- float deltaX = [event deltaX];
- float deltaY = [event deltaY];
- float deltaZ = [event deltaZ];
- int clickCount = clickCountForEvent(event);
- WebEvent::Modifiers modifiers = modifiersForEvent(event);
- double timestamp = eventTimeStampSince1970(event);
- int eventNumber = [event eventNumber];
- int menuTypeForEvent = typeForEvent(event);
-
double force = 0;
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
- int stage = [event type] == NSEventTypePressure ? event.stage : lastPressureEvent.stage;
- double pressure = [event type] == NSEventTypePressure ? event.pressure : lastPressureEvent.pressure;
- force = stage < 1 ? pressure : pressure + stage - 1;
+ force = pressureEvent.stage < 1 ? pressureEvent.pressure : pressureEvent.pressure + pressureEvent.stage - 1;
#endif
return WebMouseEvent(type, button, IntPoint(position), IntPoint(globalPosition), deltaX, deltaY, deltaZ, clickCount, modifiers, timestamp, force, eventNumber, menuTypeForEvent);
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (182955 => 182956)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1431,17 +1431,13 @@
if (event == _data->_pressureEvent)
return;
- if (_data->_ignoresNonWheelEvents)
- return;
-
if (event.phase != NSEventPhaseChanged && event.phase != NSEventPhaseBegan && event.phase != NSEventPhaseEnded)
return;
- NativeWebMouseEvent webEvent(event, _data->_pressureEvent, self);
- _data->_page->handleMouseEvent(webEvent);
-
[_data->_pressureEvent release];
_data->_pressureEvent = [event retain];
+
+ _data->_page->inputDeviceForceDidChange(event.pressure, event.stage);
#endif
}
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (182955 => 182956)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2015-04-17 17:33:21 UTC (rev 182956)
@@ -4397,9 +4397,6 @@
case WebEvent::MouseDown:
case WebEvent::MouseUp:
- case WebEvent::MouseForceChanged:
- case WebEvent::MouseForceDown:
- case WebEvent::MouseForceUp:
case WebEvent::Wheel:
case WebEvent::KeyDown:
case WebEvent::KeyUp:
@@ -4430,10 +4427,6 @@
case WebEvent::MouseUp:
m_currentlyProcessedMouseDownEvent = nullptr;
break;
- case WebEvent::MouseForceChanged:
- case WebEvent::MouseForceDown:
- case WebEvent::MouseForceUp:
- break;
case WebEvent::Wheel: {
MESSAGE_CHECK(!m_currentlyProcessedWheelEvents.isEmpty());
@@ -5681,6 +5674,11 @@
m_process->send(Messages::WebPage::FocusAndSelectLastActionMenuHitTestResult(), m_pageID);
}
+void WebPageProxy::inputDeviceForceDidChange(float force, int stage)
+{
+ m_process->send(Messages::WebPage::InputDeviceForceDidChange(force, stage), m_pageID);
+}
+
void WebPageProxy::immediateActionDidUpdate()
{
m_process->send(Messages::WebPage::ImmediateActionDidUpdate(), m_pageID);
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (182955 => 182956)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2015-04-17 17:33:21 UTC (rev 182956)
@@ -994,6 +994,7 @@
void selectLastActionMenuRange();
void focusAndSelectLastActionMenuHitTestResult();
+ void inputDeviceForceDidChange(float force, int stage);
void immediateActionDidUpdate();
void immediateActionDidCancel();
void immediateActionDidComplete();
Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp (182955 => 182956)
--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp 2015-04-17 17:33:21 UTC (rev 182956)
@@ -474,9 +474,6 @@
case WebEvent::MouseMove:
setXMotionEventFields(xEvent, event, convertToRootView(IntPoint()));
break;
- case WebEvent::MouseForceChanged:
- case WebEvent::MouseForceDown:
- case WebEvent::MouseForceUp:
case WebEvent::NoType:
case WebEvent::Wheel:
case WebEvent::KeyDown:
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (182955 => 182956)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1903,12 +1903,6 @@
if (onlyUpdateScrollbars)
return page->corePage()->userInputBridge().handleMouseMoveOnScrollbarEvent(platformMouseEvent);
return page->corePage()->userInputBridge().handleMouseMoveEvent(platformMouseEvent);
-
- case PlatformEvent::MouseForceChanged:
- case PlatformEvent::MouseForceDown:
- case PlatformEvent::MouseForceUp:
- return page->corePage()->userInputBridge().handleMouseForceEvent(platformMouseEvent);
-
default:
ASSERT_NOT_REACHED();
return false;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (182955 => 182956)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1094,6 +1094,7 @@
PassRefPtr<WebCore::Range> lookupTextAtLocation(WebCore::FloatPoint, NSDictionary **options);
void selectLastActionMenuRange();
void focusAndSelectLastActionMenuHitTestResult();
+ void inputDeviceForceDidChange(float force, int stage);
void immediateActionDidUpdate();
void immediateActionDidCancel();
void immediateActionDidComplete();
@@ -1354,6 +1355,7 @@
RefPtr<WebCore::Range> m_lastActionMenuRangeForSelection;
WebCore::HitTestResult m_lastActionMenuHitTestResult;
RefPtr<WebPageOverlay> m_lastActionMenuHitPageOverlay;
+ int m_lastForceStage { 0 };
#endif
bool m_mainFrameProgressCompleted;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (182955 => 182956)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2015-04-17 17:33:21 UTC (rev 182956)
@@ -407,6 +407,7 @@
PerformActionMenuHitTestAtLocation(WebCore::FloatPoint location, bool forImmediateAction)
SelectLastActionMenuRange()
FocusAndSelectLastActionMenuHitTestResult()
+ InputDeviceForceDidChange(float force, int stage)
ImmediateActionDidUpdate()
ImmediateActionDidCancel()
ImmediateActionDidComplete()
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (182955 => 182956)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1141,6 +1141,25 @@
frame->selection().setSelection(position);
}
+void WebPage::inputDeviceForceDidChange(float force, int stage)
+{
+ Element* element = m_lastActionMenuHitTestResult.innerElement();
+ if (!element)
+ return;
+
+ float overallForce = stage < 1 ? force : force + stage - 1;
+ element->dispatchMouseForceChanged(overallForce);
+
+ if (m_lastForceStage == 1 && stage == 2)
+ element->dispatchMouseForceDown();
+ else if (m_lastForceStage == 2 && stage == 1) {
+ element->dispatchMouseForceUp();
+ element->dispatchMouseForceClick();
+ }
+
+ m_lastForceStage = stage;
+}
+
void WebPage::immediateActionDidUpdate()
{
m_page->mainFrame().eventHandler().setImmediateActionStage(ImmediateActionStage::ActionUpdated);
Modified: trunk/Tools/ChangeLog (182955 => 182956)
--- trunk/Tools/ChangeLog 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Tools/ChangeLog 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1,3 +1,20 @@
+2015-04-17 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, rolling out r182912 and r182920.
+ https://bugs.webkit.org/show_bug.cgi?id=143881
+
+ Build breakage in some configurations (Requested by ap on
+ #webkit).
+
+ Reverted changesets:
+
+ "Force mouse events should go through normal mouse event
+ handling code paths"
+ https://bugs.webkit.org/show_bug.cgi?id=143749
+ http://trac.webkit.org/changeset/182912
+
+ http://trac.webkit.org/changeset/182920
+
2015-04-17 Csaba Osztrogonác <o...@webkit.org>
[GTK] One more unreviewed fix after r182882.
Modified: trunk/Tools/WebKitTestRunner/EventSenderProxy.h (182955 => 182956)
--- trunk/Tools/WebKitTestRunner/EventSenderProxy.h 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Tools/WebKitTestRunner/EventSenderProxy.h 2015-04-17 17:33:21 UTC (rev 182956)
@@ -58,9 +58,6 @@
void mouseDown(unsigned button, WKEventModifiers);
void mouseUp(unsigned button, WKEventModifiers);
- void mouseForceDown();
- void mouseForceUp();
- void mouseForceChanged(float);
void mouseMoveTo(double x, double y);
void mouseScrollBy(int x, int y);
void mouseScrollByWithWheelAndMomentumPhases(int x, int y, int phase, int momentum);
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl (182955 => 182956)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl 2015-04-17 17:33:21 UTC (rev 182956)
@@ -27,9 +27,6 @@
void mouseDown(long buttonNumber, object modifierArray);
void mouseUp(long buttonNumber, object modifierArray);
void mouseMoveTo(long x, long y);
- void mouseForceDown();
- void mouseForceUp();
- void mouseForceChanged(double force);
void mouseScrollBy(long x, long y);
void mouseScrollByWithWheelAndMomentumPhases(long x, long y, DOMString phase, DOMString momentum, optional boolean asyncScrolling);
void continuousMouseScrollBy(long x, long y, optional boolean paged);
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp (182955 => 182956)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp 2015-04-17 17:33:21 UTC (rev 182956)
@@ -253,46 +253,6 @@
WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
}
-void EventSendingController::mouseForceDown()
-{
- WKRetainPtr<WKStringRef> EventSenderMessageName(AdoptWK, WKStringCreateWithUTF8CString("EventSender"));
- WKRetainPtr<WKMutableDictionaryRef> EventSenderMessageBody(AdoptWK, WKMutableDictionaryCreate());
-
- WKRetainPtr<WKStringRef> subMessageKey(AdoptWK, WKStringCreateWithUTF8CString("SubMessage"));
- WKRetainPtr<WKStringRef> subMessageName(AdoptWK, WKStringCreateWithUTF8CString("MouseForceDown"));
- WKDictionarySetItem(EventSenderMessageBody.get(), subMessageKey.get(), subMessageName.get());
-
- WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
-}
-
-void EventSendingController::mouseForceUp()
-{
- WKRetainPtr<WKStringRef> EventSenderMessageName(AdoptWK, WKStringCreateWithUTF8CString("EventSender"));
- WKRetainPtr<WKMutableDictionaryRef> EventSenderMessageBody(AdoptWK, WKMutableDictionaryCreate());
-
- WKRetainPtr<WKStringRef> subMessageKey(AdoptWK, WKStringCreateWithUTF8CString("SubMessage"));
- WKRetainPtr<WKStringRef> subMessageName(AdoptWK, WKStringCreateWithUTF8CString("MouseForceUp"));
- WKDictionarySetItem(EventSenderMessageBody.get(), subMessageKey.get(), subMessageName.get());
-
- WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
-}
-
-void EventSendingController::mouseForceChanged(double force)
-{
- WKRetainPtr<WKStringRef> EventSenderMessageName(AdoptWK, WKStringCreateWithUTF8CString("EventSender"));
- WKRetainPtr<WKMutableDictionaryRef> EventSenderMessageBody(AdoptWK, WKMutableDictionaryCreate());
-
- WKRetainPtr<WKStringRef> subMessageKey(AdoptWK, WKStringCreateWithUTF8CString("SubMessage"));
- WKRetainPtr<WKStringRef> subMessageName(AdoptWK, WKStringCreateWithUTF8CString("MouseForceChanged"));
- WKDictionarySetItem(EventSenderMessageBody.get(), subMessageKey.get(), subMessageName.get());
-
- WKRetainPtr<WKStringRef> forceKey(AdoptWK, WKStringCreateWithUTF8CString("Force"));
- WKRetainPtr<WKDoubleRef> forceRef(AdoptWK, WKDoubleCreate(force));
- WKDictionarySetItem(EventSenderMessageBody.get(), forceKey.get(), forceRef.get());
-
- WKBundlePagePostSynchronousMessage(InjectedBundle::singleton().page()->page(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
-}
-
void EventSendingController::leapForward(int milliseconds)
{
WKRetainPtr<WKStringRef> EventSenderMessageName(AdoptWK, WKStringCreateWithUTF8CString("EventSender"));
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h (182955 => 182956)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h 2015-04-17 17:33:21 UTC (rev 182956)
@@ -46,9 +46,6 @@
void mouseDown(int button, JSValueRef modifierArray);
void mouseUp(int button, JSValueRef modifierArray);
void mouseMoveTo(int x, int y);
- void mouseForceDown();
- void mouseForceUp();
- void mouseForceChanged(double force);
void mouseScrollBy(int x, int y);
void mouseScrollByWithWheelAndMomentumPhases(int x, int y, JSStringRef phase, JSStringRef momentum, bool asyncScrolling);
void continuousMouseScrollBy(int x, int y, bool paged);
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (182955 => 182956)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2015-04-17 17:33:21 UTC (rev 182956)
@@ -1102,32 +1102,6 @@
return 0;
}
-#if PLATFORM(MAC)
- if (WKStringIsEqualToUTF8CString(subMessageName, "MouseForceDown")) {
- WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
- m_eventSenderProxy->mouseForceDown();
- WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
- return 0;
- }
-
- if (WKStringIsEqualToUTF8CString(subMessageName, "MouseForceUp")) {
- WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
- m_eventSenderProxy->mouseForceUp();
- WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
- return 0;
- }
-
- if (WKStringIsEqualToUTF8CString(subMessageName, "MouseForceChanged")) {
- WKRetainPtr<WKStringRef> forceKey = adoptWK(WKStringCreateWithUTF8CString("Force"));
- double force = WKDoubleGetValue(static_cast<WKDoubleRef>(WKDictionaryGetItemForKey(messageBodyDictionary, forceKey.get())));
-
- WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
- m_eventSenderProxy->mouseForceChanged(force);
- WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
- return 0;
- }
-#endif // PLATFORM(MAC)
-
if (WKStringIsEqualToUTF8CString(subMessageName, "MouseScrollBy")) {
WKRetainPtr<WKStringRef> xKey = adoptWK(WKStringCreateWithUTF8CString("X"));
double x = WKDoubleGetValue(static_cast<WKDoubleRef>(WKDictionaryGetItemForKey(messageBodyDictionary, xKey.get())));
Modified: trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm (182955 => 182956)
--- trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm 2015-04-17 17:30:43 UTC (rev 182955)
+++ trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm 2015-04-17 17:33:21 UTC (rev 182956)
@@ -39,85 +39,6 @@
- (void)_setCurrentEvent:(NSEvent *)event;
@end
-#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
-@interface EventSenderPressureEvent : NSEvent {
-@public
- NSPoint _eventSender_locationInWindow;
- NSPoint _eventSender_location;
- NSInteger _eventSender_stage;
- float _eventSender_pressure;
- NSEventPhase _eventSender_phase;
- NSTimeInterval _eventSender_timestamp;
- NSInteger _eventSender_eventNumber;
-}
-
-- (id)initAtLocation:(NSPoint)location globalLocation:(NSPoint)globalLocation stage:(NSInteger)stage pressure:(float)pressure phase:(NSEventPhase)phase time:(NSTimeInterval)time eventNumber:(NSInteger)eventNumber;
-- (NSTimeInterval)timestamp;
-@end
-
-@implementation EventSenderPressureEvent
-
-- (id)initAtLocation:(NSPoint)location globalLocation:(NSPoint)globalLocation stage:(NSInteger)stage pressure:(float)pressure phase:(NSEventPhase)phase time:(NSTimeInterval)time eventNumber:(NSInteger)eventNumber
-{
- self = [super init];
-
- if (!self)
- return nil;
-
- _eventSender_location = location;
- _eventSender_locationInWindow = globalLocation;
- _eventSender_stage = stage;
- _eventSender_pressure = pressure;
- _eventSender_phase = phase;
- _eventSender_timestamp = time;
- _eventSender_eventNumber = eventNumber;
-
- return self;
-}
-
-- (NSTimeInterval)timestamp
-{
- return _eventSender_timestamp;
-}
-
-- (NSEventType)type
-{
- return NSEventTypePressure;
-}
-
-- (NSPoint)locationInWindow
-{
- return self->_eventSender_location;
-}
-
-- (NSPoint)location
-{
- return self->_eventSender_locationInWindow;
-}
-
-- (NSInteger)stage
-{
- return _eventSender_stage;
-}
-
-- (float)pressure
-{
- return _eventSender_pressure;
-}
-
-- (NSEventPhase)phase
-{
- return _eventSender_phase;
-}
-
-- (NSInteger)eventNumber
-{
- return _eventSender_eventNumber;
-}
-
-@end
-#endif // __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
-
namespace WTR {
enum MouseAction {
@@ -279,115 +200,6 @@
m_clickPosition = m_position;
}
-#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
-void EventSenderProxy::mouseForceDown()
-{
- EventSenderPressureEvent *firstEvent = [[EventSenderPressureEvent alloc] initAtLocation:NSMakePoint(m_position.x, m_position.y)
- globalLocation:([m_testController->mainWebView()->platformWindow() convertRectToScreen:NSMakeRect(m_position.x, m_position.y, 1, 1)].origin)
- stage:1
- pressure:0.9
- phase:NSEventPhaseChanged
- time:absoluteTimeForEventTime(currentEventTime())
- eventNumber:++eventNumber];
- EventSenderPressureEvent *secondEvent = [[EventSenderPressureEvent alloc] initAtLocation:NSMakePoint(m_position.x, m_position.y)
- globalLocation:([m_testController->mainWebView()->platformWindow() convertRectToScreen:NSMakeRect(m_position.x, m_position.y, 1, 1)].origin)
- stage:2
- pressure:0.1
- phase:NSEventPhaseChanged
- time:absoluteTimeForEventTime(currentEventTime())
- eventNumber:++eventNumber];
-
- NSView *targetView = [m_testController->mainWebView()->platformView() hitTest:[firstEvent locationInWindow]];
- targetView = targetView ? targetView : m_testController->mainWebView()->platformView();
- ASSERT(targetView);
-
- // Since AppKit does not implement forceup/down as mouse events, we need to send two pressure events to detect
- // the change in stage that marks those moments.
- [NSApp _setCurrentEvent:firstEvent];
- [targetView pressureChangeWithEvent:firstEvent];
- [NSApp _setCurrentEvent:secondEvent];
- [targetView pressureChangeWithEvent:secondEvent];
-
- [NSApp _setCurrentEvent:nil];
- // WKView caches the most recent pressure event, so send it a nil event to clear the cache.
- [targetView pressureChangeWithEvent:nil];
-
- [firstEvent release];
- [secondEvent release];
-}
-
-void EventSenderProxy::mouseForceUp()
-{
- EventSenderPressureEvent *firstEvent = [[EventSenderPressureEvent alloc] initAtLocation:NSMakePoint(m_position.x, m_position.y)
- globalLocation:([m_testController->mainWebView()->platformWindow() convertRectToScreen:NSMakeRect(m_position.x, m_position.y, 1, 1)].origin)
- stage:2
- pressure:0.1
- phase:NSEventPhaseChanged
- time:absoluteTimeForEventTime(currentEventTime())
- eventNumber:++eventNumber];
- EventSenderPressureEvent *secondEvent = [[EventSenderPressureEvent alloc] initAtLocation:NSMakePoint(m_position.x, m_position.y)
- globalLocation:([m_testController->mainWebView()->platformWindow() convertRectToScreen:NSMakeRect(m_position.x, m_position.y, 1, 1)].origin)
- stage:1
- pressure:0.9
- phase:NSEventPhaseChanged
- time:absoluteTimeForEventTime(currentEventTime())
- eventNumber:++eventNumber];
-
- NSView *targetView = [m_testController->mainWebView()->platformView() hitTest:[firstEvent locationInWindow]];
- targetView = targetView ? targetView : m_testController->mainWebView()->platformView();
- ASSERT(targetView);
-
- // Since AppKit does not implement forceup/down as mouse events, we need to send two pressure events to detect
- // the change in stage that marks those moments.
- [NSApp _setCurrentEvent:firstEvent];
- [targetView pressureChangeWithEvent:firstEvent];
- [NSApp _setCurrentEvent:secondEvent];
- [targetView pressureChangeWithEvent:secondEvent];
-
- [NSApp _setCurrentEvent:nil];
- // WKView caches the most recent pressure event, so send it a nil event to clear the cache.
- [targetView pressureChangeWithEvent:nil];
-
- [firstEvent release];
- [secondEvent release];
-}
-
-void EventSenderProxy::mouseForceChanged(float force)
-{
- EventSenderPressureEvent *event = [[EventSenderPressureEvent alloc] initAtLocation:NSMakePoint(m_position.x, m_position.y)
- globalLocation:([m_testController->mainWebView()->platformWindow() convertRectToScreen:NSMakeRect(m_position.x, m_position.y, 1, 1)].origin)
- stage:force < 1 ? 1 : 2
- pressure:force
- phase:NSEventPhaseChanged
- time:absoluteTimeForEventTime(currentEventTime())
- eventNumber:++eventNumber];
-
- NSView *targetView = [m_testController->mainWebView()->platformView() hitTest:[event locationInWindow]];
- targetView = targetView ? targetView : m_testController->mainWebView()->platformView();
- ASSERT(targetView);
- [NSApp _setCurrentEvent:event];
- [targetView pressureChangeWithEvent:event];
- [NSApp _setCurrentEvent:nil];
-
- // WKView caches the most recent pressure event, so send it a nil event to clear the cache.
- [targetView pressureChangeWithEvent:nil];
-
- [event release];
-}
-#else
-void EventSenderProxy::mouseForceDown()
-{
-}
-
-void EventSenderProxy::mouseForceUp()
-{
-}
-
-void EventSenderProxy::mouseForceChanged(float)
-{
-}
-#endif // __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
-
void EventSenderProxy::mouseMoveTo(double x, double y)
{
NSView *view = m_testController->mainWebView()->platformView();