Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes omnibox text selection color. #8749

Merged
merged 1 commit into from
May 10, 2021

Conversation

mkarolin
Copy link
Collaborator

@mkarolin mkarolin commented May 7, 2021

Fixes brave/brave-browser#15690

Due to the cr91 upstream change below the omnibox selection color is
now the same color as the focus ring of the omnibox. Since we override
the focus ring to be our brand color, the selection is now also the
brand color, which we don't want.

This fix reverts the omnibox selection color to what it was in cr90
(kGoogleBlue200 for Light theme, kGoogleBlue800 for Dark).

Also, see a follow up issue brave/brave-browser#15732

Chromium changes:

This change redefined kColorId_TextfieldSelectionBackgroundFocused from
explicit colors (gfx::kGoogleBlue200 and gfx::kGoogleBlue800 ) to fall
back onto kColorId_LabelTextSelectionBackgroundFocused.

https://source.chromium.org/chromium/chromium/src/+/76f9ef872febca7e3630db31c699ad2c2ec4e7a5

commit 76f9ef872febca7e3630db31c699ad2c2ec4e7a5
Author: Peter Kasting [email protected]
Date: Mon Feb 22 17:56:22 2021 +0000

Convert existing color definitions to more canonical forms.

This defines as many colors as possible in terms of a small number of
core colors.  The primary benefit of this is to remove most dark mode
color definitions (which will now be automatically correct).  It also
makes some relationships clearer.

No behavior change intended (yet).

Bug: none

This change made kColorId_LabelTextSelectionBackgroundFocused fall back to
AlphaBlend(kColorId_ProminentButtonColor, kColorId_WindowBackground, gfx::kGoogleGreyAlpha500)
We redefine kColorId_ProminentButtonColor as kBraveColorBrand = RGB(0xfb, 0x54, 0x2b).

https://source.chromium.org/chromium/chromium/src/+/c042fff0a7823aa4ebb0494d5b094f67f15aa4b3

commit c042fff0a7823aa4ebb0494d5b094f67f15aa4b3
Author: Peter Kasting [email protected]
Date: Wed Mar 24 21:10:08 2021 +0000

Tweak existing systematized colors.

Primarily, this adjusts menus, tables, trees, and textfields to all use
the same blue to represent a selected item (and that blue now matches
the focus ring).

Bug: 1061127

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

Fixes brave/brave-browser#15690

Due to the cr91 upstream change below the omnibox selection color is
now the same color as the focus ring of the omnibox. Since we override
the focus ring to be our brand color, the selection is now also the
brand color, which we don't want.

This fix reverts the omnibox selection color to what it was in cr90
(kGoogleBlue200 for Light theme, kGoogleBlue800 for Dark).

Chromium changes:

This change redefined kColorId_TextfieldSelectionBackgroundFocused from
explicit colors (gfx::kGoogleBlue200 and gfx::kGoogleBlue800 ) to fall
back onto kColorId_LabelTextSelectionBackgroundFocused.

https://source.chromium.org/chromium/chromium/src/+/76f9ef872febca7e3630db31c699ad2c2ec4e7a5

commit 76f9ef872febca7e3630db31c699ad2c2ec4e7a5
Author: Peter Kasting <[email protected]>
Date:   Mon Feb 22 17:56:22 2021 +0000

    Convert existing color definitions to more canonical forms.

    This defines as many colors as possible in terms of a small number of
    core colors.  The primary benefit of this is to remove most dark mode
    color definitions (which will now be automatically correct).  It also
    makes some relationships clearer.

    No behavior change intended (yet).

    Bug: none

This change made kColorId_LabelTextSelectionBackgroundFocused fall back to
AlphaBlend(kColorId_ProminentButtonColor, kColorId_WindowBackground, gfx::kGoogleGreyAlpha500)
We redefine kColorId_ProminentButtonColor as kBraveColorBrand = RGB(0xfb, 0x54, 0x2b).

https://source.chromium.org/chromium/chromium/src/+/c042fff0a7823aa4ebb0494d5b094f67f15aa4b3

commit c042fff0a7823aa4ebb0494d5b094f67f15aa4b3
Author: Peter Kasting <[email protected]>
Date:   Wed Mar 24 21:10:08 2021 +0000

    Tweak existing systematized colors.

    Primarily, this adjusts menus, tables, trees, and textfields to all use
    the same blue to represent a selected item (and that blue now matches
    the focus ring).

    Bug: 1061127
@mkarolin mkarolin added CI/skip-android Do not run CI builds for Android CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-ios Do not run CI builds for iOS labels May 7, 2021
@mkarolin mkarolin requested a review from a team as a code owner May 7, 2021 20:44
@mkarolin mkarolin self-assigned this May 7, 2021
@mkarolin mkarolin merged commit c49c0d0 into master May 10, 2021
@mkarolin mkarolin deleted the maxk-fix-omnibox-selection-color branch May 10, 2021 23:03
@mkarolin mkarolin added this to the 1.26.x - Nightly milestone May 10, 2021
mkarolin added a commit that referenced this pull request May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-android Do not run CI builds for Android CI/skip-ios Do not run CI builds for iOS CI/skip-macos-x64 Do not run CI builds for macOS x64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cr91 follow-up: Fix omnibox selection color.
4 participants