| Index: Source/core/rendering/RenderBlock.cpp
|
| diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
|
| index 13895b0b848b756fd78c46d16c5cdabab0b59b70..604a5d7a1023ed020bad10899689da36ea0bd224 100644
|
| --- a/Source/core/rendering/RenderBlock.cpp
|
| +++ b/Source/core/rendering/RenderBlock.cpp
|
| @@ -3747,7 +3747,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());
|
| + RenderStyle* s = styleOrFirstLineStyle(firstLine && document().styleEngine()->usesFirstLineRules());
|
| return s->computedLineHeight();
|
| }
|
|
|
| @@ -3800,7 +3800,7 @@ int RenderBlock::baselinePosition(FontBaseline baselineType, bool firstLine, Lin
|
| // Note that inline-block counts as replaced here.
|
| ASSERT(linePositionMode == PositionOfInteriorLineBoxes);
|
|
|
| - const FontMetrics& fontMetrics = style(firstLine)->fontMetrics();
|
| + const FontMetrics& fontMetrics = styleOrFirstLineStyle(firstLine)->fontMetrics();
|
| return fontMetrics.ascent(baselineType) + (lineHeight(firstLine, direction, linePositionMode) - fontMetrics.height()) / 2;
|
| }
|
|
|
| @@ -3809,7 +3809,7 @@ LayoutUnit RenderBlock::minLineHeightForReplacedRenderer(bool isFirstLine, Layou
|
| if (!document().inNoQuirksMode() && replacedHeight)
|
| return replacedHeight;
|
|
|
| - if (!(style(isFirstLine)->lineBoxContain() & LineBoxContainBlock))
|
| + if (!(styleOrFirstLineStyle(isFirstLine)->lineBoxContain() & LineBoxContainBlock))
|
| return 0;
|
|
|
| return std::max<LayoutUnit>(replacedHeight, lineHeight(isFirstLine, isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes));
|
| @@ -3822,7 +3822,7 @@ int RenderBlock::firstLineBoxBaseline() const
|
|
|
| if (childrenInline()) {
|
| if (firstLineBox())
|
| - return firstLineBox()->logicalTop() + style(true)->fontMetrics().ascent(firstRootBox()->baselineType());
|
| + return firstLineBox()->logicalTop() + styleOrFirstLineStyle(true)->fontMetrics().ascent(firstRootBox()->baselineType());
|
| else
|
| return -1;
|
| }
|
| @@ -3862,7 +3862,7 @@ int RenderBlock::lastLineBoxBaseline(LineDirectionMode lineDirection) const
|
| + (lineDirection == HorizontalLine ? borderTop() + paddingTop() : borderRight() + paddingRight());
|
| }
|
| if (lastLineBox())
|
| - return lastLineBox()->logicalTop() + style(lastLineBox() == firstLineBox())->fontMetrics().ascent(lastRootBox()->baselineType());
|
| + return lastLineBox()->logicalTop() + styleOrFirstLineStyle(lastLineBox() == firstLineBox())->fontMetrics().ascent(lastRootBox()->baselineType());
|
| return -1;
|
| } else {
|
| bool haveNormalFlowChild = false;
|
|
|