Closed
Bug 721474
Opened 13 years ago
Closed 13 years ago
Port |Bug 575830 - Image zoom (Page zoom) is reset when I switch tabs| to SeaMonkey
Categories
(SeaMonkey :: Tabbed Browser, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
seamonkey2.12
People
(Reporter: mcsmurf, Assigned: mcsmurf)
References
Details
Attachments
(1 file, 2 obsolete files)
2.27 KB,
patch
|
mcsmurf
:
review+
|
Details | Diff | Splinter Review |
Bug 575830 fixed the problem that Firefox forgot the current zoom level in a tab when switching tabs. SeaMonkey has the same problem so that patch should be ported to SeaMonkey.
Assignee | ||
Comment 1•13 years ago
|
||
Also includes fix from Bug 719271.
Neil: Can you check if my usage of content.browser is correct? The Firefox code uses both browser.contentDocument.mozSyntheticDocument and content.document.mozSyntheticDocument in the same file. I changed that code to content.document... Is that correct?
Assignee: nobody → bugzilla
Attachment #591902 -
Flags: review?(neil)
Assignee | ||
Comment 2•13 years ago
|
||
Comment on attachment 591902 [details] [diff] [review]
Patch
Not ready for review yet.
Attachment #591902 -
Flags: review?(neil)
Comment 3•13 years ago
|
||
Comment on attachment 591902 [details] [diff] [review]
Patch
>+ if (!aIsTabSwitch && content.document.mozSyntheticDocument) {
No, this needs to use aBrowser.contentDocument for consistency. (As far as I can tell, aBrowser is always the selected browser. Firefox claims to have some weird background tab update system but it appears to be unnecessary.)
>+ ZoomManager.setZoomForBrowser(browser, 1);
aBrowser
>+ if (content.document.mozSyntheticDocument)
>+ return;
This (well, aBrowser.contentDocument) needs to be merged into the condition before the try/catch, as per _applySettingToPref (except that the latter correctly uses content.document).
>+ if (!(content.document.mozSyntheticDocument))
Nit: don't need the inner ()s any more.
Attachment #591902 -
Flags: review-
Assignee | ||
Comment 4•13 years ago
|
||
Fixed the issues from the review comment.
BTW: I noticed Bug 722624 (Firefox), maybe we should fix this one as well while we're at it. Not sure what we could do, maybe save the current zoom level anyway when looking at an image or video? But that might not be what the user expects.
Attachment #591902 -
Attachment is obsolete: true
Attachment #602099 -
Flags: review?(neil)
Assignee | ||
Comment 5•13 years ago
|
||
Actually ignore what I said about Bug 722624, that one needs a different solution. Maybe storing the zoom level for pages (in contrast to images/video/...) somewhere in the backend.
Comment 6•13 years ago
|
||
Comment on attachment 602099 [details] [diff] [review]
Updates patch
Sorry for not spotting these last time.
>+ // Image documents should always start at 1, and are not affected by prefs.
>+ if (!aIsTabSwitch && aBrowser.contentDocument.mozSyntheticDocument) {
>+ ZoomManager.setZoomForBrowser(aBrowser, 1);
This needs to be this._ensureValid(1) as per bug 672146.
>- if (!this.siteSpecific || window.gInPrintPreviewMode)
>+ if (!this.siteSpecific || window.gInPrintPreviewMode ||
>+ aBrowser.contentDocument.mozSyntheticDocument)
> return;
>
> var browser = aBrowser || (getBrowser() && getBrowser().selectedBrowser);
We had better move this up so that we can use browser instead of aBrowser.
(aBrowser could be null or undefined.)
r=me with those fixed.
Attachment #602099 -
Flags: review?(neil) → review+
Assignee | ||
Comment 7•13 years ago
|
||
Attachment #602099 -
Attachment is obsolete: true
Attachment #621341 -
Flags: review+
Assignee | ||
Comment 8•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.12
You need to log in
before you can comment on or make changes to this bug.
Description
•