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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 3048 matching lines...) Expand 10 before | Expand all | Expand 10 after
3059 #if DCHECK_IS_ON() 3059 #if DCHECK_IS_ON()
3060 if (!GetLayoutObject().View()->GetFrame() || 3060 if (!GetLayoutObject().View()->GetFrame() ||
3061 !GetLayoutObject().View()->GetFrame()->ShouldThrottleRendering()) 3061 !GetLayoutObject().View()->GetFrame()->ShouldThrottleRendering())
3062 paint_info.paint_layer->GetLayoutObject().AssertSubtreeIsLaidOut(); 3062 paint_info.paint_layer->GetLayoutObject().AssertSubtreeIsLaidOut();
3063 #endif 3063 #endif
3064 3064
3065 float device_scale_factor = blink::DeviceScaleFactorDeprecated( 3065 float device_scale_factor = blink::DeviceScaleFactorDeprecated(
3066 paint_info.paint_layer->GetLayoutObject().GetFrame()); 3066 paint_info.paint_layer->GetLayoutObject().GetFrame());
3067 context.SetDeviceScaleFactor(device_scale_factor); 3067 context.SetDeviceScaleFactor(device_scale_factor);
3068 3068
3069 Settings* settings = GetLayoutObject().GetFrame()->GetSettings();
3070 HighContrastSettings high_contrast_settings;
3071 high_contrast_settings.mode = settings->GetHighContrastMode();
3072 high_contrast_settings.grayscale = settings->GetHighContrastGrayscale();
3073 high_contrast_settings.contrast = settings->GetHighContrastContrast();
3074 context.SetHighContrast(high_contrast_settings);
3075
3069 if (paint_info.paint_layer->GetCompositingState() != 3076 if (paint_info.paint_layer->GetCompositingState() !=
3070 kPaintsIntoGroupedBacking) { 3077 kPaintsIntoGroupedBacking) {
3071 // FIXME: GraphicsLayers need a way to split for multicol. 3078 // FIXME: GraphicsLayers need a way to split for multicol.
3072 PaintLayerPaintingInfo painting_info( 3079 PaintLayerPaintingInfo painting_info(
3073 paint_info.paint_layer, LayoutRect(dirty_rect), kGlobalPaintNormalPhase, 3080 paint_info.paint_layer, LayoutRect(dirty_rect), kGlobalPaintNormalPhase,
3074 paint_info.paint_layer->SubpixelAccumulation()); 3081 paint_info.paint_layer->SubpixelAccumulation());
3075 PaintLayerPainter(*paint_info.paint_layer) 3082 PaintLayerPainter(*paint_info.paint_layer)
3076 .PaintLayerContents(context, painting_info, paint_layer_flags); 3083 .PaintLayerContents(context, painting_info, paint_layer_flags);
3077 3084
3078 if (paint_info.paint_layer->ContainsDirtyOverlayScrollbars()) 3085 if (paint_info.paint_layer->ContainsDirtyOverlayScrollbars())
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
3640 } else if (graphics_layer == decoration_outline_layer_.get()) { 3647 } else if (graphics_layer == decoration_outline_layer_.get()) {
3641 name = "Decoration Layer"; 3648 name = "Decoration Layer";
3642 } else { 3649 } else {
3643 NOTREACHED(); 3650 NOTREACHED();
3644 } 3651 }
3645 3652
3646 return name; 3653 return name;
3647 } 3654 }
3648 3655
3649 } // namespace blink 3656 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Settings.json5 ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698