Reviewed by Darin, landed by ap.
[WebKit-https.git] / WebCore / rendering / RenderBox.cpp
index d7804f430f2583a465e5fbc8cf61feecd2f38427..0e13ba6b0c5f9f34ccb65636cee8327c40743cd2 100644 (file)
@@ -973,6 +973,10 @@ void RenderBox::calcWidth()
         return;
     }
     
+    // If layout is limited to a subtree, the subtree root's width does not change.
+    if (node() && view()->frameView() && view()->frameView()->layoutRoot() == node())
+        return;
+
     // The parent box is flexing us, so it has increased or decreased our
     // width.  Use the width from the style context.
     if (m_overrideSize != -1 && parent()->style()->boxOrient() == HORIZONTAL