Closed
Bug 538487
Opened 15 years ago
Closed 2 years ago
With taskbar previews enabled, print preview gets its "own tab". Switching tabs causes the print preview toolbar to persist and won't close
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
WORKSFORME
Tracking | Status | |
---|---|---|
blocking2.0 | --- | - |
People
(Reporter: u88484, Unassigned)
References
Details
(Keywords: uiwanted)
Attachments
(3 files, 1 obsolete file)
6.02 KB,
patch
|
Details | Diff | Splinter Review | |
216.06 KB,
image/png
|
Details | |
2.32 KB,
patch
|
Details | Diff | Splinter Review |
STR: 1) Open two or more tabs 2) Open print preview on the second tab 3) a new tab is created (older version of Firefox basically overwrite this tab) 2) Move mouse down to the taskbar and switch to the first tab The print preview toolbar persist across tabs and now you can't close it unless you go back to the tab that you opened the print preview. The following error appears in the error console when trying to close this toolbar: Error: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebBrowserPrint.exitPrintPreview] Source file: chrome://global/content/printUtils.js Line: 289
Summary: With taskbar previews enabled, print preview gets its "own tab". Switch tabs causes the print preview toolbar to persist and won't close → With taskbar previews enabled, print preview gets its "own tab". Switching tabs causes the print preview toolbar to persist and won't close
Comment 1•15 years ago
|
||
Setting uiwanted as I'm not sure what we should do for the print preview case.
Keywords: uiwanted
Comment 2•15 years ago
|
||
I'd say this is a bug in the way we implement print preview. It should open in it's own window, or like we're doing with other stand alone dialog nows, have it fall into it's own separate tab.
Comment 3•15 years ago
|
||
There's a project to do this listed on https://wiki.mozilla.org/Firefox/Projects but there's no bug filed or project page for it.
Comment 4•15 years ago
|
||
I don't know much about the print preview code so I'd like some feedback on the approach. We special case the print preview tab - it is never made visible or part of the ordering. It also does not count against the "max tab previews" check. Since the print preview code also hides all the chrome so it can make a toolbar, I decided to exit print preview mode if the user wants a live preview of their tabs. Unfortunately, the obvious check of gInPrintPreview fails when trying to decide what to do with a new tab - it's never set when the tab is created and doing so leads to unfortunate unbounded recursion. Hence the odd and unabstract check in TabWindow.newTab. I'd like to get rid of it but I'd also just rather that the print preview feature didn't go make a new tab in the first place!
Updated•15 years ago
|
Attachment #440709 -
Flags: feedback?(rflint)
Attachment #440709 -
Flags: feedback?(gavin.sharp)
Attachment #440709 -
Flags: feedback?
Comment 5•15 years ago
|
||
Comment on attachment 440709 [details] [diff] [review] Special case the print preview tab After talking with Gavin, it's probably a better idea to try to fix up Firefox's implementation of the print preview code to not be so hacky. I don't have a plan yet but somehow we have to conjure up a nsIDocShell for the toolkit code. My faith in the test coverage here is low so this would be nice to have for an alpha.
Attachment #440709 -
Flags: feedback?(rflint)
Attachment #440709 -
Flags: feedback?(gavin.sharp)
Attachment #440709 -
Flags: feedback?
Updated•15 years ago
|
Attachment #440709 -
Flags: feedback?
Comment 6•14 years ago
|
||
STR: 1.Open Minefield 2.Open some tabs and go some web site 3.Go to Print Preview 4.Open other programs (i.e Thunderbird) and use it to open a link in a new tab in Firefox 5. Go to new tab with the new website, close Print Preview 6. Tab bar, Navigation and Bookmark Toolbar will disappear leaving only the Firefox Menu Button
Updated•14 years ago
|
blocking2.0: --- → ?
Updated•14 years ago
|
blocking2.0: ? → final+
Comment 7•14 years ago
|
||
Rob - is this still something you're working on? It's been dormant for a while, but if you can't do it, I'd appreciate any suggestions of alternates, since it's a release blocker for FF4.
Comment 8•14 years ago
|
||
No, I have not worked on this for some time. If it happens to work out that we can make the print preview replace the current tab contents, then we should do that instead and this bug won't occur. I don't know if the bugs that halted the earlier print preview project/sprint have been fixed or do not occur. I will hopefully have some time in about 2 weeks to figure this out.
Comment 9•14 years ago
|
||
Simple fix - hide tab previews for the print preview window.
Attachment #495866 -
Flags: review?(tellrob)
Comment 10•14 years ago
|
||
Comment on attachment 495866 [details] [diff] [review] hide tab previews v.1 >--- a/browser/base/content/browser.js >+++ b/browser/base/content/browser.js >@@ -196,16 +196,19 @@ XPCOMUtils.defineLazyGetter(this, "Win7F > Cu.import("resource://gre/modules/WindowsPreviewPerTab.jsm", temp); > let AeroPeek = temp.AeroPeek; > return { > onOpenWindow: function () { > AeroPeek.onOpenWindow(window); > }, > onCloseWindow: function () { > AeroPeek.onCloseWindow(window); >+ }, >+ enableForWindow: function (flag) { >+ AeroPeek.enableForWindow(window, flag); > } > }; > } > #endif > #endif > return null; > }); > >@@ -2676,24 +2679,28 @@ var PrintPreviewListener = { > this._tabBeforePrintPreview.linkedBrowser : gBrowser.selectedBrowser; > }, > getNavToolbox: function () { > return gNavToolbox; > }, > onEnter: function () { > gInPrintPreviewMode = true; > this._toggleAffectedChrome(); >+ if (Win7Features) >+ Win7Features.enableForWindow(false); > }, Does this actually make sense API-wise, i.e. would we really want to disable all potential "win 7 features" in print preview mode?
Updated•14 years ago
|
Comment 11•14 years ago
|
||
> Does this actually make sense API-wise, i.e. would we really want to disable
> all potential "win 7 features" in print preview mode?
The only win7 features tied to this are our custom tab / live previews. Since there are no tabs with print preview up, seemed like the simplest fix. When our custom implementation is disabled, Windows reverts back to it's default behavior for the window, so we don't loose the thumbnail or the live preview feature.
Comment 12•14 years ago
|
||
I realize this is the only actual feature. It still seems to me that you really want something like Win7Features.AeroPeek.enableForWindow...
Comment 13•14 years ago
|
||
(In reply to comment #12) > I realize this is the only actual feature. It still seems to me that you really > want something like Win7Features.AeroPeek.enableForWindow... Ah, sure, sounds good to me.
Updated•14 years ago
|
Whiteboard: [will be fixed with aero peak turned off]
Comment 14•14 years ago
|
||
As long as we block on bug 605338 we don't need to continue to block on this bug.
Comment 15•14 years ago
|
||
(In reply to comment #14) > As long as we block on bug 605338 we don't need to continue to block on this > bug. My understanding (and maybe this has changed) is that we are just flipping the pref in bug 605338 but leaving the GUI option visible. Shouldn't we still get this fixed for final since having a GUI option implies some sort of quality for this feature?
Comment 16•14 years ago
|
||
Dao, how about |Win7Features.enableTabPreviewsForWindow(flag)|? That seems to get the point across.
Assignee: tellrob → jmathies
Attachment #495866 -
Attachment is obsolete: true
Attachment #497805 -
Flags: review?(dao)
Attachment #495866 -
Flags: review?(tellrob)
Updated•14 years ago
|
blocking2.0: final+ → -
Comment 17•14 years ago
|
||
I would imagine that having a gui option would depend on if bugs like this one are fixed. Up to drivers to make the blocking call.
Reporter | ||
Comment 18•14 years ago
|
||
(In reply to comment #17) > Up to drivers to make the blocking call. When I filed the bug the print preview toolbar would not close leaving the user with a broken browsing session but now it seems to close fine so maybe it shouldn't block even though it is a nuisance.
Comment 19•14 years ago
|
||
This isn't blocking now that we've disabled previews by default. We do have a fix though for people who enable previews on their own. Hopefully it'll land before we release.
Whiteboard: [will be fixed with aero peak turned off]
Comment 20•14 years ago
|
||
Comment on attachment 497805 [details] [diff] [review] hide tab previews v.2 Why is Win7Features.enableTabPreviewsForWindow better than Win7Features.AeroPeek.enableForWindow?
Comment 21•14 years ago
|
||
(In reply to comment #20) > Comment on attachment 497805 [details] [diff] [review] > hide tab previews v.2 > > Why is Win7Features.enableTabPreviewsForWindow better than > Win7Features.AeroPeek.enableForWindow? Honestly I don't understand how the scope works out on this - http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#189 AeroPeek seems temporary to me. I can call Win7Features but I don't see how I can access AeroPeek directly.
Comment 22•14 years ago
|
||
You would set AeroPeek as a property on the returned object: return { AeroPeek: temp.AeroPeek, ...
Updated•14 years ago
|
Attachment #497805 -
Flags: review?(dao)
Updated•12 years ago
|
Assignee: jmathies → nobody
Comment 24•6 years ago
|
||
No assignee, updating the status.
Comment 25•6 years ago
|
||
No assignee, updating the status.
Comment 26•6 years ago
|
||
No assignee, updating the status.
Comment 27•5 years ago
|
||
Shell Integration is for default browser code so moving to general.
Component: Shell Integration → General
Updated•2 years ago
|
Severity: normal → S3
Comment 28•2 years ago
|
||
We changed print preview so I don't think this is an issue now.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•