Last Comment Bug 312415 - Selected images (from a selection of the document to print) are black
: Selected images (from a selection of the document to print) are black
Status: RESOLVED FIXED
: fixed1.8.1, regression, verified1.8.0.1
Product: Core
Classification: Components
Component: Printing: Output (show other bugs)
: Trunk
: All All
: -- major with 7 votes (vote)
: mozilla1.9alpha1
Assigned To: Boris Zbarsky [:bz]
:
Mentors:
http://www.stratosgroup.com/reviews/g...
: 316018 318167 318339 319239 320418 321290 322425 324811 (view as bug list)
Depends on:
Blocks: 306262
  Show dependency treegraph
 
Reported: 2005-10-13 22:01 PDT by windaria
Modified: 2006-05-18 14:50 PDT (History)
18 users (show)
dveditz: blocking1.8.1+
dveditz: blocking1.8.0.1+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
I think this is the right fix... (1.24 KB, patch)
2005-11-25 22:58 PST, Boris Zbarsky [:bz]
roc: review+
roc: superreview+
dveditz: approval1.8.0.1+
dveditz: approval1.8.1+
Details | Diff | Splinter Review

Description windaria 2005-10-13 22:01:06 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1

While I can print the page, and it prints fine, any time I select a range of the
page to print, such as from the Game Reviews image that goes across the top of
the review down to the second to the last paragraph of the body of the review,
the images print as black images with diagnal lines over them. If I print the
doucment normally they look fine. This is true for this page as well as any
other page on which an image is selected.

I could find no other mention of this bug. I have a Canon i9100 and am using
Firefox Beta 2 for Windows 2000.

Reproducible: Always

Steps to Reproduce:
1. Select images and text to print
2. Go to file > Print and select Selection
3. Click OK

Actual Results:  
As specified in Details, the images do not print properly.

Expected Results:  
The images should have printed, they do not.

I am not entirely sure that I have the correct severity selected, however I
decided to go with Major because printing selections of web pages is a major
feature, at least as far as I am concerned, and thusly qualifies it as greater
than Normal.
Comment 1 Jesse Moorman 2005-10-20 12:29:59 PDT
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b5) Gecko/20051006
I have the same setup, same problem with Print range = Selection. I'm printing
to a Brother 1870N laser on ethernet. I noticed this problem a few days ago with
what seemed to be text in a table format. Today it is definitely true with
graphics at, e.g., http://firefox.dbltree.com/
Comment 2 Doug Manning 2005-10-21 09:27:24 PDT
I have the same problem.  I just updated from 1.0.7 to beta 2 of 1.5.  I have a
Canon LBP 1260 Laser Printer (LaserJet 4 Engine) and I print shipping labels
from the UPS site daily.  Since the update I have not been able to highligh the
label and print selection.  If I print the whole page the it prints fine, or if
i right click and choose view Image then I can print just the label portion, so
it seems to just be a problem whe there is a selection involved, and that
selection is a graphic.  If there is text and Graphic then the text comes out
ok, but the graphic is Solid black with horozontal grey lines thouh it.

The workaround for now is to do the Right Click - View Image then print from the
new window, and since I just want the label this will work for me.
Comment 3 Jesse Moorman 2005-10-21 16:46:03 PDT
As I said the other day, it is not only graphics. For example, view:

http://www.hrcp-web.org/P_releases.cfm

highlight some text and print it, and it is all black.

If graphic or "bad" text is highlighted, and (perhaps accidentally) you print
the whole page, the highlighted part still comes out black.
Comment 4 Jesse Moorman 2005-11-03 11:36:19 PST
Not all tables print black when selected. E.g., tables on Bugzilla pages.

This looks like Bug 311726
Comment 5 Volkmar Kostka 2005-11-09 01:41:32 PST
Is is neccessary to show the selection at all?
If not, the removing of the selection prior to print may be a quick fix.
Both IE and Opera do not show the selection in print.
Comment 7 Martijn Wargers [:mwargers] (not working for Mozilla) 2005-11-25 05:50:32 PST
Yes, definetely a regression from bug 306262.
Backing out the patch from that bug, makes this bug disappear in my debug build.
Comment 8 Martijn Wargers [:mwargers] (not working for Mozilla) 2005-11-25 07:27:28 PST
*** Bug 316018 has been marked as a duplicate of this bug. ***
Comment 9 Boris Zbarsky [:bz] 2005-11-25 22:58:24 PST
Created attachment 204199 [details] [diff] [review]
I think this is the right fix...

We used to not enable selection at all in a presshell without a docshell, but that seems pretty odd to me.  If printing can't handle selections, it should just turn them off and be done with it.
Comment 10 Boris Zbarsky [:bz] 2005-11-29 10:15:30 PST
Fixed.
Comment 11 Andreas Lange 2005-11-29 13:37:39 PST
*** Bug 318167 has been marked as a duplicate of this bug. ***
Comment 12 Peter Weilbacher 2005-11-30 05:42:35 PST
This fixes the problem on the 1.8 branch, too. Would be great to get this into 1.8.1, as there is no approval flag for that I am (ab)using the blocking flag.
Comment 13 Bill Gianopoulos [:WG9s] 2005-11-30 06:46:21 PST
(In reply to comment #12)
> This fixes the problem on the 1.8 branch, too. Would be great to get this into
> 1.8.1, as there is no approval flag for that I am (ab)using the blocking flag.
> 

Could that be because the next relase will be 1.8.0.1 and there IS an approval flag for that?
Comment 14 Boris Zbarsky [:bz] 2005-11-30 07:00:17 PST
1.8.0.1 is a security and crash fix release, as I understand.  But maybe the plan's changed again; who knows.

If people want this on the 1.8 branch, they need to do a lot more testing than I've been able to do so far and then make the case for it to drivers.  I really don't have the time for either of those.
Comment 15 Kenneth Herron 2005-11-30 08:51:24 PST
*** Bug 318339 has been marked as a duplicate of this bug. ***
Comment 16 sendmail.to 2005-11-30 10:28:17 PST
(In reply to comment #14)
> 1.8.0.1 is a security and crash fix release, as I understand.  But maybe the
> plan's changed again; who knows.
> 
> If people want this on the 1.8 branch, they need to do a lot more testing than
> I've been able to do so far and then make the case for it to drivers.  I really
> don't have the time for either of those.
> 

Have a look to the Roadmap http://cbeard.typepad.com/.shared/image.html?/photos/uncategorized/releaseroadmapdraftv1_2.png
Gecko 1.8.1, will be released with Firefox 2.0.

I think such an essential bug should fixed before G1.9 which is F3.0!

How do you imagine testing for this Fix? Please describe it a little bit for me.

And is there any change to get this Fix into the comming F1.5 Builds?
Comment 17 Boris Zbarsky [:bz] 2005-11-30 11:28:34 PST
I'm quite familiar with the roadmap.

Testing would involve testing all sorts of selection-related printing stuff.

1.5 has shipped, so there is no way this is getting fixed in 1.5.  In fact, the bug was filed after non-security-or-crash-issue freeze for 1.5...
Comment 18 Jesse Moorman 2005-11-30 11:46:04 PST
Shouldn't we change "Status:" from RESOLVED, and "Resolution:" from FIXED?

This question may be naive (since I'm not a programmer), but with Firefox's automatic updating feature, why is there "no way this is getting fixed in 1.5"? When IE has a problem, MS doesn't wait for IE 7 to patch it.
Comment 19 Bill Gianopoulos [:WG9s] 2005-11-30 12:03:02 PST
(In reply to comment #18)
> Shouldn't we change "Status:" from RESOLVED, and "Resolution:" from FIXED?
> 
> This question may be naive (since I'm not a programmer), but with Firefox's
> automatic updating feature, why is there "no way this is getting fixed in 1.5"?
> When IE has a problem, MS doesn't wait for IE 7 to patch it.
> 

1.  The Resolved and FIXED status refer to the status of the bug in the current source code tree, not the sate of the latest released product.

2.  The "no way this is getting fixed in 1.5" meant it will not be (and obviously was not) in the 1.5 release version.  If it is subsequently patched via software update, that will change the version number to a 1.5.x.x version. So it will possibly be fixed via software update before version 2.0.
Comment 20 Boris Zbarsky [:bz] 2005-11-30 13:21:46 PST
> why is there "no way this is getting fixed in 1.5"?

Apart from the impossibility of time travel, that's not an issue of "can't do it" as much as of "shouldn't do it".  Under-tested changes should not be made to the "stable" release tree.

> When IE has a problem, MS doesn't wait for IE 7 to patch it.

Depends on the problem, doesn't it?
Comment 21 Vidar Haarr (not reading bugmail) 2005-12-04 15:15:30 PST
bz, roc: What would be required before requesting approval1.8.0.1 ?
Comment 22 Boris Zbarsky [:bz] 2005-12-04 15:19:01 PST
Testing.  If you've tested enough that you're sure this doesn't break anything, request approval.
Comment 23 Volkmar Kostka 2005-12-05 06:53:38 PST
NOT RESOLVED!

Try in trunk:
Select some text with images. Select File -> Print preview. Preview looks fine. Close preview. Try to select something in the page. You can not select anything in the page. You have to reload the page to do that.
Comment 24 Volkmar Kostka 2005-12-05 06:58:40 PST
Sorry! I'm ashamed, i was too fast.
The described problem exist also in 1.5
Still a chance to fix it too.
Comment 25 Boris Zbarsky [:bz] 2005-12-05 07:07:36 PST
That has nothing to do with this bug.  Please file a bug on it, if there isn't one already.
Comment 26 Jesse Ruderman 2005-12-06 06:45:19 PST
*** Bug 319239 has been marked as a duplicate of this bug. ***
Comment 27 Martijn Wargers [:mwargers] (not working for Mozilla) 2006-01-02 13:36:05 PST
Could this patch potentially have fixed bug 319357? (not even sure if that one is still a problem in current trunk builds, though)
Comment 28 Boris Zbarsky [:bz] 2006-01-03 07:43:28 PST
Yeah, it could have.   Certainly that exact stack can no longer arise...
Comment 29 Martijn Wargers [:mwargers] (not working for Mozilla) 2006-01-04 07:49:01 PST
So in that case, wouldn't it be wise to make this blocking 1.8.0.1, since bug 319357 is a topcrasher for 1.5 branch (see bug 319357, comment 6)?
Comment 30 Boris Zbarsky [:bz] 2006-01-04 07:55:57 PST
Requesting blocking; can someone confirm that this really does fix bug 319357?  And has anyone done some serious testing of this patch?
Comment 31 Martijn Wargers [:mwargers] (not working for Mozilla) 2006-01-04 14:06:05 PST
I can't reproduce bug 319357, so I can't confirm.
Ria or Peter, can you see bug 319357, and can you see if it is fixed in the time the fix for this bug got checked into the tree?
Comment 32 Ria Klaassen (not reading all bugmail) 2006-01-04 14:13:21 PST
(In reply to comment #31)
I have no printer :)
Comment 33 Peter van der Woude [:Peter6] 2006-01-04 14:18:18 PST
no printer here either
Comment 34 Zachariah 2006-01-04 15:23:10 PST
(In reply to comment #33)
> no printer here either
> 

There are many free print-to-pdf programs available on the web, which you could use to test this.
Comment 35 Martijn Wargers [:mwargers] (not working for Mozilla) 2006-01-04 17:23:54 PST
*** Bug 322425 has been marked as a duplicate of this bug. ***
Comment 36 ruben 2006-01-05 05:58:07 PST
This seems to have fixed bug 319357
Comment 37 Boris Zbarsky [:bz] 2006-01-05 08:43:26 PST
Based on what?  See bug 319357 comment 11.
Comment 38 ruben 2006-01-06 09:37:44 PST
Boris, I've tested the correct builds now (2005-11-29 and 2005-11-30) and 2005-11-30 seems to have fixed the problem.
Comment 39 Daniel Veditz [:dveditz] 2006-01-06 13:43:32 PST
Comment on attachment 204199 [details] [diff] [review]
I think this is the right fix...

I think bz meant to request patch approval
Comment 40 Daniel Veditz [:dveditz] 2006-01-09 11:41:24 PST
Comment on attachment 204199 [details] [diff] [review]
I think this is the right fix...

a=dveditz
Comment 41 Boris Zbarsky [:bz] 2006-01-09 13:33:35 PST
*** Committing to MOZILLA_1_8_BRANCH... 
/cvsroot/mozilla/layout/printing/nsPrintEngine.cpp,v  <--  nsPrintEngine.cpp
new revision: 1.97.4.2; previous revision: 1.97.4.1

*** Committing layout/printing/nsPrintEngine.cpp on MOZILLA_1_8_0_BRANCH... 
/cvsroot/mozilla/layout/printing/nsPrintEngine.cpp,v  <--  nsPrintEngine.cpp
new revision: 1.97.4.1.4.1; previous revision: 1.97.4.1
Comment 42 Marcia Knous [:marcia - use ni] 2006-01-11 17:35:45 PST
verified fixed on the branch using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1. I tested using the URL cited and was able to print a selection of images and text fine. 
Comment 43 Martijn Wargers [:mwargers] (not working for Mozilla) 2006-01-26 11:12:23 PST
*** Bug 324811 has been marked as a duplicate of this bug. ***
Comment 44 Eli Friedman 2006-02-05 09:25:06 PST
*** Bug 320418 has been marked as a duplicate of this bug. ***
Comment 45 Jesse Moorman 2006-02-05 11:58:34 PST
There is still a problem with printing selected TEXT. Choose any webpage with text taking more than one printed page. Select a range of text. The printing does not break the lines at the end of the page. The the top part of the letters in the bottom line will print on page 1, and the bottom part will print at the top of page 2.
Comment 46 Boris Zbarsky [:bz] 2006-02-05 12:01:35 PST
That's not related to this bug at all.  Please file a separate bug if one is not filed yet.
Comment 47 cignangulo 2006-05-18 14:50:12 PDT
*** Bug 321290 has been marked as a duplicate of this bug. ***

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