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

Unified Diff: Source/core/rendering/line/LineWidth.cpp

Issue 763173003: Convert RenderBlockFlow code to use FloatingObject references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/core/rendering/line/LineWidth.cpp
diff --git a/Source/core/rendering/line/LineWidth.cpp b/Source/core/rendering/line/LineWidth.cpp
index fe51d904433a7cbd9e21a4e6a11cb16c1be2125c..0bf05214e99ed52a09c752764322cebe8322d80c 100644
--- a/Source/core/rendering/line/LineWidth.cpp
+++ b/Source/core/rendering/line/LineWidth.cpp
@@ -63,7 +63,7 @@ void LineWidth::updateAvailableWidth(LayoutUnit replacedHeight)
void LineWidth::shrinkAvailableWidthForNewFloatIfNeeded(FloatingObject* newFloat)
Julien - ping for review 2014/12/01 16:12:47 We could use a reference here too.
Sunil Ratnu 2015/03/16 08:06:30 Done.
{
LayoutUnit height = m_block.logicalHeight();
- if (height < m_block.logicalTopForFloat(newFloat) || height >= m_block.logicalBottomForFloat(newFloat))
+ if (height < m_block.logicalTopForFloat(*newFloat) || height >= m_block.logicalBottomForFloat(*newFloat))
return;
ShapeOutsideDeltas shapeDeltas;
@@ -73,7 +73,7 @@ void LineWidth::shrinkAvailableWidthForNewFloatIfNeeded(FloatingObject* newFloat
}
if (newFloat->type() == FloatingObject::FloatLeft) {
- float newLeft = m_block.logicalRightForFloat(newFloat).toFloat();
+ float newLeft = m_block.logicalRightForFloat(*newFloat).toFloat();
if (shapeDeltas.isValid()) {
if (shapeDeltas.lineOverlapsShape())
newLeft += shapeDeltas.rightMarginBoxDelta();
@@ -84,7 +84,7 @@ void LineWidth::shrinkAvailableWidthForNewFloatIfNeeded(FloatingObject* newFloat
newLeft += floorToInt(m_block.textIndentOffset());
m_left = std::max<float>(m_left, newLeft);
} else {
- float newRight = m_block.logicalLeftForFloat(newFloat).toFloat();
+ float newRight = m_block.logicalLeftForFloat(*newFloat).toFloat();
if (shapeDeltas.isValid()) {
if (shapeDeltas.lineOverlapsShape())
newRight += shapeDeltas.leftMarginBoxDelta();

Powered by Google App Engine
This is Rietveld 408576698