OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 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 16 matching lines...) Expand all Loading... |
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 "PageWidgetDelegate.h" | 32 #include "PageWidgetDelegate.h" |
33 | 33 |
34 #include "PageOverlayList.h" | 34 #include "PageOverlayList.h" |
35 #include "WebInputEvent.h" | 35 #include "WebInputEvent.h" |
36 #include "WebInputEventConversion.h" | 36 #include "WebInputEventConversion.h" |
| 37 #include "core/page/AutoscrollController.h" |
37 #include "core/page/EventHandler.h" | 38 #include "core/page/EventHandler.h" |
38 #include "core/frame/Frame.h" | 39 #include "core/frame/Frame.h" |
39 #include "core/frame/FrameView.h" | 40 #include "core/frame/FrameView.h" |
40 #include "core/platform/graphics/GraphicsContext.h" | 41 #include "core/platform/graphics/GraphicsContext.h" |
41 #include "wtf/CurrentTime.h" | 42 #include "wtf/CurrentTime.h" |
42 | 43 |
43 using namespace WebCore; | 44 using namespace WebCore; |
44 | 45 |
45 namespace WebKit { | 46 namespace WebKit { |
46 | 47 |
47 static inline FrameView* mainFrameView(Page* page) | 48 static inline FrameView* mainFrameView(Page* page) |
48 { | 49 { |
49 if (!page) | 50 if (!page) |
50 return 0; | 51 return 0; |
51 // FIXME: Can we remove this check? | 52 // FIXME: Can we remove this check? |
52 if (!page->mainFrame()) | 53 if (!page->mainFrame()) |
53 return 0; | 54 return 0; |
54 return page->mainFrame()->view(); | 55 return page->mainFrame()->view(); |
55 } | 56 } |
56 | 57 |
57 void PageWidgetDelegate::animate(Page* page, double monotonicFrameBeginTime) | 58 void PageWidgetDelegate::animate(Page* page, double monotonicFrameBeginTime) |
58 { | 59 { |
59 FrameView* view = mainFrameView(page); | 60 FrameView* view = mainFrameView(page); |
60 if (!view) | 61 if (!view) |
61 return; | 62 return; |
| 63 page->autoscrollController().animate(monotonicFrameBeginTime); |
62 view->serviceScriptedAnimations(monotonicFrameBeginTime); | 64 view->serviceScriptedAnimations(monotonicFrameBeginTime); |
63 } | 65 } |
64 | 66 |
65 void PageWidgetDelegate::layout(Page* page) | 67 void PageWidgetDelegate::layout(Page* page) |
66 { | 68 { |
67 FrameView* view = mainFrameView(page); | 69 FrameView* view = mainFrameView(page); |
68 if (!view) | 70 if (!view) |
69 return; | 71 return; |
70 // In order for our child HWNDs (NativeWindowWidgets) to update properly, | 72 // In order for our child HWNDs (NativeWindowWidgets) to update properly, |
71 // they need to be told that we are updating the screen. The problem is that | 73 // they need to be told that we are updating the screen. The problem is that |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 { | 211 { |
210 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m
ainFrame.view(), event)); | 212 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m
ainFrame.view(), event)); |
211 } | 213 } |
212 | 214 |
213 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv
ent& event) | 215 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv
ent& event) |
214 { | 216 { |
215 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m
ainFrame.view(), event)); | 217 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m
ainFrame.view(), event)); |
216 } | 218 } |
217 | 219 |
218 } | 220 } |
OLD | NEW |