Closed Bug 127042 Opened 23 years ago Closed 23 years ago

background images don't print or print preview.

Categories

(Core :: Layout, defect, P2)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.9

People

(Reporter: dcone, Assigned: dcone)

Details

Attachments

(1 file)

This is caused by nsPresContext::LoadImage.. there is a check in there added by pavlov.. that exits if there is no element. if (!element) // this would seem bad(tm) return NS_ERROR_FAILURE; I will enter a patch.. not sure if its the right thing to do.. but it works.
Keywords: nsbeta1
Target Milestone: --- → mozilla0.9.9
Marking nsbeta1+
Keywords: nsbeta1nsbeta1+
My take on the fix is that instead of bailing out with and error code it continues on, skipping over the if statement because element is null and then it executes the following code (which it wasn't doing before): nsImageLoader *newLoader = new nsImageLoader(); if (!newLoader) return NS_ERROR_OUT_OF_MEMORY; NS_ADDREF(newLoader); // new nsCOMPtr<nsISupports> sup; newLoader->QueryInterface(NS_GET_IID(nsISupports), getter_AddRefs(sup)); loader = NS_REINTERPRET_CAST(nsImageLoader*, sup.get()); loader->Init(aTargetFrame, this); mImageLoaders.Put(&key, sup); } // Allow for a null target frame argument (for precached images) if (aTargetFrame) { // Mark frame as having loaded an image nsFrameState state; aTargetFrame->GetFrameState(&state); state |= NS_FRAME_HAS_LOADED_IMAGES; aTargetFrame->SetFrameState(state); } loader->Load(uri); loader->GetRequest(aRequest); NS_RELEASE(loader); return NS_OK;
Comment on attachment 70733 [details] [diff] [review] Proposed fix.. need Pavlov to review this r=pavlov
Attachment #70733 - Flags: review+
Comment on attachment 70733 [details] [diff] [review] Proposed fix.. need Pavlov to review this sr=kin@netscape.com
Attachment #70733 - Flags: superreview+
Comment on attachment 70733 [details] [diff] [review] Proposed fix.. need Pavlov to review this If |content| is null then |element| is guaranteed to be null, so why not just null-check |element|? (I've already argued with pavlov about this code, so I won't repeat what I already said...) Anyway, a=dbaron.
Attachment #70733 - Flags: approval+
Keywords: mozilla0.9.9+
Priority: -- → P2
Changing QA contact
QA Contact: petersen → moied
fixed
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verifeid fix checked in cvs (rev 3.189)
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: