Index: third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp |
diff --git a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp |
index 5b1cb75c969c554cbaeef2759b035e3b772c2fe1..1cb76d58100b0022b79a177f45f9effd381ad35d 100644 |
--- a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp |
@@ -12,11 +12,11 @@ |
#include "core/layout/LayoutBlock.h" |
#include "core/layout/LayoutTextCombine.h" |
#include "core/layout/LayoutTheme.h" |
+#include "core/layout/api/LineLayoutAPIShim.h" |
#include "core/layout/api/LineLayoutBox.h" |
#include "core/layout/api/LineLayoutText.h" |
#include "core/layout/line/InlineTextBox.h" |
#include "core/paint/BoxPainter.h" |
-#include "core/paint/LineLayoutPaintShim.h" |
#include "core/paint/PaintInfo.h" |
#include "core/paint/TextPainter.h" |
#include "platform/graphics/GraphicsContextStateSaver.h" |
@@ -92,7 +92,7 @@ void InlineTextBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& |
return; |
LayoutRect paintRect(logicalVisualOverflow); |
m_inlineTextBox.logicalRectToPhysicalRect(paintRect); |
- if (paintInfo.phase != PaintPhaseSelection && (haveSelection || paintsMarkerHighlights(*LineLayoutPaintShim::layoutObjectFrom(m_inlineTextBox.lineLayoutItem())))) |
+ if (paintInfo.phase != PaintPhaseSelection && (haveSelection || paintsMarkerHighlights(*LineLayoutAPIShim::layoutObjectFrom(m_inlineTextBox.lineLayoutItem())))) |
paintRect.unite(m_inlineTextBox.localSelectionRect(m_inlineTextBox.start(), m_inlineTextBox.start() + m_inlineTextBox.len())); |
paintRect.moveBy(adjustedPaintOffset); |
drawingRecorder.emplace(paintInfo.context, m_inlineTextBox, DisplayItem::paintPhaseToDrawingType(paintInfo.phase), FloatRect(paintRect)); |
@@ -127,7 +127,7 @@ void InlineTextBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& |
LayoutTextCombine* combinedText = nullptr; |
if (!m_inlineTextBox.isHorizontal()) { |
if (styleToUse.hasTextCombine() && m_inlineTextBox.lineLayoutItem().isCombineText()) { |
- combinedText = &toLayoutTextCombine(*LineLayoutPaintShim::layoutObjectFrom(m_inlineTextBox.lineLayoutItem())); |
+ combinedText = &toLayoutTextCombine(*LineLayoutAPIShim::layoutObjectFrom(m_inlineTextBox.lineLayoutItem())); |
if (!combinedText->isCombined()) |
combinedText = nullptr; |
} |
@@ -141,7 +141,7 @@ void InlineTextBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& |
} |
// Determine text colors. |
- const LayoutObject& textBoxLayoutObject = *LineLayoutPaintShim::layoutObjectFrom(m_inlineTextBox.lineLayoutItem()); |
+ const LayoutObject& textBoxLayoutObject = *LineLayoutAPIShim::layoutObjectFrom(m_inlineTextBox.lineLayoutItem()); |
TextPainter::Style textStyle = TextPainter::textPaintingStyle(textBoxLayoutObject, styleToUse, paintInfo); |
TextPainter::Style selectionStyle = TextPainter::selectionPaintingStyle(textBoxLayoutObject, haveSelection, paintInfo, textStyle); |
bool paintSelectedTextOnly = (paintInfo.phase == PaintPhaseSelection); |
@@ -745,7 +745,7 @@ void InlineTextBoxPainter::paintDecoration(const PaintInfo& paintInfo, const Lay |
// Get the text decoration colors. |
LayoutObject::AppliedTextDecoration underline, overline, linethrough; |
- LayoutObject& textBoxLayoutObject = *LineLayoutPaintShim::layoutObjectFrom(m_inlineTextBox.lineLayoutItem()); |
+ LayoutObject& textBoxLayoutObject = *LineLayoutAPIShim::layoutObjectFrom(m_inlineTextBox.lineLayoutItem()); |
textBoxLayoutObject.getTextDecorations(deco, underline, overline, linethrough, true); |
if (m_inlineTextBox.isFirstLineStyle()) |
textBoxLayoutObject.getTextDecorations(deco, underline, overline, linethrough, true, true); |
@@ -830,7 +830,7 @@ void InlineTextBoxPainter::paintCompositionUnderline(GraphicsContext& context, c |
void InlineTextBoxPainter::paintTextMatchMarkerForeground(const PaintInfo& paintInfo, const LayoutPoint& boxOrigin, DocumentMarker* marker, const ComputedStyle& style, const Font& font) |
{ |
- if (!LineLayoutPaintShim::layoutObjectFrom(m_inlineTextBox.lineLayoutItem())->frame()->editor().markedTextMatchesAreHighlighted()) |
+ if (!LineLayoutAPIShim::layoutObjectFrom(m_inlineTextBox.lineLayoutItem())->frame()->editor().markedTextMatchesAreHighlighted()) |
return; |
// TODO(ramya.v): Extract this into a helper function and share many copies of this code. |
@@ -855,7 +855,7 @@ void InlineTextBoxPainter::paintTextMatchMarkerForeground(const PaintInfo& paint |
void InlineTextBoxPainter::paintTextMatchMarkerBackground(const PaintInfo& paintInfo, const LayoutPoint& boxOrigin, DocumentMarker* marker, const ComputedStyle& style, const Font& font) |
{ |
- if (!LineLayoutPaintShim::layoutObjectFrom(m_inlineTextBox.lineLayoutItem())->frame()->editor().markedTextMatchesAreHighlighted()) |
+ if (!LineLayoutAPIShim::layoutObjectFrom(m_inlineTextBox.lineLayoutItem())->frame()->editor().markedTextMatchesAreHighlighted()) |
return; |
// Use same y positioning and height as for selection, so that when the selection and this highlight are on |