| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| 11 * 2. Redistributions in binary form must reproduce the above copyright | 11 * 2. Redistributions in binary form must reproduce the above copyright |
| 12 * notice, this list of conditions and the following disclaimer in the | 12 * notice, this list of conditions and the following disclaimer in the |
| 13 * documentation and/or other materials provided with the distribution. | 13 * documentation and/or other materials provided with the distribution. |
| 14 * | 14 * |
| 15 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY | 15 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY |
| 16 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 16 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 18 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR | 18 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
| 19 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 19 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #include "config.h" | 28 #include "sky/engine/config.h" |
| 29 #include "core/page/EventHandler.h" | 29 #include "sky/engine/core/page/EventHandler.h" |
| 30 | 30 |
| 31 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | |
| 32 #include "gen/sky/core/HTMLNames.h" | 31 #include "gen/sky/core/HTMLNames.h" |
| 33 #include "core/dom/Document.h" | |
| 34 #include "core/dom/DocumentMarkerController.h" | |
| 35 #include "core/dom/NodeRenderingTraversal.h" | |
| 36 #include "core/dom/TouchList.h" | |
| 37 #include "core/dom/shadow/ShadowRoot.h" | |
| 38 #include "core/editing/Editor.h" | |
| 39 #include "core/editing/FrameSelection.h" | |
| 40 #include "core/editing/TextIterator.h" | |
| 41 #include "core/editing/htmlediting.h" | |
| 42 #include "core/events/DOMWindowEventQueue.h" | |
| 43 #include "core/events/EventPath.h" | |
| 44 #include "core/events/KeyboardEvent.h" | |
| 45 #include "core/events/MouseEvent.h" | |
| 46 #include "core/events/TextEvent.h" | |
| 47 #include "core/events/TouchEvent.h" | |
| 48 #include "core/events/WheelEvent.h" | |
| 49 #include "core/fetch/ImageResource.h" | |
| 50 #include "core/frame/FrameView.h" | |
| 51 #include "core/frame/LocalFrame.h" | |
| 52 #include "core/frame/Settings.h" | |
| 53 #include "core/loader/FrameLoaderClient.h" | |
| 54 #include "core/page/AutoscrollController.h" | |
| 55 #include "core/page/Chrome.h" | |
| 56 #include "core/page/ChromeClient.h" | |
| 57 #include "core/page/EditorClient.h" | |
| 58 #include "core/page/EventWithHitTestResults.h" | |
| 59 #include "core/page/FocusController.h" | |
| 60 #include "core/page/Page.h" | |
| 61 #include "core/page/TouchAdjustment.h" | |
| 62 #include "core/rendering/HitTestRequest.h" | |
| 63 #include "core/rendering/HitTestResult.h" | |
| 64 #include "core/rendering/RenderLayer.h" | |
| 65 #include "core/rendering/RenderView.h" | |
| 66 #include "core/rendering/style/RenderStyle.h" | |
| 67 #include "platform/PlatformGestureEvent.h" | |
| 68 #include "platform/PlatformKeyboardEvent.h" | |
| 69 #include "platform/PlatformTouchEvent.h" | |
| 70 #include "platform/PlatformWheelEvent.h" | |
| 71 #include "gen/sky/platform/RuntimeEnabledFeatures.h" | 32 #include "gen/sky/platform/RuntimeEnabledFeatures.h" |
| 72 #include "platform/TraceEvent.h" | 33 #include "sky/engine/bindings/core/v8/ExceptionStatePlaceholder.h" |
| 73 #include "platform/WindowsKeyboardCodes.h" | 34 #include "sky/engine/core/dom/Document.h" |
| 74 #include "platform/geometry/FloatPoint.h" | 35 #include "sky/engine/core/dom/DocumentMarkerController.h" |
| 75 #include "platform/graphics/Image.h" | 36 #include "sky/engine/core/dom/NodeRenderingTraversal.h" |
| 76 #include "platform/heap/Handle.h" | 37 #include "sky/engine/core/dom/TouchList.h" |
| 77 #include "platform/scroll/ScrollAnimator.h" | 38 #include "sky/engine/core/dom/shadow/ShadowRoot.h" |
| 78 #include "platform/scroll/Scrollbar.h" | 39 #include "sky/engine/core/editing/Editor.h" |
| 79 #include "wtf/Assertions.h" | 40 #include "sky/engine/core/editing/FrameSelection.h" |
| 80 #include "wtf/CurrentTime.h" | 41 #include "sky/engine/core/editing/TextIterator.h" |
| 81 #include "wtf/StdLibExtras.h" | 42 #include "sky/engine/core/editing/htmlediting.h" |
| 82 #include "wtf/TemporaryChange.h" | 43 #include "sky/engine/core/events/DOMWindowEventQueue.h" |
| 44 #include "sky/engine/core/events/EventPath.h" |
| 45 #include "sky/engine/core/events/KeyboardEvent.h" |
| 46 #include "sky/engine/core/events/MouseEvent.h" |
| 47 #include "sky/engine/core/events/TextEvent.h" |
| 48 #include "sky/engine/core/events/TouchEvent.h" |
| 49 #include "sky/engine/core/events/WheelEvent.h" |
| 50 #include "sky/engine/core/fetch/ImageResource.h" |
| 51 #include "sky/engine/core/frame/FrameView.h" |
| 52 #include "sky/engine/core/frame/LocalFrame.h" |
| 53 #include "sky/engine/core/frame/Settings.h" |
| 54 #include "sky/engine/core/loader/FrameLoaderClient.h" |
| 55 #include "sky/engine/core/page/AutoscrollController.h" |
| 56 #include "sky/engine/core/page/Chrome.h" |
| 57 #include "sky/engine/core/page/ChromeClient.h" |
| 58 #include "sky/engine/core/page/EditorClient.h" |
| 59 #include "sky/engine/core/page/EventWithHitTestResults.h" |
| 60 #include "sky/engine/core/page/FocusController.h" |
| 61 #include "sky/engine/core/page/Page.h" |
| 62 #include "sky/engine/core/page/TouchAdjustment.h" |
| 63 #include "sky/engine/core/rendering/HitTestRequest.h" |
| 64 #include "sky/engine/core/rendering/HitTestResult.h" |
| 65 #include "sky/engine/core/rendering/RenderLayer.h" |
| 66 #include "sky/engine/core/rendering/RenderView.h" |
| 67 #include "sky/engine/core/rendering/style/RenderStyle.h" |
| 68 #include "sky/engine/platform/PlatformGestureEvent.h" |
| 69 #include "sky/engine/platform/PlatformKeyboardEvent.h" |
| 70 #include "sky/engine/platform/PlatformTouchEvent.h" |
| 71 #include "sky/engine/platform/PlatformWheelEvent.h" |
| 72 #include "sky/engine/platform/TraceEvent.h" |
| 73 #include "sky/engine/platform/WindowsKeyboardCodes.h" |
| 74 #include "sky/engine/platform/geometry/FloatPoint.h" |
| 75 #include "sky/engine/platform/graphics/Image.h" |
| 76 #include "sky/engine/platform/heap/Handle.h" |
| 77 #include "sky/engine/platform/scroll/ScrollAnimator.h" |
| 78 #include "sky/engine/platform/scroll/Scrollbar.h" |
| 79 #include "sky/engine/wtf/Assertions.h" |
| 80 #include "sky/engine/wtf/CurrentTime.h" |
| 81 #include "sky/engine/wtf/StdLibExtras.h" |
| 82 #include "sky/engine/wtf/TemporaryChange.h" |
| 83 | 83 |
| 84 namespace blink { | 84 namespace blink { |
| 85 | 85 |
| 86 // The amount of time to wait before sending a fake mouse event, triggered | 86 // The amount of time to wait before sending a fake mouse event, triggered |
| 87 // during a scroll. The short interval is used if the content responds to the mo
use events quickly enough, | 87 // during a scroll. The short interval is used if the content responds to the mo
use events quickly enough, |
| 88 // otherwise the long interval is used. | 88 // otherwise the long interval is used. |
| 89 static const double fakeMouseMoveShortInterval = 0.1; | 89 static const double fakeMouseMoveShortInterval = 0.1; |
| 90 static const double fakeMouseMoveLongInterval = 0.250; | 90 static const double fakeMouseMoveLongInterval = 0.250; |
| 91 | 91 |
| 92 // The amount of time to wait for a cursor update on style and layout changes | 92 // The amount of time to wait for a cursor update on style and layout changes |
| (...skipping 2597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2690 unsigned EventHandler::accessKeyModifiers() | 2690 unsigned EventHandler::accessKeyModifiers() |
| 2691 { | 2691 { |
| 2692 #if OS(MACOSX) | 2692 #if OS(MACOSX) |
| 2693 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 2693 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 2694 #else | 2694 #else |
| 2695 return PlatformEvent::AltKey; | 2695 return PlatformEvent::AltKey; |
| 2696 #endif | 2696 #endif |
| 2697 } | 2697 } |
| 2698 | 2698 |
| 2699 } // namespace blink | 2699 } // namespace blink |
| OLD | NEW |