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

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

Issue 209443007: Remove shape-inside support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix Zoltan's comments Created 6 years, 9 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/rendering/line/LineWidth.cpp
diff --git a/Source/core/rendering/line/LineWidth.cpp b/Source/core/rendering/line/LineWidth.cpp
index d5fc96c4f386bc24f3603d216763bbb85bbaea8a..d9d765617bd6dec2c752510bbc7b445f1028e480 100644
--- a/Source/core/rendering/line/LineWidth.cpp
+++ b/Source/core/rendering/line/LineWidth.cpp
@@ -43,11 +43,9 @@ LineWidth::LineWidth(RenderBlockFlow& block, bool isFirstLine, IndentTextOrNot s
, m_left(0)
, m_right(0)
, m_availableWidth(0)
- , m_segment(0)
, m_isFirstLine(isFirstLine)
, m_shouldIndentText(shouldIndentText)
{
- updateCurrentShapeSegment();
updateAvailableWidth();
}
@@ -58,11 +56,6 @@ void LineWidth::updateAvailableWidth(LayoutUnit replacedHeight)
m_left = m_block.logicalLeftOffsetForLine(height, shouldIndentText(), logicalHeight).toFloat();
m_right = m_block.logicalRightOffsetForLine(height, shouldIndentText(), logicalHeight).toFloat();
- if (m_segment) {
- m_left = std::max<float>(m_segment->logicalLeft, m_left);
- m_right = std::min<float>(m_segment->logicalRight, m_right);
- }
-
computeAvailableWidthFromLeftAndRight();
}
@@ -206,30 +199,12 @@ void LineWidth::fitBelowFloats(bool isFirstLine)
newLineWidth = availableWidthAtOffset(m_block, floatLogicalBottom, shouldIndentText(), newLineLeft, newLineRight);
lastFloatLogicalBottom = floatLogicalBottom;
- if (newLineWidth >= m_uncommittedWidth) {
- ShapeInsideInfo* shapeInsideInfo = m_block.layoutShapeInsideInfo();
- if (shapeInsideInfo) {
- // To safely update our shape segments, the current segment must be the first in this line, so committedWidth has to be 0
- ASSERT(!m_committedWidth);
-
- LayoutUnit logicalOffsetFromShapeContainer = m_block.logicalOffsetFromShapeAncestorContainer(&shapeInsideInfo->owner()).height();
- LayoutUnit lineHeight = m_block.lineHeight(false, m_block.isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes);
- shapeInsideInfo->updateSegmentsForLine(lastFloatLogicalBottom + logicalOffsetFromShapeContainer, lineHeight);
- updateCurrentShapeSegment();
- updateAvailableWidth();
- }
+ if (newLineWidth >= m_uncommittedWidth)
break;
- }
}
updateLineDimension(lastFloatLogicalBottom, newLineWidth, newLineLeft, newLineRight);
}
-void LineWidth::updateCurrentShapeSegment()
-{
- if (ShapeInsideInfo* shapeInsideInfo = m_block.layoutShapeInsideInfo())
- m_segment = shapeInsideInfo->currentSegment();
-}
-
void LineWidth::computeAvailableWidthFromLeftAndRight()
{
m_availableWidth = max(0.0f, m_right - m_left) + m_overhangWidth;

Powered by Google App Engine
This is Rietveld 408576698