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

Unified Diff: Source/core/rendering/RenderBlockFlow.h

Issue 583023002: Move paint code from RenderBlockFlow into BlockFlowPainter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix Created 6 years, 3 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/paint/BlockFlowPainter.cpp ('k') | Source/core/rendering/RenderBlockFlow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlockFlow.h
diff --git a/Source/core/rendering/RenderBlockFlow.h b/Source/core/rendering/RenderBlockFlow.h
index 9d332ae8d4850b7f1494951fb57b1e95b6da92cc..5a1c74152196876e9a7943431f0b380910a9200b 100644
--- a/Source/core/rendering/RenderBlockFlow.h
+++ b/Source/core/rendering/RenderBlockFlow.h
@@ -186,6 +186,24 @@ public:
virtual bool avoidsFloats() const OVERRIDE;
+ LayoutUnit xPositionForFloatIncludingMargin(const FloatingObject* child) const
+ {
+ if (isHorizontalWritingMode())
+ return child->x() + child->renderer()->marginLeft();
+
+ return child->x() + marginBeforeForChild(child->renderer());
+ }
+
+ LayoutUnit yPositionForFloatIncludingMargin(const FloatingObject* child) const
+ {
+ if (isHorizontalWritingMode())
+ return child->y() + marginBeforeForChild(child->renderer());
+
+ return child->y() + child->renderer()->marginTop();
+ }
+
+ LayoutPoint flipFloatForWritingModeForChild(const FloatingObject*, const LayoutPoint&) const;
+
protected:
void rebuildFloatsFromIntruding();
void layoutInlineChildren(bool relayoutChildren, LayoutUnit& paintInvalidationLogicalTop, LayoutUnit& paintInvalidationLogicalBottom, LayoutUnit afterEdge);
@@ -221,24 +239,6 @@ private:
void adjustPositionedBlock(RenderBox* child, const MarginInfo&);
void adjustFloatingBlock(const MarginInfo&);
- LayoutPoint flipFloatForWritingModeForChild(const FloatingObject*, const LayoutPoint&) const;
-
- LayoutUnit xPositionForFloatIncludingMargin(const FloatingObject* child) const
- {
- if (isHorizontalWritingMode())
- return child->x() + child->renderer()->marginLeft();
-
- return child->x() + marginBeforeForChild(child->renderer());
- }
-
- LayoutUnit yPositionForFloatIncludingMargin(const FloatingObject* child) const
- {
- if (isHorizontalWritingMode())
- return child->y() + marginBeforeForChild(child->renderer());
-
- return child->y() + child->renderer()->marginTop();
- }
-
LayoutPoint computeLogicalLocationForFloat(const FloatingObject*, LayoutUnit logicalTopOffset) const;
FloatingObject* insertFloatingObject(RenderBox*);
@@ -393,6 +393,9 @@ public:
};
LayoutUnit marginOffsetForSelfCollapsingBlock();
+ FloatingObjects* floatingObjects() { return m_floatingObjects.get(); }
+
+
protected:
LayoutUnit maxPositiveMarginBefore() const { return m_rareData ? m_rareData->m_margins.positiveMarginBefore() : RenderBlockFlowRareData::positiveMarginBeforeDefault(this); }
LayoutUnit maxNegativeMarginBefore() const { return m_rareData ? m_rareData->m_margins.negativeMarginBefore() : RenderBlockFlowRareData::negativeMarginBeforeDefault(this); }
« no previous file with comments | « Source/core/paint/BlockFlowPainter.cpp ('k') | Source/core/rendering/RenderBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698