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

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

Issue 2027653004: Adjust color for printing list-item markers as we do for text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fixes Created 4 years, 7 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/ListMarkerPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/ListMarkerPainter.cpp b/third_party/WebKit/Source/core/paint/ListMarkerPainter.cpp
index 27991025796862a05d448e8a9af4abdb8f9d012c..ac38a5b36e8f8abda52935f186eb49e751ef3941 100644
--- a/third_party/WebKit/Source/core/paint/ListMarkerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/ListMarkerPainter.cpp
@@ -8,8 +8,10 @@
#include "core/layout/LayoutListMarker.h"
#include "core/layout/ListMarkerText.h"
#include "core/layout/api/SelectionState.h"
+#include "core/paint/BoxPainter.h"
#include "core/paint/LayoutObjectDrawingRecorder.h"
#include "core/paint/PaintInfo.h"
+#include "core/paint/TextPainter.h"
#include "platform/geometry/LayoutPoint.h"
#include "platform/graphics/GraphicsContextStateSaver.h"
@@ -80,7 +82,11 @@ void ListMarkerPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& pai
if (styleCategory == LayoutListMarker::ListStyleCategory::None)
return;
- const Color color(m_layoutListMarker.resolveColor(CSSPropertyColor));
+ Color color(m_layoutListMarker.resolveColor(CSSPropertyColor));
+
+ if (BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(m_layoutListMarker.styleRef(), m_layoutListMarker.listItem()->document()))
fs 2016/06/01 08:50:10 (I guess this could just be m_layoutListMarker.doc
rune 2016/06/01 09:43:31 They are currently always anonymous, so LayoutObje
fs 2016/06/01 10:22:59 Yes.
+ color = TextPainter::textColorForWhiteBackground(color);
+
// Apply the color to the list marker text.
context.setFillColor(color);

Powered by Google App Engine
This is Rietveld 408576698