Closed
Bug 127042
Opened 23 years ago
Closed 23 years ago
background images don't print or print preview.
Categories
(Core :: Layout, defect, P2)
Tracking
()
VERIFIED
FIXED
mozilla0.9.9
People
(Reporter: dcone, Assigned: dcone)
Details
Attachments
(1 file)
(deleted),
patch
|
pavlov
:
review+
kinmoz
:
superreview+
dbaron
:
approval+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Comment 1•23 years ago
|
||
Comment 3•23 years ago
|
||
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 4•23 years ago
|
||
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 6•23 years ago
|
||
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+
Updated•23 years ago
|
Keywords: mozilla0.9.9+
Updated•23 years ago
|
Priority: -- → P2
Assignee | ||
Comment 8•23 years ago
|
||
fixed
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•