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

Unified Diff: third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp

Issue 2337373002: Update composition underline start/end constraints. (Closed)
Patch Set: Sync to head. Created 4 years, 3 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 | « third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
index 80b56bdd8fe76b22b72d356564459e495f9e2715..82dcb650723250137ebfa0c0bd8ca72777a84660 100644
--- a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
@@ -83,7 +83,8 @@ void SVGInlineTextBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoin
ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
ASSERT(m_svgInlineTextBox.truncation() == cNoTruncation);
- if (m_svgInlineTextBox.getLineLayoutItem().style()->visibility() != EVisibility::Visible)
+ if (m_svgInlineTextBox.getLineLayoutItem().style()->visibility() != EVisibility::Visible
+ || !m_svgInlineTextBox.len())
return;
// We're explicitly not supporting composition & custom underlines and custom highlighters -- unlike InlineTextBox.
@@ -106,15 +107,14 @@ void SVGInlineTextBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoin
&& (haveSelection || InlineTextBoxPainter::paintsMarkerHighlights(textLayoutObject));
DrawingRecorder recorder(paintInfo.context, m_svgInlineTextBox, displayItemType,
boundsForDrawingRecorder(paintInfo, style, paintOffset, includeSelectionRect));
- InlineTextBoxPainter(m_svgInlineTextBox).paintDocumentMarkers(
- paintInfo, paintOffset, style,
+ InlineTextBoxPainter textPainter(m_svgInlineTextBox);
+ textPainter.paintDocumentMarkers(paintInfo, paintOffset, style,
textLayoutObject.scaledFont(), DocumentMarkerPaintPhase::Background);
if (!m_svgInlineTextBox.textFragments().isEmpty())
paintTextFragments(paintInfo, parentLayoutObject);
- InlineTextBoxPainter(m_svgInlineTextBox).paintDocumentMarkers(
- paintInfo, paintOffset, style,
+ textPainter.paintDocumentMarkers(paintInfo, paintOffset, style,
textLayoutObject.scaledFont(), DocumentMarkerPaintPhase::Foreground);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698