At the moment, nsDSURIContentListener::IsPreferred just forwards its IsPreferred call on to its parent listener. This means that all parent listeners have to know about types that Gecko can handle (see:

http://lxr.mozilla.org/seamonkey/source/embedding/browser/gtk/src/EmbedContentListener.cpp#95
http://lxr.mozilla.org/seamonkey/source/embedding/browser/activex/src/control/WebBrowserContainer.cpp#406
etc.)

My suggestion is to have nsDSURIContentListener::IsPreferred call its parent listener and then if that returns PR_TRUE to check whether it can actually handle the content before returning PR_TRUE. If the parent returns PR_FALSE, just return PR_FALSE.

This should not affect existing content listeners (which only return PR_TRUE when docshell can handle it anyway), and should make it much easier to implement a parent content listener...

-Boris
_______________________________________________
mozilla-embedding mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to