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

Unified Diff: Source/core/rendering/line/BreakingContextInlineHeaders.h

Issue 752723004: Use references in RenderBlock and RenderBlockFlow methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: cover RenderBlockFlow class as well Created 6 years, 1 month 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/rendering/RenderTable.cpp ('k') | Source/core/rendering/line/LineBreaker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/line/BreakingContextInlineHeaders.h
diff --git a/Source/core/rendering/line/BreakingContextInlineHeaders.h b/Source/core/rendering/line/BreakingContextInlineHeaders.h
index 2330f454c510859f4938d049ab8dc395d12591c7..b69dbfe4d57ae63519e7ad2785f4e12616496a5a 100644
--- a/Source/core/rendering/line/BreakingContextInlineHeaders.h
+++ b/Source/core/rendering/line/BreakingContextInlineHeaders.h
@@ -216,7 +216,7 @@ inline void setStaticPositions(RenderBlockFlow* block, RenderBox* child)
// container changing width.
child->moveWithEdgeOfInlineContainerIfNecessary(child->isHorizontalWritingMode());
}
- block->updateStaticInlinePositionForChild(child, blockHeight);
+ block->updateStaticInlinePositionForChild(*child, blockHeight);
child->layer()->setStaticBlockPosition(blockHeight);
}
@@ -233,7 +233,7 @@ inline void BreakingContext::skipTrailingWhitespace(InlineIterator& iterator, co
if (object->isOutOfFlowPositioned())
setStaticPositions(m_block, toRenderBox(object));
else if (object->isFloating())
- m_block->insertFloatingObject(toRenderBox(object));
+ m_block->insertFloatingObject(*toRenderBox(object));
iterator.increment();
}
}
@@ -342,7 +342,7 @@ inline void BreakingContext::handleOutOfFlowPositioned(Vector<RenderBox*>& posit
RenderBox* box = toRenderBox(m_current.object());
bool isInlineType = box->style()->isOriginalDisplayInlineType();
if (!isInlineType) {
- m_block->setStaticInlinePositionForChild(box, m_block->startOffsetForContent());
+ m_block->setStaticInlinePositionForChild(*box, m_block->startOffsetForContent());
} else {
// If our original display was an INLINE type, then we can go ahead
// and determine our static y position now.
@@ -366,7 +366,7 @@ inline void BreakingContext::handleOutOfFlowPositioned(Vector<RenderBox*>& posit
inline void BreakingContext::handleFloat()
{
RenderBox* floatBox = toRenderBox(m_current.object());
- FloatingObject* floatingObject = m_block->insertFloatingObject(floatBox);
+ FloatingObject* floatingObject = m_block->insertFloatingObject(*floatBox);
// check if it fits in the current line.
// If it does, position it now, otherwise, position
// it after moving to next line (in newLine() func)
@@ -461,7 +461,7 @@ inline void BreakingContext::handleReplaced()
// Optimize for a common case. If we can't find whitespace after the list
// item, then this is all moot.
- LayoutUnit replacedLogicalWidth = m_block->logicalWidthForChild(replacedBox) + m_block->marginStartForChild(replacedBox) + m_block->marginEndForChild(replacedBox) + inlineLogicalWidth(m_current.object());
+ LayoutUnit replacedLogicalWidth = m_block->logicalWidthForChild(*replacedBox) + m_block->marginStartForChild(*replacedBox) + m_block->marginEndForChild(*replacedBox) + inlineLogicalWidth(m_current.object());
if (m_current.object()->isListMarker()) {
if (m_blockStyle->collapseWhiteSpace() && shouldSkipWhitespaceAfterStartObject(m_block, m_current.object(), m_lineMidpointState)) {
// Like with inline flows, we start ignoring spaces to make sure that any
« no previous file with comments | « Source/core/rendering/RenderTable.cpp ('k') | Source/core/rendering/line/LineBreaker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698