Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Side by Side Diff: Source/web/PageWidgetDelegate.cpp

Issue 73643004: Web Animations: Extract an API for servicing animations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/testing/runner/WebTestProxy.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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/animation/DocumentAnimations.h"
37 #include "core/page/AutoscrollController.h" 38 #include "core/page/AutoscrollController.h"
38 #include "core/page/EventHandler.h" 39 #include "core/page/EventHandler.h"
39 #include "core/frame/Frame.h" 40 #include "core/frame/Frame.h"
40 #include "core/frame/FrameView.h" 41 #include "core/frame/FrameView.h"
41 #include "core/platform/graphics/GraphicsContext.h" 42 #include "core/platform/graphics/GraphicsContext.h"
42 #include "core/rendering/RenderLayerCompositor.h" 43 #include "core/rendering/RenderLayerCompositor.h"
43 #include "core/rendering/RenderView.h" 44 #include "core/rendering/RenderView.h"
44 #include "wtf/CurrentTime.h" 45 #include "wtf/CurrentTime.h"
45 46
46 using namespace WebCore; 47 using namespace WebCore;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 view->setFrameRect(view->frameRect()); 81 view->setFrameRect(view->frameRect());
81 82
82 // setFrameRect may have the side-effect of causing existing page layout to 83 // setFrameRect may have the side-effect of causing existing page layout to
83 // be invalidated, so layout needs to be called last. 84 // be invalidated, so layout needs to be called last.
84 view->updateLayoutAndStyleIfNeededRecursive(); 85 view->updateLayoutAndStyleIfNeededRecursive();
85 86
86 // For now, as we know this is the point in code where the compositor has 87 // For now, as we know this is the point in code where the compositor has
87 // actually asked for Blink to update the composited layer tree. So finally 88 // actually asked for Blink to update the composited layer tree. So finally
88 // do all the deferred work for updateCompositingLayers() here. 89 // do all the deferred work for updateCompositingLayers() here.
89 view->renderView()->compositor()->updateCompositingLayers(CompositingUpdateF inishAllDeferredWork); 90 view->renderView()->compositor()->updateCompositingLayers(CompositingUpdateF inishAllDeferredWork);
91
92 DocumentAnimations::serviceAfterCompositingUpdate(*view);
90 } 93 }
91 94
92 void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas* canvas, const WebRect& rect, CanvasBackground background) 95 void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas* canvas, const WebRect& rect, CanvasBackground background)
93 { 96 {
94 if (rect.isEmpty()) 97 if (rect.isEmpty())
95 return; 98 return;
96 GraphicsContext gc(canvas); 99 GraphicsContext gc(canvas);
97 gc.setCertainlyOpaque(background == Opaque); 100 gc.setCertainlyOpaque(background == Opaque);
98 gc.applyDeviceScaleFactor(page->deviceScaleFactor()); 101 gc.applyDeviceScaleFactor(page->deviceScaleFactor());
99 gc.setUseHighResMarkers(page->deviceScaleFactor() > 1.5f); 102 gc.setUseHighResMarkers(page->deviceScaleFactor() > 1.5f);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 { 221 {
219 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m ainFrame.view(), event)); 222 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m ainFrame.view(), event));
220 } 223 }
221 224
222 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv ent& event) 225 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv ent& event)
223 { 226 {
224 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m ainFrame.view(), event)); 227 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m ainFrame.view(), event));
225 } 228 }
226 229
227 } 230 }
OLDNEW
« no previous file with comments | « Source/testing/runner/WebTestProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698