window.print() doesn't work from inside a frame

RESOLVED FIXED

Status

()

Core
Layout
P1
normal
RESOLVED FIXED
9 years ago
8 years ago

People

(Reporter: Martijn Wargers (zombie), Assigned: smaug)

Tracking

({regression, testcase})

Trunk
x86
Windows XP
regression, testcase
Points:
---
Bug Flags:
blocking1.9.2 +
in-testsuite ?
in-litmus ?

Firefox Tracking Flags

(status1.9.2 beta1-fixed)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

9 years ago
Created attachment 395841 [details]
testcase

See testcase, a print dialog should appear, this regressed when bug 352093 landed.
Flags: blocking1.9.2?

Updated

9 years ago
Flags: blocking1.9.2? → blocking1.9.2+
Priority: -- → P2
Duplicate of this bug: 513254
So printing a frame somehow depends on that frame having a widget?  Seems like it shouldn't...
This sucks actually. I tried to avoid supporting print preview of an iframe because I thought only chrome could do that, and although I guess that's still true, I didn't know content could print iframes. The problem is that the print engine expects a widget at the root and I don't know how hard it would be to fix that for printing --- I know it looked hard for print preview.

Olli, would you possibly be able to look at this? I'm suspect your cloning patch fixes it but I guess we can't backport that to 1.9.2 :-(.
(Assignee)

Comment 6

9 years ago
I'll look at this.
Assignee: nobody → Olli.Pettay
(Assignee)

Comment 7

9 years ago
Created attachment 399289 [details] [diff] [review]
patch

We use mParentWidget only when creating print preview.
Attachment #399289 - Flags: review?(roc)
Martijn, do you know if it's possible to write a mochitest here? You can probably set a pref to disable the dialog box, but I guess the test output still goes to the default printer, and that would be bad...

Updated

9 years ago
Flags: in-testsuite?
Flags: in-litmus?
(Assignee)

Updated

9 years ago
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Priority: P2 → P1
(Assignee)

Comment 11

9 years ago
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/4d62b8e4997a
status1.9.2: --- → beta1-fixed
Priority: P1 → P2
(Assignee)

Updated

9 years ago
Priority: P2 → P1
You need to log in before you can comment on or make changes to this bug.