MozillaZine

[Ext] BackTrack Tab History

Announce and Discuss the Latest Theme and Extension Releases.
Kevin Jones
 
Posts: 625
Joined: August 12th, 2009, 10:22 am

Post Posted May 4th, 2017, 8:58 am

Hello Alex,

It appears that Backtrack's onTabClosing handler accesses browser.messageManager on lazy-browser tabs, which will always force insertion of the browser (make it non-lazy).

I've filed bug 1362092: https://bugzilla.mozilla.org/show_bug.cgi?id=1362092

[bug 1345098] Lazy browser prematurely inserted via 'messageManager' property access:
getter@chrome://browser/content/tabbrowser.xml:2122:45
onTabClosing@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///Users/allasso/Library/Application%20Support/Firefox/Profiles/ALT2/extensions/backtrack@byalexv.co.uk.xpi!/bootstrap.js:1164:9
onSSTabClosing@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///Users/allasso/Library/Application%20Support/Firefox/Profiles/ALT2/extensions/backtrack@byalexv.co.uk.xpi!/bootstrap.js:1094:5
ssi_onTabClose@resource:///modules/sessionstore/SessionStore.jsm:1930:5
ssi_handleEvent@resource:///modules/sessionstore/SessionStore.jsm:1012:11
_beginRemoveTab@chrome://browser/content/tabbrowser.xml:2772:13
removeTab@chrome://browser/content/tabbrowser.xml:2639:18
removeAllTabsBut@chrome://browser/content/tabbrowser.xml:2587:19
oncommand@chrome://browser/content/browser.xul:1:1

AlexVallat
 
Posts: 61
Joined: September 30th, 2006, 8:53 am

Post Posted May 4th, 2017, 10:06 am

Thank you for reporting this. Please try the dev channel version v0.16 which should resolve the issue.

Kevin Jones
 
Posts: 625
Joined: August 12th, 2009, 10:22 am

Post Posted May 5th, 2017, 3:29 am

AlexVallat wrote:Thank you for reporting this. Please try the dev channel version v0.16 which should resolve the issue.


Thanks for fixing this so quickly :-)

iByzod

User avatar
 
Posts: 9
Joined: October 15th, 2011, 9:16 pm

Post Posted June 16th, 2017, 8:15 am

Hi, @AlexVallat, thanks for your great addon, but something is annoying me: it can't copy session history to new tabs that are opened from script/other addon.

