OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "WebViewImpl.h" | 32 #include "WebViewImpl.h" |
33 | 33 |
| 34 #include "AXObjectCache.h" |
34 #include "ActivePlatformGestureAnimation.h" | 35 #include "ActivePlatformGestureAnimation.h" |
35 #include "AutofillPopupMenuClient.h" | 36 #include "AutofillPopupMenuClient.h" |
36 #include "AXObjectCache.h" | |
37 #include "BackForwardListChromium.h" | 37 #include "BackForwardListChromium.h" |
38 #include "cc/CCProxy.h" | |
39 #include "CSSStyleSelector.h" | 38 #include "CSSStyleSelector.h" |
40 #include "CSSValueKeywords.h" | 39 #include "CSSValueKeywords.h" |
41 #include "Chrome.h" | 40 #include "Chrome.h" |
42 #include "ColorSpace.h" | 41 #include "ColorSpace.h" |
43 #include "CompositionUnderlineVectorBuilder.h" | 42 #include "CompositionUnderlineVectorBuilder.h" |
44 #include "ContextMenu.h" | 43 #include "ContextMenu.h" |
45 #include "ContextMenuController.h" | 44 #include "ContextMenuController.h" |
46 #include "ContextMenuItem.h" | 45 #include "ContextMenuItem.h" |
47 #include "Cursor.h" | 46 #include "Cursor.h" |
48 #include "DOMUtilitiesPrivate.h" | 47 #include "DOMUtilitiesPrivate.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 #include "SharedGraphicsContext3D.h" | 107 #include "SharedGraphicsContext3D.h" |
109 #include "SpeechInputClientImpl.h" | 108 #include "SpeechInputClientImpl.h" |
110 #include "SpeechRecognitionClient.h" | 109 #include "SpeechRecognitionClient.h" |
111 #include "TextIterator.h" | 110 #include "TextIterator.h" |
112 #include "Timer.h" | 111 #include "Timer.h" |
113 #include "TouchpadFlingPlatformGestureCurve.h" | 112 #include "TouchpadFlingPlatformGestureCurve.h" |
114 #include "TraceEvent.h" | 113 #include "TraceEvent.h" |
115 #include "TypingCommand.h" | 114 #include "TypingCommand.h" |
116 #include "UserGestureIndicator.h" | 115 #include "UserGestureIndicator.h" |
117 #include "WebAccessibilityObject.h" | 116 #include "WebAccessibilityObject.h" |
| 117 #include "WebActiveWheelFlingParameters.h" |
118 #include "WebAutofillClient.h" | 118 #include "WebAutofillClient.h" |
119 #include "WebCompositorImpl.h" | 119 #include "WebCompositorImpl.h" |
120 #include "WebDevToolsAgentImpl.h" | 120 #include "WebDevToolsAgentImpl.h" |
121 #include "WebDevToolsAgentPrivate.h" | 121 #include "WebDevToolsAgentPrivate.h" |
122 #include "platform/WebDragData.h" | |
123 #include "WebFrameImpl.h" | 122 #include "WebFrameImpl.h" |
124 #include "platform/WebGraphicsContext3D.h" | |
125 #include "platform/WebImage.h" | |
126 #include "WebInputElement.h" | 123 #include "WebInputElement.h" |
127 #include "WebInputEvent.h" | 124 #include "WebInputEvent.h" |
128 #include "WebInputEventConversion.h" | 125 #include "WebInputEventConversion.h" |
129 #include "WebKit.h" | 126 #include "WebKit.h" |
130 #include "platform/WebKitPlatformSupport.h" | |
131 #include "platform/WebLayer.h" | |
132 #include "platform/WebLayerTreeView.h" | |
133 #include "WebMediaPlayerAction.h" | 127 #include "WebMediaPlayerAction.h" |
134 #include "WebNode.h" | 128 #include "WebNode.h" |
135 #include "WebPlugin.h" | 129 #include "WebPlugin.h" |
136 #include "WebPluginAction.h" | 130 #include "WebPluginAction.h" |
137 #include "WebPluginContainerImpl.h" | 131 #include "WebPluginContainerImpl.h" |
138 #include "platform/WebPoint.h" | |
139 #include "WebPopupMenuImpl.h" | 132 #include "WebPopupMenuImpl.h" |
140 #include "WebRange.h" | 133 #include "WebRange.h" |
141 #include "platform/WebRect.h" | |
142 #include "WebRuntimeFeatures.h" | 134 #include "WebRuntimeFeatures.h" |
143 #include "WebSettingsImpl.h" | 135 #include "WebSettingsImpl.h" |
| 136 #include "WebViewClient.h" |
| 137 #include "WheelEvent.h" |
| 138 #include "cc/CCProxy.h" |
| 139 #include "platform/WebDragData.h" |
| 140 #include "platform/WebImage.h" |
| 141 #include "platform/WebKitPlatformSupport.h" |
144 #include "platform/WebString.h" | 142 #include "platform/WebString.h" |
145 #include "platform/WebVector.h" | 143 #include "platform/WebVector.h" |
146 #include "WebViewClient.h" | 144 #include <public/WebFloatPoint.h> |
147 #include "WheelEvent.h" | 145 #include <public/WebGraphicsContext3D.h> |
| 146 #include <public/WebLayer.h> |
| 147 #include <public/WebLayerTreeView.h> |
| 148 #include <public/WebPoint.h> |
| 149 #include <public/WebRect.h> |
148 #include <wtf/ByteArray.h> | 150 #include <wtf/ByteArray.h> |
149 #include <wtf/CurrentTime.h> | 151 #include <wtf/CurrentTime.h> |
150 #include <wtf/MainThread.h> | 152 #include <wtf/MainThread.h> |
151 #include <wtf/RefPtr.h> | 153 #include <wtf/RefPtr.h> |
152 | 154 |
153 #if ENABLE(GESTURE_EVENTS) | 155 #if ENABLE(GESTURE_EVENTS) |
154 #include "PlatformGestureEvent.h" | 156 #include "PlatformGestureEvent.h" |
155 #endif | 157 #endif |
156 | 158 |
157 #if USE(CG) | 159 #if USE(CG) |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 case WebInputEvent::GesturePinchUpdate: { | 672 case WebInputEvent::GesturePinchUpdate: { |
671 PlatformGestureEventBuilder platformEvent(mainFrameImpl()->frameView(),
event); | 673 PlatformGestureEventBuilder platformEvent(mainFrameImpl()->frameView(),
event); |
672 return mainFrameImpl()->frame()->eventHandler()->handleGestureEvent(plat
formEvent); | 674 return mainFrameImpl()->frame()->eventHandler()->handleGestureEvent(plat
formEvent); |
673 } | 675 } |
674 default: | 676 default: |
675 ASSERT_NOT_REACHED(); | 677 ASSERT_NOT_REACHED(); |
676 } | 678 } |
677 return false; | 679 return false; |
678 } | 680 } |
679 | 681 |
| 682 void WebViewImpl::transferActiveWheelFlingAnimation(const WebActiveWheelFlingPar
ameters& parameters) |
| 683 { |
| 684 TRACE_EVENT0("webkit", "WebViewImpl::transferActiveWheelFlingAnimation"); |
| 685 ASSERT(!m_gestureAnimation); |
| 686 m_lastWheelPosition = parameters.point; |
| 687 m_lastWheelGlobalPosition = parameters.globalPoint; |
| 688 m_flingModifier = parameters.modifiers; |
| 689 OwnPtr<PlatformGestureCurve> curve = TouchpadFlingPlatformGestureCurve::crea
te(parameters.delta, IntPoint(parameters.cumulativeScroll)); |
| 690 m_gestureAnimation = ActivePlatformGestureAnimation::create(curve.release(),
this, parameters.startTime); |
| 691 scheduleAnimation(); |
| 692 } |
| 693 |
680 void WebViewImpl::startPageScaleAnimation(const IntPoint& scroll, bool useAnchor
, float newScale, double durationSec) | 694 void WebViewImpl::startPageScaleAnimation(const IntPoint& scroll, bool useAnchor
, float newScale, double durationSec) |
681 { | 695 { |
682 if (!m_layerTreeView.isNull()) | 696 if (!m_layerTreeView.isNull()) |
683 m_layerTreeView.startPageScaleAnimation(scroll, useAnchor, newScale, dur
ationSec); | 697 m_layerTreeView.startPageScaleAnimation(scroll, useAnchor, newScale, dur
ationSec); |
684 } | 698 } |
685 #endif | 699 #endif |
686 | 700 |
687 bool WebViewImpl::keyEvent(const WebKeyboardEvent& event) | 701 bool WebViewImpl::keyEvent(const WebKeyboardEvent& event) |
688 { | 702 { |
689 ASSERT((event.type == WebInputEvent::RawKeyDown) | 703 ASSERT((event.type == WebInputEvent::RawKeyDown) |
(...skipping 2822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3512 const WebMouseEvent& mouseEvent = static_cast<const WebMouseEvent&>(event); | 3526 const WebMouseEvent& mouseEvent = static_cast<const WebMouseEvent&>(event); |
3513 | 3527 |
3514 if (page()) | 3528 if (page()) |
3515 page()->pointerLockController()->dispatchLockedMouseEvent( | 3529 page()->pointerLockController()->dispatchLockedMouseEvent( |
3516 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), mouseEvent), | 3530 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), mouseEvent), |
3517 eventType); | 3531 eventType); |
3518 } | 3532 } |
3519 #endif | 3533 #endif |
3520 | 3534 |
3521 } // namespace WebKit | 3535 } // namespace WebKit |
OLD | NEW |