Added toolbar color processing to BrowserThemePack
To fix a class of theme-related contrast bugs, BrowserThemePack now does processing for the toolbar to generate COLOR_TOOLBAR by compositing the provided image with the color it will be drawn on top of, and then samples that image into COLOR_TOOLBAR - this solves some issues with contrast checking not working properly if a toolbar image is specified alongside an explicit toolbar color that doesn't represent the color of the image. Additionally, COLOR_FRAME (and its variants) now similarly get replaced with the values computed from their composited images regardless of whether an explicit color was provided (previously, the colors only got set as such if there was no explicit color provided). To preserve some existing behavior, any explicit color provided for COLOR_TOOLBAR is copied into COLOR_INFOBAR (new), and COLOR_DETACHED_BOOKMARK_BAR_BACKGROUND (existing), and several UI elements have been updated to draw using those colors instead of COLOR_TOOLBAR. Bug: 913227 Change-Id: Idc4166f3f4e4ee75f178fddc40458b03883e85cc Reviewed-on: https://chromium-review.googlesource.com/c/1387154 Commit-Queue: Ryan Meier <rameier@chromium.org> Reviewed-by:Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#619961}
Showing
No preview for this file type
429 Bytes
428 Bytes