Closed Bug 739038 Opened 8 years ago Closed 8 years ago

Window.print() causes weird issues, making Fennec unusable

Categories

(Firefox for Android :: General, defect)

ARM
Android
defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 14
Tracking Status
firefox15 --- verified
blocking-fennec1.0 --- +

People

(Reporter: martijn.martijn, Assigned: mbrubeck)

References

()

Details

(Keywords: testcase)

Attachments

(3 files)

Attached file testcase
Similar bugs, bug 735237 and bug 707385.

See testcase, when visiting that testcase, window.print() is invoked. After that, Fennec behaves weird. You can't navigate to any page anymore, basically.

Tested on the Galaxy Nexus, Android 4.0.2.
blocking-fennec1.0: --- → ?
Assignee: nobody → wjohnston
blocking-fennec1.0: ? → +
Assignee: wjohnston → mbrubeck
Attached patch patchSplinter Review
This patch makes window.print throw an exception in Fennec, similar to the patch in bug 735237.

Note: This patch applies on top of the patch from bug 735237.  (They don't depend on each other functionally; they just touch nearby lines of code.)
Attachment #614580 - Flags: review?(jst)
Pushed to Try: https://tbpl.mozilla.org/?tree=Try&rev=339284aba55e
Status: NEW → ASSIGNED
Attachment #614580 - Flags: review?(jst) → review+
Attached patch testsSplinter Review
Oops!  I included these tests in my push to Try (comment 2), but I attached (and landed) old copies of my patches that didn't include the tests.  Here are some simple mochitests for this bug and bug 735237.
Attachment #614895 - Flags: review?(jst)
Attachment #614895 - Flags: review?(jst) → review+
https://hg.mozilla.org/mozilla-central/rev/362fd0d7c8c3
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
2 errors are thrown when the test page is opened on the latest Nightly:

E/GeckoConsole(25117): [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must to be declared in the document or in the transfer protocol." {file: "https://bug511883.bugzilla.mozilla.org/attachment.cgi?id=395841" line: 0}]

E/GeckoConsole(25117): [JavaScript Error: "NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMWindow.print]" {file: "data:text/html;charset=utf-8,%3Cscript%3Ewindow.print%28%29%3B%3C/script%3E" line: 1}]

Since both are expected, I will close this bug as verified fixed on:

Firefox 15.0a1 (2012-05-30)
Device: Galaxy Nexus
OS: Android 4.0.2
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.