Closed Bug 63426 Opened 24 years ago Closed 24 years ago

[MF]Printing the selected object needs to be supported

Categories

(Core :: Printing: Output, defect)

defect
Not set
normal

Tracking

()

VERIFIED WORKSFORME
mozilla0.8

People

(Reporter: kmcclusk, Assigned: rods)

References

Details

Attachments

(4 files)

Mozilla needs to support printing the selected object (text, image, etc.)
Set milestone to mozilla0.8
Target Milestone: --- → mozilla0.8
Status: NEW → ASSIGNED
Summary: Printing the selected object needs to be supported → [MF]Printing the selected object needs to be supported
Blocks: 64841
Will this allow printing of any selection which is a combination of text, images, iframes etc (as in Internet Explorer's print `current selection' option), or just printing of one particular HTML element?
This will print anything in the selection with the exception of frames and iframes.
Whiteboard: checkin by 1/22 - 1/24, I am ready for reviews
r=buster for the layout changes. rod, you should attach the diff -u to the bug
Attached patch Patch file for printing changes (deleted) — Splinter Review
Attached patch latest patch for view system (deleted) — Splinter Review
r=kmcclusk@netscape.com (for the view module changes)
r=erik for the nsTextFrame changes
Attached patch final (hopefully) gfx patch (deleted) — Splinter Review
Attached patch lastest full patch (deleted) — Splinter Review
This is awesome. I'm sure that after doing this, you have plenty of kindling to keep you warm through those cold Dakota nights. Couple comments... - on nsIPrintOptions.idl, where you have getter/setter pairs, (e.g., margins, print range, page range, print options, etc.) you should just make these attributes; e.g., int topMargin; int leftMargin; int rightMargin; int bottomMargin; etc. XPConnect will create getters and setters for you in C++, and this will make a *much* more natural API from JavaScript. - You know that your `WriteBitfieldPref()' calls will spam the bejesus out of any pref observers. Why not just collapse the bitfield and update it once? You only seem to call each of [Read|Write]BitfieldPref() from one place anyway. - Change the `#ifdef NS_DEBUG' code in nsDeviceContextSpecG.cpp to `#ifdef DEBUG_rods'. There is no reason to spam everyone with this stuff. - Ibid nsDeviceContextSpecFactoryW.cpp - Looks like you started a comment at around line 1034 in nsDocumentViewer.cpp. Do you wanna finish it? :-) - You #if 0'd out a tract of code in DocumentViewerImpl::GetSelctionDocument(). Should we just nuke it? Or, at least comment why it's #if 0'd out... - In nsFrame.cpp, not clear if you want to leave the changes to the frame tree output there? If so, go ahead and nuke the commented-out `if' statement. - So it looks like we'll never print the background image if we're printing ``selection only''. Is that ok? - In nsPageFrame::GetXPosition(), why leave `//x = aRect;'? Maybe just comment ``nothing to do''. - String-fu! Don't use `str.AppendWithConversion("...")'. Instead use `str.Append(NS_LITERAL_STRING("..."));'. See nsPageFrame::DrawHeaderFooter(). - No need to leave commented `NS_ENSURE_ARG_POINTER' in nsSimplePageSequenceFrame::Print() - It's C++: don't need to `typedef enum' nsColorID. Just do `enum nsColorID { ... };'. (Also, you're American: spell `color' like an American, man! :-)) - Looks like the tabs are screwed up for your changes to nsViewManager::Display() - Ibid nsViewManager2::Display() - My only other concern is, do all those calls to IsVisibleForPainting() have a noticable impact on performance? Maybe just do a quick A/B check using jrgm's performance tests at http://jrgm/page-loaders/loader.pl.
> - So it looks like we'll never print the background image if we're > printing ``selection only''. Is that ok? Probably not. :-( Some amateurish pages specify a background image but no background color, with text that is unreadable if the background image is not displayed -- or printed, for that matter. `Print background image' should be a checkbox in the print dialog; but it should be independent of whether the whole document is being printed, or just a selection. (Even ignoring the invisible text problem, users would never be able to understand why a selection from one set of radio buttons was affecting the enabled/disabled status of an apparently completely unrelated checkbox.)
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Whiteboard: checkin by 1/22 - 1/24, I am ready for reviews
I leave this closed but note that printing selected objects doesn't work anymore (2001-02-05-21/Linux). I opend bug 67537 for this problem.
qa :sujay. Can you pls verify ? Thnx!
QA Contact: shrir → sujay
can someone outline some steps to verify this? I have a web page with an image, table and text. and I select the image(single click on it). Then I click on print. IT prints out all the objects. Not image like I expected. maybe I'm missing something here...
When the print dialog comes up you need to click on the Selection radio button then press OK. (At least thats how it works on WIN32)
Selection radio button is dimmed out... I can't select it...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Works for me using todays mozilla build on WINNT. Also works with MfcEmbed. Marking WORKSFORME. The image printed too small however. There is a new bug to cover this bug 75425.
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → WORKSFORME
verified in 4/10 build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: