Content-Style-Type doesn't handle parameters

VERIFIED FIXED in mozilla0.9.4

Status

()

P1
normal
VERIFIED FIXED
18 years ago
16 years ago

People

(Reporter: shibaten, Assigned: peterv)

Tracking

({css1, regression, testcase})

Trunk
mozilla0.9.4
css1, regression, testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [Hixie-P3], URL)

Attachments

(4 attachments)

(Reporter)

Description

18 years ago
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css; charset=Shift_JIS">
makes all inline styles ignored.
Parameters should be ignored.

Trailing spaces cause the same effect.
Reporter, could you by any chance provide a testcase for this?  That would be
greatly appreciated.

Updated

18 years ago
Component: Browser-General → Style System
Whiteboard: waiting for reporter, either parser or style system
Parameters should _not_ be ignored, they should be processed. This is probably
a duplicate. See 
   http://www.bath.ac.uk/~py8ieh/internet/importtest/extra/charset.html
Severity: minor → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: correctness, css1, mozilla1.0, testcase
Whiteboard: waiting for reporter, either parser or style system

Updated

18 years ago
Assignee: asa → pierre
QA Contact: doronr → chrisd

Comment 3

18 years ago
reassign.
(Reporter)

Comment 4

18 years ago
Created attachment 21196 [details]
specifing Content-Style-Type with correct charset parameter cause mismatching of style-type
Netscape's standard compliance QA team reorganised itself once again, so taking 
remaining non-tables style bugs. Sorry about the spam. I tried to get this done 
directly at the database level, but apparently that is "not easy because of the 
shadow db", "plus it screws up the audit trail", so no can do...
QA Contact: chrisd → ian

Updated

18 years ago
Blocks: 66190

Comment 6

18 years ago
I'm going to attach a patch.  The first part of nsCSSLoader.cpp is a fix for the 
related bug 66190.

Marc, Daniel: please review.
Status: NEW → ASSIGNED
Whiteboard: [fix in hand]
Target Milestone: --- → mozilla0.9.1

Updated

18 years ago
Priority: -- → P3

Comment 8

18 years ago
I really don't like the magic number '8' (strlen("charset=") and
strlen("text/css")) - I'd prefer a constant for the strings, and using strlen on
that string. But, that is a nit, take it or leave it. [s]r=attinasi

Comment 9

18 years ago
Moving to m0.9.2
Target Milestone: mozilla0.9.1 → mozilla0.9.2

Comment 10

18 years ago
fixed
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
REOPENing. This has regressed. It is causing the links on 
   http://www.passionata.com/
...to be inaccessible, too, because only half the style gets applied (the style
in the style block is applied, but the style in the style attributes does not).

Tested on Netscape Commercial Branch build. If this works on the trunk, then
I apologise, feel free to reclose.

STEPS TO REPRODUCE
   http://bugzilla.mozilla.org/showattachment.cgi?attach_id=21196

ACTUAL RESULTS
   both lines unstyled

EXPECTED RESULTS
   first line should be red
Status: VERIFIED → REOPENED
Keywords: regression
Resolution: FIXED → ---
Summary: Content-Style-Type don't ignore parameters → Content-Style-Type doesn't handle parameters
Whiteboard: [fix in hand] → [Hixie-P3]
Target Milestone: mozilla0.9.2 → ---
Blocks: 92232
Tested on TRUNK with 20010718 (linux) and 20010724 (win2k) builds : bug confirmed.
(Assignee)

Comment 14

17 years ago
I'll take this. I tried to fix the regression (see bug 84564), but my fix was
wrong too.
Assignee: pierre → peterv
Status: REOPENED → NEW
side comment on existing code : "text/css" string should be an atom....
(Assignee)

Comment 16

17 years ago
I'm attaching a patch that fixes this problem. I agree that text/css and other
mimetypes should be atoms, but I am not going to do that.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.3
(Assignee)

Comment 18

17 years ago
Bah, wrong patch. Right one coming up. Should we try to get this on the branch
(is that still possible?).
(Assignee)

Comment 19

17 years ago
Created attachment 43514 [details] [diff] [review]
Patch v1 (ignore previous)
r=glazman for the following reasons :

   - we don't have a "text/css" atom for the moment so we have to create a
     string here
   - given that fact, a char[] is the fastest way
   - Marc does not want to see the constant 8 (length of string above)
   - sizeof(foo) for |char foo[]="..."| always returns length of string foo
     plus 1
   - sizeof(X)-1 is often used in our code
   - patch works (which is a minimum, right ?-) and does the right thing

Comment 21

17 years ago
sr=attinasi for Patch V1 (the correct one). I think that the branch *and* 0.9.3
are behind us now, however...
(Assignee)

Updated

17 years ago
OS: Windows 2000 → All
Hardware: PC → All
Target Milestone: mozilla0.9.3 → mozilla0.9.4
(Assignee)

Updated

17 years ago
Priority: P3 → P1
(Assignee)

Comment 22

17 years ago
Checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago17 years ago
Resolution: --- → FIXED

Comment 23

16 years ago
verified 
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.