report failure to load stylesheet due to MIME type mismatch

RESOLVED FIXED in mozilla1.1beta



CSS Parsing and Computation
16 years ago
14 years ago


(Reporter: dbaron, Assigned: dbaron)



Firefox Tracking Flags

(Not tracked)




(3 attachments, 4 obsolete attachments)

I'm going to attach a patch that reports the failure to load a stylesheet due to
a MIME type mismatch to the error console.  We've discussed this a few times,
and I finally broke down and did it.  (Do we have another bug on this somewhere?
 Oh well.)

I'll probably want to move the main added function somewhere else when I work on
localizability of CSS parser error messages.  However, for now, I'll just put it
where it's needed.

I probably need to do more magic than I just did to add a new  It works
on Linux, though.  (Does Mac need babysitting?)
Priority: -- → P2
Target Milestone: --- → mozilla1.1beta
Created attachment 89666 [details] [diff] [review]
patch, v. 1.1
Attachment #89665 - Attachment is obsolete: true
Comment on attachment 89666 [details] [diff] [review]
patch, v. 1.1

>+                         NS_ConvertASCIItoUCS2("").get(), /* file name */
>+                         NS_LITERAL_STRING("").get(), /* source line */

They're both NS_LITERAL_STRING now in my tree.
bug 113399 is the orig; dup whichever way is more convenient.

Do we want to use or get the URI from the nsIChannel and GetSpec
on that?  Also, is actually ASCII?  Or UTF8?
Blocks: 113399
GetName seems to be equivalent for all the ones that actually are also
nsIChannel.  You're right that it's probably UTF8, though.  I'll fix that...
Created attachment 89667 [details] [diff] [review]
patch, v. 1.2
Attachment #89666 - Attachment is obsolete: true
Created attachment 89669 [details] [diff] [review]
patch, v. 1.3

Add changes to so the Mac will stay happy too.
Attachment #89667 - Attachment is obsolete: true
Created attachment 89670 [details] [diff] [review]
patch, v. 1.4

Refactor a bit.  Use URI rather than Name.  Change status to error, and add
warning for case where we do load.  (I'd rather use warning and info, but
nsIScriptError doesn't have info -- we only seem to do that for generic console
messages, perhaps.)
> + *  @param aErrorName     The name of a string in
> + *  @param aParams        The parameters for that string in
> + *  @param aParamsLength  The length of aParams.

Fix this to match the actual params the method takes and r=bzbarsky

Comment 10

16 years ago
Comment on attachment 89670 [details] [diff] [review]
patch, v. 1.4

Attachment #89670 - Flags: superreview+
Fix checked in 2002-07-01 20:11 PDT.
Last Resolved: 16 years ago
Resolution: --- → FIXED


16 years ago
Whiteboard: [whitebox]
Whiteboard: [whitebox]


16 years ago
Whiteboard: [whitebox]
Madhur, if you're going to plaster "[whitebox]" over bugs, please at least don't
do it for bugs that are easily verifiable.
Whiteboard: [whitebox]
Created attachment 158844 [details]
testcase, standards mode
Created attachment 158845 [details]
testcase, quirks mode
You need to log in before you can comment on or make changes to this bug.