Closed Bug 154942 Opened 18 years ago Closed 18 years ago

report failure to load stylesheet due to MIME type mismatch

Categories

(Core :: CSS Parsing and Computation, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.1beta

People

(Reporter: dbaron, Assigned: dbaron)

References

()

Details

Attachments

(3 files, 4 obsolete files)

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 jar.mn.  It works
on Linux, though.  (Does Mac need babysitting?)
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla1.1beta
Attached patch patch, v. 1.1 (obsolete) — Splinter Review
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 nsIRequest.name or get the URI from the nsIChannel and GetSpec
on that?  Also, is nsIRequest.name 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...
Attached patch patch, v. 1.2 (obsolete) — Splinter Review
Attachment #89666 - Attachment is obsolete: true
Attached patch patch, v. 1.3 (obsolete) — Splinter Review
Add changes to MozillaBuildList.pm so the Mac will stay happy too.
Attachment #89667 - Attachment is obsolete: true
Attached patch patch, v. 1.4Splinter Review
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 css.properties.
> + *  @param aParams        The parameters for that string in css.properties.
> + *  @param aParamsLength  The length of aParams.

Fix this to match the actual params the method takes and r=bzbarsky
Comment on attachment 89670 [details] [diff] [review]
patch, v. 1.4

sr=waterson
Attachment #89670 - Flags: superreview+
Fix checked in 2002-07-01 20:11 PDT.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [whitebox]
Whiteboard: [whitebox]
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]
You need to log in before you can comment on or make changes to this bug.