Closed Bug 760238 Opened 12 years ago Closed 12 years ago

Find in page has broken viewport save/restore code

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 15

People

(Reporter: kats, Assigned: Margaret)

References

Details

Attachments

(1 file, 1 obsolete file)

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}]
Blocks: find
Attached patch patch (obsolete) — Splinter Review
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.
Attached patch update patchSplinter Review
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+
(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 :)
https://hg.mozilla.org/integration/mozilla-inbound/rev/758bde132601
Target Milestone: --- → Firefox 15
https://hg.mozilla.org/mozilla-central/rev/758bde132601
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: