Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

When no frame index is provided for a new tab, insert at the end of the frame list #14102

Merged
merged 1 commit into from
May 12, 2018

Conversation

petemill
Copy link
Member

@petemill petemill commented May 11, 2018

Fix #14101
Whilst we do not display a tab until it has received tab-inserted-at and therefore has an index, we do switch the active Tab Page to the index of the new tab (if it is active), which would be the index of the tab page at tab index 0.

A better fix would be to not add the frame to the window state until tab-inserted-at has been received and we have the actual index, but that is a larger (high-risk) change that I'll contribute separately . This could also help performance, especially if batched.

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. (Ask a Brave employee to help if you cannot access this document.)

Test Plan:

On #14101

Reviewer Checklist:

  • Request a security/privacy review as needed if one was not already requested.

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

@petemill petemill added this to the 0.22.x Release 3 (Beta channel) milestone May 11, 2018
@petemill petemill self-assigned this May 11, 2018
@petemill petemill requested a review from bsclifton May 11, 2018 23:24
…he frame list

Fix #14101
Whilst we do not display a tab until it has received tab-inserted-at and therefore has an index, we do switch the active Tab Page to the index of the new tab (if it is active), which would be the index of the tab page at tab index 0.

A better fix would be to not add the frame to the window state until tab-inserted-at has been received. This could also help performance, especially if batched.
@petemill petemill force-pushed the fix/14101-tab-page-change-new-tab branch from 883445a to 11854e6 Compare May 12, 2018 00:19
@ryanml ryanml self-requested a review May 12, 2018 00:26
Copy link
Contributor

@ryanml ryanml 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 changes 🎉

@petemill petemill merged commit ff065bb into master May 12, 2018
@petemill petemill deleted the fix/14101-tab-page-change-new-tab branch May 12, 2018 00:53
petemill added a commit that referenced this pull request May 12, 2018
When no frame index is provided for a new tab, insert at the end of the frame list
@petemill
Copy link
Member Author

0.23.x b3875e9
0.22.x-release3 35dd336

petemill added a commit that referenced this pull request May 12, 2018
When no frame index is provided for a new tab, insert at the end of the frame list
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating new tab moves to first tab page and back again
2 participants