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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 return 0; | 52 return 0; |
53 return page->mainFrame()->view(); | 53 return page->mainFrame()->view(); |
54 } | 54 } |
55 | 55 |
56 void PageWidgetDelegate::animate(Page* page, double monotonicFrameBeginTime) | 56 void PageWidgetDelegate::animate(Page* page, double monotonicFrameBeginTime) |
57 { | 57 { |
58 #if ENABLE(REQUEST_ANIMATION_FRAME) | 58 #if ENABLE(REQUEST_ANIMATION_FRAME) |
59 FrameView* view = mainFrameView(page); | 59 FrameView* view = mainFrameView(page); |
60 if (!view) | 60 if (!view) |
61 return; | 61 return; |
62 view->serviceScriptedAnimations(monotonicFrameBeginTime); | 62 double timeShift = currentTime() - monotonicallyIncreasingTime(); |
| 63 view->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(monotonicFrameB
eginTime + timeShift)); |
63 #endif | 64 #endif |
64 } | 65 } |
65 | 66 |
66 void PageWidgetDelegate::layout(Page* page) | 67 void PageWidgetDelegate::layout(Page* page) |
67 { | 68 { |
68 FrameView* view = mainFrameView(page); | 69 FrameView* view = mainFrameView(page); |
69 if (!view) | 70 if (!view) |
70 return; | 71 return; |
71 // In order for our child HWNDs (NativeWindowWidgets) to update properly, | 72 // In order for our child HWNDs (NativeWindowWidgets) to update properly, |
72 // 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 213 } |
213 | 214 |
214 #if ENABLE(TOUCH_EVENTS) | 215 #if ENABLE(TOUCH_EVENTS) |
215 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv
ent& event) | 216 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv
ent& event) |
216 { | 217 { |
217 return mainFrame.eventHandler()->handleTouchEvent(PlatformTouchEventBuilder(
mainFrame.view(), event)); | 218 return mainFrame.eventHandler()->handleTouchEvent(PlatformTouchEventBuilder(
mainFrame.view(), event)); |
218 } | 219 } |
219 #endif | 220 #endif |
220 | 221 |
221 } | 222 } |
OLD | NEW |