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) |