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

Unified Diff: Source/core/layout/LayoutBlock.h

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: float tests added + cleanup a bit Created 5 years, 7 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/LayoutBlock.h
diff --git a/Source/core/layout/LayoutBlock.h b/Source/core/layout/LayoutBlock.h
index 67b040080b73063d58ee5f9e854cd31ce098a190..4a3115a9d4b33d7d0c4c004982e5d67a10a3840e 100644
--- a/Source/core/layout/LayoutBlock.h
+++ b/Source/core/layout/LayoutBlock.h
@@ -281,6 +281,7 @@ protected:
virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const override;
virtual void computePreferredLogicalWidths() override;
void adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const;
+ void minMaxPreferredLogicalWidthOfChild(LayoutObject& child, LayoutUnit& minPreferredLogicalWidth, LayoutUnit& maxPreferredLogicalWidth) const;
virtual int firstLineBoxBaseline() const override;
virtual int inlineBlockBaseline(LineDirectionMode) const override;
@@ -452,6 +453,10 @@ protected:
public:
virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const override final;
+ bool needsRecalcLogicalWidthAfterLayoutChildren() const { return m_needsRecalcLogicalWidthAfterLayoutChildren; }
+ void setNeedsRecalcLogicalWidthAfterLayoutChildren() { m_needsRecalcLogicalWidthAfterLayoutChildren = true; }
+ void clearNeedsRecalcLogicalWidthAfterLayoutChildren() { m_needsRecalcLogicalWidthAfterLayoutChildren = false; }
+
protected:
LayoutObjectChildList m_children;
LineBoxList m_lineBoxes; // All of the root line boxes created for this block flow. For example, <div>Hello<br>world.</div> will have two total lines for the <div>.
@@ -465,6 +470,7 @@ protected:
unsigned m_widthAvailableToChildrenChanged : 1;
mutable unsigned m_hasOnlySelfCollapsingChildren : 1;
mutable unsigned m_descendantsWithFloatsMarkedForLayout : 1;
+ mutable unsigned m_needsRecalcLogicalWidthAfterLayoutChildren : 1;
// LayoutRubyBase objects need to be able to split and merge, moving their children around
// (calling moveChildTo, moveAllChildrenTo, and makeChildrenNonInline).

Powered by Google App Engine
This is Rietveld 408576698