New issue
Advanced search Search tips

Issue 685242 link

Starred by 14 users

Issue metadata

Status: Started
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome
Pri: 2
Type: Bug

Blocked on:
issue 791813

Blocking:
issue 224031
issue 784040
issue 743234


Show other hotlists

Hotlists containing this issue:
Hotlist-1


Sign in to add a comment

Implement native High Contrast mode

Project Member Reported by dmazz...@chromium.org, Jan 25 2017

Issue description

Chrome should have a built-in high contrast mode that offers inverted colors.

The High Contrast extension is surprisingly popular (currently 0.5 million users), despite many limitations:

* Doesn't work on web store or Chrome WebUI pages
* Incompatible with some web sites due to CSS injected in page conflicting with existing page CSS
* Exposes bugs in CSS filters
* Flickers as page loads sometimes

Finally, many users have complained that they want the extension (despite these flaws) but can't because their enterprise policy forbids all extensions.

We need to make High Contrast built-in to address these concerns.

Design doc:
https://docs.google.com/document/d/1nRBhzkfWF-ts9hb-smQeQIUV9nH4RH8PREEW7K1k7J8/edit

There are a lot of ideas in that doc, but here's what we want to ship for v1:

* Inverted colors, ideally inverting in HSL rather than RGB space, it looks nicer.
* Some default gamma correction so that the overall contrast is roughly the same after the color inversion
* A heuristic to try to avoid inverting large photographic images. Some false negatives are okay
* An easy toggle
* Detect OS native inverted colors or high contrast mode and work with it
* Automatically migrate extension users to the new built-in feature

Everything else - like user settings for improved contrast, or smarter heuristics for photos, and stuff like that - is optional for v1.

 
A few features that would be really helpful in supporting high contrast mode, particularly in CEF:

