Closed
Bug 515141
Opened 15 years ago
Closed 15 years ago
move events firing logic from nsDocAccessible and nsAccEvent into special classes
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
People
(Reporter: surkov, Assigned: surkov)
References
(Blocks 2 open bugs)
Details
(Keywords: access)
Attachments
(1 file, 2 obsolete files)
48.56 KB,
patch
|
ginnchen+exoracle
:
review+
davidb
:
review+
|
Details | Diff | Splinter Review |
In the meantime delayed events handling is spread between nsDocAccessible and nsAccEvent classes. It would be nice to have nsEventUtils and nsEventQueue classes which will have all necessary logic to fire events. nsDocAccessible would create an instance of nsEventQueue class to deal with delayed events. nsEventUtills would keep common logic for normal and delayed events firing, for example, it could have FireShowHideEvents() method.
Comment 1•15 years ago
|
||
Agreed. This logic should sit in one place (class or otherwise). Are you working on this?
Assignee | ||
Comment 2•15 years ago
|
||
I plan to start working on this once I'll land patch of bug 514595.
Comment 3•15 years ago
|
||
Great! Can you post a WIP for discussion, or catch me on IRC? We might not want multiple classes for this. I just want to check with you about the design before you go too far down (with an enormous patch) :)
Assignee | ||
Comment 4•15 years ago
|
||
1) probably it's nice to have to files (for nsEventQueue and nsEventUtils)
2) gLastFocusFrameType should live inside of event utils probably if so nsRootAcc should have access to it
3) think about PrepareEvents while you are here
4) probably it's worth to move FireTextEvent/FireShowHide/FireFocus into nsEventUtils
5) should nsDocAcc owns by nsEventQueue or it's preferable (more comfortable) to have its cache independently.
Comment 5•15 years ago
|
||
Thanks, as per our chat I might take this on so you can work on the table bugs. This will be a good bug to fix first, before our event perf bugs.
Comment 6•15 years ago
|
||
Wow I spent a lot of time tonight trying take this patch to a clean compile; maybe I was taking it in the wrong direction, not sure.
I'm more comfortable with making smaller changes, compiling as often as I can stand it... I think there is a lot of unfinished business in this patch :)
Hmmm, do you want to continue it, or should I start over?
Assignee | ||
Comment 7•15 years ago
|
||
part 1: bug 540262 "get rid nsAccEvent static helpers"
Assignee | ||
Comment 8•15 years ago
|
||
part 2: bug 481396 - rename nsAccessibleEventData file to nsAccEvent
Depends on: 481396
Assignee | ||
Comment 9•15 years ago
|
||
part 3: Bug 540265 - move nsAccUtils::FireEvent into special class
Assignee | ||
Comment 10•15 years ago
|
||
part 4: Bug 540272 - don't use nsAccessible::FireAccessibleEvent directly
Assignee | ||
Comment 11•15 years ago
|
||
part 5: Bug 540281 - rename nsAccessible::FireAccessibleEvent into HandleAccEvent
Assignee | ||
Comment 12•15 years ago
|
||
part 6: Bug 540285 - stop explicit usage of nsAccEvent::prepareEvent
Assignee | ||
Comment 13•15 years ago
|
||
Assignee: nobody → surkov.alexander
Attachment #400027 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #422954 -
Flags: superreview?(neil)
Attachment #422954 -
Flags: review?(ginn.chen)
Attachment #422954 -
Flags: review?(bolterbugz)
Assignee | ||
Comment 14•15 years ago
|
||
this patch is built upon the patch of bug 523785.
Assignee | ||
Comment 15•15 years ago
|
||
fix queue processing logic
Attachment #422954 -
Attachment is obsolete: true
Attachment #422985 -
Flags: superreview?(neil)
Attachment #422985 -
Flags: review?(ginn.chen)
Attachment #422985 -
Flags: review?(bolterbugz)
Attachment #422954 -
Flags: superreview?(neil)
Attachment #422954 -
Flags: review?(ginn.chen)
Attachment #422954 -
Flags: review?(bolterbugz)
Assignee | ||
Comment 16•15 years ago
|
||
(In reply to comment #15)
> Created an attachment (id=422985) [details]
> patch2
>
> fix queue processing logic
oops, sorry, missed return.
Assignee | ||
Comment 17•15 years ago
|
||
What do you think about inline Get...() method (like GetEventType() and etc) usage instead of making nsAccEventQueue a friend of nsAccEvent? Does it sound reasonable?
Assignee | ||
Comment 18•15 years ago
|
||
Comment 19•15 years ago
|
||
(In reply to comment #17)
> What do you think about inline Get...() method (like GetEventType() and etc)
> usage instead of making nsAccEventQueue a friend of nsAccEvent? Does it sound
> reasonable?
nsAccEventQueue uses those members a lot, so no, I think friend is better.
Comment 20•15 years ago
|
||
Comment on attachment 422985 [details] [diff] [review]
patch2
I didn't see any interesting changes...
Attachment #422985 -
Flags: superreview?(neil)
Updated•15 years ago
|
Attachment #422985 -
Flags: review?(bolterbugz) → review+
Comment 21•15 years ago
|
||
Comment on attachment 422985 [details] [diff] [review]
patch2
r=me, minor nit:
>+++ b/accessible/src/base/nsAccessNode.h
>@@ -163,19 +163,30 @@ class nsAccessNode: public nsIAccessNode
> */
> virtual nsresult Shutdown();
>
> /**
> * Return frame for the given access node object.
> */
> virtual nsIFrame* GetFrame();
>
>+ /**
>+ * Return the presentation shell the accessible belongs to.
>+ */
>+ already_AddRefed<nsIPresShell> GetPresShell();
I'd rather the comment didn't use "belongs" since we aren't a member of the pres shell. How about "Return the corresponding press shell for this accessible".
>+
>+ /**
>+ * Return true if the accessible still has presentation shell. Light-weight
>+ * version of IsDefunct() method.
>+ */
>+ PRBool HasWeakShell() const { return !!mWeakShell; }
Good, fast ;)
Assignee | ||
Comment 22•15 years ago
|
||
(In reply to comment #21)
> >+ /**
> >+ * Return the presentation shell the accessible belongs to.
> >+ */
> >+ already_AddRefed<nsIPresShell> GetPresShell();
>
> I'd rather the comment didn't use "belongs" since we aren't a member of the
> pres shell. How about "Return the corresponding press shell for this
> accessible".
Done. As well I changed the uuid of nsAccessNode.
Attachment #422985 -
Flags: review?(ginn.chen) → review+
Assignee | ||
Comment 23•15 years ago
|
||
landed on 1.9.3 - http://hg.mozilla.org/mozilla-central/rev/0f180f44f0b4
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•