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

Update shadow layer bounds when tab's layer bounds changes #18111

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

sangwoo108
Copy link
Contributor

When scrolling, tab's bounds doesn't change while the layer's bounds changes. In order to synchronize shadow_layer_'s bounds to it, we should layout it from OnLayerBoundsChanged().

Resolves brave/brave-browser#29791

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
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • 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 wiki
    • npm run lint, npm run presubmit wiki, 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:

  • Enable vertical tab strip
  • Make as many tabs as you can scroll the scroll area
  • Try scrolling the area
  • Check if the shadow for the active tab is positioned well

When scrolling, tab's bounds doesn't change while the layer's bounds
changes. In order to synchronize shadow_layer_'s bounds to it,
we should layout it from OnLayerBoundsChanged().
@sangwoo108 sangwoo108 marked this pull request as ready for review April 18, 2023 08:03
@linhkikuchi linhkikuchi merged commit 46e5f36 into master Apr 19, 2023
@linhkikuchi linhkikuchi deleted the sko/vtab-shadow-layer branch April 19, 2023 02:02
@github-actions github-actions bot added this to the 1.52.x - Nightly milestone Apr 19, 2023
brave-builds added a commit that referenced this pull request Apr 19, 2023
@MadhaviSeelam
Copy link

MadhaviSeelam commented Apr 21, 2023

Verification PASSED on Win 11 x64 using the following build(s):

Brave | 1.52.64 Chromium: 112.0.5615.165 (Official Build) nightly (64-bit)
-- | --
Revision | c262f36e6b1d711ee42d4fbe1343b49960593f18-refs/branch-heads/5615@{#1297}
OS | Windows 11 Version 22H2 (Build 22621.1555)

Verified using STR from #18111 (comment)

  • Install 1.52.64

  • launch Brave

  • open brave://flags and enabled for #brave-vertical-tabs

  • clicked Relaunch

  • added few tabs in horizontal tab view

  • open brave://settings/appearance

  • toggled on Use vertical tabs under tabs section

  • confirmed vertical tab view is enabled

  • added few more tabs to vertical tab view

  • scroll down to the last tab and scolled back up in the panel

  • Confirmed no shadow/grey area shown in between tabs and inactive and active tabs are highlighted as expected

ex ex
image image

kjozwiak pushed a commit that referenced this pull request Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants