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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutFlexibleBox.h

Issue 1639723003: [css-flexbox] Use correct aspect ratio for min-size: auto (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 11 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: third_party/WebKit/Source/core/layout/LayoutFlexibleBox.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.h b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.h
index a4948ca887e121316082056525893d4280ea4292..d2605bdb7c0a33c2c771c9e809251df8156dbc30 100644
--- a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.h
+++ b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.h
@@ -127,12 +127,15 @@ private:
LayoutUnit crossAxisScrollbarExtent() const;
LayoutUnit crossAxisScrollbarExtentForChild(const LayoutBox& child) const;
LayoutPoint flowAwareLocationForChild(const LayoutBox& child) const;
+ bool useChildAspectRatio(const LayoutBox& child) const;
+ LayoutUnit computeMainSizeFromAspectRatioUsing(const LayoutBox& child, Length crossSizeLength) const;
void setFlowAwareLocationForChild(LayoutBox& child, const LayoutPoint&);
void adjustAlignmentForChild(LayoutBox& child, LayoutUnit);
ItemPosition alignmentForChild(const LayoutBox& child) const;
LayoutUnit mainAxisBorderAndPaddingExtentForChild(const LayoutBox& child) const;
LayoutUnit computeInnerFlexBaseSizeForChild(LayoutBox& child, ChildLayoutType = LayoutIfNeeded);
bool mainAxisLengthIsDefinite(const LayoutBox& child, const Length& flexBasis) const;
+ bool crossAxisLengthIsDefinite(const LayoutBox& child, const Length& flexBasis) const;
bool childFlexBaseSizeRequiresLayout(const LayoutBox& child) const;
bool needToStretchChildLogicalHeight(const LayoutBox& child) const;
bool childHasIntrinsicMainAxisSize(const LayoutBox& child) const;
@@ -154,6 +157,7 @@ private:
LayoutUnit computeChildMarginValue(Length margin);
void prepareOrderIteratorAndMargins();
LayoutUnit adjustChildSizeForMinAndMax(const LayoutBox& child, LayoutUnit childSize);
+ LayoutUnit adjustChildSizeForAspectRatioCrossAxisMinAndMax(const LayoutBox& child, LayoutUnit childSize);
// The hypothetical main size of an item is the flex base size clamped according to its min and max main size properties
bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& sumFlexBaseSize, double& totalFlexGrow, double& totalFlexShrink, double& totalWeightedFlexShrink, LayoutUnit& sumHypotheticalMainSize, bool relayoutChildren);

Powered by Google App Engine
This is Rietveld 408576698