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

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

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/BreakingContextInlineHeaders.h
diff --git a/Source/core/rendering/line/BreakingContextInlineHeaders.h b/Source/core/rendering/line/BreakingContextInlineHeaders.h
index c7de49ca2289e49ebf032886af3cd1049f56c215..c808288202f8c0228704ef875cda4116e7937d4e 100644
--- a/Source/core/rendering/line/BreakingContextInlineHeaders.h
+++ b/Source/core/rendering/line/BreakingContextInlineHeaders.h
@@ -36,7 +36,6 @@
#include "core/rendering/line/LineInfo.h"
#include "core/rendering/line/LineWidth.h"
#include "core/rendering/line/TrailingObjects.h"
-#include "core/rendering/shapes/ShapeInsideInfo.h"
#include "core/rendering/svg/RenderSVGInlineText.h"
namespace WebCore {
@@ -507,51 +506,6 @@ inline float firstPositiveWidth(const WordMeasurements& wordMeasurements)
return 0;
}
-inline void updateSegmentsForShapes(RenderBlockFlow* block, const FloatingObject* lastFloatFromPreviousLine, const WordMeasurements& wordMeasurements, LineWidth& width, bool isFirstLine)
-{
- ASSERT(lastFloatFromPreviousLine);
-
- ShapeInsideInfo* shapeInsideInfo = block->layoutShapeInsideInfo();
- if (!lastFloatFromPreviousLine->isPlaced() || !shapeInsideInfo)
- return;
-
- bool isHorizontalWritingMode = block->isHorizontalWritingMode();
- LayoutUnit logicalOffsetFromShapeContainer = block->logicalOffsetFromShapeAncestorContainer(&shapeInsideInfo->owner()).height();
-
- LayoutUnit lineLogicalTop = block->logicalHeight() + logicalOffsetFromShapeContainer;
- LayoutUnit lineLogicalHeight = block->lineHeight(isFirstLine, isHorizontalWritingMode ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes);
- LayoutUnit lineLogicalBottom = lineLogicalTop + lineLogicalHeight;
-
- LayoutUnit floatLogicalTop = block->logicalTopForFloat(lastFloatFromPreviousLine);
- LayoutUnit floatLogicalBottom = block->logicalBottomForFloat(lastFloatFromPreviousLine);
-
- bool lineOverlapsWithFloat = (floatLogicalTop < lineLogicalBottom) && (lineLogicalTop < floatLogicalBottom);
- if (!lineOverlapsWithFloat)
- return;
-
- // FIXME: We need to remove this once we support multiple-segment polygons
- if (shapeInsideInfo->segments().size() > 1)
- return;
-
- float minSegmentWidth = firstPositiveWidth(wordMeasurements);
-
- LayoutUnit floatLogicalWidth = block->logicalWidthForFloat(lastFloatFromPreviousLine);
- LayoutUnit availableLogicalWidth = block->logicalWidth() - block->logicalRightForFloat(lastFloatFromPreviousLine);
- if (availableLogicalWidth < minSegmentWidth)
- block->setLogicalHeight(floatLogicalBottom);
-
- if (block->logicalHeight() < floatLogicalTop) {
- shapeInsideInfo->adjustLogicalLineTop(minSegmentWidth + floatLogicalWidth);
- block->setLogicalHeight(shapeInsideInfo->logicalLineTop() - logicalOffsetFromShapeContainer);
- }
-
- lineLogicalTop = block->logicalHeight() + logicalOffsetFromShapeContainer;
-
- shapeInsideInfo->updateSegmentsForLine(lineLogicalTop, lineLogicalHeight);
- width.updateCurrentShapeSegment();
- width.updateAvailableWidth();
-}
-
inline float measureHyphenWidth(RenderText* renderer, const Font& font, TextDirection textDirection)
{
RenderStyle* style = renderer->style();
@@ -719,9 +673,6 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
m_appliedStartWidth = true;
}
- if (m_lastFloatFromPreviousLine)
- updateSegmentsForShapes(m_block, m_lastFloatFromPreviousLine, wordMeasurements, m_width, m_lineInfo.isFirstLine());
-
applyWordSpacing = wordSpacing && m_currentCharacterIsSpace;
if (!m_width.committedWidth() && m_autoWrap && !m_width.fitsOnLine())

Powered by Google App Engine
This is Rietveld 408576698