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

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

Issue 351213002: Change RenderObject::style(bool) to accept an enum instead (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed enum to OwnOrFirstLineStyle, rebased and got rid of duplicate state on the stack in RootInl… Created 6 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
« no previous file with comments | « Source/core/rendering/line/BreakingContextInlineHeaders.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/line/LineWidth.cpp
diff --git a/Source/core/rendering/line/LineWidth.cpp b/Source/core/rendering/line/LineWidth.cpp
index 1b46843d9f4b7fd32b053d09cfac0cb24625f28d..40042abad60514c73891736a3fe4d1cc5a11eed2 100644
--- a/Source/core/rendering/line/LineWidth.cpp
+++ b/Source/core/rendering/line/LineWidth.cpp
@@ -53,7 +53,7 @@ LineWidth::LineWidth(RenderBlockFlow& block, bool isFirstLine, IndentTextOrNot s
void LineWidth::updateAvailableWidth(LayoutUnit replacedHeight)
{
LayoutUnit height = m_block.logicalHeight();
- LayoutUnit logicalHeight = m_block.minLineHeightForReplacedRenderer(m_isFirstLine, replacedHeight);
+ LayoutUnit logicalHeight = m_block.minLineHeightForReplacedRenderer(m_isFirstLine ? FirstLineStyle : OwnStyle, replacedHeight);
m_left = m_block.logicalLeftOffsetForLine(height, shouldIndentText(), logicalHeight).toFloat();
m_right = m_block.logicalRightOffsetForLine(height, shouldIndentText(), logicalHeight).toFloat();
@@ -68,7 +68,7 @@ void LineWidth::shrinkAvailableWidthForNewFloatIfNeeded(FloatingObject* newFloat
ShapeOutsideInfo* shapeOutsideInfo = newFloat->renderer()->shapeOutsideInfo();
if (shapeOutsideInfo) {
- LayoutUnit lineHeight = m_block.lineHeight(m_isFirstLine, m_block.isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes);
+ LayoutUnit lineHeight = m_block.lineHeight(m_isFirstLine ? FirstLineStyle : OwnStyle, m_block.isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes);
shapeOutsideInfo->updateDeltasForContainingBlockLine(m_block, *newFloat, m_block.logicalHeight(), lineHeight);
}
@@ -109,7 +109,7 @@ void LineWidth::applyOverhang(RenderRubyRun* rubyRun, RenderObject* startRendere
{
int startOverhang;
int endOverhang;
- rubyRun->getOverhang(m_isFirstLine, startRenderer, endRenderer, startOverhang, endOverhang);
+ rubyRun->getOverhang(m_isFirstLine ? FirstLineStyle : OwnStyle, startRenderer, endRenderer, startOverhang, endOverhang);
startOverhang = std::min<int>(startOverhang, m_committedWidth);
m_availableWidth += startOverhang;
@@ -156,7 +156,7 @@ inline static bool isWholeLineFit(const RenderBlockFlow& block, const LayoutUnit
void LineWidth::wrapNextToShapeOutside(bool isFirstLine)
{
- LayoutUnit lineHeight = m_block.lineHeight(isFirstLine, m_block.isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes);
+ LayoutUnit lineHeight = m_block.lineHeight(isFirstLine ? FirstLineStyle : OwnStyle, m_block.isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes);
LayoutUnit lineLogicalTop = m_block.logicalHeight();
LayoutUnit newLineTop = lineLogicalTop;
LayoutUnit floatLogicalBottom = m_block.nextFloatLogicalBottomBelow(lineLogicalTop);
« no previous file with comments | « Source/core/rendering/line/BreakingContextInlineHeaders.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698