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

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

Issue 1164933006: Create LineLayout api (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: naming nits, remove unimplemented operators 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/line/LineWidth.cpp
diff --git a/Source/core/layout/line/LineWidth.cpp b/Source/core/layout/line/LineWidth.cpp
index 9ca13dc6ce21a079eef9a71e5cf1118731522f10..231b9dbeb6b6da9c08163fca5d5436cff5195288 100644
--- a/Source/core/layout/line/LineWidth.cpp
+++ b/Source/core/layout/line/LineWidth.cpp
@@ -35,7 +35,7 @@
namespace blink {
-LineWidth::LineWidth(LayoutBlockFlow& block, bool isFirstLine, IndentTextOrNot shouldIndentText)
+LineWidth::LineWidth(LineLayoutBlockFlow block, bool isFirstLine, IndentTextOrNot shouldIndentText)
: m_block(block)
, m_uncommittedWidth(0)
, m_committedWidth(0)
@@ -119,7 +119,7 @@ void LineWidth::applyOverhang(LayoutRubyRun* rubyRun, LayoutObject* startLayoutO
m_overhangWidth += startOverhang + endOverhang;
}
-inline static float availableWidthAtOffset(const LayoutBlockFlow& block, const LayoutUnit& offset, bool shouldIndentText, float& newLineLeft,
+inline static float availableWidthAtOffset(LineLayoutBlockFlow block, const LayoutUnit& offset, bool shouldIndentText, float& newLineLeft,
float& newLineRight, const LayoutUnit& lineHeight = 0)
{
newLineLeft = block.logicalLeftOffsetForLine(offset, shouldIndentText, lineHeight).toFloat();
@@ -173,7 +173,7 @@ void LineWidth::fitBelowFloats(bool isFirstLine)
float newLineLeft = m_left;
float newLineRight = m_right;
- FloatingObject* lastFloatFromPreviousLine = (m_block.containsFloats() ? m_block.m_floatingObjects->set().last().get() : 0);
+ FloatingObject* lastFloatFromPreviousLine = m_block.lastFloatFromPreviousLine();
if (lastFloatFromPreviousLine && lastFloatFromPreviousLine->layoutObject()->shapeOutsideInfo())
return wrapNextToShapeOutside(isFirstLine);

Powered by Google App Engine
This is Rietveld 408576698