Chromium Code Reviews| 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) |