| Index: Source/core/frame/FrameView.cpp
|
| diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
|
| index d87e41d8b487faed68e5364b46bce7bf08ff60fd..7fa5774f4b4f81457cebf8c7004e53649af26cd6 100644
|
| --- a/Source/core/frame/FrameView.cpp
|
| +++ b/Source/core/frame/FrameView.cpp
|
| @@ -2539,6 +2539,18 @@ void FrameView::updateWidgetPositionsIfNeeded()
|
|
|
| void FrameView::updateLayoutAndStyleForPainting()
|
| {
|
| + LocalFrame* startFrame = &frame();
|
| + while (startFrame != page()->mainFrame() && startFrame->tree().parent()->isLocalFrame()) {
|
| + startFrame = toLocalFrame(startFrame->tree().parent());
|
| + }
|
| + startFrame->view()->updateLayoutAndStyleForPaintingInternal();
|
| +}
|
| +
|
| +void FrameView::updateLayoutAndStyleForPaintingInternal()
|
| +{
|
| + // This must be called from the root frame, since it recurses down, not up. Otherwise the lifecycles of the frames might be out of sync.
|
| + ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalFrame()));
|
| +
|
| // Updating layout can run script, which can tear down the FrameView.
|
| RefPtrWillBeRawPtr<FrameView> protector(this);
|
|
|
| @@ -2567,7 +2579,7 @@ void FrameView::updateLayoutAndStyleForPainting()
|
|
|
| void FrameView::updateLayoutAndStyleIfNeededRecursive()
|
| {
|
| - // We have to crawl our entire tree looking for any FrameViews that need
|
| + // We have to crawl our entire subtree looking for any FrameViews that need
|
| // layout and make sure they are up to date.
|
| // Mac actually tests for intersection with the dirty region and tries not to
|
| // update layout for frames that are outside the dirty region. Not only does this seem
|
|
|