| Index: Source/core/rendering/RenderBlock.cpp
|
| diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
|
| index 6737a7e3bdeb5f149668004ba2e4e8a1dd08c6ca..8b68935a4c720def4b53a09e1a314651b901f3ac 100644
|
| --- a/Source/core/rendering/RenderBlock.cpp
|
| +++ b/Source/core/rendering/RenderBlock.cpp
|
| @@ -3760,7 +3760,7 @@ bool RenderBlock::hasLineIfEmpty() const
|
| return false;
|
| }
|
|
|
| -LayoutUnit RenderBlock::lineHeight(bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
|
| +LayoutUnit RenderBlock::lineHeight(OwnOrFirstLineStyle firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
|
| {
|
| // Inline blocks are replaced elements. Otherwise, just pass off to
|
| // the base class. If we're being queried as though we're the root line
|
| @@ -3769,8 +3769,7 @@ LayoutUnit RenderBlock::lineHeight(bool firstLine, LineDirectionMode direction,
|
| if (isReplaced() && linePositionMode == PositionOnContainingLine)
|
| return RenderBox::lineHeight(firstLine, direction, linePositionMode);
|
|
|
| - RenderStyle* s = style(firstLine && document().styleEngine()->usesFirstLineRules());
|
| - return s->computedLineHeight();
|
| + return style(firstLine)->computedLineHeight();
|
| }
|
|
|
| int RenderBlock::beforeMarginInLineDirection(LineDirectionMode direction) const
|
| @@ -3778,7 +3777,7 @@ int RenderBlock::beforeMarginInLineDirection(LineDirectionMode direction) const
|
| return direction == HorizontalLine ? marginTop() : marginRight();
|
| }
|
|
|
| -int RenderBlock::baselinePosition(FontBaseline baselineType, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
|
| +int RenderBlock::baselinePosition(FontBaseline baselineType, OwnOrFirstLineStyle firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
|
| {
|
| // Inline blocks are replaced elements. Otherwise, just pass off to
|
| // the base class. If we're being queried as though we're the root line
|
| @@ -3826,7 +3825,7 @@ int RenderBlock::baselinePosition(FontBaseline baselineType, bool firstLine, Lin
|
| return fontMetrics.ascent(baselineType) + (lineHeight(firstLine, direction, linePositionMode) - fontMetrics.height()) / 2;
|
| }
|
|
|
| -LayoutUnit RenderBlock::minLineHeightForReplacedRenderer(bool isFirstLine, LayoutUnit replacedHeight) const
|
| +LayoutUnit RenderBlock::minLineHeightForReplacedRenderer(OwnOrFirstLineStyle isFirstLine, LayoutUnit replacedHeight) const
|
| {
|
| if (!document().inNoQuirksMode() && replacedHeight)
|
| return replacedHeight;
|
| @@ -3844,7 +3843,7 @@ int RenderBlock::firstLineBoxBaseline() const
|
|
|
| if (childrenInline()) {
|
| if (firstLineBox())
|
| - return firstLineBox()->logicalTop() + style(true)->fontMetrics().ascent(firstRootBox()->baselineType());
|
| + return firstLineBox()->logicalTop() + style(FirstLineStyle)->fontMetrics().ascent(firstRootBox()->baselineType());
|
| else
|
| return -1;
|
| }
|
| @@ -3880,11 +3879,11 @@ int RenderBlock::lastLineBoxBaseline(LineDirectionMode lineDirection) const
|
| if (!firstLineBox() && hasLineIfEmpty()) {
|
| const FontMetrics& fontMetrics = firstLineStyle()->fontMetrics();
|
| return fontMetrics.ascent()
|
| - + (lineHeight(true, lineDirection, PositionOfInteriorLineBoxes) - fontMetrics.height()) / 2
|
| - + (lineDirection == HorizontalLine ? borderTop() + paddingTop() : borderRight() + paddingRight());
|
| + + (lineHeight(FirstLineStyle, lineDirection, PositionOfInteriorLineBoxes) - fontMetrics.height()) / 2
|
| + + (lineDirection == HorizontalLine ? borderTop() + paddingTop() : borderRight() + paddingRight());
|
| }
|
| if (lastLineBox())
|
| - return lastLineBox()->logicalTop() + style(lastLineBox() == firstLineBox())->fontMetrics().ascent(lastRootBox()->baselineType());
|
| + return lastLineBox()->logicalTop() + style(lastLineBox() == firstLineBox() ? FirstLineStyle : OwnStyle)->fontMetrics().ascent(lastRootBox()->baselineType());
|
| return -1;
|
| } else {
|
| bool haveNormalFlowChild = false;
|
| @@ -3899,8 +3898,8 @@ int RenderBlock::lastLineBoxBaseline(LineDirectionMode lineDirection) const
|
| if (!haveNormalFlowChild && hasLineIfEmpty()) {
|
| const FontMetrics& fontMetrics = firstLineStyle()->fontMetrics();
|
| return fontMetrics.ascent()
|
| - + (lineHeight(true, lineDirection, PositionOfInteriorLineBoxes) - fontMetrics.height()) / 2
|
| - + (lineDirection == HorizontalLine ? borderTop() + paddingTop() : borderRight() + paddingRight());
|
| + + (lineHeight(FirstLineStyle, lineDirection, PositionOfInteriorLineBoxes) - fontMetrics.height()) / 2
|
| + + (lineDirection == HorizontalLine ? borderTop() + paddingTop() : borderRight() + paddingRight());
|
| }
|
| }
|
|
|
|
|