1. Support for -ms-high-contrast or equivalent media query
2. Support for -ms-high-contrast-adjust or equivalent CSS property to allow override of a High Contrast style
3. Support CSS2 System Colors (Example: http://codepen.io/AmeliaBR/full/JbaZLX/) that match user settings when in High Contrast Mode.
4. If using SVG filters is deemed the best way to support high contrast across the broadest number of sites, the filters should dynamically adjust to use user-specified high contrast foreground and background colors.
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/36fd0123a492075ae8d6c12675ecfd58de596cfd

commit 36fd0123a492075ae8d6c12675ecfd58de596cfd
Author: dmazzoni <dmazzoni@chromium.org>
Date: Fri Jun 09 19:13:08 2017

Initial skeleton of high-contrast mode.

Adds frame settings for high-contrast mode - one to invert colors, one
to convert to grayscale, and one to adjust contrast. Eventually these
will be controlled by the browser and remembered on a per-site basis,
like zoom.

High-contrast mode is implemented as a color filter in
GraphicsContext.  Most primitive drawing operations like rects and
lines can be filtered simply by applying the color filter to the
provided color, so the performance impact is minimal. Follow-up
changes will address trickier cases like images, gradients, layers,
theme drawing, and more, plus heuristics to optionally avoid inverting
some images (such as photos or video).

For testing, introduces a virtual test suite that runs tests with
high contrast mode enabled. This patch just introduces one test, but
follow-up changes will run a subset of existing LayoutTests to ensure
broad coverage. I also intend to add an additional image_diff switch
to enable comparing inverted images with uninverted expectations, to
help quickly identify failing pixel tests without manually inspecting
output.

BUG=685242
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2878573003
Cr-Commit-Position: refs/heads/master@{#478362}

[modify] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/LayoutTests/paint/high-contrast-mode/text-on-backgrounds-expected.png
[add] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/LayoutTests/paint/high-contrast-mode/text-on-backgrounds-expected.txt
[add] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/LayoutTests/paint/high-contrast-mode/text-on-backgrounds.html
[add] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/README.txt
[add] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/text-on-backgrounds-expected.png
[modify] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/Source/core/frame/LocalFrameView.cpp
[modify] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/Source/core/frame/Settings.h
[modify] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/Source/core/frame/Settings.json5
[modify] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
[modify] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
[modify] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
[modify] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/Source/platform/graphics/GraphicsContextTest.cpp
[add] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/Source/platform/graphics/HighContrastSettings.h
[modify] https://crrev.com/36fd0123a492075ae8d6c12675ecfd58de596cfd/third_party/WebKit/Source/platform/graphics/paint/PaintRecordBuilder.cpp

Project Member

Comment 4 by bugdroid1@chromium.org, Jun 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d5af4cd44c455022bd8fd747bf426f96c1a043e9

commit d5af4cd44c455022bd8fd747bf426f96c1a043e9
Author: Dominic Mazzoni <dmazzoni@chromium.org>
Date: Fri Jun 16 05:01:05 2017

Add two image filtering modes to high contrast mode support.

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 <dmazzoni@chromium.org>
Reviewed-by: Chris harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479954}
[modify] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/cc/paint/paint_flags.h
[modify] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/paint/high-contrast-mode/image-filter-all/gradient-invert-expected.png
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/paint/high-contrast-mode/image-filter-all/gradient-invert-expected.txt
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/paint/high-contrast-mode/image-filter-all/gradient-invert.html
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/paint/high-contrast-mode/image-filter-all/image-invert-expected.png
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/paint/high-contrast-mode/image-filter-all/image-invert-expected.txt
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/paint/high-contrast-mode/image-filter-all/image-invert.html
[rename] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/paint/high-contrast-mode/image-filter-all/text-on-backgrounds-expected.png
[rename] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/paint/high-contrast-mode/image-filter-all/text-on-backgrounds-expected.txt
[rename] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/paint/high-contrast-mode/image-filter-all/text-on-backgrounds.html
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/paint/high-contrast-mode/image-filter-none/gradient-noinvert-expected.png
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/paint/high-contrast-mode/image-filter-none/gradient-noinvert-expected.txt
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/paint/high-contrast-mode/image-filter-none/gradient-noinvert.html
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/paint/high-contrast-mode/image-filter-none/image-noinvert-expected.png
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/paint/high-contrast-mode/image-filter-none/image-noinvert-expected.txt
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/paint/high-contrast-mode/image-filter-none/image-noinvert.html
[rename] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/README.txt
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/gradient-invert-expected.png
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/gradient-invert-expected.txt
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/image-invert-expected.png
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/image-invert-expected.txt
[rename] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/text-on-backgrounds-expected.png
[copy] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/text-on-backgrounds-expected.txt
[copy] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-none/README.txt
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-none/gradient-noinvert-expected.png
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-none/gradient-noinvert-expected.txt
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-none/image-noinvert-expected.png
[add] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-none/image-noinvert-expected.txt
[modify] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/Source/core/frame/LocalFrameView.cpp
[modify] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/Source/core/frame/Settings.json5
[modify] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
[modify] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/Source/platform/graphics/Gradient.cpp
[modify] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/Source/platform/graphics/Gradient.h
[modify] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
[modify] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
[modify] https://crrev.com/d5af4cd44c455022bd8fd747bf426f96c1a043e9/third_party/WebKit/Source/platform/graphics/HighContrastSettings.h

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/15d710301bd67ccb02a6f6a1b1584e012e2320a8

commit 15d710301bd67ccb02a6f6a1b1584e012e2320a8
Author: Dominic Mazzoni <dmazzoni@chromium.org>
Date: Fri Aug 11 19:42:01 2017

Update link to dark theme in high contrast bubble

The previous link didn't work, this is a good equivalent.

We're rethinking everything about high-contrast mode in bug 685242,
please comment there for long-term plans.

Bug:  738287 ,685242
Change-Id: I8f1236c8ed51d92d40e8dc2f321b5aeca6acd87d
Reviewed-on: https://chromium-review.googlesource.com/612123
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493832}
[modify] https://crrev.com/15d710301bd67ccb02a6f6a1b1584e012e2320a8/chrome/browser/ui/views/accessibility/invert_bubble_view.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Sep 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5

commit fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5
Author: Ramin Halavati <rhalavati@chromium.org>
Date: Tue Sep 26 07:29:19 2017

Basic image content based approach added to HighContrastImagePolicy.

To correctly decide if an image should be inverted or not for high-
contrast view, a very simple classifier is added under kFilterSmart
HighContrastImagePolicy and the decision on an image is stored in the
blink::Image objects for next references.

Bug: 685242
Change-Id: I47242c237e7f34291bba53a7a02a9d6c9ef632a1
Reviewed-on: https://chromium-review.googlesource.com/654644
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504305}
[modify] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-smart/README.txt
[add] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-smart/gradient-noinvert-expected.png
[add] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-smart/gradient-noinvert-expected.txt
[add] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-smart/image-invert-expected.png
[add] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-smart/image-invert-expected.txt
[modify] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
[modify] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
[modify] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/Source/platform/graphics/GraphicsTypes.h
[add] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifier.cpp
[add] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifier.h
[add] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifierTest.cpp
[modify] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/Source/platform/graphics/HighContrastSettings.h
[modify] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/Source/platform/graphics/Image.cpp
[modify] https://crrev.com/fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5/third_party/WebKit/Source/platform/graphics/Image.h

Cc: rhalavati@chromium.org
Project Member

Comment 9 by bugdroid1@chromium.org, Sep 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4fd96d95cd9a25242771ea2556bca7443ea3c8c9

