Closed Bug 82022 Opened 23 years ago Closed 23 years ago

xml-stylesheet without href in XUL document gives blank page

Categories

(Core :: XUL, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.3

People

(Reporter: hjtoi-bugzilla, Assigned: hjtoi-bugzilla)

Details

Attachments

(2 files)

I fixed this in normal XML, we treated empty href and !href differently,
returning error code if !href, which stopped parsing. I suspect this is also a
one line fix.

This grew out from bug 71151. I'll attach a testcase that was there, no idea if
it is correct XUL.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
note that Heikki's fix for xml was in bug 73160

Reassigning to me, I found were the bug is...
Assignee: hyatt → heikki
Status: ASSIGNED → NEW
Target Milestone: Future → ---
Status: NEW → ASSIGNED
Priority: -- → P3
Whiteboard: [fixinhand]
Target Milestone: --- → mozilla0.9.3
I have the fix in my tree, will attach... The problem was
nsParserUtils::GetQuotedAttributeValue() which returns NS_ERROR_FAILURE if the
attribute is not present, and we propagated that value out which stopped layout.
Ignoring the return value fixes this. There is a bug on harishd's plate on
fixing the wrong return values from nsParserUtils::GetQuotedAttributeValue()
(bug 77791).
Please double check this part

+        nsresult rv = NS_NewURI(getter_AddRefs(url), href, mDocumentURL);
         if (NS_FAILED(rv)) {
             return NS_OK; // The URL is bad, move along. Don't propogate for now.
         }

Shouldn't we return NS_ERROR_OUT_OF_MEMORY atleast?

Other than that r=harishd
The error returns are a can of worms. NS_NewURI can return out of memory, but
NS_ERROR_MALFORMED_URI is also an error code, as are several other non-critical
conditions in necko. Some error codes should really be changed into
success-with-info codes.

We discussed this with harishd, and decided to add a comment about that to the
code, but leave it otherwise as is.
sr=vidur
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: [fixinhand]
verified win2k (my trunk pull from yesterday)
         linux 2001072606
Status: RESOLVED → VERIFIED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: