Last Comment Bug 342439 - printing certain urls (google groups and maps) from print preview shows the style/meta tags on paper
: printing certain urls (google groups and maps) from print preview shows the s...
Status: RESOLVED FIXED
[fixed on trunk, 1.8.1 branch, and 1....
: fixed1.8.0.7, fixed1.8.1, regression
Product: Core
Classification: Components
Component: Printing: Output (show other bugs)
: 1.8 Branch
: x86 Windows XP
: -- normal with 1 vote (vote)
: mozilla1.8.1
Assigned To: (not reading, please use seth@sspitzer.org instead)
:
Mentors:
http://groups.google.com/group/mozill...
Depends on: 334944 340119
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-22 11:30 PDT by (not reading, please use seth@sspitzer.org instead)
Modified: 2006-11-10 12:10 PST (History)
6 users (show)
mtschrep: blocking1.8.1+
dveditz: blocking1.8.0.7-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
groups printout (31.51 KB, application/pdf)
2006-06-22 11:33 PDT, (not reading, please use seth@sspitzer.org instead)
no flags Details
maps printout (174.08 KB, application/pdf)
2006-06-22 11:34 PDT, (not reading, please use seth@sspitzer.org instead)
no flags Details
same thing, but on IE (no style tag leakage) (36.60 KB, application/pdf)
2006-06-22 11:38 PDT, (not reading, please use seth@sspitzer.org instead)
no flags Details
patch suggested by bz (991 bytes, patch)
2006-07-20 21:16 PDT, (not reading, please use seth@sspitzer.org instead)
dbaron: review+
dbaron: superreview+
Details | Diff | Splinter Review
patch suggested by bz (with a comment, per dbaron) (1.06 KB, patch)
2006-07-24 17:24 PDT, (not reading, please use seth@sspitzer.org instead)
moco: review+
moco: superreview+
dveditz: approval1.8.0.7+
mbeltzner: approval1.8.1+
Details | Diff | Splinter Review

Description (not reading, please use seth@sspitzer.org instead) 2006-06-22 11:30:37 PDT
[printing] printing (a google pages) shows the style tag on paper (but not in preview)

try it with http://groups.google.com/group/mozilla.dev.apps.firefox/msg/46e9754733d4a436

I have seen this on google maps, too.  I'll get a test case

see attached pdf.

I'm using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1a3) Gecko/20060620 BonEcho/2.0a3
Comment 1 (not reading, please use seth@sspitzer.org instead) 2006-06-22 11:32:25 PDT
yes, print this:  http://maps.google.com/maps?oi=map&q=51+Campbell+Avenue,+Campbell,+CA

I am using http://www.pdf995.com/ to print to pdf on windows.

here come two pdfs.  
Comment 2 (not reading, please use seth@sspitzer.org instead) 2006-06-22 11:33:08 PDT
Created attachment 226676 [details]
groups printout
Comment 3 (not reading, please use seth@sspitzer.org instead) 2006-06-22 11:34:05 PDT
Created attachment 226677 [details]
maps printout
Comment 4 (not reading, please use seth@sspitzer.org instead) 2006-06-22 11:36:51 PDT
here is the tag that is leaking:

<noscript><style type="text/css"><!--
.noscripthide { display:none; }
.noscriptinline { display:inline; }
.noscriptblock { display:block; }
//--></style></noscript>
Comment 5 (not reading, please use seth@sspitzer.org instead) 2006-06-22 11:38:31 PDT
Created attachment 226678 [details]
same thing, but on IE (no style tag leakage)
Comment 6 Phil Ringnalda (:philor, back in August) 2006-06-22 16:25:59 PDT
See also (at least until it turned trainwreck) bug 334944
Comment 7 (not reading, please use seth@sspitzer.org instead) 2006-07-08 15:51:33 PDT
thanks for the bug links, phil.

for test case, use http://maps.google.com/maps?oi=map&q=51+E+Campbell+Avenue,+Campbell,+CA (instead of my link in comment #1).

bz, this seems related to bugs #334944 and #340119.

Note, I've tried a recent trunk build (and recent branch build) on windows, and this issue remains.

updating summary.
to answer bug #334944 comment #4

> Are the people seeing this in printing just printing?  Or printing from inside
> print preview?

yes, I only see this with print preview.  print works fine.
Comment 8 Boris Zbarsky [:bz] 2006-07-14 16:14:04 PDT
So it doesn't appear in print preview, but does when you print from print preview?

If so, I'll need some help debugging here, since on Linux printing from inside print preview is impossible..
Comment 9 (not reading, please use seth@sspitzer.org instead) 2006-07-14 20:12:29 PDT
> So it doesn't appear in print preview, but does when you print from print
> preview?

yes, that is what I'm seeing.

> If so, I'll need some help debugging here, since on Linux printing from inside
> print preview is impossible..

I've got a debug win32 build, so I should be able to help you out.  Any suggestions on where to start looking?
Comment 10 Boris Zbarsky [:bz] 2006-07-14 22:19:02 PDT
I'd probably start by breakpointing in TurnScriptingOn and seeing what it's called with...  After the first time we've disabled scripting, breakpoint in PresShell::SetPrefNoScriptRule and see what happens there?
Comment 11 (not reading, please use seth@sspitzer.org instead) 2006-07-20 21:16:28 PDT
Created attachment 230074 [details] [diff] [review]
patch suggested by bz
Comment 12 (not reading, please use seth@sspitzer.org instead) 2006-07-21 00:06:56 PDT
thanks again to bz for working with me over irc and for suggesting a fix.

I'll seek approval for 1.8.0x, 1.8 and trunk.

bz suggested that roc r+sr this bug.
Comment 13 (not reading, please use seth@sspitzer.org instead) 2006-07-24 16:25:26 PDT
Comment on attachment 230074 [details] [diff] [review]
patch suggested by bz

maybe dbaron can review?

I'd like to get this into the branch for 2.0b2, too.
Comment 14 David Baron :dbaron: ⌚️UTC+2 (mostly busy through August 4; review requests must explain patch) 2006-07-24 17:03:36 PDT
Comment on attachment 230074 [details] [diff] [review]
patch suggested by bz

r+sr=dbaron, although you might want to add a comment that you're checking print for the case where printing is done from the print preview window.

(Although I wonder if what we should really be doing is checking mDocument->GetShellAt(0)->GetPresContext()->Type == nsPresContext::eContext_PrintPreview .  Except that might break if we made print preview work sensibly, although doing that would probably lead to tearing all this code out anyway.)
Comment 15 (not reading, please use seth@sspitzer.org instead) 2006-07-24 17:24:05 PDT
Created attachment 230525 [details] [diff] [review]
patch suggested by bz (with a comment, per dbaron)
Comment 16 (not reading, please use seth@sspitzer.org instead) 2006-07-24 17:28:31 PDT
Comment on attachment 230525 [details] [diff] [review]
patch suggested by bz (with a comment, per dbaron)

note, I fixed this typo:

"// see bug #242439 for more details"

"// see bug #342439 for more details
Comment 17 jag (Peter Annema) 2006-07-24 18:29:46 PDT
Your editor let you insert a tab. Bad editor!
Comment 18 Mike Beltzner [:beltzner, not reading bugmail] 2006-07-25 10:28:09 PDT
Comment on attachment 230525 [details] [diff] [review]
patch suggested by bz (with a comment, per dbaron)

a=drivers. Please land on the MOZILLA_1_8_BRANCH.
Comment 19 (not reading, please use seth@sspitzer.org instead) 2006-07-25 14:23:55 PDT
fixed on 1.8 branch, too.
Comment 20 (not reading, please use seth@sspitzer.org instead) 2006-07-30 19:56:23 PDT
I've verified that 1.5.0.x has this bug, and that applying this to the MOZILLA_1_8_0_BRANCH fixes it.

Is this worth taking for 1.5.0.6?
Comment 21 (not reading, please use seth@sspitzer.org instead) 2006-07-30 20:00:57 PDT
> Is this worth taking for 1.5.0.6?

I see that it is in the pipeline for the 1.8.0.7 (1.5.0.7) release and not the 1.8.0.6 release (1.5.0.6).

I'll wait for drivers to process the nomination.
Comment 22 Boris Zbarsky [:bz] 2006-07-30 20:54:24 PDT
Yeah, 1.8.0.6 is basically 1.8.0.5 with a major snafu fixed.  This should go into 1.8.0.7...
Comment 23 Daniel Veditz [:dveditz] 2006-08-10 11:39:20 PDT
Not blocking 1.8.0.x but we'll look at the patch
Comment 24 Daniel Veditz [:dveditz] 2006-08-10 11:39:46 PDT
Comment on attachment 230525 [details] [diff] [review]
patch suggested by bz (with a comment, per dbaron)

approved for 1.8.0 branch, a=dveditz for drivers
Comment 25 (not reading, please use seth@sspitzer.org instead) 2006-08-11 11:23:00 PDT
I've checked in the fix to the 1.8.0 branch for 1.8.0.7.

thanks again to bz for the fix.

Note You need to log in before you can comment on or make changes to this bug.