commit 4fd96d95cd9a25242771ea2556bca7443ea3c8c9
Author: Marc Treib <treib@chromium.org>
Date: Tue Sep 26 08:25:01 2017

Revert "Basic image content based approach added to HighContrastImagePolicy."

This reverts commit fed2d25eddeaea01e786b1fe1d3e95a2a1fd98c5.

Reason for revert: Breaks compile on chromium.webkit Android Builder:
https://build.chromium.org/p/chromium.webkit/builders/Android%20Builder/builds/121292

Original change's description:
> Basic image content based approach added to HighContrastImagePolicy.
> 
> To correctly decide if an image should be inverted or not for high-
> contrast view, a very simple classifier is added under kFilterSmart
> HighContrastImagePolicy and the decision on an image is stored in the
> blink::Image objects for next references.
> 
> Bug: 685242
> Change-Id: I47242c237e7f34291bba53a7a02a9d6c9ef632a1
> Reviewed-on: https://chromium-review.googlesource.com/654644
> Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
> Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
> Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#504305}

TBR=dmazzoni@chromium.org,chrishtr@chromium.org,rhalavati@chromium.org

Change-Id: I181904195ec796271c14b1e1664ed0c575c5214c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 685242
Reviewed-on: https://chromium-review.googlesource.com/684314
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504314}
[modify] https://crrev.com/4fd96d95cd9a25242771ea2556bca7443ea3c8c9/third_party/WebKit/LayoutTests/VirtualTestSuites
[delete] https://crrev.com/8ac19ac76519aaa0e4ffd228629d4488d5efea79/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-smart/README.txt
[delete] https://crrev.com/8ac19ac76519aaa0e4ffd228629d4488d5efea79/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-smart/gradient-noinvert-expected.png
[delete] https://crrev.com/8ac19ac76519aaa0e4ffd228629d4488d5efea79/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-smart/gradient-noinvert-expected.txt
[delete] https://crrev.com/8ac19ac76519aaa0e4ffd228629d4488d5efea79/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-smart/image-invert-expected.png
[delete] https://crrev.com/8ac19ac76519aaa0e4ffd228629d4488d5efea79/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-smart/image-invert-expected.txt
[modify] https://crrev.com/4fd96d95cd9a25242771ea2556bca7443ea3c8c9/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/4fd96d95cd9a25242771ea2556bca7443ea3c8c9/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
[modify] https://crrev.com/4fd96d95cd9a25242771ea2556bca7443ea3c8c9/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
[modify] https://crrev.com/4fd96d95cd9a25242771ea2556bca7443ea3c8c9/third_party/WebKit/Source/platform/graphics/GraphicsTypes.h
[delete] https://crrev.com/8ac19ac76519aaa0e4ffd228629d4488d5efea79/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifier.cpp
[delete] https://crrev.com/8ac19ac76519aaa0e4ffd228629d4488d5efea79/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifier.h
[delete] https://crrev.com/8ac19ac76519aaa0e4ffd228629d4488d5efea79/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifierTest.cpp
[modify] https://crrev.com/4fd96d95cd9a25242771ea2556bca7443ea3c8c9/third_party/WebKit/Source/platform/graphics/HighContrastSettings.h
[modify] https://crrev.com/4fd96d95cd9a25242771ea2556bca7443ea3c8c9/third_party/WebKit/Source/platform/graphics/Image.cpp
[modify] https://crrev.com/4fd96d95cd9a25242771ea2556bca7443ea3c8c9/third_party/WebKit/Source/platform/graphics/Image.h

Project Member

Comment 10 by bugdroid1@chromium.org, Sep 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d34091054bac9727a9e99a5eb8790891458eb6dd

commit d34091054bac9727a9e99a5eb8790891458eb6dd
Author: Ramin Halavati <rhalavati@chromium.org>
Date: Wed Sep 27 05:37:19 2017

Classification using image content added to High Contrast mode.

To correctly decide if an image should be inverted or not for high-
contrast view, a very simple classifier is added under kFilterSmart
HighContrastImagePolicy and the decision on an image is stored in the
blink::Image objects for next references.
(Relanding after buildbot failure on Android.)

