Closed
Bug 73160
Opened 24 years ago
Closed 24 years ago
Handling of <?xml-stylesheet?> without href attribute
Categories
(Core :: XML, defect, P5)
Core
XML
Tracking
()
VERIFIED
FIXED
mozilla0.9.1
People
(Reporter: basic, Assigned: hjtoi-bugzilla)
Details
(Whiteboard: [fixinhand])
Attachments
(3 files)
218 bytes,
text/xml
|
Details | |
223 bytes,
text/xml
|
Details | |
1.60 KB,
patch
|
Details | Diff | Splinter Review |
When loading an xml file with a <?xml-stylesheet type="text/css"?> tag, mozilla
would just stop loading the page.
It doesn't give an error message, it doesn't display a blank page and it doesn't
even display an error message in the console.
In fact according to the console the page was successfully loaded.
I'm not sure what the right behavior should be, but the current behavior is bad.
The first attachment will display nothing.
The second attachment works.
Assignee | ||
Comment 4•24 years ago
|
||
In fact the page loaded ok. The content area just does not get refreshed. If you
do view source, you will see the page loaded. But yeah, this is a valid bug and
should be fixed. I don't see it as too serious though, you will immediately
notice something is vevy, vevy wong if you try to it...
Will try to fix, probably trivial. But breakage is obvious to any developer and
the workaround is simple.
Severity: normal → minor
Priority: -- → P5
Target Milestone: --- → mozilla0.9.1
Assignee | ||
Comment 6•24 years ago
|
||
Assignee | ||
Comment 7•24 years ago
|
||
The fix was indeed simple. If there is no href attribute,
nsParserUtils::GetQuotedAttributeValue() will return NS_ERROR_FAILURE. If we
propagate that, we won't display the page. If there was an href but it was empty
we bail out early but do not return with an error value, hence the difference in
behaviour. With this fix we treat !href and href="" the same. The patch also
includes a couple of changes that might slightly improve performance on some
platforms. I wanted to remove all the NS_Convert... calls to NS_LITERAL_STRING,
but it turns out that would have required rather substantial changes elsewhere.
Status: NEW → ASSIGNED
Whiteboard: [fixinhand]
Assignee | ||
Comment 8•24 years ago
|
||
I did some measuring, and AssignWithConversion is faster than
Assign(NS_LITERAL_STRING()), so I decided not to change those, just the return
value (so the fix is one line change).
The fix is also included in the patch to bug 67887, in block @@ -1231,8 +1279,8 @@.
Comment 10•24 years ago
|
||
sr=vidur. We should confirm that no content sink codepaths force an
unintentional error return code. I'm guessing that implementors (including me)
weren't aware of the repercussions of returning error codes to the parser.
Assignee | ||
Comment 11•24 years ago
|
||
Nisheeth says r=nisheeth
Assignee | ||
Comment 12•24 years ago
|
||
Fix checked in.
Assignee | ||
Comment 13•24 years ago
|
||
Really.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•