Closed
Bug 539887
Opened 15 years ago
Closed 14 years ago
[HTML5][Patch] Document.opened docs should save document.written charset on the wyciwyg cache entry
Categories
(Core :: DOM: HTML Parser, defect, P1)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
FIXED
People
(Reporter: hsivonen, Assigned: hsivonen)
References
Details
Attachments
(2 files, 1 obsolete file)
1.03 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
36.94 KB,
patch
|
mozilla+ben
:
review+
|
Details | Diff | Splinter Review |
content/html/document/test/test_bug255820.html fails. Presumably, this has to do with the HTML5 parser ignoring document.written charset metas.
Assignee | ||
Comment 1•14 years ago
|
||
Assignee | ||
Comment 2•14 years ago
|
||
This patch is incomplete: the charset doesn't get properly recorded in the wyciwyg channel's cache entry. Per IRC discussion with Boris, I'll start discussion on the WHATWG list about what the complete right fix should be. Still, I'm pretty convinced the right fix will require the components that are already in this patch, and I'd like to get these bit out of the way so that they don't cause merge conflicts with other fixes.
Attachment #428679 -
Flags: review?(bnewman)
Assignee | ||
Updated•14 years ago
|
Summary: [HTML5] Document.opened docs should save document.written charset on the wyciwyg cache entry → [HTML5][Patch] Document.opened docs should save document.written charset on the wyciwyg cache entry
Assignee | ||
Comment 3•14 years ago
|
||
Filed bug 548232 as a follow-up reminder.
Updated•14 years ago
|
Attachment #428678 -
Flags: review?(bzbarsky) → review+
Comment 4•14 years ago
|
||
Comment on attachment 428679 [details] [diff] [review] Partial fix for making document.written meta charset on document.opened docs set the charset on the document object > mStreamParser->SetDocumentCharset(aCharset, aCharsetSource); >+ mExecutor->SetDocumentCharsetSource(aCharsetSource); > mExecutor->SetDocumentCharset((nsACString&)aCharset); Why not make these interfaces more similar; i.e., add aCharsetSource parameter to the existing nsHtml5TreeOpExecutor::SetDocumentCharset method? You set both in every instance that you set either, as far as I can tell from this patch.
Assignee | ||
Comment 5•14 years ago
|
||
Test pushed: http://hg.mozilla.org/mozilla-central/rev/dd43b45fac42
Assignee | ||
Comment 6•14 years ago
|
||
(In reply to comment #4) > (From update of attachment 428679 [details] [diff] [review]) > > mStreamParser->SetDocumentCharset(aCharset, aCharsetSource); > >+ mExecutor->SetDocumentCharsetSource(aCharsetSource); > > mExecutor->SetDocumentCharset((nsACString&)aCharset); > > Why not make these interfaces more similar; i.e., add aCharsetSource parameter > to the existing nsHtml5TreeOpExecutor::SetDocumentCharset method? You set both > in every instance that you set either, as far as I can tell from this patch. SetDocumentCharset comes from nsIContentSink. That's why it is a separate method. I quick look at the callers on MXR suggests that I could turn the method from the interface into an unimplemented stub and add a new method that combines the current two.
Assignee | ||
Comment 7•14 years ago
|
||
This addresses the review comment.
Attachment #428679 -
Attachment is obsolete: true
Attachment #431873 -
Flags: review?(bnewman)
Attachment #428679 -
Flags: review?(bnewman)
Comment 8•14 years ago
|
||
Comment on attachment 431873 [details] [diff] [review] Combine charset and charset source setting Looks good. Thanks for revisiting this, and my apologies for the delayed review.
Attachment #431873 -
Flags: review?(bnewman) → review+
Assignee | ||
Comment 9•14 years ago
|
||
Thanks! Pushed: http://hg.mozilla.org/mozilla-central/rev/28513d79140d
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•