Closed Bug 211175 Opened 22 years ago Closed 5 years ago

move nsDetectionAdaptor to content

Categories

(Core :: Internationalization, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: dbaron, Assigned: dbaron)

Details

Moving nsDetectionAdaptor (currently in intl/chardet/src/) to content (probably content/html/document/src/, although perhaps content/base/src/) would greatly reduce the dependencies of the intl libraries. It seems to have less to do with intl than it does with documents and parsers. The nsICharsetDetectionAdaptor interface could be removed, since it's only used from content, and we wouldn't need the extra XPCOM. I'm hoping that this little snippet: static NS_METHOD nsDetectionAdaptorRegistrationProc(nsIComponentManager *aCompMgr, nsIFile *aPath, const char *registryLocation, const char *componentType, const nsModuleComponentInfo *info) { return AddCategoryEntry(NS_CHARSET_DETECTOR_CATEGORY, "off", "off"); } isn't doing anything useful. ("off", "off" makes me think that's the case, but I haven't double-checked yet.)
Actually, nsMetaCharsetObserver, nsXMLEncodingObserver, and nsObserverBase also have dependencies on the parser (but not also on content). Perhaps they should move as well...
all sounds quite reasonable to me - are you saying to move them into the parser (which would make sense, I think?)
I think the same way as Alec does. Adding Simon and Shanjian to Cc. Shanjian may be too busy to comment on this(because he doesn't work on mozilla any more), but IIRC, he worked on chardet in the past so that he may know a thing or two we don't know. > content (probably content/html/document/src/, although perhaps content/base/src/) This part is a bit confusing. Which location is your preference? :-) It seems to me that content/base/src is better...
would removing the interface mean that a third party couldn't offer a better detection adapter thingamabobber for perhaps ruby critters or klingon?
This looks a right thing to do. I originoally put it there while I still a beginning learner about the adaptor pattern. I surely put it in the wrong place.
QA Contact: amyy → i18n

The adaptor is gone.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.