Closed
Bug 246454
Opened 20 years ago
Closed 20 years ago
content-language HTML equivalent doesn't work
Categories
(SeaMonkey :: General, defect)
SeaMonkey
General
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: annevk, Assigned: martijn.martijn)
References
()
Details
(Keywords: helpwanted)
Attachments
(1 file, 2 obsolete files)
|
3.55 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
It seems that the 'content-language' HTTP header isn't supported as META element: <meta http-equiv="content-language" content="x-example"> The code should be changed to make sure we support both.
Comment 1•20 years ago
|
||
Build 2004061108 (Seamonkey) Works for me if the language was present in the list in Preferences->Navigator->Languages. If I add 'x-example' in the list, I see the green line. If I change the language to 'nl' (which is in my list), I also see green. When I change it to 'de' (not in my list), I see a red line. When I add 'de' or 'de-at' to the list, I see the green line again. Isn't this the expected behaviour ?
| Reporter | ||
Comment 2•20 years ago
|
||
Not at all. The following two test cases should output exactly the same with default settings afaik: * <http://annevankesteren.nl/test/css/s/p-c/lang-005.htm.php> * <http://annevankesteren.nl/test/css/s/p-c/lang-007.htm>
Comment 3•20 years ago
|
||
Anne, you could move content-language header processing out of the document and into the content sink. That would fix this. See nsContentSink::ProcessHTTPHeaders and nsDocument::RetrieveRelevantHeaders
Keywords: helpwanted
| Assignee | ||
Comment 4•20 years ago
|
||
Well, this seems to work for me. Because I absolutely don't know what I'm doing, this is very likely done in the wrong way.
Comment 5•20 years ago
|
||
Martijn, that looks like a pretty good start to me! I'm not so sure we want to make that member public -- I'd rather we either added a setter or moved the actual setting of the string into nsDocument::SetHeaderData.
| Assignee | ||
Comment 6•20 years ago
|
||
Yes, I already thought that was the sucking part, but I didn't know better. Perhaps this one is better. It seems to be working fine for me. I did use NS_ConvertUCS2toUTF8(aData). Not really knowing if this is correct. The other option, adding a setter, I don't think I know how to make that one.
| Assignee | ||
Updated•20 years ago
|
Attachment #151048 -
Attachment is obsolete: true
Comment 7•20 years ago
|
||
a setter would be a function like "void SetContentLanguage(const nsACString&
aLanguage) { mContentLanguage = aLanguage; }"
(can't comment on the patch you attached as I don't know this code.
although... shouldn't you still read the default language pref?)
Comment 8•20 years ago
|
||
> I did use NS_ConvertUCS2toUTF8(aData). Why? You should have been able to keep using CopyUTF16toUTF8, no? > shouldn't you still read the default language pref? Actually, no. The fact that we read it is a bug (see http://lists.w3.org/Archives/Public/public-css-testsuite/2004Jun/0002.html). It was supposed to have been filed, but looks like that hasn't happened.
| Assignee | ||
Comment 9•20 years ago
|
||
Ehm, yes. I didn't know why I did not use that in the first place. This does compile, although I did not test it, because then I have to compile the whole build again (which I'll do anyway but that takes a while). I didn't know I would fix another bug with this patch, but now I can see that. That was completely unintentional (and I don't even know whether I find that rule logical).
Attachment #152952 -
Attachment is obsolete: true
Comment 10•20 years ago
|
||
Comment on attachment 152979 [details] [diff] [review] More improved(?) version r+sr=bzbarsky. Do be sure to test this, though, and ping me to check this in once the tree reopens, please.
Attachment #152979 -
Flags: superreview+
Attachment #152979 -
Flags: review+
| Assignee | ||
Comment 11•20 years ago
|
||
Ok, I've tested this now. It seems to work just fine for the testcases. And the tree is reopened, so...
Updated•20 years ago
|
Assignee: general → m.wargers
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 12•20 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 13•20 years ago
|
||
Thanks Martijn! (And Boris for checking it in.)
Status: RESOLVED → VERIFIED
OS: Windows XP → All
Hardware: PC → All
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•