Changeset 182748 in webkit
- Timestamp:
- Apr 13, 2015 12:17:48 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 3 deleted
- 46 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r182743 r182748 1 2015-04-13 Beth Dakin <bdakin@apple.com> 2 3 Add force property to MouseEvents 4 https://bugs.webkit.org/show_bug.cgi?id=143569 5 -and corresponding- 6 rdar://problem/20472954 7 8 Reviewed by Darin Adler. 9 10 * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt: 11 * platform/mac/js/dom/global-constructors-attributes-expected.txt: 12 * platform/win/js/dom/global-constructors-attributes-expected.txt: 13 1 14 2015-04-13 Simon Fraser <simon.fraser@apple.com> 2 15 -
trunk/LayoutTests/platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt
r182180 r182748 2004 2004 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMediaKeys').enumerable is false 2005 2005 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMediaKeys').configurable is true 2006 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').value is WebKitMouseForceEvent2007 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').hasOwnProperty('get') is false2008 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').hasOwnProperty('set') is false2009 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').enumerable is false2010 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').configurable is true2011 2006 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMutationObserver').value is WebKitMutationObserver 2012 2007 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMutationObserver').hasOwnProperty('get') is false -
trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
r182180 r182748 2024 2024 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMediaKeys').enumerable is false 2025 2025 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMediaKeys').configurable is true 2026 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').value is WebKitMouseForceEvent2027 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').hasOwnProperty('get') is false2028 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').hasOwnProperty('set') is false2029 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').enumerable is false2030 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').configurable is true2031 2026 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMutationObserver').value is WebKitMutationObserver 2032 2027 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMutationObserver').hasOwnProperty('get') is false -
trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt
r182180 r182748 1809 1809 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMediaKeys').enumerable is false 1810 1810 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMediaKeys').configurable is true 1811 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').value is WebKitMouseForceEvent1812 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').hasOwnProperty('get') is false1813 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').hasOwnProperty('set') is false1814 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').enumerable is false1815 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMouseForceEvent').configurable is true1816 1811 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMutationObserver').value is WebKitMutationObserver 1817 1812 PASS Object.getOwnPropertyDescriptor(global, 'WebKitMutationObserver').hasOwnProperty('get') is false -
trunk/Source/WebCore/CMakeLists.txt
r182627 r182748 429 429 dom/UIEvent.idl 430 430 dom/WebKitAnimationEvent.idl 431 dom/WebKitMouseForceEvent.idl432 431 dom/WebKitNamedFlow.idl 433 432 dom/WebKitTransitionEvent.idl … … 1457 1456 dom/VisitedLinkState.cpp 1458 1457 dom/WebKitAnimationEvent.cpp 1459 dom/WebKitMouseForceEvent.cpp1460 1458 dom/WebKitNamedFlow.cpp 1461 1459 dom/WebKitTransitionEvent.cpp -
trunk/Source/WebCore/ChangeLog
r182747 r182748 1 2015-04-13 Beth Dakin <bdakin@apple.com> 2 3 Add force property to MouseEvents 4 https://bugs.webkit.org/show_bug.cgi?id=143569 5 -and corresponding- 6 rdar://problem/20472954 7 8 Reviewed by Darin Adler. 9 10 This patch removes WebKitMouseForceEvent and uses a MouseEvent everywhere that it 11 was used. That’s possible because this patch also adds a force property to all 12 MouseEvents and to PlatformMouseEvent. 13 14 Remove WebKitMouseForceEvent. 15 * CMakeLists.txt: 16 * DerivedSources.cpp: 17 * DerivedSources.make: 18 * WebCore.vcxproj/WebCore.vcxproj: 19 * WebCore.vcxproj/WebCore.vcxproj.filters: 20 * WebCore.xcodeproj/project.pbxproj: 21 * dom/DOMAllInOne.cpp: 22 23 Create MouseEvents with the appropriate force instead of WebKitMouseForceEvents. 24 This patch also gets rid of the PlatformMouseEvent parameter for these events. 25 They were re-using the cached mousedown event before, which they never should have 26 done. Instead, we create PlatformMouseEvents inside these functions and then use 27 that to make MouseEvents. 28 * dom/Element.cpp: 29 (WebCore::Element::dispatchMouseForceWillBegin): 30 (WebCore::Element::dispatchMouseForceChanged): 31 (WebCore::Element::dispatchMouseForceDown): 32 (WebCore::Element::dispatchMouseForceUp): 33 (WebCore::Element::dispatchMouseForceClick): 34 (WebCore::Element::dispatchMouseForceCancelled): 35 * dom/Element.h: 36 37 No More WebKitMouseForceEvent. 38 * dom/EventNames.in: 39 40 Add force to MouseEvent. 41 * dom/MouseEvent.cpp: 42 (WebCore::MouseEvent::create): 43 (WebCore::MouseEvent::MouseEvent): 44 (WebCore::MouseEvent::cloneFor): 45 (WebCore::SimulatedMouseEvent::SimulatedMouseEvent): 46 * dom/MouseEvent.h: 47 (WebCore::MouseEvent::force): 48 (WebCore::MouseEvent::setForce): 49 * dom/MouseEvent.idl: 50 51 No More WebKitMouseForceEvent. 52 * dom/WebKitMouseForceEvent.cpp: Removed. 53 * dom/WebKitMouseForceEvent.h: Removed. 54 * dom/WebKitMouseForceEvent.idl: Removed. 55 56 PlatformMouseEvent now takes a force parameter. 57 * dom/WheelEvent.cpp: 58 (WebCore::WheelEvent::WheelEvent): 59 * page/ContextMenuController.cpp: 60 (WebCore::ContextMenuController::showContextMenuAt): 61 * page/DragController.cpp: 62 (WebCore::createMouseEvent): 63 * page/EventHandler.cpp: 64 (WebCore::EventHandler::dispatchDragEvent): 65 (WebCore::EventHandler::sendContextMenuEventForKey): 66 (WebCore::EventHandler::fakeMouseMoveEventTimerFired): 67 68 We don’t need lastMouseDownEvent() anymore. We were using it to avoid creating new 69 PlatformMouseEvents for the force events, but we fix that in this patch. 70 (WebCore::EventHandler::lastMouseDownEvent): Deleted. 71 * page/EventHandler.h: 72 73 At force to PlatformMouseEvent. 74 * platform/PlatformMouseEvent.h: 75 (WebCore::PlatformMouseEvent::PlatformMouseEvent): 76 (WebCore::PlatformMouseEvent::force): 77 * replay/SerializationMethods.cpp: 78 (JSC::EncodingTraits<PlatformMouseEvent>::encodeValue): 79 (JSC::EncodingTraits<PlatformMouseEvent>::decodeValue): 80 1 81 2015-04-13 Andreas Kling <akling@apple.com> 2 82 -
trunk/Source/WebCore/DerivedSources.cpp
r182180 r182748 511 511 #include "JSWebKitCSSMatrix.cpp" 512 512 #include "JSWebKitCSSRegionRule.cpp" 513 #include "JSWebKitMouseForceEvent.cpp"514 513 #include "JSWebKitNamedFlow.cpp" 515 514 #include "JSWebKitPoint.cpp" -
trunk/Source/WebCore/DerivedSources.make
r182627 r182748 315 315 $(WebCore)/dom/UIEvent.idl \ 316 316 $(WebCore)/dom/WebKitAnimationEvent.idl \ 317 $(WebCore)/dom/WebKitMouseForceEvent.idl \318 317 $(WebCore)/dom/WebKitNamedFlow.idl \ 319 318 $(WebCore)/dom/WebKitTransitionEvent.idl \ -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r182351 r182748 6333 6333 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild> 6334 6334 </ClCompile> 6335 <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitMouseForceEvent.cpp">6336 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>6337 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>6338 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>6339 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>6340 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>6341 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>6342 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>6343 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>6344 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>6345 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>6346 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>6347 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>6348 </ClCompile>6349 6335 <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitNamedFlow.cpp"> 6350 6336 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> … … 14244 14230 </ClCompile> 14245 14231 <ClCompile Include="..\dom\WebKitAnimationEvent.cpp"> 14246 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>14247 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>14248 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>14249 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>14250 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>14251 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>14252 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>14253 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>14254 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>14255 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>14256 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>14257 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>14258 </ClCompile>14259 <ClCompile Include="..\dom\WebKitMouseForceEvent.cpp">14260 14232 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> 14261 14233 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> … … 19122 19094 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitCSSRegionRule.h" /> 19123 19095 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitCSSTransformValue.h" /> 19124 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitMouseForceEvent.h" />19125 19096 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitNamedFlow.h" /> 19126 19097 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitPoint.h" /> … … 21045 21016 <ClInclude Include="..\dom\ViewportArguments.h" /> 21046 21017 <ClInclude Include="..\dom\WebKitAnimationEvent.h" /> 21047 <ClInclude Include="..\dom\WebKitMouseForceEvent.h" />21048 21018 <ClInclude Include="..\dom\WebKitNamedFlow.h" /> 21049 21019 <ClInclude Include="..\dom\WebKitTransitionEvent.h" /> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r182351 r182748 3379 3379 <Filter>dom</Filter> 3380 3380 </ClCompile> 3381 <ClCompile Include="..\dom\WebKitMouseForceEvent.cpp">3382 <Filter>dom</Filter>3383 </ClCompile>3384 3381 <ClCompile Include="..\dom\WebKitNamedFlow.cpp"> 3385 3382 <Filter>dom</Filter> … … 6216 6213 </ClCompile> 6217 6214 <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitCSSTransformValue.cpp"> 6218 <Filter>DerivedSources</Filter>6219 </ClCompile>6220 <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitMouseForceEvent.cpp">6221 6215 <Filter>DerivedSources</Filter> 6222 6216 </ClCompile> … … 10495 10489 <Filter>dom</Filter> 10496 10490 </ClInclude> 10497 <ClInclude Include="..\dom\WebKitMouseForceEvent.h">10498 <Filter>dom</Filter>10499 </ClInclude>10500 10491 <ClInclude Include="..\dom\WebKitNamedFlow.h"> 10501 10492 <Filter>dom</Filter> … … 13600 13591 </ClInclude> 13601 13592 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitCSSTransformValue.h"> 13602 <Filter>DerivedSources</Filter>13603 </ClInclude>13604 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWebKitMouseForceEvent.h">13605 13593 <Filter>DerivedSources</Filter> 13606 13594 </ClInclude> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r182650 r182748 3428 3428 93CCF0270AF6C52900018E89 /* NavigationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CCF0260AF6C52900018E89 /* NavigationAction.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3429 3429 93CCF0600AF6CA7600018E89 /* NavigationAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93CCF05F0AF6CA7600018E89 /* NavigationAction.cpp */; }; 3430 93D200ED1AB8ED090025E851 /* WebKitMouseForceEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D200EB1AB8ED090025E851 /* WebKitMouseForceEvent.cpp */; };3431 93D200EE1AB8ED090025E851 /* WebKitMouseForceEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D200EC1AB8ED090025E851 /* WebKitMouseForceEvent.h */; };3432 93D200F21AB8F81F0025E851 /* JSWebKitMouseForceEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D200F01AB8F81F0025E851 /* JSWebKitMouseForceEvent.cpp */; };3433 93D200F31AB8F8200025E851 /* JSWebKitMouseForceEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D200F11AB8F81F0025E851 /* JSWebKitMouseForceEvent.h */; };3434 3430 93D3C1590F97A9D70053C013 /* DOMHTMLCanvasElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3C1580F97A9D70053C013 /* DOMHTMLCanvasElement.h */; }; 3435 3431 93D3C17D0F97AA760053C013 /* DOMHTMLCanvasElement.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 93D3C1580F97A9D70053C013 /* DOMHTMLCanvasElement.h */; }; … … 10680 10676 93CCF0260AF6C52900018E89 /* NavigationAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigationAction.h; sourceTree = "<group>"; }; 10681 10677 93CCF05F0AF6CA7600018E89 /* NavigationAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NavigationAction.cpp; sourceTree = "<group>"; }; 10682 93D200EB1AB8ED090025E851 /* WebKitMouseForceEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitMouseForceEvent.cpp; sourceTree = "<group>"; };10683 93D200EC1AB8ED090025E851 /* WebKitMouseForceEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitMouseForceEvent.h; sourceTree = "<group>"; };10684 93D200EF1AB8ED640025E851 /* WebKitMouseForceEvent.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebKitMouseForceEvent.idl; sourceTree = "<group>"; };10685 93D200F01AB8F81F0025E851 /* JSWebKitMouseForceEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitMouseForceEvent.cpp; sourceTree = "<group>"; };10686 93D200F11AB8F81F0025E851 /* JSWebKitMouseForceEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitMouseForceEvent.h; sourceTree = "<group>"; };10687 10678 93D3C1580F97A9D70053C013 /* DOMHTMLCanvasElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMHTMLCanvasElement.h; sourceTree = "<group>"; }; 10688 10679 93D9D53B0DA27E180077216C /* RangeBoundaryPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RangeBoundaryPoint.h; sourceTree = "<group>"; }; … … 19734 19725 31C0FF390E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.cpp */, 19735 19726 31C0FF3A0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.h */, 19736 93D200F01AB8F81F0025E851 /* JSWebKitMouseForceEvent.cpp */,19737 93D200F11AB8F81F0025E851 /* JSWebKitMouseForceEvent.h */,19738 19727 31C0FF3B0E4CEFAC007D6FE5 /* JSWebKitTransitionEvent.cpp */, 19739 19728 31C0FF3C0E4CEFAC007D6FE5 /* JSWebKitTransitionEvent.h */, … … 23208 23197 31C0FF1C0E4CEB6E007D6FE5 /* WebKitAnimationEvent.h */, 23209 23198 31C0FF1D0E4CEB6E007D6FE5 /* WebKitAnimationEvent.idl */, 23210 93D200EB1AB8ED090025E851 /* WebKitMouseForceEvent.cpp */,23211 93D200EC1AB8ED090025E851 /* WebKitMouseForceEvent.h */,23212 93D200EF1AB8ED640025E851 /* WebKitMouseForceEvent.idl */,23213 23199 D7613A4E1474F13F00DB8606 /* WebKitNamedFlow.cpp */, 23214 23200 D7613A4D1474F13F00DB8606 /* WebKitNamedFlow.h */, … … 24249 24235 BC1A37B6097C715F0019F3D8 /* DOMHTML.h in Headers */, 24250 24236 319848081A1E6CB500A13318 /* DOMAnimationEvent.h in Headers */, 24251 93D200F31AB8F8200025E851 /* JSWebKitMouseForceEvent.h in Headers */,24252 24237 85DF81270AA7787200486AD7 /* DOMHTMLAnchorElement.h in Headers */, 24253 24238 85E7119B0AC5D5350053270F /* DOMHTMLAnchorElementInternal.h in Headers */, … … 26614 26599 B2227A3C0D00BF220071B782 /* SVGLineElement.h in Headers */, 26615 26600 0810764412828556007C63BA /* SVGListProperty.h in Headers */, 26616 93D200EE1AB8ED090025E851 /* WebKitMouseForceEvent.h in Headers */,26617 26601 088A0E09126EF1DB00978F7A /* SVGListPropertyTearOff.h in Headers */, 26618 26602 B2227A410D00BF220071B782 /* SVGLocatable.h in Headers */, … … 27545 27529 2EDEF1F3121B0EFC00726DB2 /* BlobData.cpp in Sources */, 27546 27530 E1D31CDC19196020001005A3 /* BlobDataFileReference.cpp in Sources */, 27547 93D200ED1AB8ED090025E851 /* WebKitMouseForceEvent.cpp in Sources */,27548 27531 E164A2ED191AE6350010737D /* BlobDataFileReferenceMac.mm in Sources */, 27549 27532 E14A94D716DFDF950068DE82 /* BlobRegistry.cpp in Sources */, … … 27574 27557 4634592C1AC2271000ECB71C /* PowerObserverMac.cpp in Sources */, 27575 27558 5081E3C33CE580C16EF8B48B /* CachedResourceRequest.cpp in Sources */, 27576 93D200F21AB8F81F0025E851 /* JSWebKitMouseForceEvent.cpp in Sources */,27577 27559 6C638896A96CCEE50C8C946C /* CachedResourceRequestInitiators.cpp in Sources */, 27578 27560 BCB16C230979C3BD00467741 /* CachedScript.cpp in Sources */, -
trunk/Source/WebCore/dom/DOMAllInOne.cpp
r182351 r182748 149 149 #include "VisitedLinkState.cpp" 150 150 #include "WebKitAnimationEvent.cpp" 151 #include "WebKitMouseForceEvent.cpp"152 151 #include "WebKitNamedFlow.cpp" 153 152 #include "WebKitTransitionEvent.cpp" -
trunk/Source/WebCore/dom/Element.cpp
r182556 r182748 80 80 #include "TextIterator.h" 81 81 #include "VoidCallback.h" 82 #include "WebKitMouseForceEvent.h"83 82 #include "WheelEvent.h" 84 83 #include "XLinkNames.h" … … 2245 2244 return false; 2246 2245 2247 PlatformMouseEvent platformMouseEvent(frame->eventHandler().lastKnownMousePosition(), frame->eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime() );2248 RefPtr< Event> mouseForceWillBeginEvent = WebKitMouseForceEvent::create(eventNames().webkitmouseforcewillbeginEvent, 0, platformMouseEvent, document().defaultView());2246 PlatformMouseEvent platformMouseEvent(frame->eventHandler().lastKnownMousePosition(), frame->eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime(), ForceAtClick); 2247 RefPtr<MouseEvent> mouseForceWillBeginEvent = MouseEvent::create(eventNames().webkitmouseforcewillbeginEvent, document().defaultView(), platformMouseEvent, 0, nullptr); 2249 2248 mouseForceWillBeginEvent->setTarget(this); 2250 2249 dispatchEvent(mouseForceWillBeginEvent); … … 2255 2254 } 2256 2255 2257 void Element::dispatchMouseForceChanged(float force , const PlatformMouseEvent& platformMouseEvent)2256 void Element::dispatchMouseForceChanged(float force) 2258 2257 { 2259 2258 if (!document().hasListenerType(Document::FORCECHANGED_LISTENER)) 2260 2259 return; 2261 2260 2262 RefPtr<WebKitMouseForceEvent> mouseForceChangedEvent = WebKitMouseForceEvent::create(eventNames().webkitmouseforcechangedEvent, force, platformMouseEvent, document().defaultView()); 2261 Frame* frame = document().frame(); 2262 if (!frame) 2263 return; 2264 2265 PlatformMouseEvent platformMouseEvent(frame->eventHandler().lastKnownMousePosition(), frame->eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime(), force); 2266 RefPtr<MouseEvent> mouseForceChangedEvent = MouseEvent::create(eventNames().webkitmouseforcechangedEvent, document().defaultView(), platformMouseEvent, 0, nullptr); 2267 2263 2268 mouseForceChangedEvent->setTarget(this); 2264 2269 dispatchEvent(mouseForceChangedEvent); 2265 2270 } 2266 2271 2267 void Element::dispatchMouseForceDown( const PlatformMouseEvent& platformMouseEvent)2272 void Element::dispatchMouseForceDown() 2268 2273 { 2269 2274 if (!document().hasListenerType(Document::FORCEDOWN_LISTENER)) 2270 2275 return; 2271 2276 2272 RefPtr<Event> mouseForceDownEvent = WebKitMouseForceEvent::create(eventNames().webkitmouseforcedownEvent, 1, platformMouseEvent, document().defaultView()); 2277 Frame* frame = document().frame(); 2278 if (!frame) 2279 return; 2280 2281 PlatformMouseEvent platformMouseEvent(frame->eventHandler().lastKnownMousePosition(), frame->eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime(), ForceAtForceClick); 2282 RefPtr<MouseEvent> mouseForceDownEvent = MouseEvent::create(eventNames().webkitmouseforcedownEvent, document().defaultView(), platformMouseEvent, 0, nullptr); 2283 2273 2284 mouseForceDownEvent->setTarget(this); 2274 2285 dispatchEvent(mouseForceDownEvent); 2275 2286 } 2276 2287 2277 void Element::dispatchMouseForceUp( const PlatformMouseEvent& platformMouseEvent)2288 void Element::dispatchMouseForceUp() 2278 2289 { 2279 2290 if (!document().hasListenerType(Document::FORCEUP_LISTENER)) 2280 2291 return; 2281 2292 2282 RefPtr<Event> mouseForceUpEvent = WebKitMouseForceEvent::create(eventNames().webkitmouseforceupEvent, 1, platformMouseEvent, document().defaultView()); 2293 Frame* frame = document().frame(); 2294 if (!frame) 2295 return; 2296 2297 PlatformMouseEvent platformMouseEvent(frame->eventHandler().lastKnownMousePosition(), frame->eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime(), ForceAtForceClick); 2298 RefPtr<MouseEvent> mouseForceUpEvent = MouseEvent::create(eventNames().webkitmouseforceupEvent, document().defaultView(), platformMouseEvent, 0, nullptr); 2299 2283 2300 mouseForceUpEvent->setTarget(this); 2284 2301 dispatchEvent(mouseForceUpEvent); 2285 2302 } 2286 2303 2287 void Element::dispatchMouseForceClick( const PlatformMouseEvent& platformMouseEvent)2304 void Element::dispatchMouseForceClick() 2288 2305 { 2289 2306 if (!document().hasListenerType(Document::FORCECLICK_LISTENER)) 2290 2307 return; 2291 2308 2292 RefPtr<Event> mouseForceClickEvent = WebKitMouseForceEvent::create(eventNames().webkitmouseforceclickEvent, 1, platformMouseEvent, document().defaultView()); 2309 Frame* frame = document().frame(); 2310 if (!frame) 2311 return; 2312 2313 PlatformMouseEvent platformMouseEvent(frame->eventHandler().lastKnownMousePosition(), frame->eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime(), ForceAtForceClick); 2314 RefPtr<MouseEvent> mouseForceClickEvent = MouseEvent::create(eventNames().webkitmouseforceclickEvent, document().defaultView(), platformMouseEvent, 0, nullptr); 2315 2293 2316 mouseForceClickEvent->setTarget(this); 2294 2317 dispatchEvent(mouseForceClickEvent); 2295 2318 } 2296 2319 2297 void Element::dispatchMouseForceCancelled( const PlatformMouseEvent& platformMouseEvent)2320 void Element::dispatchMouseForceCancelled() 2298 2321 { 2299 2322 if (!document().hasListenerType(Document::FORCECANCELLED_LISTENER)) 2300 2323 return; 2301 2324 2302 RefPtr<Event> mouseForceCancelledEvent = WebKitMouseForceEvent::create(eventNames().webkitmouseforcecancelledEvent, 0, platformMouseEvent, document().defaultView()); 2325 Frame* frame = document().frame(); 2326 if (!frame) 2327 return; 2328 2329 PlatformMouseEvent platformMouseEvent(frame->eventHandler().lastKnownMousePosition(), frame->eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime(), 0); 2330 RefPtr<MouseEvent> mouseForceCancelledEvent = MouseEvent::create(eventNames().webkitmouseforcecancelledEvent, document().defaultView(), platformMouseEvent, 0, nullptr); 2331 2303 2332 mouseForceCancelledEvent->setTarget(this); 2304 2333 dispatchEvent(mouseForceCancelledEvent); … … 2312 2341 } 2313 2342 2314 void Element::dispatchMouseForceChanged(float , const PlatformMouseEvent&)2315 { 2316 } 2317 2318 void Element::dispatchMouseForceDown( const PlatformMouseEvent&)2319 { 2320 } 2321 2322 void Element::dispatchMouseForceUp( const PlatformMouseEvent&)2323 { 2324 } 2325 2326 void Element::dispatchMouseForceClick( const PlatformMouseEvent&)2327 { 2328 } 2329 2330 void Element::dispatchMouseForceCancelled( const PlatformMouseEvent&)2343 void Element::dispatchMouseForceChanged(float) 2344 { 2345 } 2346 2347 void Element::dispatchMouseForceDown() 2348 { 2349 } 2350 2351 void Element::dispatchMouseForceUp() 2352 { 2353 } 2354 2355 void Element::dispatchMouseForceClick() 2356 { 2357 } 2358 2359 void Element::dispatchMouseForceCancelled() 2331 2360 { 2332 2361 } -
trunk/Source/WebCore/dom/Element.h
r182215 r182748 470 470 471 471 WEBCORE_EXPORT bool dispatchMouseForceWillBegin(); 472 WEBCORE_EXPORT void dispatchMouseForceChanged(float force , const PlatformMouseEvent&);473 WEBCORE_EXPORT void dispatchMouseForceDown( const PlatformMouseEvent&);474 WEBCORE_EXPORT void dispatchMouseForceUp( const PlatformMouseEvent&);475 WEBCORE_EXPORT void dispatchMouseForceClick( const PlatformMouseEvent&);476 WEBCORE_EXPORT void dispatchMouseForceCancelled( const PlatformMouseEvent&);472 WEBCORE_EXPORT void dispatchMouseForceChanged(float force); 473 WEBCORE_EXPORT void dispatchMouseForceDown(); 474 WEBCORE_EXPORT void dispatchMouseForceUp(); 475 WEBCORE_EXPORT void dispatchMouseForceClick(); 476 WEBCORE_EXPORT void dispatchMouseForceCancelled(); 477 477 478 478 virtual bool willRecalcStyle(Style::Change); -
trunk/Source/WebCore/dom/EventNames.in
r181907 r182748 29 29 UIEvents interfaceName=UIEvent 30 30 WebKitAnimationEvent 31 WebKitMouseForceEvent32 31 WebKitTransitionEvent 33 32 WheelEvent -
trunk/Source/WebCore/dom/MouseEvent.cpp
r177264 r182748 67 67 #endif 68 68 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), event.button(), 69 relatedTarget );69 relatedTarget, event.force()); 70 70 } 71 71 … … 76 76 #endif 77 77 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, 78 PassRefPtr<EventTarget> relatedTarget )78 PassRefPtr<EventTarget> relatedTarget, double force) 79 79 80 80 { … … 84 84 movementX, movementY, 85 85 #endif 86 ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, 0, false);86 ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, force, 0, false); 87 87 } 88 88 … … 93 93 #endif 94 94 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, 95 PassRefPtr<EventTarget> relatedTarget, PassRefPtr<DataTransfer> dataTransfer, bool isSimulated)95 PassRefPtr<EventTarget> relatedTarget, double force, PassRefPtr<DataTransfer> dataTransfer, bool isSimulated) 96 96 { 97 97 return adoptRef(*new MouseEvent(type, canBubble, cancelable, timestamp, view, … … 100 100 movementX, movementY, 101 101 #endif 102 ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, dataTransfer, isSimulated));102 ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, force, dataTransfer, isSimulated)); 103 103 } 104 104 … … 115 115 #endif 116 116 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, 117 unsigned short button, PassRefPtr<EventTarget> relatedTarget, 117 unsigned short button, PassRefPtr<EventTarget> relatedTarget, double force, 118 118 PassRefPtr<DataTransfer> dataTransfer, bool isSimulated) 119 119 : MouseRelatedEvent(eventType, canBubble, cancelable, timestamp, view, detail, IntPoint(screenX, screenY), … … 126 126 , m_buttonDown(button != (unsigned short)-1) 127 127 , m_relatedTarget(relatedTarget) 128 , m_force(force) 128 129 , m_dataTransfer(dataTransfer) 129 130 { … … 255 256 // Nullifies relatedTarget. 256 257 0); 258 clonedMouseEvent->setForce(force()); 257 259 return clonedMouseEvent.release(); 258 260 } … … 272 274 0, 0, 273 275 #endif 274 false, false, false, false, 0, 0, 0, true)276 false, false, false, false, 0, 0, 0, 0, true) 275 277 { 276 278 if (UIEventWithKeyState* keyStateEvent = findEventWithKeyState(underlyingEvent.get())) { -
trunk/Source/WebCore/dom/MouseEvent.h
r177739 r182748 60 60 #endif 61 61 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, 62 PassRefPtr<EventTarget> relatedTarget );62 PassRefPtr<EventTarget> relatedTarget, double force); 63 63 64 64 WEBCORE_EXPORT static Ref<MouseEvent> create(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView>, … … 68 68 #endif 69 69 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, 70 PassRefPtr<EventTarget> relatedTarget, PassRefPtr<DataTransfer>, bool isSimulated = false);70 PassRefPtr<EventTarget> relatedTarget, double force, PassRefPtr<DataTransfer>, bool isSimulated = false); 71 71 72 72 WEBCORE_EXPORT static Ref<MouseEvent> create(const AtomicString& eventType, PassRefPtr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtr<Node> relatedTarget); … … 87 87 virtual EventTarget* relatedTarget() const override final { return m_relatedTarget.get(); } 88 88 void setRelatedTarget(PassRefPtr<EventTarget> relatedTarget) { m_relatedTarget = relatedTarget; } 89 89 double force() const { return m_force; } 90 void setForce(double force) { m_force = force; } 90 91 91 92 Node* toElement() const; … … 113 114 #endif 114 115 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, 115 PassRefPtr<EventTarget> relatedTarget, PassRefPtr<DataTransfer>, bool isSimulated);116 PassRefPtr<EventTarget> relatedTarget, double force, PassRefPtr<DataTransfer>, bool isSimulated); 116 117 117 118 MouseEvent(const AtomicString& type, const MouseEventInit&); … … 123 124 bool m_buttonDown; 124 125 RefPtr<EventTarget> m_relatedTarget; 126 double m_force { 0 }; 125 127 RefPtr<DataTransfer> m_dataTransfer; 126 128 }; -
trunk/Source/WebCore/dom/MouseEvent.idl
r170585 r182748 1 1 /* 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2015 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 34 34 [Conditional=POINTER_LOCK] readonly attribute long movementX; 35 35 [Conditional=POINTER_LOCK] readonly attribute long movementY; 36 [Conditional=MOUSE_FORCE_EVENTS]readonly attribute double force; 36 37 37 38 [ObjCLegacyUnnamedParameters] void initMouseEvent([Default=Undefined] optional DOMString type, -
trunk/Source/WebCore/dom/WheelEvent.cpp
r171685 r182748 71 71 , 0, 0 72 72 #endif 73 , event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), 0, 0, 0, false)73 , event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), 0, 0, 0, 0, false) 74 74 , m_wheelDelta(event.wheelTicksX() * TickMultiplier, event.wheelTicksY() * TickMultiplier) 75 75 , m_deltaX(-event.deltaX()) -
trunk/Source/WebCore/page/ContextMenuController.cpp
r182573 r182748 1434 1434 1435 1435 // Simulate a click in the middle of the accessibility object. 1436 PlatformMouseEvent mouseEvent(clickPoint, clickPoint, RightButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime() );1436 PlatformMouseEvent mouseEvent(clickPoint, clickPoint, RightButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime(), ForceAtClick); 1437 1437 frame->eventHandler().handleMousePressEvent(mouseEvent); 1438 1438 bool handled = frame->eventHandler().sendContextMenuEvent(mouseEvent); -
trunk/Source/WebCore/page/DragController.cpp
r181760 r182748 94 94 return PlatformMouseEvent(dragData.clientPosition(), dragData.globalPosition(), 95 95 LeftButton, PlatformEvent::MouseMoved, 0, shiftKey, ctrlKey, altKey, 96 metaKey, currentTime() );96 metaKey, currentTime(), ForceAtClick); 97 97 } 98 98 -
trunk/Source/WebCore/page/EventHandler.cpp
r182334 r182748 2160 2160 #endif 2161 2161 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), 2162 0, 0, dataTransfer);2162 0, 0, event.force(), dataTransfer); 2163 2163 2164 2164 dragTarget.dispatchEvent(me.get(), IGNORE_EXCEPTION); … … 2850 2850 #endif 2851 2851 2852 PlatformMouseEvent platformMouseEvent(position, globalPosition, RightButton, eventType, 1, false, false, false, false, WTF::currentTime() );2852 PlatformMouseEvent platformMouseEvent(position, globalPosition, RightButton, eventType, 1, false, false, false, false, WTF::currentTime(), ForceAtClick); 2853 2853 2854 2854 return !dispatchMouseEvent(eventNames().contextmenuEvent, targetNode, true, 0, platformMouseEvent, false); … … 2937 2937 bool metaKey; 2938 2938 PlatformKeyboardEvent::getCurrentModifierState(shiftKey, ctrlKey, altKey, metaKey); 2939 PlatformMouseEvent fakeMouseMoveEvent(m_lastKnownMousePosition, m_lastKnownMouseGlobalPosition, NoButton, PlatformEvent::MouseMoved, 0, shiftKey, ctrlKey, altKey, metaKey, currentTime() );2939 PlatformMouseEvent fakeMouseMoveEvent(m_lastKnownMousePosition, m_lastKnownMouseGlobalPosition, NoButton, PlatformEvent::MouseMoved, 0, shiftKey, ctrlKey, altKey, metaKey, currentTime(), 0); 2940 2940 mouseMoved(fakeMouseMoveEvent); 2941 2941 } … … 4021 4021 } 4022 4022 4023 const PlatformMouseEvent& EventHandler::lastMouseDownEvent() const4024 {4025 return m_mouseDown;4026 }4027 4028 4023 void EventHandler::setImmediateActionStage(ImmediateActionStage stage) 4029 4024 { -
trunk/Source/WebCore/page/EventHandler.h
r182334 r182748 313 313 314 314 WEBCORE_EXPORT void setImmediateActionStage(ImmediateActionStage stage); 315 WEBCORE_EXPORT const PlatformMouseEvent& lastMouseDownEvent() const;316 315 317 316 private: -
trunk/Source/WebCore/platform/PlatformMouseEvent.h
r182581 r182748 43 43 44 44 namespace WebCore { 45 45 46 const double ForceAtClick = 0; 47 const double ForceAtForceClick = 1; 48 46 49 // These button numbers match the ones used in the DOM API, 0 through 2, except for NoButton which isn't specified. 47 50 enum MouseButton : int8_t { NoButton = -1, LeftButton, MiddleButton, RightButton }; … … 64 67 65 68 PlatformMouseEvent(const IntPoint& position, const IntPoint& globalPosition, MouseButton button, PlatformEvent::Type type, 66 int clickCount, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey, double timestamp )69 int clickCount, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey, double timestamp, double force) 67 70 : PlatformEvent(type, shiftKey, ctrlKey, altKey, metaKey, timestamp) 68 71 , m_position(position) … … 71 74 , m_clickCount(clickCount) 72 75 , m_modifierFlags(0) 76 , m_force(force) 73 77 #if PLATFORM(MAC) 74 78 , m_eventNumber(0) … … 89 93 int clickCount() const { return m_clickCount; } 90 94 unsigned modifierFlags() const { return m_modifierFlags; } 95 double force() const { return m_force; } 91 96 92 97 … … 124 129 int m_clickCount; 125 130 unsigned m_modifierFlags; 131 double m_force { 0 }; 126 132 127 133 #if PLATFORM(MAC) -
trunk/Source/WebCore/replay/SerializationMethods.cpp
r181562 r182748 315 315 ENCODE_TYPE_WITH_KEY(encodedValue, bool, metaKey, input.metaKey()); 316 316 ENCODE_TYPE_WITH_KEY(encodedValue, int, timestamp, input.timestamp()); 317 ENCODE_TYPE_WITH_KEY(encodedValue, double, force, input.force()); 317 318 318 319 return encodedValue; … … 333 334 DECODE_TYPE_WITH_KEY(encodedValue, bool, metaKey); 334 335 DECODE_TYPE_WITH_KEY(encodedValue, int, timestamp); 336 DECODE_TYPE_WITH_KEY(encodedValue, double, force); 335 337 336 338 input = std::make_unique<PlatformMouseEvent>(IntPoint(positionX, positionY), 337 339 IntPoint(globalPositionX, globalPositionY), 338 340 button, type, clickCount, 339 shiftKey, ctrlKey, altKey, metaKey, timestamp );341 shiftKey, ctrlKey, altKey, metaKey, timestamp, force); 340 342 return true; 341 343 } -
trunk/Source/WebKit/ios/ChangeLog
r182207 r182748 1 2015-04-13 Beth Dakin <bdakin@apple.com> 2 3 Add force property to MouseEvents 4 https://bugs.webkit.org/show_bug.cgi?id=143569 5 -and corresponding- 6 rdar://problem/20472954 7 8 Reviewed by Darin Adler. 9 10 Send the appropriate force with this simulated click event. 11 * WebView/WebPDFViewPlaceholder.mm: 12 (-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]): 13 1 14 2015-03-31 Myles C. Maxfield <mmaxfield@apple.com> 2 15 -
trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.mm
r180110 r182748 472 472 0, 0, 473 473 #endif 474 false, false, false, false, 0, 0, 0, true);474 false, false, false, false, 0, 0, 0, 0, true); 475 475 476 476 // Call to the frame loader because this is where our security checks are made. -
trunk/Source/WebKit/mac/ChangeLog
r182735 r182748 1 2015-04-13 Beth Dakin <bdakin@apple.com> 2 3 Add force property to MouseEvents 4 https://bugs.webkit.org/show_bug.cgi?id=143569 5 -and corresponding- 6 rdar://problem/20472954 7 8 Reviewed by Darin Adler. 9 10 PlatformMouseEvent and MouseEvent now take force parameters. 11 * WebView/WebFrame.mm: 12 (-[WebFrame _dragSourceEndedAt:operation:]): 13 * WebView/WebPDFView.mm: 14 (-[WebPDFView PDFViewWillClickOnLink:withURL:]): 15 1 16 2015-04-12 Darin Adler <darin@apple.com> 2 17 -
trunk/Source/WebKit/mac/WebView/WebFrame.mm
r182544 r182748 967 967 // FIXME: These are fake modifier keys here, but they should be real ones instead. 968 968 PlatformMouseEvent event(IntPoint(windowLoc), globalPoint(windowLoc, [view->platformWidget() window]), 969 LeftButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime() );969 LeftButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), WebCore::ForceAtClick); 970 970 _private->coreFrame->eventHandler().dragSourceEndedAt(event, (DragOperation)operation); 971 971 } -
trunk/Source/WebKit/mac/WebView/WebPDFView.mm
r180110 r182748 1028 1028 [nsEvent modifierFlags] & NSShiftKeyMask, 1029 1029 [nsEvent modifierFlags] & NSCommandKeyMask, 1030 button, 0, 0, true);1030 button, 0, WebCore::ForceAtClick, 0, true); 1031 1031 } 1032 1032 -
trunk/Source/WebKit/win/ChangeLog
r182736 r182748 1 2015-04-13 Beth Dakin <bdakin@apple.com> 2 3 Add force property to MouseEvents 4 https://bugs.webkit.org/show_bug.cgi?id=143569 5 -and corresponding- 6 rdar://problem/20472954 7 8 Reviewed by Darin Adler. 9 10 PlatformMouseEvent takes a force parameter. 11 * WebDropSource.cpp: 12 (generateMouseEvent): 13 1 14 2015-04-13 Per Arne Vollan <peavo@outlook.com> 2 15 -
trunk/Source/WebKit/win/WebDropSource.cpp
r176892 r182748 102 102 ::ScreenToClient(viewWindow, reinterpret_cast<LPPOINT>(&localpt)); 103 103 return PlatformMouseEvent(IntPoint(localpt.x, localpt.y), IntPoint(pt.x, pt.y), 104 isDrag ? LeftButton : NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime() );104 isDrag ? LeftButton : NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), 0); 105 105 } 106 106 -
trunk/Source/WebKit2/ChangeLog
r182747 r182748 1 2015-04-13 Beth Dakin <bdakin@apple.com> 2 3 Add force property to MouseEvents 4 https://bugs.webkit.org/show_bug.cgi?id=143569 5 -and corresponding- 6 rdar://problem/20472954 7 8 Reviewed by Darin Adler. 9 10 In order to accommodate adding force to all PlatformMouseEvents, we have to add it 11 to pass a caches pressure event to NativeWebMouseEvent and add force to 12 WebMouseEvent. 13 14 NativeWebMouseEvent now requires a second NSEvent for the pressureEvent. 15 * Shared/NativeWebMouseEvent.h: 16 17 WebMouseEvent takes a force parameter. 18 * Shared/WebEvent.h: 19 (WebKit::WebMouseEvent::force): 20 * Shared/WebEventConversion.cpp: 21 (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): 22 * Shared/WebMouseEvent.cpp: 23 (WebKit::WebMouseEvent::WebMouseEvent): 24 (WebKit::WebMouseEvent::encode): 25 (WebKit::WebMouseEvent::decode): 26 * Shared/mac/NativeWebMouseEventMac.mm: 27 (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): 28 * Shared/mac/WebEventFactory.h: 29 * Shared/mac/WebEventFactory.mm: 30 (WebKit::WebEventFactory::createWebMouseEvent): 31 32 Cache the most recent pressureEvent in _data so that it can be sent along to the 33 NativeWebMouseEvent constructor. 34 * UIProcess/API/mac/WKView.mm: 35 (-[WKView pressureChangeWithEvent:]): 36 (-[WKView acceptsFirstMouse:]): 37 (-[WKView shouldDelayWindowOrderingForEvent:]): 38 (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): 39 (-[WKView initWithFrame:processPool:configuration:webView:]): 40 41 WebMouseEvent takes a force parameter. 42 * WebProcess/Plugins/PDF/PDFPlugin.mm: 43 (WebKit::PDFPlugin::showContextMenuAtPoint): 44 * WebProcess/Plugins/PluginView.cpp: 45 (WebKit::PluginView::createWebEvent): 46 47 MouseEvent and PlatformMouseEvent both take force parameters too. 48 * WebProcess/WebPage/WebPage.cpp: 49 (WebKit::WebPage::navigateToURLWithSimulatedClick): 50 (WebKit::WebPage::contextMenuAtPointInWindow): 51 (WebKit::WebPage::dragEnded): 52 (WebKit::WebPage::simulateMouseDown): 53 (WebKit::WebPage::simulateMouseUp): 54 (WebKit::WebPage::simulateMouseMotion): 55 56 The functions that dispatch the force events no longer take a PlatformMouseEvent 57 as a parameter. 58 * WebProcess/WebPage/mac/WebPageMac.mm: 59 (WebKit::WebPage::inputDeviceForceDidChange): 60 (WebKit::WebPage::immediateActionDidCancel): 61 1 62 2015-04-13 Andreas Kling <akling@apple.com> 2 63 -
trunk/Source/WebKit2/Shared/NativeWebMouseEvent.h
r166763 r182748 50 50 public: 51 51 #if USE(APPKIT) 52 NativeWebMouseEvent(NSEvent *, NS View *);52 NativeWebMouseEvent(NSEvent *, NSEvent *pressureEvent, NSView *); 53 53 #elif PLATFORM(GTK) 54 54 NativeWebMouseEvent(const NativeWebMouseEvent&); -
trunk/Source/WebKit2/Shared/WebEvent.h
r182581 r182748 125 125 126 126 #if PLATFORM(MAC) 127 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);127 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); 128 128 #else 129 WebMouseEvent(Type, Button, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers, double timestamp );129 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); 130 130 #endif 131 131 … … 141 141 int32_t menuTypeForEvent() const { return m_menuTypeForEvent; } 142 142 #endif 143 double force() const { return m_force; } 143 144 144 145 void encode(IPC::ArgumentEncoder&) const; … … 159 160 int32_t m_menuTypeForEvent; 160 161 #endif 162 double m_force { 0 }; 161 163 }; 162 164 -
trunk/Source/WebKit2/Shared/WebEventConversion.cpp
r182581 r182748 39 39 case WebEvent::MouseDown: 40 40 m_type = WebCore::PlatformEvent::MousePressed; 41 m_force = WebCore::ForceAtClick; 41 42 break; 42 43 case WebEvent::MouseUp: 43 44 m_type = WebCore::PlatformEvent::MouseReleased; 45 m_force = WebCore::ForceAtClick; 44 46 break; 45 47 case WebEvent::MouseMove: 46 48 m_type = WebCore::PlatformEvent::MouseMoved; 49 m_force = webEvent.force(); 47 50 break; 48 51 default: -
trunk/Source/WebKit2/Shared/WebMouseEvent.cpp
r182581 r182748 49 49 50 50 #if PLATFORM(MAC) 51 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)51 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) 52 52 #else 53 WebMouseEvent::WebMouseEvent(Type type, Button button, const IntPoint& position, const IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers modifiers, double timestamp )53 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) 54 54 #endif 55 55 : WebEvent(type, modifiers, timestamp) … … 65 65 , m_menuTypeForEvent(menuType) 66 66 #endif 67 , m_force(force) 67 68 { 68 69 ASSERT(isMouseEventType(type)); … … 84 85 encoder << m_menuTypeForEvent; 85 86 #endif 87 encoder << m_force; 86 88 } 87 89 … … 111 113 return false; 112 114 #endif 115 if (!decoder.decode(result.m_force)) 116 return false; 113 117 114 118 return true; -
trunk/Source/WebKit2/Shared/mac/NativeWebMouseEventMac.mm
r119349 r182748 33 33 namespace WebKit { 34 34 35 NativeWebMouseEvent::NativeWebMouseEvent(NSEvent * event, NSView*view)36 : WebMouseEvent(WebEventFactory::createWebMouseEvent(event, view))35 NativeWebMouseEvent::NativeWebMouseEvent(NSEvent *event, NSEvent *pressureEvent, NSView *view) 36 : WebMouseEvent(WebEventFactory::createWebMouseEvent(event, pressureEvent, view)) 37 37 , m_nativeEvent(event) 38 38 { -
trunk/Source/WebKit2/Shared/mac/WebEventFactory.h
r182581 r182748 43 43 public: 44 44 #if USE(APPKIT) 45 static WebMouseEvent createWebMouseEvent(NSEvent *, NS View *windowView);45 static WebMouseEvent createWebMouseEvent(NSEvent *, NSEvent *pressureEvent, NSView *windowView); 46 46 static WebWheelEvent createWebWheelEvent(NSEvent *, NSView *windowView); 47 47 static WebKeyboardEvent createWebKeyboardEvent(NSEvent *, bool handledByInputMethod, const Vector<WebCore::KeypressCommand>&); -
trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm
r182589 r182748 359 359 } 360 360 361 WebMouseEvent WebEventFactory::createWebMouseEvent(NSEvent *event, NS View *windowView)361 WebMouseEvent WebEventFactory::createWebMouseEvent(NSEvent *event, NSEvent *pressureEvent, NSView *windowView) 362 362 { 363 363 NSPoint position = pointForEvent(event, windowView); … … 375 375 int menuTypeForEvent = typeForEvent(event); 376 376 377 return WebMouseEvent(type, button, IntPoint(position), IntPoint(globalPosition), deltaX, deltaY, deltaZ, clickCount, modifiers, timestamp, eventNumber, menuTypeForEvent); 377 double force = 0; 378 #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003 379 force = pressureEvent.stage < 1 ? pressureEvent.pressure : pressureEvent.pressure + pressureEvent.stage - 1; 380 #endif 381 382 return WebMouseEvent(type, button, IntPoint(position), IntPoint(globalPosition), deltaX, deltaY, deltaZ, clickCount, modifiers, timestamp, force, eventNumber, menuTypeForEvent); 378 383 } 379 384 -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r182640 r182748 225 225 BOOL _willBecomeFirstResponderAgain; 226 226 NSEvent *_mouseDownEvent; 227 NSEvent *_pressureEvent; 227 228 BOOL _ignoringMouseDraggedEvents; 228 229 … … 1250 1251 LOG(TextInput, "%s was handled by text input context", String(#Selector).substring(0, String(#Selector).find("Internal")).ascii().data()); \ 1251 1252 else { \ 1252 NativeWebMouseEvent webEvent(theEvent, self); \1253 NativeWebMouseEvent webEvent(theEvent, _data->_pressureEvent, self); \ 1253 1254 _data->_page->handleMouseEvent(webEvent); \ 1254 1255 } \ … … 1260 1261 return; \ 1261 1262 } \ 1262 NativeWebMouseEvent webEvent(theEvent, self); \1263 NativeWebMouseEvent webEvent(theEvent, _data->_pressureEvent, self); \ 1263 1264 _data->_page->handleMouseEvent(webEvent); \ 1264 1265 } … … 1273 1274 LOG(TextInput, "%s was handled by text input context", String(#Selector).substring(0, String(#Selector).find("Internal")).ascii().data()); \ 1274 1275 else { \ 1275 NativeWebMouseEvent webEvent(theEvent, self); \1276 NativeWebMouseEvent webEvent(theEvent, _data->_pressureEvent, self); \ 1276 1277 _data->_page->handleMouseEvent(webEvent); \ 1277 1278 } \ … … 1279 1280 return; \ 1280 1281 } \ 1281 NativeWebMouseEvent webEvent(theEvent, self); \1282 NativeWebMouseEvent webEvent(theEvent, _data->_pressureEvent, self); \ 1282 1283 _data->_page->handleMouseEvent(webEvent); \ 1283 1284 } … … 1296 1297 return; \ 1297 1298 } \ 1298 NativeWebMouseEvent webEvent(theEvent, self); \1299 NativeWebMouseEvent webEvent(theEvent, _data->_pressureEvent, self); \ 1299 1300 _data->_page->handleMouseEvent(webEvent); \ 1300 1301 } … … 1308 1309 return; \ 1309 1310 } \ 1310 NativeWebMouseEvent webEvent(theEvent, self); \1311 NativeWebMouseEvent webEvent(theEvent, _data->_pressureEvent, self); \ 1311 1312 _data->_page->handleMouseEvent(webEvent); \ 1312 1313 } … … 1418 1419 { 1419 1420 #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003 1420 if (event.phase == NSEventPhaseChanged || event.phase == NSEventPhaseBegan || event.phase == NSEventPhaseEnded) 1421 _data->_page->inputDeviceForceDidChange(event.pressure, event.stage); 1421 if (event == _data->_pressureEvent) 1422 return; 1423 1424 if (event.phase != NSEventPhaseChanged && event.phase != NSEventPhaseBegan && event.phase != NSEventPhaseEnded) 1425 return; 1426 1427 [_data->_pressureEvent release]; 1428 _data->_pressureEvent = [event retain]; 1429 1430 _data->_page->inputDeviceForceDidChange(event.pressure, event.stage); 1422 1431 #endif 1423 1432 } … … 1434 1443 1435 1444 [self _setMouseDownEvent:event]; 1436 bool result = _data->_page->acceptsFirstMouse([event eventNumber], WebEventFactory::createWebMouseEvent(event, self));1445 bool result = _data->_page->acceptsFirstMouse([event eventNumber], WebEventFactory::createWebMouseEvent(event, _data->_pressureEvent, self)); 1437 1446 [self _setMouseDownEvent:nil]; 1438 1447 return result; … … 1455 1464 1456 1465 [self _setMouseDownEvent:event]; 1457 bool result = _data->_page->shouldDelayWindowOrderingForEvent(WebEventFactory::createWebMouseEvent(event, self));1466 bool result = _data->_page->shouldDelayWindowOrderingForEvent(WebEventFactory::createWebMouseEvent(event, _data->_pressureEvent, self)); 1458 1467 [self _setMouseDownEvent:nil]; 1459 1468 return result; … … 2971 2980 modifierFlags:[flagsChangedEvent modifierFlags] timestamp:[flagsChangedEvent timestamp] windowNumber:[flagsChangedEvent windowNumber] 2972 2981 context:[flagsChangedEvent context] eventNumber:0 clickCount:0 pressure:0]; 2973 NativeWebMouseEvent webEvent(fakeEvent, self);2982 NativeWebMouseEvent webEvent(fakeEvent, _data->_pressureEvent, self); 2974 2983 _data->_page->handleMouseEvent(webEvent); 2975 2984 } … … 3776 3785 3777 3786 _data->_mouseDownEvent = nil; 3787 _data->_pressureEvent = nil; 3778 3788 _data->_ignoringMouseDraggedEvents = NO; 3779 3789 _data->_clipsToVisibleRect = NO; -
trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm
r182746 r182748 1459 1459 FrameView* frameView = webFrame()->coreFrame()->view(); 1460 1460 IntPoint contentsPoint = frameView->contentsToRootView(point); 1461 WebMouseEvent event(WebEvent::MouseDown, WebMouseEvent::RightButton, contentsPoint, contentsPoint, 0, 0, 0, 1, static_cast<WebEvent::Modifiers>(0), monotonicallyIncreasingTime() );1461 WebMouseEvent event(WebEvent::MouseDown, WebMouseEvent::RightButton, contentsPoint, contentsPoint, 0, 0, 0, 1, static_cast<WebEvent::Modifiers>(0), monotonicallyIncreasingTime(), WebCore::ForceAtClick); 1462 1462 return handleContextMenuEvent(event); 1463 1463 } -
trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp
r182271 r182748 888 888 modifiers |= WebEvent::MetaKey; 889 889 890 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 );890 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); 891 891 } 892 892 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r182623 r182748 1091 1091 1092 1092 const int singleClick = 1; 1093 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);1093 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); 1094 1094 mainFrame->loader().urlSelected(mainFrameDocument->completeURL(url), emptyString(), mouseEvent.release(), LockHistory::No, LockBackForwardList::No, ShouldSendReferrer::MaybeSendReferrer); 1095 1095 } … … 1783 1783 1784 1784 // Simulate a mouse click to generate the correct menu. 1785 PlatformMouseEvent mouseEvent(point, point, RightButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime() );1785 PlatformMouseEvent mouseEvent(point, point, RightButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime(), WebCore::ForceAtClick); 1786 1786 bool handled = corePage()->userInputBridge().handleContextMenuEvent(mouseEvent, &corePage()->mainFrame()); 1787 1787 if (!handled) … … 3088 3088 return; 3089 3089 // FIXME: These are fake modifier keys here, but they should be real ones instead. 3090 PlatformMouseEvent event(adjustedClientPosition, adjustedGlobalPosition, LeftButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime() );3090 PlatformMouseEvent event(adjustedClientPosition, adjustedGlobalPosition, LeftButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), 0); 3091 3091 m_page->mainFrame().eventHandler().dragSourceEndedAt(event, (DragOperation)operation); 3092 3092 } … … 4017 4017 void WebPage::simulateMouseDown(int button, WebCore::IntPoint position, int clickCount, WKEventModifiers modifiers, double time) 4018 4018 { 4019 mouseEvent(WebMouseEvent(WebMouseEvent::MouseDown, static_cast<WebMouseEvent::Button>(button), position, position, 0, 0, 0, clickCount, static_cast<WebMouseEvent::Modifiers>(modifiers), time ));4019 mouseEvent(WebMouseEvent(WebMouseEvent::MouseDown, static_cast<WebMouseEvent::Button>(button), position, position, 0, 0, 0, clickCount, static_cast<WebMouseEvent::Modifiers>(modifiers), time, WebCore::ForceAtClick)); 4020 4020 } 4021 4021 4022 4022 void WebPage::simulateMouseUp(int button, WebCore::IntPoint position, int clickCount, WKEventModifiers modifiers, double time) 4023 4023 { 4024 mouseEvent(WebMouseEvent(WebMouseEvent::MouseUp, static_cast<WebMouseEvent::Button>(button), position, position, 0, 0, 0, clickCount, static_cast<WebMouseEvent::Modifiers>(modifiers), time ));4024 mouseEvent(WebMouseEvent(WebMouseEvent::MouseUp, static_cast<WebMouseEvent::Button>(button), position, position, 0, 0, 0, clickCount, static_cast<WebMouseEvent::Modifiers>(modifiers), time, WebCore::ForceAtClick)); 4025 4025 } 4026 4026 4027 4027 void WebPage::simulateMouseMotion(WebCore::IntPoint position, double time) 4028 4028 { 4029 mouseEvent(WebMouseEvent(WebMouseEvent::MouseMove, WebMouseEvent::NoButton, position, position, 0, 0, 0, 0, WebMouseEvent::Modifiers(), time ));4029 mouseEvent(WebMouseEvent(WebMouseEvent::MouseMove, WebMouseEvent::NoButton, position, position, 0, 0, 0, 0, WebMouseEvent::Modifiers(), time, 0)); 4030 4030 } 4031 4031 -
trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm
r182603 r182748 523 523 WKBeginObservingContentChanges(true); 524 524 525 mainframe.eventHandler().mouseMoved(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, 0 ));525 mainframe.eventHandler().mouseMoved(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, 0, WebCore::ForceAtClick)); 526 526 mainframe.document()->updateStyleIfNeeded(); 527 527 … … 570 570 bool tapWasHandled = false; 571 571 m_lastInteractionLocation = roundedAdjustedPoint; 572 tapWasHandled |= mainframe.eventHandler().handleMousePressEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MousePressed, 1, false, false, false, false, 0 ));573 tapWasHandled |= mainframe.eventHandler().handleMouseReleaseEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MouseReleased, 1, false, false, false, false, 0 ));572 tapWasHandled |= mainframe.eventHandler().handleMousePressEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MousePressed, 1, false, false, false, false, 0, WebCore::ForceAtClick)); 573 tapWasHandled |= mainframe.eventHandler().handleMouseReleaseEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MouseReleased, 1, false, false, false, false, 0, WebCore::ForceAtClick)); 574 574 575 575 RefPtr<Frame> newFocusedFrame = m_page->focusController().focusedFrame(); … … 686 686 Frame& mainframe = m_page->mainFrame(); 687 687 688 mainframe.eventHandler().mouseMoved(PlatformMouseEvent(adjustedPoint, adjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, 0 ));688 mainframe.eventHandler().mouseMoved(PlatformMouseEvent(adjustedPoint, adjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, 0, 0)); 689 689 mainframe.document()->updateStyleIfNeeded(); 690 690 } -
trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
r182674 r182748 1149 1149 1150 1150 float overallForce = stage < 1 ? force : force + stage - 1; 1151 element->dispatchMouseForceChanged(overallForce , m_page->mainFrame().eventHandler().lastMouseDownEvent());1151 element->dispatchMouseForceChanged(overallForce); 1152 1152 1153 1153 if (m_lastForceStage == 1 && stage == 2) 1154 element->dispatchMouseForceDown( m_page->mainFrame().eventHandler().lastMouseDownEvent());1154 element->dispatchMouseForceDown(); 1155 1155 else if (m_lastForceStage == 2 && stage == 1) { 1156 element->dispatchMouseForceUp( m_page->mainFrame().eventHandler().lastMouseDownEvent());1157 element->dispatchMouseForceClick( m_page->mainFrame().eventHandler().lastMouseDownEvent());1156 element->dispatchMouseForceUp(); 1157 element->dispatchMouseForceClick(); 1158 1158 } 1159 1159 … … 1174 1174 return; 1175 1175 1176 element->dispatchMouseForceCancelled( m_page->mainFrame().eventHandler().lastMouseDownEvent());1176 element->dispatchMouseForceCancelled(); 1177 1177 } 1178 1178
Note: See TracChangeset
for help on using the changeset viewer.