Index: Source/core/frame/FrameView.cpp |
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp |
index 95f79cbc724c033eeb430f97c5e0db39788b65c4..bfea1985d792b2aaa4c0570c89b515dae7b184f5 100644 |
--- a/Source/core/frame/FrameView.cpp |
+++ b/Source/core/frame/FrameView.cpp |
@@ -883,7 +883,6 @@ void FrameView::layout(bool allowSubtree) |
return; |
} |
- bool shouldDoFullLayout = false; |
FontCachePurgePreventer fontCachePurgePreventer; |
RenderLayer* layer; |
{ |
@@ -909,7 +908,7 @@ void FrameView::layout(bool allowSubtree) |
ScrollbarMode vMode; |
calculateScrollbarModesForLayoutAndSetViewportRenderer(hMode, vMode); |
- shouldDoFullLayout = !inSubtreeLayout && (m_firstLayout || toRenderView(rootForThisLayout)->document().printing()); |
+ bool shouldDoFullRepaint = !inSubtreeLayout && (m_firstLayout || toRenderView(rootForThisLayout)->document().printing()); |
if (!inSubtreeLayout) { |
// Now set our scrollbar state for the layout. |
@@ -942,7 +941,9 @@ void FrameView::layout(bool allowSubtree) |
m_size = LayoutSize(layoutSize().width(), layoutSize().height()); |
if (oldSize != m_size) { |
- shouldDoFullLayout = true; |
+ if (!renderView()->style()->isHorizontalWritingMode() || oldSize.width() != m_size.width()) |
ojan
2014/03/28 01:51:36
I'm not sure I follow this...isn't it also the cas
Xianzhu
2014/03/28 16:26:01
Added comments here.
|
+ shouldDoFullRepaint = true; |
+ |
if (!m_firstLayout) { |
RenderBox* rootRenderer = document->documentElement() ? document->documentElement()->renderBox() : 0; |
RenderBox* bodyRenderer = rootRenderer && document->body() ? document->body()->renderBox() : 0; |
@@ -958,7 +959,7 @@ void FrameView::layout(bool allowSubtree) |
// We need to set m_doFullRepaint before triggering layout as RenderObject::checkForRepaint |
// checks the boolean to disable local repaints. |
- m_doFullRepaint |= shouldDoFullLayout; |
+ m_doFullRepaint |= shouldDoFullRepaint; |
performLayout(rootForThisLayout, inSubtreeLayout); |
@@ -1746,7 +1747,8 @@ void FrameView::repaintContentRectangle(const IntRect& r) |
void FrameView::contentsResized() |
{ |
ScrollView::contentsResized(); |
- setNeedsLayout(); |
+ if (RenderView* renderView = this->renderView()) |
+ renderView->setNeedsLayout(MarkContainingBlockChain, nullptr, false); |
} |
void FrameView::scrollbarExistenceDidChange() |