Chromium Code Reviews| Index: Source/core/page/FrameView.cpp |
| diff --git a/Source/core/page/FrameView.cpp b/Source/core/page/FrameView.cpp |
| index 8ff98d3bef09f7fdc669210827a202239ef35394..858724603bfe62c4c5df3ef28ebd873588303e5c 100644 |
| --- a/Source/core/page/FrameView.cpp |
| +++ b/Source/core/page/FrameView.cpp |
| @@ -474,6 +474,24 @@ void FrameView::setMarginHeight(LayoutUnit h) |
| m_margins.setHeight(h); |
| } |
| +IntSize FrameView::layoutSize(VisibleContentRectIncludesScrollbars scrollbarInclusion) const |
| +{ |
| + if (m_layoutSize.isEmpty()) |
| + return ScrollView::layoutSize(scrollbarInclusion); |
|
aelias_OOO_until_Jul13
2013/07/31 22:31:21
I don't think we should keep using the ScrollView:
|
| + |
| + return m_layoutSize; |
| +} |
| + |
| +void FrameView::setLayoutSize(const IntSize& newSize) |
|
aelias_OOO_until_Jul13
2013/07/31 22:31:21
Could you just layout() when this is called and re
|
| +{ |
| + if (m_layoutSize == newSize) |
| + return; |
| + |
| + m_layoutSize = newSize; |
| + updateScrollbars(scrollOffset()); |
| + contentsResized(); |
| +} |
| + |
| void FrameView::setCanHaveScrollbars(bool canHaveScrollbars) |
| { |
| m_canHaveScrollbars = canHaveScrollbars; |
| @@ -1712,7 +1730,7 @@ void FrameView::visibleContentsResized() |
| if (!frame()->view()) |
| return; |
| - if (!useFixedLayout() && needsLayout()) |
| + if (m_layoutSize.isEmpty() && needsLayout()) |
| layout(); |
| if (RenderView* renderView = this->renderView()) { |