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

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: dcheng comments and 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)
eseidel 2014/07/11 16:33:03 Why is it valid to call this method with a null pa
kenrb 2014/07/11 20:03:33 It was added explicitly in r169672. I am not certa
dcheng 2014/07/11 21:22:52 Do you mind filing a bug and assigning it to me? T
return;
- page->animator().updateLayoutAndStyleForPainting();
+
+ if (!rootFrame) {
eseidel 2014/07/11 16:33:03 Why not make this a default =0 argument then? Or
kenrb 2014/07/11 20:03:33 Done.
+ if (!page->mainFrame() || !page->mainFrame()->isLocalFrame())
eseidel 2014/07/11 16:33:03 How can a page not have a mainFrame? Or a page's
kenrb 2014/07/11 20:03:33 I don't know about a null mainFrame (see above rev
+ 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