Changeset 64845 in webkit
- Timestamp:
- Aug 6, 2010 6:38:04 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 22 added
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64840 r64845 1 2010-08-06 Dean Jackson <dino@apple.com> 2 3 Reviewed by Simon Fraser and Steve Block 4 5 https://bugs.webkit.org/show_bug.cgi?id=42865 6 Implement DeviceMotionEvent 7 8 Add DeviceMotion and ondevicemotion testing to 9 the device-orientation test, and make sure the DeviceMotion 10 interface is not tested in the generic window object. 11 12 * fast/dom/Window/window-properties-device-orientation-expected.txt: 13 * fast/dom/Window/window-properties-device-orientation.html: 14 * fast/dom/Window/window-properties.html: 15 16 Add some tests for the DeviceMotionEvent interface. 17 18 * fast/dom/DeviceMotion/create-event-expected.txt: Added. 19 * fast/dom/DeviceMotion/create-event.html: Added. 20 * fast/dom/DeviceMotion/optional-event-properties-expected.txt: Added. 21 * fast/dom/DeviceMotion/optional-event-properties.html: Added. 22 * fast/dom/DeviceMotion/script-tests/TEMPLATE.html: Added. 23 * fast/dom/DeviceMotion/script-tests/create-event.js: Added. 24 * fast/dom/DeviceMotion/script-tests/optional-event-properties.js: Added. 25 * fast/dom/DeviceMotion/script-tests/window-property.js: Added. 26 * fast/dom/DeviceMotion/window-property-expected.txt: Added. 27 * fast/dom/DeviceMotion/window-property.html: Added. 28 29 Make sure these are skipped on Mac, Win, GTK and QT. 30 31 * platform/gtk/Skipped: 32 * platform/mac/Skipped: 33 * platform/qt/Skipped: 34 * platform/win/Skipped: 35 1 36 2010-08-06 Pavel Feldman <pfeldman@chromium.org> 2 37 -
trunk/LayoutTests/fast/dom/Window/window-properties-device-orientation-expected.txt
r62653 r64845 1 1 This test dumps all of the properties that are reachable from the window.DeviceOrientationEvent and window.ondeviceorientation objects, along with their types. 2 2 3 window.DeviceMotionEvent [function] 4 window.ondevicemotion [null] 3 5 window.DeviceOrientationEvent [function] 4 6 window.ondeviceorientation [null] -
trunk/LayoutTests/fast/dom/Window/window-properties-device-orientation.html
r62653 r64845 1 <p>This test dumps all of the properties that are reachable from the window.DeviceOrientationEvent and window.ondeviceorientation objects, along with their types.</p> 1 <p>This test dumps all of the properties that are reachable from the window.DeviceMotionEvent window.ondevicemotion, window.DeviceOrientationEvent and window.ondeviceorientation objects, along with their types. 2 These properties are currently guarded by ENABLE_DEVICE_ORIENTATION.</p> 2 3 <hr> 3 4 <pre id="pre"></pre> … … 89 90 } 90 91 92 logValue('window.DeviceMotionEvent'); 93 logValue('window.ondevicemotion'); 91 94 logValue('window.DeviceOrientationEvent'); 92 95 logValue('window.ondeviceorientation'); -
trunk/LayoutTests/fast/dom/Window/window-properties.html
r64766 r64845 87 87 "window.DeviceOrientationEvent" : 1, 88 88 "window.ondeviceorientation" : 1, 89 "window.DeviceMotionEvent" : 1, 90 "window.ondevicemotion" : 1, 89 91 "window.webkitPerformance" : 1, 90 92 -
trunk/LayoutTests/platform/gtk/Skipped
r64815 r64845 1082 1082 fast/dom/cssTarget-crash.html 1083 1083 fast/dom/frame-loading-via-document-write.html 1084 fast/dom/DeviceMotion/create-event.html 1085 fast/dom/DeviceMotion/optional-event-properties.html 1086 fast/dom/DeviceMotion/window-property.html 1084 1087 fast/dom/DeviceOrientation/basic-operation.html 1085 1088 fast/dom/DeviceOrientation/create-event.html -
trunk/LayoutTests/platform/mac/Skipped
r64434 r64845 241 241 storage/indexeddb 242 242 243 # This port doesn't support DeviceOrientation. 243 # This port doesn't support DeviceMotion or DeviceOrientation. 244 fast/dom/DeviceMotion 244 245 fast/dom/DeviceOrientation 245 246 fast/dom/Window/window-properties-device-orientation.html -
trunk/LayoutTests/platform/qt/Skipped
r64766 r64845 79 79 # =========================================================================== # 80 80 81 # This port doesn't support DeviceOrientation. 81 # This port doesn't support DeviceMotion or DeviceOrientation. 82 fast/dom/DeviceMotion 82 83 fast/dom/DeviceOrientation 83 84 fast/dom/Window/window-properties-device-orientation.html -
trunk/LayoutTests/platform/win/Skipped
r64766 r64845 875 875 storage/indexeddb 876 876 877 # This port doesn't support DeviceOrientation. 877 # This port doesn't support DeviceMotion or DeviceOrientation. 878 fast/dom/DeviceMotion 878 879 fast/dom/DeviceOrientation 879 880 fast/dom/Window/window-properties-device-orientation.html -
trunk/WebCore/Android.derived.jscbindings.mk
r64828 r64845 106 106 $(intermediates)/dom/JSDOMImplementation.h \ 107 107 $(intermediates)/dom/JSDOMStringList.h \ 108 $(intermediates)/dom/JSDeviceMotionEvent.h \ 108 109 $(intermediates)/dom/JSDeviceOrientationEvent.h \ 109 110 $(intermediates)/dom/JSDocument.h \ -
trunk/WebCore/Android.derived.v8bindings.mk
r64828 r64845 87 87 $(intermediates)/bindings/V8DOMImplementation.h \ 88 88 $(intermediates)/bindings/V8DOMStringList.h \ 89 $(intermediates)/bindings/V8DeviceMotionEvent.h \ 89 90 $(intermediates)/bindings/V8DeviceOrientationEvent.h \ 90 91 $(intermediates)/bindings/V8Document.h \ -
trunk/WebCore/Android.jscbindings.mk
r64840 r64845 94 94 bindings/js/JSDedicatedWorkerContextCustom.cpp \ 95 95 bindings/js/JSDesktopNotificationsCustom.cpp \ 96 bindings/js/JSDeviceMotionEventCustom.cpp \ 96 97 bindings/js/JSDeviceOrientationEventCustom.cpp \ 97 98 bindings/js/JSDocumentCustom.cpp \ -
trunk/WebCore/Android.mk
r64828 r64845 118 118 dom/DOMStringList.cpp \ 119 119 dom/DecodedDataDocumentParser.cpp \ 120 dom/DeviceMotionController.cpp \ 121 dom/DeviceMotionData.cpp \ 122 dom/DeviceMotionEvent.cpp \ 120 123 dom/Document.cpp \ 121 124 dom/DocumentFragment.cpp \ -
trunk/WebCore/Android.v8bindings.mk
r64840 r64845 109 109 bindings/v8/custom/V8DatabaseCustom.cpp \ 110 110 bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp \ 111 bindings/v8/custom/V8DeviceMotionEventCustom.cpp \ 111 112 bindings/v8/custom/V8DeviceOrientationEventCustom.cpp \ 112 113 bindings/v8/custom/V8DocumentCustom.cpp \ -
trunk/WebCore/CMakeLists.txt
r64840 r64845 145 145 dom/CompositionEvent.idl 146 146 dom/CustomEvent.idl 147 dom/DeviceMotionEvent.idl 147 148 dom/DeviceOrientationEvent.idl 148 149 dom/DocumentFragment.idl … … 597 598 bindings/js/JSDebugWrapperSet.cpp 598 599 bindings/js/JSDedicatedWorkerContextCustom.cpp 600 bindings/js/JSDeviceMotionEventCustom.cpp 599 601 bindings/js/JSDeviceOrientationEventCustom.cpp 600 602 bindings/js/JSDocumentCustom.cpp … … 792 794 dom/DatasetDOMStringMap.cpp 793 795 dom/DecodedDataDocumentParser.cpp 796 dom/DeviceMotionController.cpp 797 dom/DeviceMotionData.cpp 798 dom/DeviceMotionEvent.cpp 794 799 dom/DeviceOrientation.cpp 795 800 dom/DeviceOrientationController.cpp -
trunk/WebCore/ChangeLog
r64844 r64845 1 2010-08-06 Dean Jackson <dino@apple.com> 2 3 Reviewed by Simon Fraser and Steve Block. 4 5 https://bugs.webkit.org/show_bug.cgi?id=42865 6 Implement DeviceMotionEvent 7 8 Implement the DeviceMotionEvent interface as defined 9 in http://dev.w3.org/geo/api/spec-source-orientation.html 10 This is currently an empty implementation, in that there is 11 no motion client connected - the platform implementations 12 will need to do that. 13 14 Tests: fast/dom/DeviceMotion/create-event.html 15 fast/dom/DeviceMotion/optional-event-properties.html 16 fast/dom/DeviceMotion/window-property.html 17 18 * Android.derived.jscbindings.mk: 19 * Android.derived.v8bindings.mk: 20 * Android.jscbindings.mk: 21 * Android.mk: 22 * Android.v8bindings.mk: 23 * CMakeLists.txt: 24 * Configurations/FeatureDefines.xcconfig: 25 * DerivedSources.make: 26 * GNUmakefile.am: 27 * WebCore.gypi: 28 * WebCore.pro: 29 * WebCore.vcproj/WebCore.vcproj: 30 * WebCore.xcodeproj/project.pbxproj: 31 - Add new files for DeviceMotionEvent build support 32 * bindings/generic/RuntimeEnabledFeatures.cpp: 33 * bindings/generic/RuntimeEnabledFeatures.h: 34 - new runtime flags for device motion 35 * bindings/js/JSDeviceMotionEventCustom.cpp: Added. 36 * bindings/v8/custom/V8DeviceMotionEventCustom.cpp: Added. 37 - Custom JS binding to translate property access through 38 to the DeviceMotionData object that the Event holds 39 * bindings/js/JSEventCustom.cpp: 40 - Include the custom code for DeviceMotionEvent 41 * dom/DeviceMotionClient.h: Added. 42 - Pure virtual client for DeviceMotion access 43 * dom/DeviceMotionController.cpp: Added. 44 * dom/DeviceMotionController.h: Added. 45 - Controller class that manages event dispatch 46 * dom/DeviceMotionData.cpp: Added. 47 * dom/DeviceMotionData.h: Added. 48 - Representation of the data that comes from a device motion 49 client that is then used within the event. 50 * dom/DeviceMotionEvent.cpp: Added. 51 * dom/DeviceMotionEvent.h: Added. 52 * dom/DeviceMotionEvent.idl: Added. 53 - The actual event implementation 54 * dom/Document.cpp: 55 (WebCore::Document::createEvent): 56 - Update createEvent to allow "devicemotion" events 57 * dom/Event.cpp: 58 * dom/Event.h: 59 - isDeviceMotionEvent virtual method 60 * dom/EventNames.h: 61 - new "devicemotion" event type 62 * page/DOMWindow.cpp: 63 (WebCore::DOMWindow::addEventListener): 64 * page/DOMWindow.h: 65 * page/DOMWindow.idl: 66 - allow creation of "devicemotion" events and pass registration 67 through to the Page's deviceMotionController object 68 * page/Page.cpp: 69 * page/Page.h: 70 - new PageClient for deviceMotionController 71 1 72 2010-08-06 Kavita Kanetkar <kkanetkar@chromium.org> 2 73 -
trunk/WebCore/DerivedSources.make
r64828 r64845 128 128 DatabaseCallback \ 129 129 DatabaseSync \ 130 DeviceMotionEvent \ 130 131 DeviceOrientationEvent \ 131 132 Document \ -
trunk/WebCore/GNUmakefile.am
r64840 r64845 182 182 DerivedSources/WebCore/JSDedicatedWorkerContext.cpp \ 183 183 DerivedSources/WebCore/JSDedicatedWorkerContext.h \ 184 DerivedSources/WebCore/JSDeviceMotionEvent.cpp \ 185 DerivedSources/WebCore/JSDeviceMotionEvent.h \ 184 186 DerivedSources/WebCore/JSDeviceOrientationEvent.cpp \ 185 187 DerivedSources/WebCore/JSDeviceOrientationEvent.h \ … … 672 674 WebCore/bindings/js/JSDOMWrapper.cpp \ 673 675 WebCore/bindings/js/JSDOMWrapper.h \ 676 WebCore/bindings/js/JSDeviceMotionEventCustom.cpp \ 674 677 WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp \ 675 678 WebCore/bindings/js/JSDocumentCustom.cpp \ … … 1020 1023 WebCore/dom/DecodedDataDocumentParser.cpp \ 1021 1024 WebCore/dom/DecodedDataDocumentParser.h \ 1025 WebCore/dom/DeviceMotionClient.h \ 1026 WebCore/dom/DeviceMotionController.cpp \ 1027 WebCore/dom/DeviceMotionController.h \ 1028 WebCore/dom/DeviceMotionData.cpp \ 1029 WebCore/dom/DeviceMotionData.h \ 1030 WebCore/dom/DeviceMotionEvent.cpp \ 1031 WebCore/dom/DeviceMotionEvent.h \ 1022 1032 WebCore/dom/DeviceOrientation.cpp \ 1023 1033 WebCore/dom/DeviceOrientation.h \ -
trunk/WebCore/WebCore.exp.in
r64803 r64845 406 406 __ZN7WebCore17CredentialStorage3getERKNS_15ProtectionSpaceE 407 407 __ZN7WebCore17DOMImplementation14isTextMIMETypeERKNS_6StringE 408 __ZN7WebCore16DeviceMotionData6createEbdbdbdbdbdbdbd 408 409 __ZN7WebCore17DeviceOrientation6createEbdbdbd 409 410 __ZN7WebCore17GlyphPageTreeNode18treeGlyphPageCountEv -
trunk/WebCore/WebCore.gypi
r64840 r64845 44 44 'dom/DOMStringList.idl', 45 45 'dom/DOMStringMap.idl', 46 'dom/DeviceMotionEvent.idl', 46 47 'dom/DeviceOrientationEvent.idl', 47 48 'dom/Document.idl', … … 551 552 'bindings/js/JSDebugWrapperSet.cpp', 552 553 'bindings/js/JSDebugWrapperSet.h', 554 'bindings/js/JSDeviceMotionEventCustom.cpp', 553 555 'bindings/js/JSDeviceOrientationEventCustom.cpp', 554 556 'bindings/js/JSDocumentCustom.cpp', … … 745 747 'bindings/v8/custom/V8DataGridColumnListCustom.cpp', 746 748 'bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp', 749 'bindings/v8/custom/V8DeviceMotionEventCustom.cpp', 747 750 'bindings/v8/custom/V8DeviceOrientationEventCustom.cpp', 748 751 'bindings/v8/custom/V8DocumentLocationCustom.cpp', … … 1126 1129 'dom/DecodedDataDocumentParser.cpp', 1127 1130 'dom/DecodedDataDocumentParser.h', 1131 'dom/DeviceMotionClient.h', 1132 'dom/DeviceMotionController.cpp', 1133 'dom/DeviceMotionController.h', 1134 'dom/DeviceMotionData.cpp', 1135 'dom/DeviceMotionData.h', 1136 'dom/DeviceMotionEvent.cpp', 1137 'dom/DeviceMotionEvent.h', 1128 1138 'dom/DeviceOrientation.cpp', 1129 1139 'dom/DeviceOrientation.h', -
trunk/WebCore/WebCore.pri
r64828 r64845 294 294 dom/CompositionEvent.idl \ 295 295 dom/CustomEvent.idl \ 296 dom/DeviceMotionEvent.idl \ 296 297 dom/DeviceOrientationEvent.idl \ 297 298 dom/DocumentFragment.idl \ -
trunk/WebCore/WebCore.pro
r64840 r64845 302 302 bindings/js/JSDebugWrapperSet.cpp \ 303 303 bindings/js/JSDesktopNotificationsCustom.cpp \ 304 bindings/js/JSDeviceMotionEventCustom.cpp \ 304 305 bindings/js/JSDeviceOrientationEventCustom.cpp \ 305 306 bindings/js/JSDocumentCustom.cpp \ … … 479 480 dom/CustomEvent.cpp \ 480 481 dom/DecodedDataDocumentParser.cpp \ 482 dom/DeviceMotionController.cpp \ 483 dom/DeviceMotionData.cpp \ 484 dom/DeviceMotionEvent.cpp \ 481 485 dom/DeviceOrientation.cpp \ 482 486 dom/DeviceOrientationController.cpp \ … … 1242 1246 dom/CustomEvent.h \ 1243 1247 dom/default/PlatformMessagePortChannel.h \ 1248 dom/DeviceMotionClient.h \ 1249 dom/DeviceMotionData.h \ 1250 dom/DeviceMotionController.h \ 1251 dom/DeviceMotionEvent.h \ 1244 1252 dom/DeviceOrientation.h \ 1245 1253 dom/DeviceOrientationClient.h \ -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r64840 r64845 2906 2906 </File> 2907 2907 <File 2908 RelativePath="$(WebKitOutputDir)\obj\WebCore\DerivedSources\JSDeviceMotionEvent.cpp" 2909 > 2910 <FileConfiguration 2911 Name="Debug|Win32" 2912 ExcludedFromBuild="true" 2913 > 2914 <Tool 2915 Name="VCCLCompilerTool" 2916 /> 2917 </FileConfiguration> 2918 <FileConfiguration 2919 Name="Release|Win32" 2920 ExcludedFromBuild="true" 2921 > 2922 <Tool 2923 Name="VCCLCompilerTool" 2924 /> 2925 </FileConfiguration> 2926 <FileConfiguration 2927 Name="Debug_Internal|Win32" 2928 ExcludedFromBuild="true" 2929 > 2930 <Tool 2931 Name="VCCLCompilerTool" 2932 /> 2933 </FileConfiguration> 2934 <FileConfiguration 2935 Name="Debug_Cairo|Win32" 2936 ExcludedFromBuild="true" 2937 > 2938 <Tool 2939 Name="VCCLCompilerTool" 2940 /> 2941 </FileConfiguration> 2942 <FileConfiguration 2943 Name="Release_Cairo|Win32" 2944 ExcludedFromBuild="true" 2945 > 2946 <Tool 2947 Name="VCCLCompilerTool" 2948 /> 2949 </FileConfiguration> 2950 <FileConfiguration 2951 Name="Debug_All|Win32" 2952 ExcludedFromBuild="true" 2953 > 2954 <Tool 2955 Name="VCCLCompilerTool" 2956 /> 2957 </FileConfiguration> 2958 </File> 2959 <File 2960 RelativePath="$(WebKitOutputDir)\obj\WebCore\DerivedSources\JSDeviceMotionEvent.h" 2961 > 2962 </File> 2963 <File 2908 2964 RelativePath="$(WebKitOutputDir)\obj\WebCore\DerivedSources\JSDeviceOrientationEvent.cpp" 2909 2965 > … … 32654 32710 </File> 32655 32711 <File 32712 RelativePath="..\dom\DeviceMotionClient.h" 32713 > 32714 </File> 32715 <File 32716 RelativePath="..\dom\DeviceMotionController.cpp" 32717 > 32718 </File> 32719 <File 32720 RelativePath="..\dom\DeviceMotionController.h" 32721 > 32722 </File> 32723 <File 32724 RelativePath="..\dom\DeviceMotionData.cpp" 32725 > 32726 </File> 32727 <File 32728 RelativePath="..\dom\DeviceMotionData.h" 32729 > 32730 </File> 32731 <File 32732 RelativePath="..\dom\DeviceMotionEvent.cpp" 32733 > 32734 </File> 32735 <File 32736 RelativePath="..\dom\DeviceMotionEvent.h" 32737 > 32738 </File> 32739 <File 32656 32740 RelativePath="..\dom\DeviceOrientation.cpp" 32657 32741 > … … 42398 42482 <File 42399 42483 RelativePath="..\bindings\js\JSDesktopNotificationsCustom.cpp" 42484 > 42485 <FileConfiguration 42486 Name="Debug|Win32" 42487 ExcludedFromBuild="true" 42488 > 42489 <Tool 42490 Name="VCCLCompilerTool" 42491 /> 42492 </FileConfiguration> 42493 <FileConfiguration 42494 Name="Release|Win32" 42495 ExcludedFromBuild="true" 42496 > 42497 <Tool 42498 Name="VCCLCompilerTool" 42499 /> 42500 </FileConfiguration> 42501 <FileConfiguration 42502 Name="Debug_Internal|Win32" 42503 ExcludedFromBuild="true" 42504 > 42505 <Tool 42506 Name="VCCLCompilerTool" 42507 /> 42508 </FileConfiguration> 42509 <FileConfiguration 42510 Name="Debug_Cairo|Win32" 42511 ExcludedFromBuild="true" 42512 > 42513 <Tool 42514 Name="VCCLCompilerTool" 42515 /> 42516 </FileConfiguration> 42517 <FileConfiguration 42518 Name="Release_Cairo|Win32" 42519 ExcludedFromBuild="true" 42520 > 42521 <Tool 42522 Name="VCCLCompilerTool" 42523 /> 42524 </FileConfiguration> 42525 <FileConfiguration 42526 Name="Debug_All|Win32" 42527 ExcludedFromBuild="true" 42528 > 42529 <Tool 42530 Name="VCCLCompilerTool" 42531 /> 42532 </FileConfiguration> 42533 </File> 42534 <File 42535 RelativePath="..\bindings\js\JSDeviceMotionEventCustom.cpp" 42400 42536 > 42401 42537 <FileConfiguration -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r64840 r64845 751 751 31C0FF4D0E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31C0FF470E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.mm */; }; 752 752 31C0FF4E0E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF480E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h */; }; 753 31FB1A57120A5D0600DC02A0 /* DeviceMotionClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31FB1A4F120A5D0600DC02A0 /* DeviceMotionClient.h */; }; 754 31FB1A58120A5D0600DC02A0 /* DeviceMotionController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31FB1A50120A5D0600DC02A0 /* DeviceMotionController.cpp */; }; 755 31FB1A59120A5D0600DC02A0 /* DeviceMotionController.h in Headers */ = {isa = PBXBuildFile; fileRef = 31FB1A51120A5D0600DC02A0 /* DeviceMotionController.h */; }; 756 31FB1A5A120A5D0600DC02A0 /* DeviceMotionData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31FB1A52120A5D0600DC02A0 /* DeviceMotionData.cpp */; }; 757 31FB1A5B120A5D0600DC02A0 /* DeviceMotionData.h in Headers */ = {isa = PBXBuildFile; fileRef = 31FB1A53120A5D0600DC02A0 /* DeviceMotionData.h */; }; 758 31FB1A5C120A5D0600DC02A0 /* DeviceMotionEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31FB1A54120A5D0600DC02A0 /* DeviceMotionEvent.cpp */; }; 759 31FB1A5D120A5D0600DC02A0 /* DeviceMotionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 31FB1A55120A5D0600DC02A0 /* DeviceMotionEvent.h */; }; 760 31FB1A65120A5D3F00DC02A0 /* JSDeviceMotionEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31FB1A63120A5D3F00DC02A0 /* JSDeviceMotionEvent.cpp */; }; 761 31FB1A66120A5D3F00DC02A0 /* JSDeviceMotionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 31FB1A64120A5D3F00DC02A0 /* JSDeviceMotionEvent.h */; }; 762 31FB1A6C120A5D6900DC02A0 /* JSDeviceMotionEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31FB1A6B120A5D6900DC02A0 /* JSDeviceMotionEventCustom.cpp */; }; 753 763 3314ACEB10892086000F0E56 /* JSExceptionBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3314ACE910892086000F0E56 /* JSExceptionBase.cpp */; }; 754 764 3314ACEC10892086000F0E56 /* JSExceptionBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 3314ACEA10892086000F0E56 /* JSExceptionBase.h */; }; … … 6480 6490 31C0FF470E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMWebKitTransitionEvent.mm; sourceTree = "<group>"; }; 6481 6491 31C0FF480E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitTransitionEventInternal.h; sourceTree = "<group>"; }; 6492 31FB1A4F120A5D0600DC02A0 /* DeviceMotionClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceMotionClient.h; sourceTree = "<group>"; }; 6493 31FB1A50120A5D0600DC02A0 /* DeviceMotionController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeviceMotionController.cpp; sourceTree = "<group>"; }; 6494 31FB1A51120A5D0600DC02A0 /* DeviceMotionController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceMotionController.h; sourceTree = "<group>"; }; 6495 31FB1A52120A5D0600DC02A0 /* DeviceMotionData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeviceMotionData.cpp; sourceTree = "<group>"; }; 6496 31FB1A53120A5D0600DC02A0 /* DeviceMotionData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceMotionData.h; sourceTree = "<group>"; }; 6497 31FB1A54120A5D0600DC02A0 /* DeviceMotionEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeviceMotionEvent.cpp; sourceTree = "<group>"; }; 6498 31FB1A55120A5D0600DC02A0 /* DeviceMotionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceMotionEvent.h; sourceTree = "<group>"; }; 6499 31FB1A56120A5D0600DC02A0 /* DeviceMotionEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DeviceMotionEvent.idl; sourceTree = "<group>"; }; 6500 31FB1A63120A5D3F00DC02A0 /* JSDeviceMotionEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDeviceMotionEvent.cpp; sourceTree = "<group>"; }; 6501 31FB1A64120A5D3F00DC02A0 /* JSDeviceMotionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDeviceMotionEvent.h; sourceTree = "<group>"; }; 6502 31FB1A6B120A5D6900DC02A0 /* JSDeviceMotionEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDeviceMotionEventCustom.cpp; sourceTree = "<group>"; }; 6482 6503 3314ACE910892086000F0E56 /* JSExceptionBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSExceptionBase.cpp; sourceTree = "<group>"; }; 6483 6504 3314ACEA10892086000F0E56 /* JSExceptionBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSExceptionBase.h; sourceTree = "<group>"; }; … … 14770 14791 FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */, 14771 14792 FE6FD48C0F676E9300092873 /* JSCoordinates.h */, 14793 31FB1A63120A5D3F00DC02A0 /* JSDeviceMotionEvent.cpp */, 14794 31FB1A64120A5D3F00DC02A0 /* JSDeviceMotionEvent.h */, 14772 14795 59A86005119DAF7F00DEF1EF /* JSDeviceOrientationEvent.cpp */, 14773 14796 59A86007119DAFA100DEF1EF /* JSDeviceOrientationEvent.h */, … … 15955 15978 4162A453101145E300DFF3ED /* JSDedicatedWorkerContextCustom.cpp */, 15956 15979 33503CBF10179C1A003B47E1 /* JSDesktopNotificationsCustom.cpp */, 15980 31FB1A6B120A5D6900DC02A0 /* JSDeviceMotionEventCustom.cpp */, 15957 15981 590E1B4A11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp */, 15958 15982 49C7BA8C1042F5B10009D447 /* JSDocumentCustom.cpp */, … … 17105 17129 A8C228A011D5722E00D5A7D3 /* DecodedDataDocumentParser.cpp */, 17106 17130 A8C2289F11D5722E00D5A7D3 /* DecodedDataDocumentParser.h */, 17131 31FB1A4F120A5D0600DC02A0 /* DeviceMotionClient.h */, 17132 31FB1A50120A5D0600DC02A0 /* DeviceMotionController.cpp */, 17133 31FB1A51120A5D0600DC02A0 /* DeviceMotionController.h */, 17134 31FB1A52120A5D0600DC02A0 /* DeviceMotionData.cpp */, 17135 31FB1A53120A5D0600DC02A0 /* DeviceMotionData.h */, 17136 31FB1A54120A5D0600DC02A0 /* DeviceMotionEvent.cpp */, 17137 31FB1A55120A5D0600DC02A0 /* DeviceMotionEvent.h */, 17138 31FB1A56120A5D0600DC02A0 /* DeviceMotionEvent.idl */, 17107 17139 59D1C10311EB5DCF00B638C8 /* DeviceOrientation.cpp */, 17108 17140 590E1B4811E4EF4B0069F784 /* DeviceOrientation.h */, … … 20032 20064 97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */, 20033 20065 CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */, 20066 31FB1A57120A5D0600DC02A0 /* DeviceMotionClient.h in Headers */, 20067 31FB1A59120A5D0600DC02A0 /* DeviceMotionController.h in Headers */, 20068 31FB1A5B120A5D0600DC02A0 /* DeviceMotionData.h in Headers */, 20069 31FB1A5D120A5D0600DC02A0 /* DeviceMotionEvent.h in Headers */, 20070 31FB1A66120A5D3F00DC02A0 /* JSDeviceMotionEvent.h in Headers */, 20034 20071 ); 20035 20072 runOnlyForDeploymentPostprocessing = 0; … … 22441 22478 E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */, 22442 22479 97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */, 22480 31FB1A58120A5D0600DC02A0 /* DeviceMotionController.cpp in Sources */, 22481 31FB1A5A120A5D0600DC02A0 /* DeviceMotionData.cpp in Sources */, 22482 31FB1A5C120A5D0600DC02A0 /* DeviceMotionEvent.cpp in Sources */, 22483 31FB1A65120A5D3F00DC02A0 /* JSDeviceMotionEvent.cpp in Sources */, 22484 31FB1A6C120A5D6900DC02A0 /* JSDeviceMotionEventCustom.cpp in Sources */, 22443 22485 ); 22444 22486 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
r64269 r64845 48 48 bool RuntimeEnabledFeatures::isPushStateEnabled = false; 49 49 bool RuntimeEnabledFeatures::isTouchEnabled = true; 50 bool RuntimeEnabledFeatures::isDeviceMotionEnabled = true; 50 51 bool RuntimeEnabledFeatures::isDeviceOrientationEnabled = true; 51 52 bool RuntimeEnabledFeatures::isSpeechInputEnabled = true; -
trunk/WebCore/bindings/generic/RuntimeEnabledFeatures.h
r64269 r64845 115 115 #endif 116 116 117 static void setDeviceMotionEnabled(bool isEnabled) { isDeviceMotionEnabled = isEnabled; } 118 static bool deviceMotionEnabled() { return isDeviceMotionEnabled; } 119 static bool deviceMotionEventEnabled() { return isDeviceMotionEnabled; } 120 static bool ondevicemotionEnabled() { return isDeviceMotionEnabled; } 121 117 122 static void setDeviceOrientationEnabled(bool isEnabled) { isDeviceOrientationEnabled = isEnabled; } 118 123 static bool deviceOrientationEnabled() { return isDeviceOrientationEnabled; } … … 137 142 static bool isPushStateEnabled; 138 143 static bool isTouchEnabled; 144 static bool isDeviceMotionEnabled; 139 145 static bool isDeviceOrientationEnabled; 140 146 static bool isSpeechInputEnabled; -
trunk/WebCore/bindings/js/JSEventCustom.cpp
r60624 r64845 33 33 #include "CompositionEvent.h" 34 34 #include "CustomEvent.h" 35 #include "DeviceMotionEvent.h" 35 36 #include "DeviceOrientationEvent.h" 36 37 #include "Event.h" … … 39 40 #include "JSCustomEvent.h" 40 41 #include "JSCompositionEvent.h" 42 #include "JSDeviceMotionEvent.h" 41 43 #include "JSDeviceOrientationEvent.h" 42 44 #include "JSErrorEvent.h" … … 174 176 wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, CustomEvent, event); 175 177 #if ENABLE(DEVICE_ORIENTATION) 178 else if (event->isDeviceMotionEvent()) 179 wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, DeviceMotionEvent, event); 176 180 else if (event->isDeviceOrientationEvent()) 177 181 wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, DeviceOrientationEvent, event); -
trunk/WebCore/dom/Document.cpp
r64740 r64845 45 45 #include "DOMImplementation.h" 46 46 #include "DOMWindow.h" 47 #include "DeviceMotionEvent.h" 47 48 #include "DeviceOrientationEvent.h" 48 49 #include "DocLoader.h" … … 3332 3333 #endif 3333 3334 #if ENABLE(DEVICE_ORIENTATION) 3335 else if (eventType == "DeviceMotionEvent") 3336 event = DeviceMotionEvent::create(); 3334 3337 else if (eventType == "DeviceOrientationEvent") 3335 3338 event = DeviceOrientationEvent::create(); -
trunk/WebCore/dom/Event.cpp
r60624 r64845 214 214 215 215 #if ENABLE(DEVICE_ORIENTATION) 216 bool Event::isDeviceMotionEvent() const 217 { 218 return false; 219 } 220 216 221 bool Event::isDeviceOrientationEvent() const 217 222 { -
trunk/WebCore/dom/Event.h
r60624 r64845 141 141 #endif 142 142 #if ENABLE(DEVICE_ORIENTATION) 143 virtual bool isDeviceMotionEvent() const; 143 144 virtual bool isDeviceOrientationEvent() const; 144 145 #endif -
trunk/WebCore/dom/EventNames.h
r64824 r64845 52 52 macro(cut) \ 53 53 macro(dblclick) \ 54 macro(devicemotion) \ 54 55 macro(deviceorientation) \ 55 56 macro(display) \ -
trunk/WebCore/page/DOMWindow.cpp
r64344 r64845 43 43 #include "Database.h" 44 44 #include "DatabaseCallback.h" 45 #include "DeviceMotionController.h" 45 46 #include "DeviceOrientationController.h" 46 47 #include "PageTransitionEvent.h" … … 1436 1437 addBeforeUnloadEventListener(this); 1437 1438 #if ENABLE(DEVICE_ORIENTATION) 1439 else if (eventType == eventNames().devicemotionEvent && frame() && frame()->page() && frame()->page()->deviceMotionController()) 1440 frame()->page()->deviceMotionController()->addListener(this); 1438 1441 else if (eventType == eventNames().deviceorientationEvent && frame() && frame()->page() && frame()->page()->deviceOrientationController()) 1439 1442 frame()->page()->deviceOrientationController()->addListener(this); … … 1453 1456 removeBeforeUnloadEventListener(this); 1454 1457 #if ENABLE(DEVICE_ORIENTATION) 1458 else if (eventType == eventNames().devicemotionEvent && frame() && frame()->page() && frame()->page()->deviceMotionController()) 1459 frame()->page()->deviceMotionController()->removeListener(this); 1455 1460 else if (eventType == eventNames().deviceorientationEvent && frame() && frame()->page() && frame()->page()->deviceOrientationController()) 1456 1461 frame()->page()->deviceOrientationController()->removeListener(this); … … 1531 1536 1532 1537 #if ENABLE(DEVICE_ORIENTATION) 1538 if (frame() && frame()->page() && frame()->page()->deviceMotionController()) 1539 frame()->page()->deviceMotionController()->removeAllListeners(this); 1533 1540 if (frame() && frame()->page() && frame()->page()->deviceOrientationController()) 1534 1541 frame()->page()->deviceOrientationController()->removeAllListeners(this); -
trunk/WebCore/page/DOMWindow.h
r64344 r64845 339 339 340 340 #if ENABLE(DEVICE_ORIENTATION) 341 DEFINE_ATTRIBUTE_EVENT_LISTENER(devicemotion); 341 342 DEFINE_ATTRIBUTE_EVENT_LISTENER(deviceorientation); 342 343 #endif -
trunk/WebCore/page/DOMWindow.idl
r64840 r64845 306 306 attribute [Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchcancel; 307 307 308 attribute [Conditional=DEVICE_ORIENTATION, EnabledAtRuntime] DeviceOrientationEventConstructor DeviceOrientationEvent; 309 attribute [Conditional=DEVICE_ORIENTATION, EnabledAtRuntime] EventListener ondeviceorientation; 308 attribute [Conditional=DEVICE_ORIENTATION,EnabledAtRuntime] DeviceMotionEventConstructor DeviceMotionEvent; 309 attribute [Conditional=DEVICE_ORIENTATION,EnabledAtRuntime] EventListener ondevicemotion; 310 attribute [Conditional=DEVICE_ORIENTATION,EnabledAtRuntime] DeviceOrientationEventConstructor DeviceOrientationEvent; 311 attribute [Conditional=DEVICE_ORIENTATION,EnabledAtRuntime] EventListener ondeviceorientation; 310 312 311 313 // EventTarget interface -
trunk/WebCore/page/Page.cpp
r64401 r64845 21 21 #include "Page.h" 22 22 23 #include "DeviceMotionController.h" 23 24 #include "BackForwardController.h" 24 25 #include "BackForwardList.h" … … 142 143 #endif 143 144 #if ENABLE(DEVICE_ORIENTATION) 145 , m_deviceMotionController(RuntimeEnabledFeatures::deviceMotionEnabled() ? new DeviceMotionController(pageClients.deviceMotionClient) : 0) 144 146 , m_deviceOrientationController(RuntimeEnabledFeatures::deviceOrientationEnabled() ? new DeviceOrientationController(this, pageClients.deviceOrientationClient) : 0) 145 147 #endif -
trunk/WebCore/page/Page.h
r64401 r64845 45 45 class ContextMenuClient; 46 46 class ContextMenuController; 47 class DeviceMotionClient; 48 class DeviceMotionController; 47 49 class DeviceOrientationClient; 48 50 class DeviceOrientationController; … … 102 104 , pluginHalterClient(0) 103 105 , geolocationControllerClient(0) 106 , deviceMotionClient(0) 104 107 , deviceOrientationClient(0) 105 108 , backForwardControllerClient(0) … … 114 117 PluginHalterClient* pluginHalterClient; 115 118 GeolocationControllerClient* geolocationControllerClient; 119 DeviceMotionClient* deviceMotionClient; 116 120 DeviceOrientationClient* deviceOrientationClient; 117 121 BackForwardControllerClient* backForwardControllerClient; … … 180 184 #endif 181 185 #if ENABLE(DEVICE_ORIENTATION) 186 DeviceMotionController* deviceMotionController() const { return m_deviceMotionController.get(); } 182 187 DeviceOrientationController* deviceOrientationController() const { return m_deviceOrientationController.get(); } 183 188 #endif … … 314 319 #endif 315 320 #if ENABLE(DEVICE_ORIENTATION) 321 OwnPtr<DeviceMotionController> m_deviceMotionController; 316 322 OwnPtr<DeviceOrientationController> m_deviceOrientationController; 317 323 #endif
Note: See TracChangeset
for help on using the changeset viewer.