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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrameView.cpp

Issue 2878573003: Initial skeleton of high-contrast mode. (Closed)
Patch Set: Rebase Created 3 years, 6 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/frame/LocalFrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrameView.cpp b/third_party/WebKit/Source/core/frame/LocalFrameView.cpp
index ecaa21a9b3bdffb7134d63f8369203b05e2244d2..d52c3301d03f7683da8d2d9509637072327b5ec0 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrameView.cpp
@@ -3280,6 +3280,15 @@ void LocalFrameView::PaintTree() {
GraphicsContext graphics_context(*paint_controller_);
if (RuntimeEnabledFeatures::PrintBrowserEnabled())
graphics_context.SetPrinting(true);
+
+ if (Settings* settings = frame_->GetSettings()) {
+ HighContrastSettings high_contrast_settings;
+ high_contrast_settings.mode = settings->GetHighContrastMode();
+ high_contrast_settings.grayscale = settings->GetHighContrastGrayscale();
+ high_contrast_settings.contrast = settings->GetHighContrastContrast();
+ graphics_context.SetHighContrast(high_contrast_settings);
+ }
+
Paint(graphics_context, CullRect(LayoutRect::InfiniteIntRect()));
paint_controller_->CommitNewDisplayItems();
}

Powered by Google App Engine
This is Rietveld 408576698