Add two image filtering modes to high contrast mode support

Desktop / Chromium - Dominic Mazzoni [chromium.org] - 16 June 2017 01:01 EDT

Depending on a flag, either applies the filter to all images, or no images. (Later there will be an "auto" mode that tries to heuristically filter most images but not photos and video.)

Adds support for gradients applying a color filter so that GraphicsContext::DrawImage works correctly for gradient images, too.

BUG=685242

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: Iffce8257233bc81426d8ad17cbe7d6410e7f9afc Reviewed-on: https://chromium-review.googlesource.com/533916 Commit-Queue: Dominic Mazzoni

d5af4cd Add two image filtering modes to high contrast mode support.
cc/paint/paint_flags.h | 3 +++
.../FlagExpectations/enable-blink-features=LayoutNG | 18 +++++++++++++++---
third_party/WebKit/LayoutTests/VirtualTestSuites | 9 +++++++--
.../image-filter-all/gradient-invert-expected.png | Bin 0 -> 4564 bytes
.../image-filter-all/gradient-invert-expected.txt | 1 +
.../image-filter-all/gradient-invert.html | 13 +++++++++++++
.../image-filter-all/image-invert-expected.png | Bin 0 -> 4243 bytes
.../image-filter-all/image-invert-expected.txt | 1 +
.../image-filter-all/image-invert.html | 6 ++++++
.../text-on-backgrounds-expected.png | Bin
.../text-on-backgrounds-expected.txt | 0
.../{ => image-filter-all}/text-on-backgrounds.html | 0
.../image-filter-none/gradient-noinvert-expected.png | Bin 0 -> 4564 bytes
.../image-filter-none/gradient-noinvert-expected.txt | 1 +
.../image-filter-none/gradient-noinvert.html | 13 +++++++++++++
.../image-filter-none/image-noinvert-expected.png | Bin 0 -> 4243 bytes
.../image-filter-none/image-noinvert-expected.txt | 1 +
.../image-filter-none/image-noinvert.html | 6 ++++++
.../{ => image-filter-all}/README.txt | 2 +-
.../image-filter-all/gradient-invert-expected.png | Bin 0 -> 3915 bytes
.../image-filter-all/gradient-invert-expected.txt | 1 +
.../image-filter-all/image-invert-expected.png | Bin 0 -> 3086 bytes
.../image-filter-all/image-invert-expected.txt | 1 +
.../text-on-backgrounds-expected.png | Bin
.../image-filter-all/text-on-backgrounds-expected.txt | 4 ++++
.../high-contrast-mode/image-filter-none/README.txt | 3 +++
.../image-filter-none/gradient-noinvert-expected.png | Bin 0 -> 3720 bytes
.../image-filter-none/gradient-noinvert-expected.txt | 1 +
.../image-filter-none/image-noinvert-expected.png | Bin 0 -> 2913 bytes
.../image-filter-none/image-noinvert-expected.txt | 1 +
.../WebKit/Source/core/frame/LocalFrameView.cpp | 2 ++
third_party/WebKit/Source/core/frame/Settings.json5 | 5 +++++
.../layout/compositing/CompositedLayerMapping.cpp | 1 +
.../WebKit/Source/platform/graphics/Gradient.cpp | 17 ++++++++++++++---
.../WebKit/Source/platform/graphics/Gradient.h | 2 ++
.../Source/platform/graphics/GraphicsContext.cpp | 11 +++++++++++
.../WebKit/Source/platform/graphics/GraphicsContext.h | 1 +
.../Source/platform/graphics/HighContrastSettings.h | 8 ++++++++
38 files changed, 123 insertions(+), 9 deletions(-)

Upstream: git.chromium.org


  • Share