Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This regression, which caused inactive tabs under certain dark/light mode conditions on Windows to have very low contrast, was cause by the Chromium 100 change below. This fix was modelled after 5c145e9.
Notes
Setting both
kColorTabForegroundInactiveFrameActive
andkColorTabForegroundInactiveFrameInactive
were required for this to work under all conditions. SettingkColorTabForegroundActiveFrameActive
andkColorTabForegroundActiveFrameInactive
were apparently not required, so I didn't include them.I verified in a debugger that
MaybeGetDefaultColorForBraveUi()
is no longer called after that Chromium change with either of the two IDs that I removed (COLOR_TAB_FOREGROUND_ACTIVE_FRAME_ACTIVE
andCOLOR_TAB_FOREGROUND_INACTIVE_FRAME_ACTIVE
).I manually tested (the cross product of) all of the following combinations on (only) Windows 10 x64 19044.1586.
Tab state: Active/Inactive
Frame state: Active/Inactive
Window type: Normal/Private/Tor
Mouse state: Hovered/Not
Color mode: Light/Dark
Show accent color on "Title bars and window borders" Windows 10 setting: Enabled/Disabled
"Choose your accent color" Windows 10 setting: Light gray/Dark gray
To reproduce the issue on a non-patched version, enable the Show accent color on "Title bars and window borders" Windows 10 setting, choose a
lightdark accent color in Windows, and choose Light mode (or choose adarklight accent color and Dark mode), and then view an inactive tab.Full disclosure: I have zero experience w/the Chromium source, so I very well could have missed something.
Resolves brave/brave-browser#22027
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: