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

Unified Diff: Source/core/paint/BlockFlowPainter.cpp

Issue 763173003: Convert RenderBlockFlow code to use FloatingObject references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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
« no previous file with comments | « Source/core/layout/shapes/ShapeOutsideInfo.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BlockFlowPainter.cpp
diff --git a/Source/core/paint/BlockFlowPainter.cpp b/Source/core/paint/BlockFlowPainter.cpp
index b082d1097a8e42b77da2f61759c127f3fa456ab8..a115c03a5115ec6aea37bfaaf776c7f1e3899ff5 100644
--- a/Source/core/paint/BlockFlowPainter.cpp
+++ b/Source/core/paint/BlockFlowPainter.cpp
@@ -22,26 +22,26 @@ void BlockFlowPainter::paintFloats(const PaintInfo& paintInfo, const LayoutPoint
const FloatingObjectSet& floatingObjectSet = m_layoutBlockFlow.floatingObjects()->set();
FloatingObjectSetIterator end = floatingObjectSet.end();
for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
- FloatingObject* floatingObject = it->get();
+ const FloatingObject& floatingObject = *it->get();
// Only paint the object if our m_shouldPaint flag is set.
- if (floatingObject->shouldPaint() && !floatingObject->layoutObject()->hasSelfPaintingLayer()) {
+ if (floatingObject.shouldPaint() && !floatingObject.layoutObject()->hasSelfPaintingLayer()) {
PaintInfo currentPaintInfo(paintInfo);
currentPaintInfo.phase = preservePhase ? paintInfo.phase : PaintPhaseBlockBackground;
// FIXME: LayoutPoint version of xPositionForFloatIncludingMargin would make this much cleaner.
LayoutPoint childPoint = m_layoutBlockFlow.flipFloatForWritingModeForChild(
floatingObject, LayoutPoint(paintOffset.x()
- + m_layoutBlockFlow.xPositionForFloatIncludingMargin(floatingObject) - floatingObject->layoutObject()->location().x(), paintOffset.y()
- + m_layoutBlockFlow.yPositionForFloatIncludingMargin(floatingObject) - floatingObject->layoutObject()->location().y()));
- floatingObject->layoutObject()->paint(currentPaintInfo, childPoint);
+ + m_layoutBlockFlow.xPositionForFloatIncludingMargin(floatingObject) - floatingObject.layoutObject()->location().x(), paintOffset.y()
+ + m_layoutBlockFlow.yPositionForFloatIncludingMargin(floatingObject) - floatingObject.layoutObject()->location().y()));
+ floatingObject.layoutObject()->paint(currentPaintInfo, childPoint);
if (!preservePhase) {
currentPaintInfo.phase = PaintPhaseChildBlockBackgrounds;
- floatingObject->layoutObject()->paint(currentPaintInfo, childPoint);
+ floatingObject.layoutObject()->paint(currentPaintInfo, childPoint);
currentPaintInfo.phase = PaintPhaseFloat;
- floatingObject->layoutObject()->paint(currentPaintInfo, childPoint);
+ floatingObject.layoutObject()->paint(currentPaintInfo, childPoint);
currentPaintInfo.phase = PaintPhaseForeground;
- floatingObject->layoutObject()->paint(currentPaintInfo, childPoint);
+ floatingObject.layoutObject()->paint(currentPaintInfo, childPoint);
currentPaintInfo.phase = PaintPhaseOutline;
- floatingObject->layoutObject()->paint(currentPaintInfo, childPoint);
+ floatingObject.layoutObject()->paint(currentPaintInfo, childPoint);
}
}
}
« no previous file with comments | « Source/core/layout/shapes/ShapeOutsideInfo.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698