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

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

Issue 1647473002: [Line Layout API] Add LineLayoutItem::resolveColor() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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 1cb76d58100b0022b79a177f45f9effd381ad35d..4072a8092a1b4ef037fd45362e6c292e24977def 100644
--- a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
@@ -141,9 +141,8 @@ void InlineTextBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoint&
}
// Determine text colors.
- 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);
+ TextPainter::Style textStyle = TextPainter::textPaintingStyle(m_inlineTextBox.lineLayoutItem(), styleToUse, paintInfo);
+ TextPainter::Style selectionStyle = TextPainter::selectionPaintingStyle(m_inlineTextBox.lineLayoutItem(), haveSelection, paintInfo, textStyle);
bool paintSelectedTextOnly = (paintInfo.phase == PaintPhaseSelection);
bool paintSelectedTextSeparately = !paintSelectedTextOnly && textStyle != selectionStyle;
@@ -157,6 +156,7 @@ void InlineTextBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoint&
if (paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseTextClip && !isPrinting) {
paintDocumentMarkers(paintInfo, boxOrigin, styleToUse, font, DocumentMarkerPaintPhase::Background);
+ const LayoutObject& textBoxLayoutObject = *LineLayoutAPIShim::layoutObjectFrom(m_inlineTextBox.lineLayoutItem());
if (haveSelection && !paintsCompositionMarkers(textBoxLayoutObject)) {
if (combinedText)
paintSelection<InlineTextBoxPainter::PaintOptions::CombinedText>(context, boxRect, styleToUse, font, selectionStyle.fillColor, combinedText);
« no previous file with comments | « third_party/WebKit/Source/core/paint/EllipsisBoxPainter.cpp ('k') | third_party/WebKit/Source/core/paint/TextPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698