Closed
Bug 334703
Opened 19 years ago
Closed 19 years ago
DSURIContentListener should ask parent content listener for content type conversions
Categories
(Core Graveyard :: File Handling, defect)
Core Graveyard
File Handling
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: bugs, Assigned: bugs)
References
Details
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
There are a few bugs in the way Firefox handles content at present. They are at various levels. One of them is that the docshell for the <browser> does not ask its parent content listener (the content listener maintained by browser.js) if it is the preferred handler for specific content types.
The upshot is that the browser (the "embeddor") cannot specify that certain special content types (e.g. application/vnd.mozilla.maybe.feed) are actually handled "internally" by the browser page - e.g. for pretty print. The parent listener needs to be consulted so that a type conversion can be specified.
Assignee | ||
Comment 1•19 years ago
|
||
This patch to nsDSURIContentListener::CanHandleContent consults the "parent" listener for any content type conversions that may apply.
Attachment #219044 -
Flags: superreview?
Attachment #219044 -
Flags: review?
Assignee | ||
Updated•19 years ago
|
Attachment #219044 -
Flags: superreview?(bzbarsky)
Attachment #219044 -
Flags: superreview?
Attachment #219044 -
Flags: review?(cbiesinger)
Attachment #219044 -
Flags: review?
Comment 2•19 years ago
|
||
So... This is actually an API change, effectively. That makes me pretty unhappy with it (nsIURIContentListener is a frozen api), much less on the 1.8 branch.
It basically feels like we're overloading isPreferred in a rather odd way....
Assignee | ||
Comment 3•19 years ago
|
||
Should I be calling parent->CanHandleContent instead? That seems more reasonable, given the documentation in nsIURIContentListener.idl...
Assignee | ||
Updated•19 years ago
|
Attachment #219044 -
Flags: superreview?(bzbarsky)
Attachment #219044 -
Flags: review?(cbiesinger)
Assignee | ||
Comment 4•19 years ago
|
||
Is your concern about API change that the Docshell's content listener now consults its parent at all, or that I used the wrong method?
Comment 5•19 years ago
|
||
> Should I be calling parent->CanHandleContent instead?
That will put you into infinite loops in many cases, so it's even worse.
In fact, so might your current patch; I recall at least some content listener impls calling into a child's CanHandleContent from IsPreferred.
So yes, the api change is that IsPreferred consults the parent at all. :(
Assignee | ||
Comment 6•19 years ago
|
||
bz told me a better way of registering on IRC:
register myself as a application/vnd.mozilla.maybe.feed -> */* converter, and I will be automatically invoked without needting to be in the docshell uri listener hierarchy.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•