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

Unified Diff: Source/web/PageWidgetDelegate.cpp

Issue 380303003: Enable resize and layout for frames with RemoteFrame ancestors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 5 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
Index: Source/web/PageWidgetDelegate.cpp
diff --git a/Source/web/PageWidgetDelegate.cpp b/Source/web/PageWidgetDelegate.cpp
index e2735262e119fcb1bb184f62b343489c2ab03ffb..7e2bcf57183d5c73080040c99862a442c9ef01ea 100644
--- a/Source/web/PageWidgetDelegate.cpp
+++ b/Source/web/PageWidgetDelegate.cpp
@@ -69,11 +69,18 @@ void PageWidgetDelegate::animate(Page* page, double monotonicFrameBeginTime)
page->animator().serviceScriptedAnimations(monotonicFrameBeginTime);
}
-void PageWidgetDelegate::layout(Page* page)
+void PageWidgetDelegate::layout(Page* page, LocalFrame* rootFrame)
{
- if (!page || !page->mainFrame())
+ if (!page)
return;
- page->animator().updateLayoutAndStyleForPainting();
+
+ if (!rootFrame) {
dcheng 2014/07/10 21:14:54 How can we end up with a null pointer here? I only
kenrb 2014/07/11 16:06:17 See above.
+ if (!page->mainFrame() || !page->mainFrame()->isLocalFrame())
+ return;
+ rootFrame = toLocalFrame(page->mainFrame());
+ }
+
+ page->animator().updateLayoutAndStyleForPainting(rootFrame);
}
void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas* canvas, const WebRect& rect, CanvasBackground background)

Powered by Google App Engine
This is Rietveld 408576698