Closed
Bug 96870
Opened 23 years ago
Closed 23 years ago
[PRINT BACKGROUND]Properly handle backgrounds/text when we print.
Categories
(Core :: Printing: Output, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.9.9
People
(Reporter: sujay, Assigned: dcone)
References
Details
(Keywords: topembed+)
Attachments
(9 files, 2 obsolete files)
1.38 KB,
text/html
|
Details | |
5.31 KB,
patch
|
Details | Diff | Splinter Review | |
5.35 KB,
patch
|
Details | Diff | Splinter Review | |
5.52 KB,
patch
|
attinasi
:
superreview+
|
Details | Diff | Splinter Review |
3.85 KB,
patch
|
peterlubczynski-bugs
:
review+
attinasi
:
superreview+
|
Details | Diff | Splinter Review |
1.08 KB,
text/plain
|
Details | |
460 bytes,
text/plain
|
Details | |
26.69 KB,
patch
|
Details | Diff | Splinter Review | |
1.16 KB,
patch
|
Details | Diff | Splinter Review |
using 8/24 build of netscape on windows 1) launch netscape 2) open attachment 3 [details] [diff] [review]) print the output is a dark rectangle with white lines. should look like what it appears in the browser.
Assignee | ||
Comment 2•23 years ago
|
||
what happens here is.. when text is printing out a color.. and its a light color, the code automatically darkens the color, this was to address the bug when a light color is printed out on a dark background.. and that background does not get printed. Those lines.. are the underline.. and are supposed to be white. So..even though this looks like a bug.. its doing what it supposed to do because the table does print that background, but the text is being lightened. The question then becomes how to handle this. I am gonna change the title of this bug to .. properly handle backgrounds when we print, and put all these issue in this bug.
Summary: this table of links prints out dark → Properly handle backgrounds/text when we print.
I've added a nicer example of why it is important to print background images at this URL: http://www.cee.hw.ac.uk/~jbw/background-image-example/index.xml This is like my first example (a comment on bug 23146) which was at: http://www.cee.hw.ac.uk/~jbw/background-image-example/ Both examples show how to depict XML element trees. Both of them rely on background images to make sure the pieces that make up the lines of the tree are the right length. If the background images are not printed, then the printed version will lose a lot of the meaning.
Assignee | ||
Updated•23 years ago
|
Summary: Properly handle backgrounds/text when we print. → [PRINT BACKGROUND]Properly handle backgrounds/text when we print.
Comment 6•23 years ago
|
||
There are some of the major site on the internet involved in this bug for example http://sportsillustrated.cnn.com
Keywords: mozilla0.9.5,
nsCatFood
Comment 7•23 years ago
|
||
I think there are two issues here. The sportsillustrated.cnn.com page in particular prints on 4.x. And incidentally gets different behaviors based on using PCL or PS on Windows. The issue here has to do with what gets printed first. If you print white text and then put the background over it, you only get the background when you print. If you put the text over the background, usually the printer is smart enough to get things right.
Comment 8•23 years ago
|
||
Rod added an option to the PrintOptions object which allows the background to be printed with the default set to NOT print the background. However, there isn't any UI for yet. CC'ing Rod
Updated•23 years ago
|
Target Milestone: --- → mozilla0.9.8
Comment 10•23 years ago
|
||
> Rod added an option to the PrintOptions object which allows > the background to be printed with the default set to NOT ok but i read at http://lxr.mozilla.org/seamonkey/source/gfx/src/nsPrintOptionsImpl.cpp#76 76 // There are currently NOT supported ... 81 //const char kPrintBackgrounds[] = "print.print_backgrounds"; does it mean that for now we must recompile the lizard in order to test this background printing feature ?
Assignee | ||
Comment 11•23 years ago
|
||
*** Bug 110282 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 12•23 years ago
|
||
*** Bug 103389 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 13•23 years ago
|
||
*** Bug 87366 has been marked as a duplicate of this bug. ***
Comment 14•23 years ago
|
||
Added keywords edt094 and topembed because edt094,topembed bug was marked as dup of this bug. Don: Please verify all dup's are fixed when you fix this bug.
Comment 15•23 years ago
|
||
Retested on 11_14_22_0.9.4ec. Remains a bug - using original testcase, output is a dark rectangle with white lines
Updated•23 years ago
|
Target Milestone: mozilla0.9.8 → mozilla0.9.7
Assignee | ||
Comment 16•23 years ago
|
||
Since backgrounds will be turned off for tables.. this is no longer a topembed. The bug for turning backgrounds off is 111953.. which will take care of this issue for the embedding project.
Keywords: topembed
Comment 17•23 years ago
|
||
per comment above adding - to edt0.9.4 keyword
Assignee | ||
Comment 18•23 years ago
|
||
Patch to generate backgrounds for printing and print preview. This wont work right away because all backgrounds are currently turned off for printing, but this will work for print preview.
Comment 19•23 years ago
|
||
Comment on attachment 59578 [details] [diff] [review] patch so backgrounds will now work for the printing. Leak: GetStyleContext will addref the parentContext, so youhave to use a COMPtr or NS_RELEASE it. Nit: LoadBackGround is a bad name, as the backgroudn is not actually loaded, the background struct is simply fetched and cached. If you do choose to keep the name, please change the 'G' to 'g' :) Fix the leak and possibly the nit, and sr=attinasi
Assignee | ||
Comment 20•23 years ago
|
||
Assignee | ||
Comment 21•23 years ago
|
||
*** Bug 111772 has been marked as a duplicate of this bug. ***
Comment 22•23 years ago
|
||
talked about a few changes, r=rods
Assignee | ||
Comment 23•23 years ago
|
||
Comment 24•23 years ago
|
||
Comment on attachment 59738 [details] [diff] [review] Patch with changes suggested by rods sr=attinasi - still
Attachment #59738 -
Flags: superreview+
Assignee | ||
Comment 25•23 years ago
|
||
This patch is for the PresContext, and the nsCSSRender'er will use that boolean to see whether the background should be printed or not. The PrintContext and PrintPreview context will set this value to the settings in the nsIPrintSettings object. This is an easier way to communicate this setting that getting the print services each time the background is painted.
Assignee | ||
Comment 26•23 years ago
|
||
*** Bug 114297 has been marked as a duplicate of this bug. ***
Comment 27•23 years ago
|
||
Comment on attachment 61131 [details] [diff] [review] Patch for finding out if the background should be printed. Can you use a PRPackedBool instead of a PRBool in the nsPResContext? Also, virtual functions cannot be inlined so there is no sense making GetBackgroundDraw and SetBackgroundDraw inline. sr=attinasi, assuming you check out my comments.
Attachment #61131 -
Flags: superreview+
Comment 28•23 years ago
|
||
Comment on attachment 61131 [details] [diff] [review] Patch for finding out if the background should be printed. r=peterl
Attachment #61131 -
Flags: review+
Assignee | ||
Comment 29•23 years ago
|
||
Backgrounds now us the nsPresContext to determine if the background is painted or not. The only thing left to do is get the printoptions to set the varible for printing the background. The color of the text needs to be update when that happens.
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Assignee | ||
Comment 30•23 years ago
|
||
There is a routine in nsCSSRendering called TransformColor(), this routine needs to know if the background is being printed or not before it changes color. When that is finished.. this bug will be closed. Bug 79477 was the bug that changed font color for printing.
Comment 31•23 years ago
|
||
see http://bugzilla.mozilla.org/show_bug.cgi?id=113789#c4 this doesn't build for me either...same output
Comment 32•23 years ago
|
||
Build terminates like mentioned for andred and diego (from IRC) and myself Only common denominator i found is that we use optimize=O2 or higher. Compilers vary: gcc 2.96-85, gcc 2.95.4, gcc 2.95.4-pre
Assignee | ||
Comment 33•23 years ago
|
||
What exactly are you sayin.. I dont understand why you are posting that info here? The tinderbox builds fine for all platforms with this patch.
Comment 34•23 years ago
|
||
Which is exactly the reason why we think it is an optimization issue. There are several of us that see this compile failure, and all of use use -O2 or higher optimization level. As far as I know, tinderboxes doesn't.
Comment 35•23 years ago
|
||
I am seeing that failure also and bug 53486 (Default linux MOZ_OPTIMIZE_FLAG is -0 !!) has 0.9.8 as target milestone, so this is not a future issue, it will block a bug that is targetted for the next milestone. Please build optimized and see for yourself. I use --enable-optimize="-O4 -finline -fno-omit-frame-pointer -march=k6 -mcpu=k6". After backing out the changes as pointed out by rkaa my tree compiled without problems.
Comment 36•23 years ago
|
||
I just built a -O1 build and it still failed at the same spot. diego is now building a non-optimized build to see if that works.
Comment 37•23 years ago
|
||
My build failed using the following mozconfig # ac_add_options --enable-optimize="-O4 -finline -fno-omit-frame-pointer -march=k6 -mcpu=k6" ac_add_options --enable-crypto ac_add_options --disable-debug ac_add_options --disable-dtd-debug ac_add_options --disable-jsd ac_add_options --disable-ldap ac_add_options --disable-xprint ac_add_options --disable-logging ac_add_options --disable-mailnews ac_add_options --disable-tests ac_add_options --disable-bidi ac_add_options --disable-accessibility What do you other guys use? Maybe we can narrow it down.. My system is Debian testing, gcc 2.95.4, kernel 2.4.16 FWIW.
Comment 38•23 years ago
|
||
This ~/.mozconfig fails, but also if I change optimize to -O1 or leave it out altogether. Could the cause be some other common thing between diego, rkaa and my .mozconfig, like --disable-bidi or --disable-dtd-debug?
Comment 39•23 years ago
|
||
Comment 40•23 years ago
|
||
I have spun off bug 114957 on the build failures and assigned it to you, dcone, I hope you don't mind.
Assignee | ||
Comment 41•23 years ago
|
||
*** Bug 67681 has been marked as a duplicate of this bug. ***
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Comment 42•23 years ago
|
||
Marking nsbeta1+. Backgrounds need to be conditionally printed based on the page-setup dialog for both print-preview and printing.
Keywords: nsbeta1+
Assignee | ||
Comment 43•23 years ago
|
||
*** Bug 123704 has been marked as a duplicate of this bug. ***
Comment 45•23 years ago
|
||
Here are some sites i believe to be example of this bug: d-n-e.com www.puma.com www.undergear.com
Assignee | ||
Comment 46•23 years ago
|
||
This patch does a few things. 1.) Fixes the problem that the background for printing was not being captured. 2.) Adds background image and color booleans for printing. 3.) Fixes how the Paintbackground is called. Now has a boolean to use the printsetings or not. This keeps the elements that use backgrounds for special purposes from breaking. (radio buttons, scroll bars). 4.) Hooks up the options to the print settings dialog.
Comment 47•23 years ago
|
||
Change the items we talked about and r=rods
Comment 48•23 years ago
|
||
Comment on attachment 69306 [details] [diff] [review] Patch to implement background images and color for printing. tab probs: + PRPackedBool mDrawImageBackground; + PRPackedBool mDrawColorBackground; Please remove the comment part of this: + if ( (frameType == nsLayoutAtoms::pageContentFrame)/* || + (frameType == nsLayoutAtoms::pageFrame) */){ otherwise, looks good. sr=attinasi
Attachment #69306 -
Flags: superreview+
Assignee | ||
Comment 49•23 years ago
|
||
This patch also adds in capablity to that if the backgrounds are being printed.. the text will not be darkened. If the backgrounds are not being printed.. then the text can be darkened if it is to light.
Assignee | ||
Updated•23 years ago
|
Attachment #69306 -
Attachment is obsolete: true
Comment 50•23 years ago
|
||
Comment on attachment 69528 [details] [diff] [review] new patch.. with cosmetic fixes. Please comment the part about canLightenColor, and make it an inline function since you call it three times. sr=attinasi
Attachment #69528 -
Flags: superreview+
Assignee | ||
Comment 51•23 years ago
|
||
Marc's comments.. and I changed name to CanDarken()..
Attachment #69528 -
Attachment is obsolete: true
Comment 52•23 years ago
|
||
r=rods
Assignee | ||
Comment 53•23 years ago
|
||
fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 54•23 years ago
|
||
The patch for nsTextFrame.cpp does something weird with canDarkenColor. When isPaginated is false, an uninitialized PRBool will be passed to SetColor!
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 55•23 years ago
|
||
*** Bug 126278 has been marked as a duplicate of this bug. ***
Comment 56•23 years ago
|
||
>Additional Comment #54 From Aleksey Nogin 2002-02-15 10:56 ------- > >The patch for nsTextFrame.cpp does something weird with canDarkenColor. When >isPaginated is false, an uninitialized PRBool will be passed to SetColor! That's right. I just spent time chasing a non-existing bug, until I traced to the fact that the color set in the rendering context wasn't the color in the style context, and discovered that it was due to this uninitialized variable -- and was not due to something in the style system. I made a fixup patch.
Comment 57•23 years ago
|
||
Comment 58•23 years ago
|
||
Left-over was checked-in.
Status: REOPENED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 59•23 years ago
|
||
I had a bug on this (122996).. complete with patch... thanks for the fix, but next time.. get and r and sr.. and I wont redo..that patch. Dont get me wrong.. I do appreciate it.. but imagine my surpise when I found that was already in there. Yes... I should have commented in here.. but I was tracking with that other bug. Anyway.. good work..next time can you request a review.. and sr before you do that. Thanks
Assignee | ||
Comment 60•23 years ago
|
||
125795 is the bug that tracked this.. not 122996.
Comment 61•23 years ago
|
||
I commented here for notification. Unfortunately, by that time, it had already eaten two days of my Mozilla hacking time, trying all sort voodoos in hunting an elusive bug elsewhere in the system following the simple left-over (ah, two days of hunting, it wasn't that simple...). I carried the earlier r/sr forward on the trivial fixup since there were no mention of the action that was going on in the other bug, and comment #54 from Aleksey Nogin 2002-02-15 with a REOPEN seemed to have been ignored. Next time I might not bother too.
Reporter | ||
Comment 62•23 years ago
|
||
ok verified on 2/20 trunk build on windows... everyone, if you can verify your DUPS to thsi bug and test it out. Make sure you go into File | Page Setup first and enable Background image first though. thanks. marking verified, if anyone finds a DUP that does not work, then REOPEN just that DUP....
Status: RESOLVED → VERIFIED
Comment 63•23 years ago
|
||
*** Bug 127629 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•