Closed
Bug 574336
(dexpcoma11y)
Opened 13 years ago
Closed 8 years ago
[meta] De-XPCOM accessible classes
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
People
(Reporter: surkov, Assigned: tbsaunde)
References
(Blocks 3 open bugs)
Details
(Keywords: access, meta, perf, Whiteboard: bk1)
We need to separate XPCOM interface methods implementation and platform specific classes implementation from core logic. So we would have core classes and XPCOM, MSAA, IA2, ATK wrap classes that redirect methods calls to core classes (via aggregation). As result we get something like class Accessible { public: Accessible* GetParent() const { return mParent; } }; class nsAccessible : public nsIAccessible { NS_IMETHODIMP GetParent(nsIAccessible* aParent) { NS_IF_ADDREF(*aParent = GetXPCOMWrap(mAccessible->GetParent())); return NS_OK; } private: Accessible* mAccessible; }; class CAccessible : public IAccessible { public: hresult get_accParent() { //blabla } private: Accessible* mAccessible; }; So we have simpler and friendly non-XPCOM like core classes, we don't run XPCOM or MSAA until XPCOM or MSAA was asked. The one thing that should be figured our how to get quick wrap object by core object and don't spend much memory for this.
Comment 1•13 years ago
|
||
(In reply to comment #0) > class Accessible What is this class responsible for?
Reporter | ||
Comment 2•13 years ago
|
||
for all logic, it is what's nsAccessible is currently (expect XPCOM interfaces implementation)
Comment 3•13 years ago
|
||
Alexander, it would be good to brain dump what we discussed with Neil at the summit. Your idea made a lot of sense.
Reporter | ||
Comment 4•13 years ago
|
||
Sure. We told about XPCOM interfaces impl only. There are two things we should add here: 1) de-xpcom accessible events: create xpcom event wrapper iif there is proper observer listener 2) GetXPCOMWrap should look into cache before to create xpcom wrapper for accessible
Reporter | ||
Comment 5•13 years ago
|
||
Further thoughts. We need to provide query mechanism like Node::GetAsElement() or downcast_Accessible like we have for accessible events. I would like to avoid multiple inheritance so that we need to line up our hierarchy. Other option would be internal interfaces creation (virtual classes), that would be nice (and personally I lean towards to this approach) but currently we deal with implementation classes rather than interfaces and therefore it doesn't make sense. For example, nsAccessible is inherited from nsIAccessibleSelectable, nsIAccessibleValue and nsIAccessibleHyperLink. It doesn't make sense to create internal interfaces for these xpcom interfaces because we deal with nsAccessible and it's perfectly casted to these interfaces. The easiest way to keep all methods of these interfaces in nsAccessible (like we have now) and provide methods like IsHyperLink() and etc. It's not savvy like having a interfaces (since we can forgot to check IsHyperLink() before we call proper methods). But again it doesn't require lot of changes. We might want to deal with multiple inheritance from virtual classes in the future. Concerning table and image accessibles implementation we could insert virtual class into hierarchy like class TableAccessible : public nsAccessible { virtual void foo() = 0; }; class nsARIAGridAccessible : public TableAccessible { virtual void foo(); }; class nsHTMLTableAccessible : public TableAccessible { /* */ } So technically it'll be similar to what we have now and we can move out xpcom interfaces implementation from main code once we have downcasting from nsAccessible to TableAccessible.
Reporter | ||
Updated•13 years ago
|
Alias: dexpcoma11y
Reporter | ||
Updated•12 years ago
|
Keywords: meta
Summary: De-XPCOM accessible classes → [meta] De-XPCOM accessible classes
Blocks: deCOM
Updated•12 years ago
|
Assignee: nobody → trev.saunders
Updated•12 years ago
|
Whiteboard: bk1
Reporter | ||
Comment 6•8 years ago
|
||
we've done with DeXPOMination, next step will be moving to WebIDL but that's different story
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•