• prashant.n's avatar
    Remove DarkModePagePolicy. · 332fc255
    prashant.n authored
    The dark mode page policy is used for deciding whether to apply dark
    mode filter to the given LayoutView or not based on values kFilterAll
    (always process) or kFilterByBackground (process based on background
    color.) The current code has kFilterByBackground as a default value.
    But processing based on background of root layout object can lead
    issues like not applying dark mode to children having light or
    transparent backgrounds.
    
    This patch removes page policy concept and now every layout object
    gets classified for applying dark mode. All the sites for which page
    policy kFilterByBackground was added, work properly after removing
    the page policy concept.
    
    This now helps pages from e.g. theverge.com render correctly in dark
    mode. In these pages, children of dark backgrounds get dark mode
    applied correctly and look dark. Previously they were getting rendered
    as if dark mode was not applied.
    
    Bug: 1081383
    Change-Id: I1e6a941bad22689569f2aec76d5beb88daced9de
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2323441Reviewed-by: default avatarRune Lillesveen <futhark@chromium.org>
    Reviewed-by: default avatarAnna Malova <amalova@chromium.org>
    Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
    Commit-Queue: Prashant Nevase <prashant.n@samsung.com>
    Cr-Commit-Position: refs/heads/master@{#800573}
    332fc255
README.txt 176 Bytes