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

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

Issue 1121173002: Fix shrink-to-fit when children's writing-mode is orthogonal (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tests and test results updated Created 5 years, 8 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
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutObject.cpp
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp
index 42299e6ca972a7887e4ea34179f8627f9a1a8637..cd4d65207ae6dfc28b061e223c34b1eadd0e7ffd 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -797,6 +797,17 @@ inline void LayoutObject::invalidateContainerPreferredLogicalWidths()
}
}
+void LayoutObject::minMaxPreferredLogicalWidthForParent(LayoutUnit& minPreferredLogicalWidth, LayoutUnit& maxPreferredLogicalWidth) const
+{
+ if (isBox() && toLayoutBox(this)->isWritingModeOrthogonalToParent()) {
+ const_cast<LayoutObject*>(this)->layoutIfNeeded();
eae 2015/05/04 00:06:59 I'd rather try to avoid calling layout during pref
+ minPreferredLogicalWidth = maxPreferredLogicalWidth = toLayoutBox(this)->logicalHeight();
+ return;
+ }
+ minPreferredLogicalWidth = this->minPreferredLogicalWidth();
+ maxPreferredLogicalWidth = this->maxPreferredLogicalWidth();
+}
+
LayoutBlock* LayoutObject::containerForFixedPosition(const LayoutBoxModelObject* paintInvalidationContainer, bool* paintInvalidationContainerSkipped) const
{
ASSERT(!paintInvalidationContainerSkipped || !*paintInvalidationContainerSkipped);
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698