Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1204)

Unified Diff: Source/core/layout/LayoutBox.cpp

Issue 1184563002: Fix broken preferred widths optimization involving subtree layout roots (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/layout/LayoutBox.cpp
diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp
index a73c9fa68a333709f851161cef7003549fd8c997..c97ccce337231de5d2346bd70f405146bf0fb45b 100644
--- a/Source/core/layout/LayoutBox.cpp
+++ b/Source/core/layout/LayoutBox.cpp
@@ -1947,7 +1947,7 @@ void LayoutBox::computeLogicalWidth(LogicalExtentComputedValues& computedValues)
}
// If layout is limited to a subtree, the subtree root's logical width does not change.
- if (node() && view()->frameView() && view()->frameView()->isLayoutRoot(*this))
+ if (node() && !parent()->needsLayout() && view()->frameView() && view()->frameView()->isLayoutRoot(*this))
chrishtr 2015/06/12 00:42:26 Maybe just delete the early-out? Does it matter?
esprehn 2015/06/12 00:44:52 It'd be nice to avoid computing preferredLogicalWi
return;
// The parent box is flexing us, so it has increased or decreased our

Powered by Google App Engine
This is Rietveld 408576698