Chromium Code Reviews| Index: Source/core/frame/FrameView.cpp |
| diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp |
| index f76f2ad58e969019ea583c52f468551281fd1044..e040bc4b346714cc4062a947d3f2d89d516cdca8 100644 |
| --- a/Source/core/frame/FrameView.cpp |
| +++ b/Source/core/frame/FrameView.cpp |
| @@ -370,8 +370,10 @@ void FrameView::setFrameRect(const IntRect& newRect) |
| return; |
| // Autosized font sizes depend on the width of the viewing area. |
| + bool mainFrameWidthChanged = false; |
| if (newRect.width() != oldRect.width()) { |
| if (isMainFrame()) { |
| + mainFrameWidthChanged = true; |
| if (m_frame->settings()->textAutosizingEnabled()) { |
| for (LocalFrame* frame = m_frame.get(); frame; frame = frame->tree().traverseNext()) { |
| if (TextAutosizer* textAutosizer = frame->document()->textAutosizer()) |
| @@ -385,6 +387,12 @@ void FrameView::setFrameRect(const IntRect& newRect) |
| updateScrollableAreaSet(); |
| + if (mainFrameWidthChanged) { |
| + // This needs to be after the call to ScrollView::setFrameRect, because it reads the new width. |
| + if (FastTextAutosizer* textAutosizer = m_frame->document()->fastTextAutosizer()) |
| + textAutosizer->updatePageInfoInAllFrames(); |
| + } |
| + |
| if (RenderView* renderView = this->renderView()) { |
| if (renderView->usesCompositing()) |
| renderView->compositor()->frameViewDidChangeSize(); |
| @@ -1746,6 +1754,11 @@ void FrameView::repaintContentRectangle(const IntRect& r) |
| void FrameView::contentsResized() |
| { |
| + if (isMainFrame()) { |
|
pdr.
2014/03/24 01:03:18
Is this testable?
skobes
2014/03/25 01:23:24
This notifies the FTA when the layout size changes
|
| + if (FastTextAutosizer* textAutosizer = m_frame->document()->fastTextAutosizer()) |
| + textAutosizer->updatePageInfoInAllFrames(); |
| + } |
| + |
| ScrollView::contentsResized(); |
| setNeedsLayout(); |
| } |