Find in page has broken viewport save/restore code

RESOLVED FIXED in Firefox 15

Status

()

Firefox for Android
General
RESOLVED FIXED
6 years ago
a year ago

People

(Reporter: kats, Assigned: Margaret)

Tracking

unspecified
Firefox 15
All
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

The code in browser.js that saves the viewport and restores it when the find-in-page operation is terminated is broken; it uses .viewport instead of getViewport() and setViewport(). As seen in logcat:

05-31 19:27:06.490 E/GeckoConsole(15891): [JavaScript Warning: "ReferenceError: reference to undefined property this._targetTab.viewport" {file: "chrome://browser/content/browser.js" line: 3224}]

Updated

6 years ago
Blocks: 695172
(Assignee)

Comment 1

6 years ago
Created attachment 628978 [details] [diff] [review]
patch
Assignee: nobody → margaret.leibovic
Attachment #628978 - Flags: review?(bugmail.mozilla)
Comment on attachment 628978 [details] [diff] [review]
patch

Review of attachment 628978 [details] [diff] [review]:
-----------------------------------------------------------------

The viewport you're restoring won't have a displayport. You should update setViewport() so that the last line of code in it is guarded by a "if (aViewport.displayPort)", or you'll get an error in the log and probably displayport update fail.
(Assignee)

Comment 3

6 years ago
Created attachment 629234 [details] [diff] [review]
update patch

Like so?
Attachment #628978 - Attachment is obsolete: true
Attachment #628978 - Flags: review?(bugmail.mozilla)
Attachment #629234 - Flags: review?(bugmail.mozilla)
Comment on attachment 629234 [details] [diff] [review]
update patch

Review of attachment 629234 [details] [diff] [review]:
-----------------------------------------------------------------

Yup. I assume you exercised the code and checked for any other javascript errors in the logcat (if not, you should do that just to make sure there's nothing else...).
Attachment #629234 - Flags: review?(bugmail.mozilla) → review+
(Assignee)

Comment 5

6 years ago
(In reply to Kartikaya Gupta (:kats) from comment #4)

> Yup. I assume you exercised the code and checked for any other javascript
> errors in the logcat (if not, you should do that just to make sure there's
> nothing else...).

Yes, I did a better job testing now, and verified it does all work without errors :)
(Assignee)

Comment 6

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/758bde132601
Target Milestone: --- → Firefox 15

Comment 7

6 years ago
https://hg.mozilla.org/mozilla-central/rev/758bde132601
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.