Closed Bug 337970 Opened 18 years ago Closed 13 years ago

nsHTMLDocument doesn't notify the charset resolver of the resolved character set

Categories

(Core :: Layout, defect)

1.8 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: Gavin, Unassigned)

References

Details

(Keywords: helpwanted)

Attachments

(2 files)

No longer blocks: 337962
Actually, does the charset resolver need to be notified after all other attempts at guessing the charset have been tried (i.e., right before SetDocumentCharacterSet is called in nsHTMLDocument::StartDocumentLoad)? I'm not quite sure how that can be done. I thought I could just call notifyResolvedCharset after requestCharset succeeds in TryBookmarkCharset, but notifying the resolver that we're using the charset it gave us when ultimately we may not be doesn't seem all that useful.

For the nsBookmarkService nsICharsetResolver implementation, I guess it doesn't really matter, since it doesn't ever set aWantCharset... but if we're assuming that it won't ever set aWantCharset, there isn't much point in adding code to check it.
This part needs fixing, regardless. I'm just not sure whether we should actually do something with "closure". I originally had:
+    if (wantCharset) {
+      // Notify the resolver
+      bookmarksResolver->NotifyResolvedCharset(charset, closure);
+    }
in the "RequestCharset succeeded" block, but as I said in the previous comment, that isn't all that useful.
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Attachment #222017 - Flags: superreview?(bzbarsky)
Attachment #222017 - Flags: review?(bzbarsky)
> after all other attempts at guessing the charset have been tried

Yes.

For now, could just add an assert that aWantCharset gets set to false or something?  :(
Attachment #222017 - Flags: superreview?(bzbarsky)
Attachment #222017 - Flags: superreview+
Attachment #222017 - Flags: review?(bzbarsky)
Attachment #222017 - Flags: review+
Comment on attachment 222017 [details] [diff] [review]
don't pass null (checked in)

mozilla/content/html/document/src/nsHTMLDocument.cpp 	3.679
Attachment #222017 - Attachment description: don't pass null → don't pass null (checked in)
Attachment #222054 - Flags: superreview?(bzbarsky)
Attachment #222054 - Flags: review?(bzbarsky)
Attachment #222017 - Flags: approval-branch-1.8.1?(bzbarsky)
Attachment #222054 - Flags: superreview?(bzbarsky)
Attachment #222054 - Flags: superreview+
Attachment #222054 - Flags: review?(bzbarsky)
Attachment #222054 - Flags: review+
Attachment #222017 - Flags: approval-branch-1.8.1?(bzbarsky) → approval-branch-1.8.1+
Comment on attachment 222054 [details] [diff] [review]
assert that we're not asked to notify (checked in)

mozilla/content/html/document/src/nsHTMLDocument.cpp 	3.680
Attachment #222054 - Attachment description: assert that we're not asked to notify → assert that we're not asked to notify (checked in)
Comment on attachment 222054 [details] [diff] [review]
assert that we're not asked to notify (checked in)

Sorry for being bugspammy, here...
Attachment #222054 - Flags: approval-branch-1.8.1?(bzbarsky)
Attachment #222054 - Flags: approval-branch-1.8.1?(bzbarsky) → approval-branch-1.8.1+
Checked in both patches, branch and trunk. Unfortunately I think that's about as much as I can do here, at least for now.
Assignee: gavin.sharp → nobody
Status: ASSIGNED → NEW
Keywords: helpwanted
Depends on: 582712
Bug 582712 made this INVALID, AFAICT.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: