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

Unified Diff: Source/web/PageWidgetDelegate.cpp

Issue 202533003: Don't schedule an animation during compositing dirty-bit setting unless needed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add null check. Created 6 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/PageWidgetDelegate.cpp
diff --git a/Source/web/PageWidgetDelegate.cpp b/Source/web/PageWidgetDelegate.cpp
index 0c7ab2aa17c25b0a0554f833e9f302d36b74568d..59a4df03517e3c75f4e5310c88fbe003d37ee431 100644
--- a/Source/web/PageWidgetDelegate.cpp
+++ b/Source/web/PageWidgetDelegate.cpp
@@ -68,20 +68,9 @@ void PageWidgetDelegate::animate(Page* page, double monotonicFrameBeginTime)
void PageWidgetDelegate::layout(Page* page)
{
- RefPtr<FrameView> view = mainFrameView(page);
- if (!view)
+ if (!page || !page->mainFrame())
return;
- // In order for our child HWNDs (NativeWindowWidgets) to update properly,
- // they need to be told that we are updating the screen. The problem is that
- // the native widgets need to recalculate their clip region and not overlap
- // any of our non-native widgets. To force the resizing, call
- // setFrameRect(). This will be a quick operation for most frames, but the
- // NativeWindowWidgets will update a proper clipping region.
- view->setFrameRect(view->frameRect());
-
- // setFrameRect may have the side-effect of causing existing page layout to
- // be invalidated, so layout needs to be called last.
- view->updateLayoutAndStyleForPainting();
+ page->animator().updateLayoutAndStyleForPainting();
}
void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas* canvas, const WebRect& rect, CanvasBackground background)
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698