For example, tabs opened/created by gesture addons or drag&drop addons have empty session history.
I open new tabs mostly by using gestures or dragging links so most opened tabs have no 'back track' session history for me :(

Can you hack "gBrowser.loadOneTab"? I think that one is called even for tabs created by script/addon.

Thanks!

AlexVallat
 
Posts: 61
Joined: September 30th, 2006, 8:53 am

Post Posted June 16th, 2017, 10:49 am

Hi iByzod, thanks for the links. I'm afraid there's not much I can do to get Easy DragToGo working, just because of the way it works. FireGestures shouldn't be a problem, though. It isn't the intercepting of the new tab that's the issue, it's detecting of the parent tab. I'm currently doing this with the click event, but if a gesture is used, no click occurs.

I've released v0.16b2 into the development channel which uses mouseup instead of click. Should be pretty much the same, except that it will work for gestures too.

Give it a go and let me if it does the job for you.

iByzod

User avatar
 
Posts: 9
Joined: October 15th, 2011, 9:16 pm

Post Posted June 16th, 2017, 7:41 pm

AlexVallat wrote:Hi iByzod, thanks for the links. I'm afraid there's not much I can do to get Easy DragToGo working, just because of the way it works. FireGestures shouldn't be a problem, though. It isn't the intercepting of the new tab that's the issue, it's detecting of the parent tab. I'm currently doing this with the click event, but if a gesture is used, no click occurs.

I've released v0.16b2 into the development channel which uses mouseup instead of click. Should be pretty much the same, except that it will work for gestures too.

Give it a go and let me if it does the job for you.


Wow I didn't expect a beta version comes out after waking up :P
Thanks for your super fast hotfix!
But there're still problems with drag&drop addons, since I didn't found your code repository, I'll post my reproduce steps here:

Test Environment
System Platform : AMD64, Windows-10-10.0.14393
Browser : Firefox Developer Edition (55.0 Beta 1, 64 bit)
User Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0
Build Config : https://hg.mozilla.org/releases/mozilla ... 1765ac199e
BackTrack Tab History : 0.16b2

Step to Reproduce
1. Create a new profile for Firefox 55beta1 build 5.
2. Install Firegesture (1.11.1)
3. Install Backtrack tab history (0.16b2)
4. Close Firefox, delete \startupCache\ folder in profile directory then open Firefox (this cache folder should be deleted for every restart later by default)
5. Open https://www.reddit.com/r/firefox/ as tab A, click `Next` link at the bottom of the page two times, your session history should be like this:
Image
6. Middle click on `Next` to open a new reddit tab B in the background, switch to tab B, it 'remembers' the original history:
Image
7. Open tab C & tab D with Firegesture (normal gesture & keypress gesture, shown in the gif below), their history is the same as above, it works
ImageImage
8. Install Drag & DropZones (Revived) (0.1.2)
9. Close Firefox, delete \startupCache\ folder in profile directory then open Firefox
10. Config Drag & DropZones to add a `open links` zone:
Image
11. Repeat step 5~7, plus step 12
12. Open tab E with Drag & DropZones, by draging the `Next` link to the `Open Link` zone.

Expected Result
1. Tab A have 3 history entries, tab B~E have 4 history entries
ImageImage
-------tab A------------------tab B~E

Actual Result
1. Tab A have 3 history entries, tab B~E have 1 history entries (itself)
2. Tab B~D still have only 1 history entries even after Drag & DropZones is uninstalled
ImageImage
-------tab A------------------tab B~E

If you need more information please reply to this thread or contact me directly (byzod#live.com, replace # with @), thanks!

AlexVallat
 
Posts: 61
Joined: September 30th, 2006, 8:53 am

Post Posted June 17th, 2017, 1:03 am

The "dragend" event does not fire "mouseup", so drag operations are not triggering the parent setting behaviour. I'm trying to think whether there is any risk of unwanted behaviour by allowing dragend to act the same as mouseup for setting a tab as parent, but I think it's probably OK. I've uploaded v0.16b3 with "dragend" event listening added.

iByzod

User avatar
 
Posts: 9
Joined: October 15th, 2011, 9:16 pm

Post Posted June 17th, 2017, 6:27 am

AlexVallat wrote:The "dragend" event does not fire "mouseup", so drag operations are not triggering the parent setting behaviour. I'm trying to think whether there is any risk of unwanted behaviour by allowing dragend to act the same as mouseup for setting a tab as parent, but I think it's probably OK. I've uploaded v0.16b3 with "dragend" event listening added.


Thanks for your update! So tabs opened by Firegesture is impossible to inherit the history? :(
Anyway, 0.16b3 works for Drag & DropZones (the test addon), but still not working on my in-use drag&drop addon.
It's a legacy addon, I know it will die soon in fx 57, but I really hope you could spare some time taking a look into it because I'm staying with Fx 56 for a while. Thank you so much!

Step to reproduce
1. Repeat step 1~5 in the former post
2. Install userChromJS v2.0, you may need to disable the signature check to install it (add an entry in about:config, xpinstall.signatures.required = false)
3. Install DragToGo.uc.js by copy it to userChrome folder in your profile directory (typically `{profile folder name}\Chrome\`). Then add one line in userChrome.js (`{profile folder name}\Chrome\userChrome.js`):
Code: Select all
userChrome.import("*", "UChrm");

4. Close Firefox, delete \startupCache\ folder in profile directory then open Firefox
5. In tab A, open tab F by draging the `Next` link to the right (open in background) or left (open in foreground) then release in 300ms (can be changed in the line 24 of DragToGo.uc.js)

Expected Result
1. Tab A have 3 history entries, tab F have 4 history entries
ImageImage
-------tab A------------------tab F

Actual Result
1. Tab A have 3 history entries, tab F have 1 history entry (itself)
ImageImage
-------tab A------------------tab F

AlexVallat
 
Posts: 61
Joined: September 30th, 2006, 8:53 am

Post Posted June 18th, 2017, 2:16 am

Sorry, but that's completely horrible. I tried installing it, and it's borked my profile so badly I can't even open the browser toolbox to try and debug it. My best guess is that its intercepting the drag events in a way the prevents them from being seen or processed by anything else, including BackTrack Tab history. I'm not willing to do any more work to try and support this hack, sorry.

iByzod

User avatar
 
Posts: 9
Joined: October 15th, 2011, 9:16 pm

Post Posted June 19th, 2017, 9:08 am

AlexVallat wrote:Sorry, but that's completely horrible. I tried installing it, and it's borked my profile so badly I can't even open the browser toolbox to try and debug it. My best guess is that its intercepting the drag events in a way the prevents them from being seen or processed by anything else, including BackTrack Tab history. I'm not willing to do any more work to try and support this hack, sorry.


Ah, the content of userchrome.js in step 3 should be
Code: Select all
if (location == "chrome://browser/content/browser.xul") {
   userChrome.import("*", "UChrm");
}

Maybe you can test it again when have spare time?

Thanks for your advice anyway, I'll check it.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: redwolfe_98 and 2 guests