Diff
Modified: trunk/LayoutTests/ChangeLog (182747 => 182748)
--- trunk/LayoutTests/ChangeLog 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/LayoutTests/ChangeLog 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1,3 +1,16 @@
+2015-04-13 Beth Dakin <bda...@apple.com>
+
+ Add force property to MouseEvents
+ https://bugs.webkit.org/show_bug.cgi?id=143569
+ -and corresponding-
+ rdar://problem/20472954
+
+ Reviewed by Darin Adler.
+
+ * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
+ * platform/mac/js/dom/global-constructors-attributes-expected.txt:
+ * platform/win/js/dom/global-constructors-attributes-expected.txt:
+
2015-04-13 Simon Fraser <simon.fra...@apple.com>
Fixed position element is truncated if moved onscreen by a transform
Modified: trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt (182747 => 182748)
--- trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt 2015-04-13 19:17:48 UTC (rev 182748)
@@ -2023,11 +2023,6 @@
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMediaKeys').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMediaKeys').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMediaKeys').configurable is true
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').value is WebKitMouseForceEvent
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMutationObserver').value is WebKitMutationObserver
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMutationObserver').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMutationObserver').hasOwnProperty('set') is false
Modified: trunk/LayoutTests/platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt (182747 => 182748)
--- trunk/LayoutTests/platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/LayoutTests/platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt 2015-04-13 19:17:48 UTC (rev 182748)
@@ -2003,11 +2003,6 @@
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMediaKeys').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMediaKeys').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMediaKeys').configurable is true
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').value is WebKitMouseForceEvent
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMutationObserver').value is WebKitMutationObserver
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMutationObserver').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMutationObserver').hasOwnProperty('set') is false
Modified: trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt (182747 => 182748)
--- trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1808,11 +1808,6 @@
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMediaKeys').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMediaKeys').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMediaKeys').configurable is true
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').value is WebKitMouseForceEvent
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMutationObserver').value is WebKitMutationObserver
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMutationObserver').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitMutationObserver').hasOwnProperty('set') is false
Modified: trunk/Source/WebCore/CMakeLists.txt (182747 => 182748)
--- trunk/Source/WebCore/CMakeLists.txt 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/CMakeLists.txt 2015-04-13 19:17:48 UTC (rev 182748)
@@ -428,7 +428,6 @@
dom/TreeWalker.idl
dom/UIEvent.idl
dom/WebKitAnimationEvent.idl
- dom/WebKitMouseForceEvent.idl
dom/WebKitNamedFlow.idl
dom/WebKitTransitionEvent.idl
dom/WheelEvent.idl
@@ -1456,7 +1455,6 @@
dom/ViewportArguments.cpp
dom/VisitedLinkState.cpp
dom/WebKitAnimationEvent.cpp
- dom/WebKitMouseForceEvent.cpp
dom/WebKitNamedFlow.cpp
dom/WebKitTransitionEvent.cpp
dom/WheelEvent.cpp
Modified: trunk/Source/WebCore/ChangeLog (182747 => 182748)
--- trunk/Source/WebCore/ChangeLog 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/ChangeLog 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1,3 +1,83 @@
+2015-04-13 Beth Dakin <bda...@apple.com>
+
+ Add force property to MouseEvents
+ https://bugs.webkit.org/show_bug.cgi?id=143569
+ -and corresponding-
+ rdar://problem/20472954
+
+ Reviewed by Darin Adler.
+
+ This patch removes WebKitMouseForceEvent and uses a MouseEvent everywhere that it
+ was used. That’s possible because this patch also adds a force property to all
+ MouseEvents and to PlatformMouseEvent.
+
+ Remove WebKitMouseForceEvent.
+ * CMakeLists.txt:
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/DOMAllInOne.cpp:
+
+ Create MouseEvents with the appropriate force instead of WebKitMouseForceEvents.
+ This patch also gets rid of the PlatformMouseEvent parameter for these events.
+ They were re-using the cached mousedown event before, which they never should have
+ done. Instead, we create PlatformMouseEvents inside these functions and then use
+ that to make MouseEvents.
+ * dom/Element.cpp:
+ (WebCore::Element::dispatchMouseForceWillBegin):
+ (WebCore::Element::dispatchMouseForceChanged):
+ (WebCore::Element::dispatchMouseForceDown):
+ (WebCore::Element::dispatchMouseForceUp):
+ (WebCore::Element::dispatchMouseForceClick):
+ (WebCore::Element::dispatchMouseForceCancelled):
+ * dom/Element.h:
+
+ No More WebKitMouseForceEvent.
+ * dom/EventNames.in:
+
+ Add force to MouseEvent.
+ * dom/MouseEvent.cpp:
+ (WebCore::MouseEvent::create):
+ (WebCore::MouseEvent::MouseEvent):
+ (WebCore::MouseEvent::cloneFor):
+ (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
+ * dom/MouseEvent.h:
+ (WebCore::MouseEvent::force):
+ (WebCore::MouseEvent::setForce):
+ * dom/MouseEvent.idl:
+
+ No More WebKitMouseForceEvent.
+ * dom/WebKitMouseForceEvent.cpp: Removed.
+ * dom/WebKitMouseForceEvent.h: Removed.
+ * dom/WebKitMouseForceEvent.idl: Removed.
+
+ PlatformMouseEvent now takes a force parameter.
+ * dom/WheelEvent.cpp:
+ (WebCore::WheelEvent::WheelEvent):
+ * page/ContextMenuController.cpp:
+ (WebCore::ContextMenuController::showContextMenuAt):
+ * page/DragController.cpp:
+ (WebCore::createMouseEvent):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::dispatchDragEvent):
+ (WebCore::EventHandler::sendContextMenuEventForKey):
+ (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
+
+ We don’t need lastMouseDownEvent() anymore. We were using it to avoid creating new
+ PlatformMouseEvents for the force events, but we fix that in this patch.
+ (WebCore::EventHandler::lastMouseDownEvent): Deleted.
+ * page/EventHandler.h:
+
+ At force to PlatformMouseEvent.
+ * platform/PlatformMouseEvent.h:
+ (WebCore::PlatformMouseEvent::PlatformMouseEvent):
+ (WebCore::PlatformMouseEvent::force):
+ * replay/SerializationMethods.cpp:
+ (JSC::EncodingTraits<PlatformMouseEvent>::encodeValue):
+ (JSC::EncodingTraits<PlatformMouseEvent>::decodeValue):
+
2015-04-13 Andreas Kling <akl...@apple.com>
Don't segregate heap objects based on Structure immortality.
Modified: trunk/Source/WebCore/DerivedSources.cpp (182747 => 182748)
--- trunk/Source/WebCore/DerivedSources.cpp 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/DerivedSources.cpp 2015-04-13 19:17:48 UTC (rev 182748)
@@ -510,7 +510,6 @@
#include "JSWebKitCSSTransformValue.cpp"
#include "JSWebKitCSSMatrix.cpp"
#include "JSWebKitCSSRegionRule.cpp"
-#include "JSWebKitMouseForceEvent.cpp"
#include "JSWebKitNamedFlow.cpp"
#include "JSWebKitPoint.cpp"
#include "JSWebKitTransitionEvent.cpp"
Modified: trunk/Source/WebCore/DerivedSources.make (182747 => 182748)
--- trunk/Source/WebCore/DerivedSources.make 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/DerivedSources.make 2015-04-13 19:17:48 UTC (rev 182748)
@@ -314,7 +314,6 @@
$(WebCore)/dom/TreeWalker.idl \
$(WebCore)/dom/UIEvent.idl \
$(WebCore)/dom/WebKitAnimationEvent.idl \
- $(WebCore)/dom/WebKitMouseForceEvent.idl \
$(WebCore)/dom/WebKitNamedFlow.idl \
$(WebCore)/dom/WebKitTransitionEvent.idl \
$(WebCore)/dom/WheelEvent.idl \
Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (182747 => 182748)
--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj 2015-04-13 19:17:48 UTC (rev 182748)
@@ -6332,20 +6332,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</ClCompile>
- <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitMouseForceEvent.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
- </ClCompile>
<ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitNamedFlow.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -14256,20 +14242,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</ClCompile>
- <ClCompile Include="..\dom\WebKitMouseForceEvent.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
- </ClCompile>
<ClCompile Include="..\dom\WebKitNamedFlow.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -19121,7 +19093,6 @@
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitCSSMatrix.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitCSSRegionRule.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitCSSTransformValue.h" />
- <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitMouseForceEvent.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitNamedFlow.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitPoint.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitTransitionEvent.h" />
@@ -21044,7 +21015,6 @@
<ClInclude Include="..\dom\UserTypingGestureIndicator.h" />
<ClInclude Include="..\dom\ViewportArguments.h" />
<ClInclude Include="..\dom\WebKitAnimationEvent.h" />
- <ClInclude Include="..\dom\WebKitMouseForceEvent.h" />
<ClInclude Include="..\dom\WebKitNamedFlow.h" />
<ClInclude Include="..\dom\WebKitTransitionEvent.h" />
<ClInclude Include="..\dom\WheelEvent.h" />
Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (182747 => 182748)
--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters 2015-04-13 19:17:48 UTC (rev 182748)
@@ -3378,9 +3378,6 @@
<ClCompile Include="..\dom\WebKitAnimationEvent.cpp">
<Filter>dom</Filter>
</ClCompile>
- <ClCompile Include="..\dom\WebKitMouseForceEvent.cpp">
- <Filter>dom</Filter>
- </ClCompile>
<ClCompile Include="..\dom\WebKitNamedFlow.cpp">
<Filter>dom</Filter>
</ClCompile>
@@ -6217,9 +6214,6 @@
<ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitCSSTransformValue.cpp">
<Filter>DerivedSources</Filter>
</ClCompile>
- <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitMouseForceEvent.cpp">
- <Filter>DerivedSources</Filter>
- </ClCompile>
<ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitNamedFlow.cpp">
<Filter>DerivedSources</Filter>
</ClCompile>
@@ -10494,9 +10488,6 @@
<ClInclude Include="..\dom\WebKitAnimationEvent.h">
<Filter>dom</Filter>
</ClInclude>
- <ClInclude Include="..\dom\WebKitMouseForceEvent.h">
- <Filter>dom</Filter>
- </ClInclude>
<ClInclude Include="..\dom\WebKitNamedFlow.h">
<Filter>dom</Filter>
</ClInclude>
@@ -13601,9 +13592,6 @@
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitCSSTransformValue.h">
<Filter>DerivedSources</Filter>
</ClInclude>
- <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitMouseForceEvent.h">
- <Filter>DerivedSources</Filter>
- </ClInclude>
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitNamedFlow.h">
<Filter>DerivedSources</Filter>
</ClInclude>
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (182747 => 182748)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-04-13 19:17:48 UTC (rev 182748)
@@ -3427,10 +3427,6 @@
93C4F6EB1108F9A50099D0DB /* AccessibilityScrollbar.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C4F6E91108F9A50099D0DB /* AccessibilityScrollbar.h */; };
93CCF0270AF6C52900018E89 /* NavigationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CCF0260AF6C52900018E89 /* NavigationAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
93CCF0600AF6CA7600018E89 /* NavigationAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93CCF05F0AF6CA7600018E89 /* NavigationAction.cpp */; };
- 93D200ED1AB8ED090025E851 /* WebKitMouseForceEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D200EB1AB8ED090025E851 /* WebKitMouseForceEvent.cpp */; };
- 93D200EE1AB8ED090025E851 /* WebKitMouseForceEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D200EC1AB8ED090025E851 /* WebKitMouseForceEvent.h */; };
- 93D200F21AB8F81F0025E851 /* JSWebKitMouseForceEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D200F01AB8F81F0025E851 /* JSWebKitMouseForceEvent.cpp */; };
- 93D200F31AB8F8200025E851 /* JSWebKitMouseForceEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D200F11AB8F81F0025E851 /* JSWebKitMouseForceEvent.h */; };
93D3C1590F97A9D70053C013 /* DOMHTMLCanvasElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3C1580F97A9D70053C013 /* DOMHTMLCanvasElement.h */; };
93D3C17D0F97AA760053C013 /* DOMHTMLCanvasElement.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 93D3C1580F97A9D70053C013 /* DOMHTMLCanvasElement.h */; };
93D9D53C0DA27E180077216C /* RangeBoundaryPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D9D53B0DA27E180077216C /* RangeBoundaryPoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -10679,11 +10675,6 @@
93CA4CA209DF93FA00DF8677 /* svg.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = svg.css; sourceTree = "<group>"; };
93CCF0260AF6C52900018E89 /* NavigationAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigationAction.h; sourceTree = "<group>"; };
93CCF05F0AF6CA7600018E89 /* NavigationAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NavigationAction.cpp; sourceTree = "<group>"; };
- 93D200EB1AB8ED090025E851 /* WebKitMouseForceEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitMouseForceEvent.cpp; sourceTree = "<group>"; };
- 93D200EC1AB8ED090025E851 /* WebKitMouseForceEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitMouseForceEvent.h; sourceTree = "<group>"; };
- 93D200EF1AB8ED640025E851 /* WebKitMouseForceEvent.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebKitMouseForceEvent.idl; sourceTree = "<group>"; };
- 93D200F01AB8F81F0025E851 /* JSWebKitMouseForceEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitMouseForceEvent.cpp; sourceTree = "<group>"; };
- 93D200F11AB8F81F0025E851 /* JSWebKitMouseForceEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitMouseForceEvent.h; sourceTree = "<group>"; };
93D3C1580F97A9D70053C013 /* DOMHTMLCanvasElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMHTMLCanvasElement.h; sourceTree = "<group>"; };
93D9D53B0DA27E180077216C /* RangeBoundaryPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RangeBoundaryPoint.h; sourceTree = "<group>"; };
93E227DB0AF589AD00D48324 /* DocumentLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentLoader.cpp; sourceTree = "<group>"; };
@@ -19733,8 +19724,6 @@
A86629C909DA2B47009633A5 /* JSUIEvent.h */,
31C0FF390E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.cpp */,
31C0FF3A0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.h */,
- 93D200F01AB8F81F0025E851 /* JSWebKitMouseForceEvent.cpp */,
- 93D200F11AB8F81F0025E851 /* JSWebKitMouseForceEvent.h */,
31C0FF3B0E4CEFAC007D6FE5 /* JSWebKitTransitionEvent.cpp */,
31C0FF3C0E4CEFAC007D6FE5 /* JSWebKitTransitionEvent.h */,
65DF31F109D1CC60000BE325 /* JSWheelEvent.cpp */,
@@ -23207,9 +23196,6 @@
31C0FF1B0E4CEB6E007D6FE5 /* WebKitAnimationEvent.cpp */,
31C0FF1C0E4CEB6E007D6FE5 /* WebKitAnimationEvent.h */,
31C0FF1D0E4CEB6E007D6FE5 /* WebKitAnimationEvent.idl */,
- 93D200EB1AB8ED090025E851 /* WebKitMouseForceEvent.cpp */,
- 93D200EC1AB8ED090025E851 /* WebKitMouseForceEvent.h */,
- 93D200EF1AB8ED640025E851 /* WebKitMouseForceEvent.idl */,
D7613A4E1474F13F00DB8606 /* WebKitNamedFlow.cpp */,
D7613A4D1474F13F00DB8606 /* WebKitNamedFlow.h */,
D7613A4A1474EE9500DB8606 /* WebKitNamedFlow.idl */,
@@ -24248,7 +24234,6 @@
7CC289DF1AA0FE5D009A9CE3 /* URLRegistry.h in Headers */,
BC1A37B6097C715F0019F3D8 /* DOMHTML.h in Headers */,
319848081A1E6CB500A13318 /* DOMAnimationEvent.h in Headers */,
- 93D200F31AB8F8200025E851 /* JSWebKitMouseForceEvent.h in Headers */,
85DF81270AA7787200486AD7 /* DOMHTMLAnchorElement.h in Headers */,
85E7119B0AC5D5350053270F /* DOMHTMLAnchorElementInternal.h in Headers */,
854075690AD6CBF900620C57 /* DOMHTMLAppletElement.h in Headers */,
@@ -26613,7 +26598,6 @@
B2227A390D00BF220071B782 /* SVGLinearGradientElement.h in Headers */,
B2227A3C0D00BF220071B782 /* SVGLineElement.h in Headers */,
0810764412828556007C63BA /* SVGListProperty.h in Headers */,
- 93D200EE1AB8ED090025E851 /* WebKitMouseForceEvent.h in Headers */,
088A0E09126EF1DB00978F7A /* SVGListPropertyTearOff.h in Headers */,
B2227A410D00BF220071B782 /* SVGLocatable.h in Headers */,
436708EE12D9CA4B00044234 /* SVGMarkerData.h in Headers */,
@@ -27544,7 +27528,6 @@
976D6C78122B8A3D001FD1F7 /* Blob.cpp in Sources */,
2EDEF1F3121B0EFC00726DB2 /* BlobData.cpp in Sources */,
E1D31CDC19196020001005A3 /* BlobDataFileReference.cpp in Sources */,
- 93D200ED1AB8ED090025E851 /* WebKitMouseForceEvent.cpp in Sources */,
E164A2ED191AE6350010737D /* BlobDataFileReferenceMac.mm in Sources */,
E14A94D716DFDF950068DE82 /* BlobRegistry.cpp in Sources */,
2EDEF1F6121B0EFC00726DB2 /* BlobRegistryImpl.cpp in Sources */,
@@ -27573,7 +27556,6 @@
BCB16C290979C3BD00467741 /* CachedResourceLoader.cpp in Sources */,
4634592C1AC2271000ECB71C /* PowerObserverMac.cpp in Sources */,
5081E3C33CE580C16EF8B48B /* CachedResourceRequest.cpp in Sources */,
- 93D200F21AB8F81F0025E851 /* JSWebKitMouseForceEvent.cpp in Sources */,
6C638896A96CCEE50C8C946C /* CachedResourceRequestInitiators.cpp in Sources */,
BCB16C230979C3BD00467741 /* CachedScript.cpp in Sources */,
A104F24314C71F7A009E2C23 /* CachedSVGDocument.cpp in Sources */,
Modified: trunk/Source/WebCore/dom/DOMAllInOne.cpp (182747 => 182748)
--- trunk/Source/WebCore/dom/DOMAllInOne.cpp 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/dom/DOMAllInOne.cpp 2015-04-13 19:17:48 UTC (rev 182748)
@@ -148,7 +148,6 @@
#include "ViewportArguments.cpp"
#include "VisitedLinkState.cpp"
#include "WebKitAnimationEvent.cpp"
-#include "WebKitMouseForceEvent.cpp"
#include "WebKitNamedFlow.cpp"
#include "WebKitTransitionEvent.cpp"
#include "WheelEvent.cpp"
Modified: trunk/Source/WebCore/dom/Element.cpp (182747 => 182748)
--- trunk/Source/WebCore/dom/Element.cpp 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/dom/Element.cpp 2015-04-13 19:17:48 UTC (rev 182748)
@@ -79,7 +79,6 @@
#include "StyleResolver.h"
#include "TextIterator.h"
#include "VoidCallback.h"
-#include "WebKitMouseForceEvent.h"
#include "WheelEvent.h"
#include "XLinkNames.h"
#include "XMLNSNames.h"
@@ -2244,8 +2243,8 @@
if (!frame)
return false;
- PlatformMouseEvent platformMouseEvent(frame->eventHandler().lastKnownMousePosition(), frame->eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime());
- RefPtr<Event> mouseForceWillBeginEvent = WebKitMouseForceEvent::create(eventNames().webkitmouseforcewillbeginEvent, 0, platformMouseEvent, document().defaultView());
+ PlatformMouseEvent platformMouseEvent(frame->eventHandler().lastKnownMousePosition(), frame->eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime(), ForceAtClick);
+ RefPtr<MouseEvent> mouseForceWillBeginEvent = MouseEvent::create(eventNames().webkitmouseforcewillbeginEvent, document().defaultView(), platformMouseEvent, 0, nullptr);
mouseForceWillBeginEvent->setTarget(this);
dispatchEvent(mouseForceWillBeginEvent);
@@ -2254,52 +2253,82 @@
return false;
}
-void Element::dispatchMouseForceChanged(float force, const PlatformMouseEvent& platformMouseEvent)
+void Element::dispatchMouseForceChanged(float force)
{
if (!document().hasListenerType(Document::FORCECHANGED_LISTENER))
return;
- RefPtr<WebKitMouseForceEvent> mouseForceChangedEvent = WebKitMouseForceEvent::create(eventNames().webkitmouseforcechangedEvent, force, platformMouseEvent, document().defaultView());
+ 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(const PlatformMouseEvent& platformMouseEvent)
+void Element::dispatchMouseForceDown()
{
if (!document().hasListenerType(Document::FORCEDOWN_LISTENER))
return;
- RefPtr<Event> mouseForceDownEvent = WebKitMouseForceEvent::create(eventNames().webkitmouseforcedownEvent, 1, platformMouseEvent, document().defaultView());
+ 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(const PlatformMouseEvent& platformMouseEvent)
+void Element::dispatchMouseForceUp()
{
if (!document().hasListenerType(Document::FORCEUP_LISTENER))
return;
- RefPtr<Event> mouseForceUpEvent = WebKitMouseForceEvent::create(eventNames().webkitmouseforceupEvent, 1, platformMouseEvent, document().defaultView());
+ 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(const PlatformMouseEvent& platformMouseEvent)
+void Element::dispatchMouseForceClick()
{
if (!document().hasListenerType(Document::FORCECLICK_LISTENER))
return;
- RefPtr<Event> mouseForceClickEvent = WebKitMouseForceEvent::create(eventNames().webkitmouseforceclickEvent, 1, platformMouseEvent, document().defaultView());
+ 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> mouseForceClickEvent = MouseEvent::create(eventNames().webkitmouseforceclickEvent, document().defaultView(), platformMouseEvent, 0, nullptr);
+
mouseForceClickEvent->setTarget(this);
dispatchEvent(mouseForceClickEvent);
}
-void Element::dispatchMouseForceCancelled(const PlatformMouseEvent& platformMouseEvent)
+void Element::dispatchMouseForceCancelled()
{
if (!document().hasListenerType(Document::FORCECANCELLED_LISTENER))
return;
- RefPtr<Event> mouseForceCancelledEvent = WebKitMouseForceEvent::create(eventNames().webkitmouseforcecancelledEvent, 0, platformMouseEvent, document().defaultView());
+ 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(), 0);
+ RefPtr<MouseEvent> mouseForceCancelledEvent = MouseEvent::create(eventNames().webkitmouseforcecancelledEvent, document().defaultView(), platformMouseEvent, 0, nullptr);
+
mouseForceCancelledEvent->setTarget(this);
dispatchEvent(mouseForceCancelledEvent);
}
@@ -2311,23 +2340,23 @@
return false;
}
-void Element::dispatchMouseForceChanged(float, const PlatformMouseEvent&)
+void Element::dispatchMouseForceChanged(float)
{
}
-void Element::dispatchMouseForceDown(const PlatformMouseEvent&)
+void Element::dispatchMouseForceDown()
{
}
-void Element::dispatchMouseForceUp(const PlatformMouseEvent&)
+void Element::dispatchMouseForceUp()
{
}
-void Element::dispatchMouseForceClick(const PlatformMouseEvent&)
+void Element::dispatchMouseForceClick()
{
}
-void Element::dispatchMouseForceCancelled(const PlatformMouseEvent&)
+void Element::dispatchMouseForceCancelled()
{
}
#endif // #if ENABLE(MOUSE_FORCE_EVENTS)
Modified: trunk/Source/WebCore/dom/Element.h (182747 => 182748)
--- trunk/Source/WebCore/dom/Element.h 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/dom/Element.h 2015-04-13 19:17:48 UTC (rev 182748)
@@ -469,11 +469,11 @@
virtual void dispatchBlurEvent(RefPtr<Element>&& newFocusedElement);
WEBCORE_EXPORT bool dispatchMouseForceWillBegin();
- WEBCORE_EXPORT void dispatchMouseForceChanged(float force, const PlatformMouseEvent&);
- WEBCORE_EXPORT void dispatchMouseForceDown(const PlatformMouseEvent&);
- WEBCORE_EXPORT void dispatchMouseForceUp(const PlatformMouseEvent&);
- WEBCORE_EXPORT void dispatchMouseForceClick(const PlatformMouseEvent&);
- WEBCORE_EXPORT void dispatchMouseForceCancelled(const PlatformMouseEvent&);
+ WEBCORE_EXPORT void dispatchMouseForceChanged(float force);
+ WEBCORE_EXPORT void dispatchMouseForceDown();
+ WEBCORE_EXPORT void dispatchMouseForceUp();
+ WEBCORE_EXPORT void dispatchMouseForceClick();
+ WEBCORE_EXPORT void dispatchMouseForceCancelled();
virtual bool willRecalcStyle(Style::Change);
virtual void didRecalcStyle(Style::Change);
Modified: trunk/Source/WebCore/dom/EventNames.in (182747 => 182748)
--- trunk/Source/WebCore/dom/EventNames.in 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/dom/EventNames.in 2015-04-13 19:17:48 UTC (rev 182748)
@@ -28,7 +28,6 @@
UIEvent
UIEvents interfaceName=UIEvent
WebKitAnimationEvent
-WebKitMouseForceEvent
WebKitTransitionEvent
WheelEvent
XMLHttpRequestProgressEvent
Modified: trunk/Source/WebCore/dom/MouseEvent.cpp (182747 => 182748)
--- trunk/Source/WebCore/dom/MouseEvent.cpp 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/dom/MouseEvent.cpp 2015-04-13 19:17:48 UTC (rev 182748)
@@ -66,7 +66,7 @@
event.movementDelta().x(), event.movementDelta().y(),
#endif
event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), event.button(),
- relatedTarget);
+ relatedTarget, event.force());
}
Ref<MouseEvent> MouseEvent::create(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView> view,
@@ -75,7 +75,7 @@
int movementX, int movementY,
#endif
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
- PassRefPtr<EventTarget> relatedTarget)
+ PassRefPtr<EventTarget> relatedTarget, double force)
{
return MouseEvent::create(type, canBubble, cancelable, timestamp, view,
@@ -83,7 +83,7 @@
#if ENABLE(POINTER_LOCK)
movementX, movementY,
#endif
- ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, 0, false);
+ ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, force, 0, false);
}
Ref<MouseEvent> MouseEvent::create(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView> view,
@@ -92,14 +92,14 @@
int movementX, int movementY,
#endif
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
- PassRefPtr<EventTarget> relatedTarget, PassRefPtr<DataTransfer> dataTransfer, bool isSimulated)
+ PassRefPtr<EventTarget> relatedTarget, double force, PassRefPtr<DataTransfer> dataTransfer, bool isSimulated)
{
return adoptRef(*new MouseEvent(type, canBubble, cancelable, timestamp, view,
detail, screenX, screenY, pageX, pageY,
#if ENABLE(POINTER_LOCK)
movementX, movementY,
#endif
- ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, dataTransfer, isSimulated));
+ ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, force, dataTransfer, isSimulated));
}
MouseEvent::MouseEvent()
@@ -114,7 +114,7 @@
int movementX, int movementY,
#endif
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey,
- unsigned short button, PassRefPtr<EventTarget> relatedTarget,
+ unsigned short button, PassRefPtr<EventTarget> relatedTarget, double force,
PassRefPtr<DataTransfer> dataTransfer, bool isSimulated)
: MouseRelatedEvent(eventType, canBubble, cancelable, timestamp, view, detail, IntPoint(screenX, screenY),
IntPoint(pageX, pageY),
@@ -125,6 +125,7 @@
, m_button(button == (unsigned short)-1 ? 0 : button)
, m_buttonDown(button != (unsigned short)-1)
, m_relatedTarget(relatedTarget)
+ , m_force(force)
, m_dataTransfer(dataTransfer)
{
}
@@ -254,6 +255,7 @@
button(),
// Nullifies relatedTarget.
0);
+ clonedMouseEvent->setForce(force());
return clonedMouseEvent.release();
}
@@ -271,7 +273,7 @@
#if ENABLE(POINTER_LOCK)
0, 0,
#endif
- false, false, false, false, 0, 0, 0, true)
+ false, false, false, false, 0, 0, 0, 0, true)
{
if (UIEventWithKeyState* keyStateEvent = findEventWithKeyState(underlyingEvent.get())) {
m_ctrlKey = keyStateEvent->ctrlKey();
Modified: trunk/Source/WebCore/dom/MouseEvent.h (182747 => 182748)
--- trunk/Source/WebCore/dom/MouseEvent.h 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/dom/MouseEvent.h 2015-04-13 19:17:48 UTC (rev 182748)
@@ -59,7 +59,7 @@
int movementX, int movementY,
#endif
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
- PassRefPtr<EventTarget> relatedTarget);
+ PassRefPtr<EventTarget> relatedTarget, double force);
WEBCORE_EXPORT static Ref<MouseEvent> create(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView>,
int detail, int screenX, int screenY, int pageX, int pageY,
@@ -67,7 +67,7 @@
int movementX, int movementY,
#endif
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
- PassRefPtr<EventTarget> relatedTarget, PassRefPtr<DataTransfer>, bool isSimulated = false);
+ PassRefPtr<EventTarget> relatedTarget, double force, PassRefPtr<DataTransfer>, bool isSimulated = false);
WEBCORE_EXPORT static Ref<MouseEvent> create(const AtomicString& eventType, PassRefPtr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtr<Node> relatedTarget);
@@ -86,8 +86,9 @@
bool buttonDown() const { return m_buttonDown; }
virtual EventTarget* relatedTarget() const override final { return m_relatedTarget.get(); }
void setRelatedTarget(PassRefPtr<EventTarget> relatedTarget) { m_relatedTarget = relatedTarget; }
+ double force() const { return m_force; }
+ void setForce(double force) { m_force = force; }
-
Node* toElement() const;
Node* fromElement() const;
@@ -112,7 +113,7 @@
int movementX, int movementY,
#endif
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
- PassRefPtr<EventTarget> relatedTarget, PassRefPtr<DataTransfer>, bool isSimulated);
+ PassRefPtr<EventTarget> relatedTarget, double force, PassRefPtr<DataTransfer>, bool isSimulated);
MouseEvent(const AtomicString& type, const MouseEventInit&);
@@ -122,6 +123,7 @@
unsigned short m_button;
bool m_buttonDown;
RefPtr<EventTarget> m_relatedTarget;
+ double m_force { 0 };
RefPtr<DataTransfer> m_dataTransfer;
};
Modified: trunk/Source/WebCore/dom/MouseEvent.idl (182747 => 182748)
--- trunk/Source/WebCore/dom/MouseEvent.idl 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/dom/MouseEvent.idl 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2015 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -33,6 +33,7 @@
[InitializedByEventConstructor] readonly attribute EventTarget relatedTarget;
[Conditional=POINTER_LOCK] readonly attribute long movementX;
[Conditional=POINTER_LOCK] readonly attribute long movementY;
+ [Conditional=MOUSE_FORCE_EVENTS]readonly attribute double force;
[ObjCLegacyUnnamedParameters] void initMouseEvent([Default=Undefined] optional DOMString type,
[Default=Undefined] optional boolean canBubble,
Deleted: trunk/Source/WebCore/dom/WebKitMouseForceEvent.cpp (182747 => 182748)
--- trunk/Source/WebCore/dom/WebKitMouseForceEvent.cpp 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/dom/WebKitMouseForceEvent.cpp 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WebKitMouseForceEvent.h"
-
-#include "DataTransfer.h"
-#include "EventNames.h"
-#include "PlatformMouseEvent.h"
-
-namespace WebCore {
-
-WebKitMouseForceEvent::WebKitMouseForceEvent()
-{
-}
-
-WebKitMouseForceEvent::WebKitMouseForceEvent(const AtomicString& type, double force, const PlatformMouseEvent& event, PassRefPtr<AbstractView> view)
- : MouseEvent(type, true, true, event.timestamp(), view, 0, event.globalPosition().x(), event.globalPosition().y(), event.position().x(), event.position().y()
-#if ENABLE(POINTER_LOCK)
- , 0, 0
-#endif
- , event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), 0, 0, 0, false)
- , m_force(force)
-{
-}
-
-WebKitMouseForceEvent::WebKitMouseForceEvent(const AtomicString& type, const WebKitMouseForceEventInit& initializer)
- : MouseEvent(type, initializer)
- , m_force(initializer.force)
-{
-}
-
-EventInterface WebKitMouseForceEvent::eventInterface() const
-{
- return WebKitMouseForceEventInterfaceType;
-}
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/dom/WebKitMouseForceEvent.h (182747 => 182748)
--- trunk/Source/WebCore/dom/WebKitMouseForceEvent.h 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/dom/WebKitMouseForceEvent.h 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebKitMouseForceEvent_h
-#define WebKitMouseForceEvent_h
-
-#if ENABLE(MOUSE_FORCE_EVENTS)
-
-#include "MouseEvent.h"
-
-namespace WebCore {
-
-struct WebKitMouseForceEventInit : public MouseEventInit {
- double force { 0 };
-};
-
-class WebKitMouseForceEvent final : public MouseEvent {
-public:
- static Ref<WebKitMouseForceEvent> create()
- {
- return adoptRef(*new WebKitMouseForceEvent);
- }
- static Ref<WebKitMouseForceEvent> create(const AtomicString& type, double force, const PlatformMouseEvent& event, PassRefPtr<AbstractView> view)
- {
- return adoptRef(*new WebKitMouseForceEvent(type, force, event, view));
- }
- static Ref<WebKitMouseForceEvent> create(const AtomicString& type, const WebKitMouseForceEventInit& initializer)
- {
- return adoptRef(*new WebKitMouseForceEvent(type, initializer));
- }
-
- double force() const { return m_force; }
-
-private:
- WebKitMouseForceEvent();
- WebKitMouseForceEvent(const AtomicString&, double m_force, const PlatformMouseEvent&, PassRefPtr<AbstractView>);
- WebKitMouseForceEvent(const AtomicString&, const WebKitMouseForceEventInit&);
-
- virtual EventInterface eventInterface() const override;
-
- double m_force { 0 };
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(MOUSE_FORCE_EVENTS)
-
-#endif // WebKitMouseForceEvent_h
Deleted: trunk/Source/WebCore/dom/WebKitMouseForceEvent.idl (182747 => 182748)
--- trunk/Source/WebCore/dom/WebKitMouseForceEvent.idl 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/dom/WebKitMouseForceEvent.idl 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-[
- ConstructorTemplate=Event
-] interface WebKitMouseForceEvent : MouseEvent {
- [InitializedByEventConstructor] readonly attribute double force;
-};
Modified: trunk/Source/WebCore/dom/WheelEvent.cpp (182747 => 182748)
--- trunk/Source/WebCore/dom/WheelEvent.cpp 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/dom/WheelEvent.cpp 2015-04-13 19:17:48 UTC (rev 182748)
@@ -70,7 +70,7 @@
#if ENABLE(POINTER_LOCK)
, 0, 0
#endif
- , event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), 0, 0, 0, false)
+ , event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), 0, 0, 0, 0, false)
, m_wheelDelta(event.wheelTicksX() * TickMultiplier, event.wheelTicksY() * TickMultiplier)
, m_deltaX(-event.deltaX())
, m_deltaY(-event.deltaY())
Modified: trunk/Source/WebCore/page/ContextMenuController.cpp (182747 => 182748)
--- trunk/Source/WebCore/page/ContextMenuController.cpp 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/page/ContextMenuController.cpp 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1433,7 +1433,7 @@
clearContextMenu();
// Simulate a click in the middle of the accessibility object.
- PlatformMouseEvent mouseEvent(clickPoint, clickPoint, RightButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime());
+ PlatformMouseEvent mouseEvent(clickPoint, clickPoint, RightButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime(), ForceAtClick);
frame->eventHandler().handleMousePressEvent(mouseEvent);
bool handled = frame->eventHandler().sendContextMenuEvent(mouseEvent);
if (handled)
Modified: trunk/Source/WebCore/page/DragController.cpp (182747 => 182748)
--- trunk/Source/WebCore/page/DragController.cpp 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/page/DragController.cpp 2015-04-13 19:17:48 UTC (rev 182748)
@@ -93,7 +93,7 @@
return PlatformMouseEvent(dragData.clientPosition(), dragData.globalPosition(),
LeftButton, PlatformEvent::MouseMoved, 0, shiftKey, ctrlKey, altKey,
- metaKey, currentTime());
+ metaKey, currentTime(), ForceAtClick);
}
DragController::DragController(Page& page, DragClient& client)
Modified: trunk/Source/WebCore/page/EventHandler.cpp (182747 => 182748)
--- trunk/Source/WebCore/page/EventHandler.cpp 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2015-04-13 19:17:48 UTC (rev 182748)
@@ -2159,7 +2159,7 @@
event.movementDelta().x(), event.movementDelta().y(),
#endif
event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(),
- 0, 0, dataTransfer);
+ 0, 0, event.force(), dataTransfer);
dragTarget.dispatchEvent(me.get(), IGNORE_EXCEPTION);
return me->defaultPrevented();
@@ -2849,7 +2849,7 @@
PlatformEvent::Type eventType = PlatformEvent::MousePressed;
#endif
- PlatformMouseEvent platformMouseEvent(position, globalPosition, RightButton, eventType, 1, false, false, false, false, WTF::currentTime());
+ PlatformMouseEvent platformMouseEvent(position, globalPosition, RightButton, eventType, 1, false, false, false, false, WTF::currentTime(), ForceAtClick);
return !dispatchMouseEvent(eventNames().contextmenuEvent, targetNode, true, 0, platformMouseEvent, false);
}
@@ -2936,7 +2936,7 @@
bool altKey;
bool metaKey;
PlatformKeyboardEvent::getCurrentModifierState(shiftKey, ctrlKey, altKey, metaKey);
- PlatformMouseEvent fakeMouseMoveEvent(m_lastKnownMousePosition, m_lastKnownMouseGlobalPosition, NoButton, PlatformEvent::MouseMoved, 0, shiftKey, ctrlKey, altKey, metaKey, currentTime());
+ PlatformMouseEvent fakeMouseMoveEvent(m_lastKnownMousePosition, m_lastKnownMouseGlobalPosition, NoButton, PlatformEvent::MouseMoved, 0, shiftKey, ctrlKey, altKey, metaKey, currentTime(), 0);
mouseMoved(fakeMouseMoveEvent);
}
#endif // !ENABLE(IOS_TOUCH_EVENTS)
@@ -4020,11 +4020,6 @@
m_lastKnownMouseGlobalPosition = event.globalPosition();
}
-const PlatformMouseEvent& EventHandler::lastMouseDownEvent() const
-{
- return m_mouseDown;
-}
-
void EventHandler::setImmediateActionStage(ImmediateActionStage stage)
{
m_immediateActionStage = stage;
Modified: trunk/Source/WebCore/page/EventHandler.h (182747 => 182748)
--- trunk/Source/WebCore/page/EventHandler.h 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/page/EventHandler.h 2015-04-13 19:17:48 UTC (rev 182748)
@@ -312,7 +312,6 @@
bool isHandlingWheelEvent() const { return m_isHandlingWheelEvent; }
WEBCORE_EXPORT void setImmediateActionStage(ImmediateActionStage stage);
- WEBCORE_EXPORT const PlatformMouseEvent& lastMouseDownEvent() const;
private:
#if ENABLE(DRAG_SUPPORT)
Modified: trunk/Source/WebCore/platform/PlatformMouseEvent.h (182747 => 182748)
--- trunk/Source/WebCore/platform/PlatformMouseEvent.h 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/platform/PlatformMouseEvent.h 2015-04-13 19:17:48 UTC (rev 182748)
@@ -42,7 +42,10 @@
#endif
namespace WebCore {
-
+
+const double ForceAtClick = 0;
+const double ForceAtForceClick = 1;
+
// These button numbers match the ones used in the DOM API, 0 through 2, except for NoButton which isn't specified.
enum MouseButton : int8_t { NoButton = -1, LeftButton, MiddleButton, RightButton };
@@ -63,13 +66,14 @@
}
PlatformMouseEvent(const IntPoint& position, const IntPoint& globalPosition, MouseButton button, PlatformEvent::Type type,
- int clickCount, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey, double timestamp)
+ int clickCount, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey, double timestamp, double force)
: PlatformEvent(type, shiftKey, ctrlKey, altKey, metaKey, timestamp)
, m_position(position)
, m_globalPosition(globalPosition)
, m_button(button)
, m_clickCount(clickCount)
, m_modifierFlags(0)
+ , m_force(force)
#if PLATFORM(MAC)
, m_eventNumber(0)
, m_menuTypeForEvent(0)
@@ -88,6 +92,7 @@
MouseButton button() const { return m_button; }
int clickCount() const { return m_clickCount; }
unsigned modifierFlags() const { return m_modifierFlags; }
+ double force() const { return m_force; }
#if PLATFORM(GTK)
@@ -123,6 +128,7 @@
MouseButton m_button;
int m_clickCount;
unsigned m_modifierFlags;
+ double m_force { 0 };
#if PLATFORM(MAC)
int m_eventNumber;
Modified: trunk/Source/WebCore/replay/SerializationMethods.cpp (182747 => 182748)
--- trunk/Source/WebCore/replay/SerializationMethods.cpp 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebCore/replay/SerializationMethods.cpp 2015-04-13 19:17:48 UTC (rev 182748)
@@ -314,6 +314,7 @@
ENCODE_TYPE_WITH_KEY(encodedValue, bool, altKey, input.altKey());
ENCODE_TYPE_WITH_KEY(encodedValue, bool, metaKey, input.metaKey());
ENCODE_TYPE_WITH_KEY(encodedValue, int, timestamp, input.timestamp());
+ ENCODE_TYPE_WITH_KEY(encodedValue, double, force, input.force());
return encodedValue;
}
@@ -332,11 +333,12 @@
DECODE_TYPE_WITH_KEY(encodedValue, bool, altKey);
DECODE_TYPE_WITH_KEY(encodedValue, bool, metaKey);
DECODE_TYPE_WITH_KEY(encodedValue, int, timestamp);
+ DECODE_TYPE_WITH_KEY(encodedValue, double, force);
input = std::make_unique<PlatformMouseEvent>(IntPoint(positionX, positionY),
IntPoint(globalPositionX, globalPositionY),
button, type, clickCount,
- shiftKey, ctrlKey, altKey, metaKey, timestamp);
+ shiftKey, ctrlKey, altKey, metaKey, timestamp, force);
return true;
}
Modified: trunk/Source/WebKit/ios/ChangeLog (182747 => 182748)
--- trunk/Source/WebKit/ios/ChangeLog 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit/ios/ChangeLog 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1,3 +1,16 @@
+2015-04-13 Beth Dakin <bda...@apple.com>
+
+ Add force property to MouseEvents
+ https://bugs.webkit.org/show_bug.cgi?id=143569
+ -and corresponding-
+ rdar://problem/20472954
+
+ Reviewed by Darin Adler.
+
+ Send the appropriate force with this simulated click event.
+ * WebView/WebPDFViewPlaceholder.mm:
+ (-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]):
+
2015-03-31 Myles C. Maxfield <mmaxfi...@apple.com>
Move ExpansionBehaviorFlags and TextDirection to their own file
Modified: trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.mm (182747 => 182748)
--- trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.mm 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.mm 2015-04-13 19:17:48 UTC (rev 182748)
@@ -471,7 +471,7 @@
#if ENABLE(POINTER_LOCK)
0, 0,
#endif
- false, false, false, false, 0, 0, 0, true);
+ false, false, false, false, 0, 0, 0, 0, true);
// Call to the frame loader because this is where our security checks are made.
Frame* frame = core([_dataSource webFrame]);
Modified: trunk/Source/WebKit/mac/ChangeLog (182747 => 182748)
--- trunk/Source/WebKit/mac/ChangeLog 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit/mac/ChangeLog 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1,3 +1,18 @@
+2015-04-13 Beth Dakin <bda...@apple.com>
+
+ Add force property to MouseEvents
+ https://bugs.webkit.org/show_bug.cgi?id=143569
+ -and corresponding-
+ rdar://problem/20472954
+
+ Reviewed by Darin Adler.
+
+ PlatformMouseEvent and MouseEvent now take force parameters.
+ * WebView/WebFrame.mm:
+ (-[WebFrame _dragSourceEndedAt:operation:]):
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
+
2015-04-12 Darin Adler <da...@apple.com>
[Cocoa] Localizable strings are inconsistent and need to be regenerated
Modified: trunk/Source/WebKit/mac/WebView/WebFrame.mm (182747 => 182748)
--- trunk/Source/WebKit/mac/WebView/WebFrame.mm 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit/mac/WebView/WebFrame.mm 2015-04-13 19:17:48 UTC (rev 182748)
@@ -966,7 +966,7 @@
return;
// FIXME: These are fake modifier keys here, but they should be real ones instead.
PlatformMouseEvent event(IntPoint(windowLoc), globalPoint(windowLoc, [view->platformWidget() window]),
- LeftButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime());
+ LeftButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), WebCore::ForceAtClick);
_private->coreFrame->eventHandler().dragSourceEndedAt(event, (DragOperation)operation);
}
#endif
Modified: trunk/Source/WebKit/mac/WebView/WebPDFView.mm (182747 => 182748)
--- trunk/Source/WebKit/mac/WebView/WebPDFView.mm 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit/mac/WebView/WebPDFView.mm 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1027,7 +1027,7 @@
[nsEvent modifierFlags] & NSAlternateKeyMask,
[nsEvent modifierFlags] & NSShiftKeyMask,
[nsEvent modifierFlags] & NSCommandKeyMask,
- button, 0, 0, true);
+ button, 0, WebCore::ForceAtClick, 0, true);
}
// Call to the frame loader because this is where our security checks are made.
Modified: trunk/Source/WebKit/win/ChangeLog (182747 => 182748)
--- trunk/Source/WebKit/win/ChangeLog 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit/win/ChangeLog 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1,3 +1,16 @@
+2015-04-13 Beth Dakin <bda...@apple.com>
+
+ Add force property to MouseEvents
+ https://bugs.webkit.org/show_bug.cgi?id=143569
+ -and corresponding-
+ rdar://problem/20472954
+
+ Reviewed by Darin Adler.
+
+ PlatformMouseEvent takes a force parameter.
+ * WebDropSource.cpp:
+ (generateMouseEvent):
+
2015-04-13 Per Arne Vollan <pe...@outlook.com>
[Win] Incorrect parameter order in call to WebView::repaint.
Modified: trunk/Source/WebKit/win/WebDropSource.cpp (182747 => 182748)
--- trunk/Source/WebKit/win/WebDropSource.cpp 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit/win/WebDropSource.cpp 2015-04-13 19:17:48 UTC (rev 182748)
@@ -101,7 +101,7 @@
if (SUCCEEDED(webView->viewWindow(&viewWindow)))
::ScreenToClient(viewWindow, reinterpret_cast<LPPOINT>(&localpt));
return PlatformMouseEvent(IntPoint(localpt.x, localpt.y), IntPoint(pt.x, pt.y),
- isDrag ? LeftButton : NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime());
+ isDrag ? LeftButton : NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), 0);
}
STDMETHODIMP WebDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState)
Modified: trunk/Source/WebKit2/ChangeLog (182747 => 182748)
--- trunk/Source/WebKit2/ChangeLog 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit2/ChangeLog 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1,3 +1,64 @@
+2015-04-13 Beth Dakin <bda...@apple.com>
+
+ Add force property to MouseEvents
+ https://bugs.webkit.org/show_bug.cgi?id=143569
+ -and corresponding-
+ rdar://problem/20472954
+
+ Reviewed by Darin Adler.
+
+ In order to accommodate adding force to all PlatformMouseEvents, we have to add it
+ to pass a caches pressure event to NativeWebMouseEvent and add force to
+ WebMouseEvent.
+
+ NativeWebMouseEvent now requires a second NSEvent for the pressureEvent.
+ * Shared/NativeWebMouseEvent.h:
+
+ WebMouseEvent takes a force parameter.
+ * Shared/WebEvent.h:
+ (WebKit::WebMouseEvent::force):
+ * Shared/WebEventConversion.cpp:
+ (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
+ * Shared/WebMouseEvent.cpp:
+ (WebKit::WebMouseEvent::WebMouseEvent):
+ (WebKit::WebMouseEvent::encode):
+ (WebKit::WebMouseEvent::decode):
+ * Shared/mac/NativeWebMouseEventMac.mm:
+ (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
+ * Shared/mac/WebEventFactory.h:
+ * Shared/mac/WebEventFactory.mm:
+ (WebKit::WebEventFactory::createWebMouseEvent):
+
+ Cache the most recent pressureEvent in _data so that it can be sent along to the
+ NativeWebMouseEvent constructor.
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView pressureChangeWithEvent:]):
+ (-[WKView acceptsFirstMouse:]):
+ (-[WKView shouldDelayWindowOrderingForEvent:]):
+ (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
+ (-[WKView initWithFrame:processPool:configuration:webView:]):
+
+ WebMouseEvent takes a force parameter.
+ * WebProcess/Plugins/PDF/PDFPlugin.mm:
+ (WebKit::PDFPlugin::showContextMenuAtPoint):
+ * WebProcess/Plugins/PluginView.cpp:
+ (WebKit::PluginView::createWebEvent):
+
+ MouseEvent and PlatformMouseEvent both take force parameters too.
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::navigateToURLWithSimulatedClick):
+ (WebKit::WebPage::contextMenuAtPointInWindow):
+ (WebKit::WebPage::dragEnded):
+ (WebKit::WebPage::simulateMouseDown):
+ (WebKit::WebPage::simulateMouseUp):
+ (WebKit::WebPage::simulateMouseMotion):
+
+ The functions that dispatch the force events no longer take a PlatformMouseEvent
+ as a parameter.
+ * WebProcess/WebPage/mac/WebPageMac.mm:
+ (WebKit::WebPage::inputDeviceForceDidChange):
+ (WebKit::WebPage::immediateActionDidCancel):
+
2015-04-13 Andreas Kling <akl...@apple.com>
Don't segregate heap objects based on Structure immortality.
Modified: trunk/Source/WebKit2/Shared/NativeWebMouseEvent.h (182747 => 182748)
--- trunk/Source/WebKit2/Shared/NativeWebMouseEvent.h 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit2/Shared/NativeWebMouseEvent.h 2015-04-13 19:17:48 UTC (rev 182748)
@@ -49,7 +49,7 @@
class NativeWebMouseEvent : public WebMouseEvent {
public:
#if USE(APPKIT)
- NativeWebMouseEvent(NSEvent *, NSView *);
+ NativeWebMouseEvent(NSEvent *, NSEvent *pressureEvent, NSView *);
#elif PLATFORM(GTK)
NativeWebMouseEvent(const NativeWebMouseEvent&);
NativeWebMouseEvent(GdkEvent*, int);
Modified: trunk/Source/WebKit2/Shared/WebEvent.h (182747 => 182748)
--- trunk/Source/WebKit2/Shared/WebEvent.h 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit2/Shared/WebEvent.h 2015-04-13 19:17:48 UTC (rev 182748)
@@ -124,9 +124,9 @@
WebMouseEvent();
#if PLATFORM(MAC)
- WebMouseEvent(Type, Button, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers, double timestamp, int eventNumber = -1, int menuType = 0);
+ WebMouseEvent(Type, Button, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers, double timestamp, double force, int eventNumber = -1, int menuType = 0);
#else
- WebMouseEvent(Type, Button, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers, double timestamp);
+ WebMouseEvent(Type, Button, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers, double timestamp, double force = 0);
#endif
Button button() const { return static_cast<Button>(m_button); }
@@ -140,6 +140,7 @@
int32_t eventNumber() const { return m_eventNumber; }
int32_t menuTypeForEvent() const { return m_menuTypeForEvent; }
#endif
+ double force() const { return m_force; }
void encode(IPC::ArgumentEncoder&) const;
static bool decode(IPC::ArgumentDecoder&, WebMouseEvent&);
@@ -158,6 +159,7 @@
int32_t m_eventNumber;
int32_t m_menuTypeForEvent;
#endif
+ double m_force { 0 };
};
// FIXME: Move this class to its own header file.
Modified: trunk/Source/WebKit2/Shared/WebEventConversion.cpp (182747 => 182748)
--- trunk/Source/WebKit2/Shared/WebEventConversion.cpp 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit2/Shared/WebEventConversion.cpp 2015-04-13 19:17:48 UTC (rev 182748)
@@ -38,12 +38,15 @@
switch (webEvent.type()) {
case WebEvent::MouseDown:
m_type = WebCore::PlatformEvent::MousePressed;
+ m_force = WebCore::ForceAtClick;
break;
case WebEvent::MouseUp:
m_type = WebCore::PlatformEvent::MouseReleased;
+ m_force = WebCore::ForceAtClick;
break;
case WebEvent::MouseMove:
m_type = WebCore::PlatformEvent::MouseMoved;
+ m_force = webEvent.force();
break;
default:
ASSERT_NOT_REACHED();
Modified: trunk/Source/WebKit2/Shared/WebMouseEvent.cpp (182747 => 182748)
--- trunk/Source/WebKit2/Shared/WebMouseEvent.cpp 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit2/Shared/WebMouseEvent.cpp 2015-04-13 19:17:48 UTC (rev 182748)
@@ -48,9 +48,9 @@
}
#if PLATFORM(MAC)
-WebMouseEvent::WebMouseEvent(Type type, Button button, const IntPoint& position, const IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers modifiers, double timestamp, int eventNumber, int menuType)
+WebMouseEvent::WebMouseEvent(Type type, Button button, const IntPoint& position, const IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers modifiers, double timestamp, double force, int eventNumber, int menuType)
#else
-WebMouseEvent::WebMouseEvent(Type type, Button button, const IntPoint& position, const IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers modifiers, double timestamp)
+WebMouseEvent::WebMouseEvent(Type type, Button button, const IntPoint& position, const IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers modifiers, double timestamp, double force)
#endif
: WebEvent(type, modifiers, timestamp)
, m_button(button)
@@ -64,6 +64,7 @@
, m_eventNumber(eventNumber)
, m_menuTypeForEvent(menuType)
#endif
+ , m_force(force)
{
ASSERT(isMouseEventType(type));
}
@@ -83,6 +84,7 @@
encoder << m_eventNumber;
encoder << m_menuTypeForEvent;
#endif
+ encoder << m_force;
}
bool WebMouseEvent::decode(IPC::ArgumentDecoder& decoder, WebMouseEvent& result)
@@ -110,6 +112,8 @@
if (!decoder.decode(result.m_menuTypeForEvent))
return false;
#endif
+ if (!decoder.decode(result.m_force))
+ return false;
return true;
}
Modified: trunk/Source/WebKit2/Shared/mac/NativeWebMouseEventMac.mm (182747 => 182748)
--- trunk/Source/WebKit2/Shared/mac/NativeWebMouseEventMac.mm 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit2/Shared/mac/NativeWebMouseEventMac.mm 2015-04-13 19:17:48 UTC (rev 182748)
@@ -32,8 +32,8 @@
namespace WebKit {
-NativeWebMouseEvent::NativeWebMouseEvent(NSEvent* event, NSView* view)
- : WebMouseEvent(WebEventFactory::createWebMouseEvent(event, 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 (182747 => 182748)
--- trunk/Source/WebKit2/Shared/mac/WebEventFactory.h 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit2/Shared/mac/WebEventFactory.h 2015-04-13 19:17:48 UTC (rev 182748)
@@ -42,7 +42,7 @@
class WebEventFactory {
public:
#if USE(APPKIT)
- static WebMouseEvent createWebMouseEvent(NSEvent *, 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 (182747 => 182748)
--- trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm 2015-04-13 19:17:48 UTC (rev 182748)
@@ -358,7 +358,7 @@
return (static_cast<NSMenuType>(event.menuTypeForEvent()) == NSMenuTypeContextMenu);
}
-WebMouseEvent WebEventFactory::createWebMouseEvent(NSEvent *event, NSView *windowView)
+WebMouseEvent WebEventFactory::createWebMouseEvent(NSEvent *event, NSEvent *pressureEvent, NSView *windowView)
{
NSPoint position = pointForEvent(event, windowView);
NSPoint globalPosition = globalPointForEvent(event);
@@ -374,7 +374,12 @@
int eventNumber = [event eventNumber];
int menuTypeForEvent = typeForEvent(event);
- return WebMouseEvent(type, button, IntPoint(position), IntPoint(globalPosition), deltaX, deltaY, deltaZ, clickCount, modifiers, timestamp, eventNumber, menuTypeForEvent);
+ double force = 0;
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
+ 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);
}
WebWheelEvent WebEventFactory::createWebWheelEvent(NSEvent *event, NSView *windowView)
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (182747 => 182748)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2015-04-13 19:17:48 UTC (rev 182748)
@@ -224,6 +224,7 @@
bool _inResignFirstResponder;
BOOL _willBecomeFirstResponderAgain;
NSEvent *_mouseDownEvent;
+ NSEvent *_pressureEvent;
BOOL _ignoringMouseDraggedEvents;
id _flagsChangedEventMonitor;
@@ -1249,7 +1250,7 @@
if (handled) \
LOG(TextInput, "%s was handled by text input context", String(#Selector).substring(0, String(#Selector).find("Internal")).ascii().data()); \
else { \
- NativeWebMouseEvent webEvent(theEvent, self); \
+ NativeWebMouseEvent webEvent(theEvent, _data->_pressureEvent, self); \
_data->_page->handleMouseEvent(webEvent); \
} \
}]; \
@@ -1259,7 +1260,7 @@
[super Selector:theEvent]; \
return; \
} \
- NativeWebMouseEvent webEvent(theEvent, self); \
+ NativeWebMouseEvent webEvent(theEvent, _data->_pressureEvent, self); \
_data->_page->handleMouseEvent(webEvent); \
}
#define NATIVE_MOUSE_EVENT_HANDLER_INTERNAL(Selector) \
@@ -1272,13 +1273,13 @@
if (handled) \
LOG(TextInput, "%s was handled by text input context", String(#Selector).substring(0, String(#Selector).find("Internal")).ascii().data()); \
else { \
- NativeWebMouseEvent webEvent(theEvent, self); \
+ NativeWebMouseEvent webEvent(theEvent, _data->_pressureEvent, self); \
_data->_page->handleMouseEvent(webEvent); \
} \
}]; \
return; \
} \
- NativeWebMouseEvent webEvent(theEvent, self); \
+ NativeWebMouseEvent webEvent(theEvent, _data->_pressureEvent, self); \
_data->_page->handleMouseEvent(webEvent); \
}
#else
@@ -1295,7 +1296,7 @@
[super Selector:theEvent]; \
return; \
} \
- NativeWebMouseEvent webEvent(theEvent, self); \
+ NativeWebMouseEvent webEvent(theEvent, _data->_pressureEvent, self); \
_data->_page->handleMouseEvent(webEvent); \
}
#define NATIVE_MOUSE_EVENT_HANDLER_INTERNAL(Selector) \
@@ -1307,7 +1308,7 @@
LOG(TextInput, "%s was handled by text input context", String(#Selector).substring(0, String(#Selector).find("Internal")).ascii().data()); \
return; \
} \
- NativeWebMouseEvent webEvent(theEvent, self); \
+ NativeWebMouseEvent webEvent(theEvent, _data->_pressureEvent, self); \
_data->_page->handleMouseEvent(webEvent); \
}
#endif
@@ -1417,8 +1418,16 @@
- (void)pressureChangeWithEvent:(NSEvent *)event
{
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
- if (event.phase == NSEventPhaseChanged || event.phase == NSEventPhaseBegan || event.phase == NSEventPhaseEnded)
- _data->_page->inputDeviceForceDidChange(event.pressure, event.stage);
+ if (event == _data->_pressureEvent)
+ return;
+
+ if (event.phase != NSEventPhaseChanged && event.phase != NSEventPhaseBegan && event.phase != NSEventPhaseEnded)
+ return;
+
+ [_data->_pressureEvent release];
+ _data->_pressureEvent = [event retain];
+
+ _data->_page->inputDeviceForceDidChange(event.pressure, event.stage);
#endif
}
@@ -1433,7 +1442,7 @@
return NO;
[self _setMouseDownEvent:event];
- bool result = _data->_page->acceptsFirstMouse([event eventNumber], WebEventFactory::createWebMouseEvent(event, self));
+ bool result = _data->_page->acceptsFirstMouse([event eventNumber], WebEventFactory::createWebMouseEvent(event, _data->_pressureEvent, self));
[self _setMouseDownEvent:nil];
return result;
}
@@ -1454,7 +1463,7 @@
return NO;
[self _setMouseDownEvent:event];
- bool result = _data->_page->shouldDelayWindowOrderingForEvent(WebEventFactory::createWebMouseEvent(event, self));
+ bool result = _data->_page->shouldDelayWindowOrderingForEvent(WebEventFactory::createWebMouseEvent(event, _data->_pressureEvent, self));
[self _setMouseDownEvent:nil];
return result;
}
@@ -2970,7 +2979,7 @@
NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved location:[[flagsChangedEvent window] mouseLocationOutsideOfEventStream]
modifierFlags:[flagsChangedEvent modifierFlags] timestamp:[flagsChangedEvent timestamp] windowNumber:[flagsChangedEvent windowNumber]
context:[flagsChangedEvent context] eventNumber:0 clickCount:0 pressure:0];
- NativeWebMouseEvent webEvent(fakeEvent, self);
+ NativeWebMouseEvent webEvent(fakeEvent, _data->_pressureEvent, self);
_data->_page->handleMouseEvent(webEvent);
}
@@ -3775,6 +3784,7 @@
_data->_page->initializeWebPage();
_data->_mouseDownEvent = nil;
+ _data->_pressureEvent = nil;
_data->_ignoringMouseDraggedEvents = NO;
_data->_clipsToVisibleRect = NO;
_data->_useContentPreparationRectForVisibleRect = NO;
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm (182747 => 182748)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1458,7 +1458,7 @@
{
FrameView* frameView = webFrame()->coreFrame()->view();
IntPoint contentsPoint = frameView->contentsToRootView(point);
- WebMouseEvent event(WebEvent::MouseDown, WebMouseEvent::RightButton, contentsPoint, contentsPoint, 0, 0, 0, 1, static_cast<WebEvent::Modifiers>(0), monotonicallyIncreasingTime());
+ WebMouseEvent event(WebEvent::MouseDown, WebMouseEvent::RightButton, contentsPoint, contentsPoint, 0, 0, 0, 1, static_cast<WebEvent::Modifiers>(0), monotonicallyIncreasingTime(), WebCore::ForceAtClick);
return handleContextMenuEvent(event);
}
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (182747 => 182748)
--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp 2015-04-13 19:17:48 UTC (rev 182748)
@@ -887,7 +887,7 @@
if (event->metaKey())
modifiers |= WebEvent::MetaKey;
- return std::make_unique<WebMouseEvent>(type, button, m_plugin->convertToRootView(IntPoint(event->offsetX(), event->offsetY())), event->screenLocation(), 0, 0, 0, clickCount, static_cast<WebEvent::Modifiers>(modifiers), 0);
+ return std::make_unique<WebMouseEvent>(type, button, m_plugin->convertToRootView(IntPoint(event->offsetX(), event->offsetY())), event->screenLocation(), 0, 0, 0, clickCount, static_cast<WebEvent::Modifiers>(modifiers), 0, 0);
}
void PluginView::handleEvent(Event* event)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (182747 => 182748)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1090,7 +1090,7 @@
return;
const int singleClick = 1;
- RefPtr<MouseEvent> mouseEvent = MouseEvent::create(eventNames().clickEvent, true, true, currentTime(), nullptr, singleClick, screenPoint.x(), screenPoint.y(), documentPoint.x(), documentPoint.y(), false, false, false, false, 0, nullptr, nullptr);
+ RefPtr<MouseEvent> mouseEvent = MouseEvent::create(eventNames().clickEvent, true, true, currentTime(), nullptr, singleClick, screenPoint.x(), screenPoint.y(), documentPoint.x(), documentPoint.y(), false, false, false, false, 0, nullptr, 0, nullptr);
mainFrame->loader().urlSelected(mainFrameDocument->completeURL(url), emptyString(), mouseEvent.release(), LockHistory::No, LockBackForwardList::No, ShouldSendReferrer::MaybeSendReferrer);
}
@@ -1782,7 +1782,7 @@
corePage()->contextMenuController().clearContextMenu();
// Simulate a mouse click to generate the correct menu.
- PlatformMouseEvent mouseEvent(point, point, RightButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime());
+ PlatformMouseEvent mouseEvent(point, point, RightButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime(), WebCore::ForceAtClick);
bool handled = corePage()->userInputBridge().handleContextMenuEvent(mouseEvent, &corePage()->mainFrame());
if (!handled)
return 0;
@@ -3087,7 +3087,7 @@
if (!view)
return;
// FIXME: These are fake modifier keys here, but they should be real ones instead.
- PlatformMouseEvent event(adjustedClientPosition, adjustedGlobalPosition, LeftButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime());
+ PlatformMouseEvent event(adjustedClientPosition, adjustedGlobalPosition, LeftButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), 0);
m_page->mainFrame().eventHandler().dragSourceEndedAt(event, (DragOperation)operation);
}
@@ -4016,17 +4016,17 @@
void WebPage::simulateMouseDown(int button, WebCore::IntPoint position, int clickCount, WKEventModifiers modifiers, double time)
{
- mouseEvent(WebMouseEvent(WebMouseEvent::MouseDown, static_cast<WebMouseEvent::Button>(button), position, position, 0, 0, 0, clickCount, static_cast<WebMouseEvent::Modifiers>(modifiers), time));
+ mouseEvent(WebMouseEvent(WebMouseEvent::MouseDown, static_cast<WebMouseEvent::Button>(button), position, position, 0, 0, 0, clickCount, static_cast<WebMouseEvent::Modifiers>(modifiers), time, WebCore::ForceAtClick));
}
void WebPage::simulateMouseUp(int button, WebCore::IntPoint position, int clickCount, WKEventModifiers modifiers, double time)
{
- mouseEvent(WebMouseEvent(WebMouseEvent::MouseUp, static_cast<WebMouseEvent::Button>(button), position, position, 0, 0, 0, clickCount, static_cast<WebMouseEvent::Modifiers>(modifiers), time));
+ mouseEvent(WebMouseEvent(WebMouseEvent::MouseUp, static_cast<WebMouseEvent::Button>(button), position, position, 0, 0, 0, clickCount, static_cast<WebMouseEvent::Modifiers>(modifiers), time, WebCore::ForceAtClick));
}
void WebPage::simulateMouseMotion(WebCore::IntPoint position, double time)
{
- mouseEvent(WebMouseEvent(WebMouseEvent::MouseMove, WebMouseEvent::NoButton, position, position, 0, 0, 0, 0, WebMouseEvent::Modifiers(), time));
+ mouseEvent(WebMouseEvent(WebMouseEvent::MouseMove, WebMouseEvent::NoButton, position, position, 0, 0, 0, 0, WebMouseEvent::Modifiers(), time, 0));
}
void WebPage::setCompositionForTesting(const String& compositionString, uint64_t from, uint64_t length)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (182747 => 182748)
--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-04-13 19:17:48 UTC (rev 182748)
@@ -522,7 +522,7 @@
WKBeginObservingContentChanges(true);
- mainframe.eventHandler().mouseMoved(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, 0));
+ mainframe.eventHandler().mouseMoved(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, 0, WebCore::ForceAtClick));
mainframe.document()->updateStyleIfNeeded();
WKStopObservingContentChanges();
@@ -569,8 +569,8 @@
bool tapWasHandled = false;
m_lastInteractionLocation = roundedAdjustedPoint;
- tapWasHandled |= mainframe.eventHandler().handleMousePressEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MousePressed, 1, false, false, false, false, 0));
- tapWasHandled |= mainframe.eventHandler().handleMouseReleaseEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MouseReleased, 1, false, false, false, false, 0));
+ tapWasHandled |= mainframe.eventHandler().handleMousePressEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MousePressed, 1, false, false, false, false, 0, WebCore::ForceAtClick));
+ tapWasHandled |= mainframe.eventHandler().handleMouseReleaseEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MouseReleased, 1, false, false, false, false, 0, WebCore::ForceAtClick));
RefPtr<Frame> newFocusedFrame = m_page->focusController().focusedFrame();
RefPtr<Element> newFocusedElement = newFocusedFrame ? newFocusedFrame->document()->focusedElement() : nullptr;
@@ -685,7 +685,7 @@
IntPoint adjustedPoint = roundedIntPoint(position);
Frame& mainframe = m_page->mainFrame();
- mainframe.eventHandler().mouseMoved(PlatformMouseEvent(adjustedPoint, adjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, 0));
+ mainframe.eventHandler().mouseMoved(PlatformMouseEvent(adjustedPoint, adjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, 0, 0));
mainframe.document()->updateStyleIfNeeded();
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (182747 => 182748)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm 2015-04-13 19:12:48 UTC (rev 182747)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm 2015-04-13 19:17:48 UTC (rev 182748)
@@ -1148,13 +1148,13 @@
return;
float overallForce = stage < 1 ? force : force + stage - 1;
- element->dispatchMouseForceChanged(overallForce, m_page->mainFrame().eventHandler().lastMouseDownEvent());
+ element->dispatchMouseForceChanged(overallForce);
if (m_lastForceStage == 1 && stage == 2)
- element->dispatchMouseForceDown(m_page->mainFrame().eventHandler().lastMouseDownEvent());
+ element->dispatchMouseForceDown();
else if (m_lastForceStage == 2 && stage == 1) {
- element->dispatchMouseForceUp(m_page->mainFrame().eventHandler().lastMouseDownEvent());
- element->dispatchMouseForceClick(m_page->mainFrame().eventHandler().lastMouseDownEvent());
+ element->dispatchMouseForceUp();
+ element->dispatchMouseForceClick();
}
m_lastForceStage = stage;
@@ -1173,7 +1173,7 @@
if (!element)
return;
- element->dispatchMouseForceCancelled(m_page->mainFrame().eventHandler().lastMouseDownEvent());
+ element->dispatchMouseForceCancelled();
}
void WebPage::immediateActionDidComplete()