Bug: 685242
Change-Id: I37634f254d109744eb8a49a17532765bcf2bdca4
Reviewed-on: https://chromium-review.googlesource.com/654644
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#504305}
Reviewed-on: https://chromium-review.googlesource.com/684076
Cr-Commit-Position: refs/heads/master@{#504587}
[modify] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-smart/README.txt
[add] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-smart/gradient-noinvert-expected.png
[add] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-smart/gradient-noinvert-expected.txt
[add] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-smart/image-invert-expected.png
[add] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-smart/image-invert-expected.txt
[modify] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
[modify] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
[modify] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/Source/platform/graphics/GraphicsTypes.h
[add] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifier.cpp
[add] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifier.h
[add] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifierTest.cpp
[modify] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/Source/platform/graphics/HighContrastSettings.h
[modify] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/Source/platform/graphics/Image.cpp
[modify] https://crrev.com/d34091054bac9727a9e99a5eb8790891458eb6dd/third_party/WebKit/Source/platform/graphics/Image.h

Project Member

Comment 11 by bugdroid1@chromium.org, Oct 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b276eb50222e6a1125debfb76a17c5495ca65c81

commit b276eb50222e6a1125debfb76a17c5495ca65c81
Author: Ramin Halavati <rhalavati@chromium.org>
Date: Fri Oct 13 08:01:10 2017

Decision tree with Simple features added to HighContrast Classifier.

A simple color buckets count feature added to the classifier. This
feature, along with color/grayscale flag is given to a shallow, human
comprehensible decision tree to do the classification.

Bug: 685242
Change-Id: I848c8260f66c2a3f53fe8ad0d903cc2b479df1c9
Reviewed-on: https://chromium-review.googlesource.com/692394
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508640}
[modify] https://crrev.com/b276eb50222e6a1125debfb76a17c5495ca65c81/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifier.cpp
[modify] https://crrev.com/b276eb50222e6a1125debfb76a17c5495ca65c81/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifier.h
[modify] https://crrev.com/b276eb50222e6a1125debfb76a17c5495ca65c81/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifierTest.cpp

Project Member

Comment 12 by bugdroid1@chromium.org, Oct 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/772111bdda64a82bdea3f0ad583b634b0cc43d14

commit 772111bdda64a82bdea3f0ad583b634b0cc43d14
Author: Ramin Halavati <rhalavati@chromium.org>
Date: Sat Oct 28 10:05:02 2017

Adding background detection to high contrast image classifier.

To correctly classify images to those suitable for color inversion and
those not, we need to detect if some part of the image is static
background and ignore it while sampling from the image.
This is because frequently there are images with very large static
background and some small foreground. Sampling uniformly from the whole
image results in very few samples from foreground and most samples from
the large background, and this skews the classifier towards inversion,
while the decision must be taken based on the foreground area.

Bug: 685242
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I5b7bd9d2ed1b52913684e7ba2fdc6a2fd0e4a46a
Reviewed-on: https://chromium-review.googlesource.com/720375
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512396}
[modify] https://crrev.com/772111bdda64a82bdea3f0ad583b634b0cc43d14/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifier.cpp
[modify] https://crrev.com/772111bdda64a82bdea3f0ad583b634b0cc43d14/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifier.h
[modify] https://crrev.com/772111bdda64a82bdea3f0ad583b634b0cc43d14/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifierTest.cpp

Blocking: 784040
Project Member

Comment 14 by bugdroid1@chromium.org, Nov 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/621a4e6ada4b74c7d52ed7fb14a6a44838c8acb7

commit 621a4e6ada4b74c7d52ed7fb14a6a44838c8acb7
Author: Ramin Halavati <rhalavati@chromium.org>
Date: Fri Nov 17 12:56:05 2017

Neural Network added to High Contrast classifier.

A tfNative generated neural network is added to High Contrast classifier
to make a better decision for images which are not decidable using the
decision tree.

Bug: 685242
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I4c30f785d7ca65d129fb09902b748978dd6de4f6
Reviewed-on: https://chromium-review.googlesource.com/753588
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517387}
[modify] https://crrev.com/621a4e6ada4b74c7d52ed7fb14a6a44838c8acb7/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/621a4e6ada4b74c7d52ed7fb14a6a44838c8acb7/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifier.cpp
[modify] https://crrev.com/621a4e6ada4b74c7d52ed7fb14a6a44838c8acb7/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifier.h
[modify] https://crrev.com/621a4e6ada4b74c7d52ed7fb14a6a44838c8acb7/third_party/WebKit/Source/platform/graphics/HighContrastImageClassifierTest.cpp
[add] https://crrev.com/621a4e6ada4b74c7d52ed7fb14a6a44838c8acb7/third_party/WebKit/Source/platform/graphics/highcontrast/README.md
[add] https://crrev.com/621a4e6ada4b74c7d52ed7fb14a6a44838c8acb7/third_party/WebKit/Source/platform/graphics/highcontrast/highcontrast_classifier.cc
[add] https://crrev.com/621a4e6ada4b74c7d52ed7fb14a6a44838c8acb7/third_party/WebKit/Source/platform/graphics/highcontrast/highcontrast_classifier.h

Blockedon: 791813
Blocking: 743234
Cc: lpalmaro@chromium.org dmazz...@chromium.org
 Issue 650459  has been merged into this issue.

Sign in to add a comment