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

Fix newtab button isn't clickable #430

Merged
merged 1 commit into from
Sep 11, 2018
Merged

Fix newtab button isn't clickable #430

merged 1 commit into from
Sep 11, 2018

Conversation

simonhong
Copy link
Member

@simonhong simonhong commented Sep 11, 2018

With chromium's recent change, this button's border path rect is
calculated by using corder radius with layout value of EMPHASIS_MAXIMUM.
However, we changed that value to 4. Because of this, path rect is
calculated much smaller than buttons size.
So, most hittest was failed.

This also fixes the problem that a blob is visible on newtab button when theme is installed.
The blob's rect is also same as above small clickable rect.
W/o theme, button background and tab strip background color is same.
So, we didn't see that blob but it was there.

Close brave/brave-browser#1092
Close brave/brave-browser#983

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed.
  • Add appropriate QA labels (QA/Needed or QA/No-QA-Needed) to include the closed issue in milestone

Test Plan:

Check new tab button work with mouse click

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

@simonhong simonhong self-assigned this Sep 11, 2018
@simonhong simonhong added the UI label Sep 11, 2018
Copy link
Contributor

@jasonrsadler jasonrsadler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments left. Looking forward to this being fixed :)

browser/ui/views/tabs/brave_new_tab_button.h Show resolved Hide resolved
With chromium's recent change, this button's border path rect is
calculated by using corder radius with layout value of EMPHASIS_MAXIMUM.
However, we changed that value to 4. Because of this, path rect is
calculated much smaller than buttons size.
So, most hittest was failed.
Copy link
Member

@petemill petemill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Thanks for the fix! I knew it was an issue with themes, but guessing it was made worse with C70 to affect the hit test.

browser/ui/views/tabs/brave_new_tab_button.h Show resolved Hide resolved
@petemill petemill merged commit 3bac438 into master Sep 11, 2018
@petemill petemill deleted the new_tab branch September 11, 2018 16:11
petemill added a commit that referenced this pull request Sep 11, 2018
Fix newtab button isn't clickable
@petemill
Copy link
Member

0.55.x 04a458f

@bbondy
Copy link
Member

bbondy commented Sep 13, 2018

Updated both issues milestones. One wasn't set and the other was set wrongly to 1.0.

@bbondy bbondy added this to the 0.55.x - Release milestone Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Tab does not work as of latest build Installing a theme adds a blob on new tab button
4 participants