Closed
Bug 1248460
Opened 8 years ago
Closed 8 years ago
Calling tabs.duplicated on a pinned tab
Categories
(WebExtensions :: Untriaged, defect, P4)
WebExtensions
Untriaged
Tracking
(firefox47 fixed)
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: andy+bugzilla, Assigned: andy+bugzilla)
References
(Depends on 1 open bug)
Details
(Whiteboard: [tabs]triaged)
Attachments
(1 file)
Should create a pinned tab next to the existing one, which is what it does on chrome. Currently it creates it next to all the pinned tabs and the new tab is not pinned.
Assignee | ||
Comment 1•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/37023/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/37023/
Attachment #8724419 -
Flags: review?(kmaglione+bmo)
Assignee | ||
Updated•8 years ago
|
Iteration: --- → 47.3 - Mar 7
Comment 2•8 years ago
|
||
Comment on attachment 8724419 [details] MozReview Request: bug 1248460 pin during SSTabRestoring r=kmag https://reviewboard.mozilla.org/r/37023/#review33593 ::: browser/components/extensions/ext-tabs.js:789 (Diff revision 1) > + newTab.addEventListener("SSTabRestoring", function listener() { Is there a reason we have to wait for this event before making these changes? ::: browser/components/extensions/ext-tabs.js:803 (Diff revision 1) > + gBrowser.selectTabAtIndex(newTab._tPos); This should really just be `gBrowser.selectedTab = newTab` ::: browser/components/extensions/test/browser/browser_ext_tabs_duplicate.js:78 (Diff revision 1) > + if (tab.linkedBrowser.currentURI.spec === "http://example.net/") { This is going to get into an infinite loop if this test fails. Maybe `while (gBrowser.tabs[0].currentURI.spec == "http://example.net/")`?
Attachment #8724419 -
Flags: review?(kmaglione+bmo)
Assignee | ||
Comment 3•8 years ago
|
||
https://reviewboard.mozilla.org/r/37023/#review33593 > Is there a reason we have to wait for this event before making these changes? According to the docs: https://developer.mozilla.org/en/docs/Session_store_API "If you want to set permissions or otherwise manipulate a restored tab before the page is loaded into it, you should watch SSTabRestoring. If you want to do something after the page is loaded, you should watch SSTabRestored." If you set tab.pinned before the tab is restored, then you lose the pinned data. If you set in the SSTabRestored event, there is a really awkward jump as the tab appears and then moves over to be pinned. We still need SSTabRestored so we can send the callback when its completed. > This should really just be `gBrowser.selectedTab = newTab` Sure. > This is going to get into an infinite loop if this test fails. > > Maybe `while (gBrowser.tabs[0].currentURI.spec == "http://example.net/")`? And its shorter too, good call.
Assignee | ||
Comment 4•8 years ago
|
||
Comment on attachment 8724419 [details] MozReview Request: bug 1248460 pin during SSTabRestoring r=kmag Review request updated; see interdiff: https://reviewboard.mozilla.org/r/37023/diff/1-2/
Attachment #8724419 -
Flags: review?(kmaglione+bmo)
Comment 5•8 years ago
|
||
https://reviewboard.mozilla.org/r/37023/#review33593 > According to the docs: https://developer.mozilla.org/en/docs/Session_store_API > > "If you want to set permissions or otherwise manipulate a restored tab before the page is loaded into it, you should watch SSTabRestoring. If you want to do something after the page is loaded, you should watch SSTabRestored." > > If you set tab.pinned before the tab is restored, then you lose the pinned data. If you set in the SSTabRestored event, there is a really awkward jump as the tab appears and then moves over to be pinned. We still need SSTabRestored so we can send the callback when its completed. OK. Please add a comment.
Comment 6•8 years ago
|
||
Comment on attachment 8724419 [details] MozReview Request: bug 1248460 pin during SSTabRestoring r=kmag https://reviewboard.mozilla.org/r/37023/#review33747 Looks good. Thanks
Attachment #8724419 -
Flags: review?(kmaglione+bmo) → review+
Assignee | ||
Comment 7•8 years ago
|
||
Comment on attachment 8724419 [details] MozReview Request: bug 1248460 pin during SSTabRestoring r=kmag Review request updated; see interdiff: https://reviewboard.mozilla.org/r/37023/diff/2-3/
Attachment #8724419 -
Attachment description: MozReview Request: bug 1248460 pin during SSTabRestoring r?kmag → MozReview Request: bug 1248460 pin during SSTabRestoring r=kmag
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 9•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b525f31f69ff
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•