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

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

Issue 1106533002: Formatting contexts should always expand to enclose floats (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated 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/FloatingObjects.h
diff --git a/Source/core/layout/FloatingObjects.h b/Source/core/layout/FloatingObjects.h
index d8b23de4d17c1503e4c8ddcc599c0b2425532ccd..9d932e259e6710d839d47e71b22f8a702d8624a5 100644
--- a/Source/core/layout/FloatingObjects.h
+++ b/Source/core/layout/FloatingObjects.h
@@ -87,6 +87,8 @@ public:
void setShouldPaint(bool shouldPaint) { m_shouldPaint = shouldPaint; }
bool isDescendant() const { return m_isDescendant; }
void setIsDescendant(bool isDescendant) { m_isDescendant = isDescendant; }
+ bool isLowestNonOverhangingFloatInChild() const { return m_isLowestNonOverhangingFloatInChild; }
+ void setIsLowestNonOverhangingFloatInChild(bool isLowestNonOverhangingFloatInChild) { m_isLowestNonOverhangingFloatInChild = isLowestNonOverhangingFloatInChild; }
// FIXME: Callers of these methods are dangerous and should be whitelisted explicitly or removed.
RootInlineBox* originatingLine() const { return m_originatingLine; }
@@ -94,7 +96,7 @@ public:
private:
explicit FloatingObject(LayoutBox*);
- FloatingObject(LayoutBox*, Type, const LayoutRect&, bool shouldPaint, bool isDescendant);
+ FloatingObject(LayoutBox*, Type, const LayoutRect&, bool shouldPaint, bool isDescendant, bool isLowestNonOverhangingFloatInChild);
LayoutBox* m_layoutObject;
RootInlineBox* m_originatingLine;
@@ -105,6 +107,7 @@ private:
unsigned m_shouldPaint : 1;
unsigned m_isDescendant : 1;
unsigned m_isPlaced : 1;
+ unsigned m_isLowestNonOverhangingFloatInChild : 1;
#if ENABLE(ASSERT)
unsigned m_isInPlacedTree : 1;
#endif
@@ -158,11 +161,12 @@ public:
LayoutUnit logicalRightOffsetForPositioningFloat(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit* heightRemaining);
LayoutUnit lowestFloatLogicalBottom(FloatingObject::Type);
+ FloatingObject* lowestFloatingObject() const;
private:
bool hasLowestFloatLogicalBottomCached(bool isHorizontal, FloatingObject::Type floatType) const;
LayoutUnit getCachedlowestFloatLogicalBottom(FloatingObject::Type floatType) const;
- void setCachedLowestFloatLogicalBottom(bool isHorizontal, FloatingObject::Type floatType, LayoutUnit value);
+ void setCachedLowestFloatLogicalBottom(bool isHorizontal, FloatingObject::Type floatType, FloatingObject*);
void markLowestFloatLogicalBottomCacheAsDirty();
void computePlacedFloatsTree();
@@ -185,7 +189,7 @@ private:
struct FloatBottomCachedValue {
FloatBottomCachedValue();
- LayoutUnit value;
+ FloatingObject* floatingObject;
bool dirty;
};
FloatBottomCachedValue m_lowestFloatBottomCache[2];
« no previous file with comments | « LayoutTests/platform/linux/fast/repaint/float-overflow-right-expected.txt ('k') | Source/core/layout/FloatingObjects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698