Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
| index bea0b2b92a1e6ba000bf830e3065c3c771a8d571..c49bd9ed01e1bfcfa996680912ff2d572cc8b1dc 100644 |
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
| @@ -162,6 +162,21 @@ static inline bool IsAcceleratedContents(LayoutObject& layout_object) { |
| layout_object.IsVideo(); |
| } |
| +static HighContrastSettings InitHighContrastSettingsFromSettings( |
| + Settings* settings) { |
| + HighContrastSettings result; |
| + if (settings) { |
| + result.mode = settings->GetHighContrastMode(); |
| + result.grayscale = settings->GetHighContrastGrayscale(); |
| + result.contrast = settings->GetHighContrastContrast(); |
| + } else { |
| + result.mode = HighContrastMode::kOff; |
| + result.grayscale = false; |
| + result.contrast = 0.0; |
| + } |
| + return result; |
| +} |
| + |
| CompositedLayerMapping::CompositedLayerMapping(PaintLayer& layer) |
| : owning_layer_(layer), |
| content_offset_in_compositing_layer_dirty_(false), |
| @@ -3089,6 +3104,11 @@ void CompositedLayerMapping::DoPaintTask( |
| paint_info.paint_layer->GetLayoutObject().GetFrame()); |
| context.SetDeviceScaleFactor(device_scale_factor); |
| + HighContrastSettings high_contrast_settings = |
| + InitHighContrastSettingsFromSettings( |
| + GetLayoutObject().GetFrame()->GetSettings()); |
|
chrishtr
2017/06/05 16:35:18
Can GetSettings ever return nullptr? If not then p
dmazzoni
2017/06/06 05:23:24
Looks like there's no way it can return nullptr, s
|
| + context.SetHighContrast(high_contrast_settings); |
| + |
| if (paint_info.paint_layer->GetCompositingState() != |
| kPaintsIntoGroupedBacking) { |
| // FIXME: GraphicsLayers need a way to split for multicol. |