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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 2878573003: Initial skeleton of high-contrast mode. (Closed)
Patch Set: Created 3 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/platform/graphics/GraphicsLayer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
index b683998817426e2df60f8eccd7cb2ee8849c6265..0f9041618faec455b1d77c6f1d091cb47d7eb740 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -275,8 +275,9 @@ IntRect GraphicsLayer::InterestRect() {
}
void GraphicsLayer::Paint(const IntRect* interest_rect,
+ HighContrastSettings* high_contrast,
chrishtr 2017/06/01 04:10:51 high_contrast_settings
dmazzoni 2017/06/01 21:44:02 Moot since I'm not passing anything to GraphicsLay
GraphicsContext::DisabledMode disabled_mode) {
- if (PaintWithoutCommit(interest_rect, disabled_mode)) {
+ if (PaintWithoutCommit(interest_rect, high_contrast, disabled_mode)) {
GetPaintController().CommitNewDisplayItems(
OffsetFromLayoutObjectWithSubpixelAccumulation());
if (RuntimeEnabledFeatures::paintUnderInvalidationCheckingEnabled()) {
@@ -293,6 +294,7 @@ void GraphicsLayer::Paint(const IntRect* interest_rect,
bool GraphicsLayer::PaintWithoutCommit(
const IntRect* interest_rect,
+ HighContrastSettings* high_contrast,
GraphicsContext::DisabledMode disabled_mode) {
DCHECK(DrawsContent());
@@ -316,6 +318,8 @@ bool GraphicsLayer::PaintWithoutCommit(
}
GraphicsContext context(GetPaintController(), disabled_mode, nullptr);
+ if (high_contrast)
+ context.SetHighContrast(*high_contrast);
previous_interest_rect_ = *interest_rect;
client_->PaintContents(this, context, painting_phase_, *interest_rect);
chrishtr 2017/06/01 04:10:51 Instead of passing the high_contrast object throug
dmazzoni 2017/06/01 21:44:01 Sure, done. That seems to work just as well. Conc
chrishtr 2017/06/02 21:12:30 Good point. For this reason, please move the appli

Powered by Google App Engine
This is Rietveld 408576698