| Index: Source/core/rendering/InlineTextBox.cpp
|
| diff --git a/Source/core/rendering/InlineTextBox.cpp b/Source/core/rendering/InlineTextBox.cpp
|
| index 5bf59ce01c682b78c6ee0b46257a3f9379f52c22..85465b1c825142b98e6850344ed6596c43bcb85e 100644
|
| --- a/Source/core/rendering/InlineTextBox.cpp
|
| +++ b/Source/core/rendering/InlineTextBox.cpp
|
| @@ -206,7 +206,7 @@ LayoutRect InlineTextBox::localSelectionRect(int startPos, int endPos)
|
|
|
| LayoutUnit selTop = selectionTop();
|
| LayoutUnit selHeight = selectionHeight();
|
| - RenderStyle* styleToUse = textRenderer().style(isFirstLineStyle());
|
| + RenderStyle* styleToUse = textRenderer().styleOrFirstLineStyle(isFirstLineStyle());
|
| const Font& font = styleToUse->font();
|
|
|
| StringBuilder charactersWithHyphen;
|
| @@ -521,7 +521,7 @@ void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset,
|
| GraphicsContext* context = paintInfo.context;
|
|
|
| RenderObject& rendererToUse = renderer();
|
| - RenderStyle* styleToUse = rendererToUse.style(isFirstLineStyle());
|
| + RenderStyle* styleToUse = rendererToUse.styleOrFirstLineStyle(isFirstLineStyle());
|
|
|
| adjustedPaintOffset.move(0, styleToUse->isHorizontalWritingMode() ? 0 : -logicalHeight());
|
|
|
| @@ -1130,7 +1130,7 @@ void InlineTextBox::paintDecoration(GraphicsContext* context, const FloatPoint&
|
|
|
| bool linesAreOpaque = !isPrinting && (!(deco & TextDecorationUnderline) || underline.color.alpha() == 255) && (!(deco & TextDecorationOverline) || overline.color.alpha() == 255) && (!(deco & TextDecorationLineThrough) || linethrough.color.alpha() == 255);
|
|
|
| - RenderStyle* styleToUse = renderer().style(isFirstLineStyle());
|
| + RenderStyle* styleToUse = renderer().styleOrFirstLineStyle(isFirstLineStyle());
|
| int baseline = styleToUse->fontMetrics().ascent();
|
|
|
| size_t shadowCount = shadowList ? shadowList->shadows().size() : 0;
|
| @@ -1265,7 +1265,7 @@ void InlineTextBox::paintDocumentMarker(GraphicsContext* pt, const FloatPoint& b
|
| // So, we generally place the underline at the bottom of the text, but in larger fonts that's not so good so
|
| // we pin to two pixels under the baseline.
|
| int lineThickness = misspellingLineThickness;
|
| - int baseline = renderer().style(isFirstLineStyle())->fontMetrics().ascent();
|
| + int baseline = renderer().styleOrFirstLineStyle(isFirstLineStyle())->fontMetrics().ascent();
|
| int descent = logicalHeight() - baseline;
|
| int underlineOffset;
|
| if (descent <= (2 + lineThickness)) {
|
| @@ -1399,7 +1399,7 @@ void InlineTextBox::paintCompositionUnderline(GraphicsContext* ctx, const FloatP
|
| // All other marked text underlines are 1px thick.
|
| // If there's not enough space the underline will touch or overlap characters.
|
| int lineThickness = 1;
|
| - int baseline = renderer().style(isFirstLineStyle())->fontMetrics().ascent();
|
| + int baseline = renderer().styleOrFirstLineStyle(isFirstLineStyle())->fontMetrics().ascent();
|
| if (underline.thick && logicalHeight() - baseline >= 2)
|
| lineThickness = 2;
|
|
|
| @@ -1445,7 +1445,7 @@ int InlineTextBox::offsetForPosition(float lineOffset, bool includePartialGlyphs
|
| FontCachePurgePreventer fontCachePurgePreventer;
|
|
|
| RenderText& text = toRenderText(renderer());
|
| - RenderStyle* style = text.style(isFirstLineStyle());
|
| + RenderStyle* style = text.styleOrFirstLineStyle(isFirstLineStyle());
|
| const Font& font = style->font();
|
| return font.offsetForPosition(constructTextRun(style, font), lineOffset - logicalLeft(), includePartialGlyphs);
|
| }
|
| @@ -1461,7 +1461,7 @@ float InlineTextBox::positionForOffset(int offset) const
|
| FontCachePurgePreventer fontCachePurgePreventer;
|
|
|
| RenderText& text = toRenderText(renderer());
|
| - RenderStyle* styleToUse = text.style(isFirstLineStyle());
|
| + RenderStyle* styleToUse = text.styleOrFirstLineStyle(isFirstLineStyle());
|
| ASSERT(styleToUse);
|
| const Font& font = styleToUse->font();
|
| int from = !isLeftToRightDirection() ? offset - m_start : 0;
|
| @@ -1498,7 +1498,7 @@ void InlineTextBox::characterWidths(Vector<float>& widths) const
|
| {
|
| FontCachePurgePreventer fontCachePurgePreventer;
|
|
|
| - RenderStyle* styleToUse = textRenderer().style(isFirstLineStyle());
|
| + RenderStyle* styleToUse = textRenderer().styleOrFirstLineStyle(isFirstLineStyle());
|
| const Font& font = styleToUse->font();
|
|
|
| TextRun textRun = constructTextRun(styleToUse, font);
|
|
|