Closed
Bug 300783
Opened 19 years ago
Closed 19 years ago
Fix for bug 290354 introduced unsafe firing of events
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: aaronlev)
References
Details
Attachments
(1 file, 2 obsolete files)
9.01 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
mkaply
:
approval1.8b4+
|
Details | Diff | Splinter Review |
The new events added in bug 290354 are being fired from within the guts of some code that really can't deal with DOM mutations. If someone happens to listen to those events and actually change the DOM from the event listeners, we'll crash. We should really be firing these events once we unwind to somewhere where it's safe to fire events (the outer event loop, basically).
Assignee | ||
Comment 1•19 years ago
|
||
Bz, can you point me some other code that does that so I can do it the right way? Also, it probably makes sense only to fire these events when the containing listbox has focus.
Reporter | ||
Comment 2•19 years ago
|
||
I don't believe we have such code... Most places we fire events it's safe to do it; we have crash bugs filed on the rest.
Assignee | ||
Comment 3•19 years ago
|
||
I'd like to fix everything that has been mentioned in one patch: 1) Remove "DOM" prefix from DOMItemSelected and DOMItemUnselected 2) Fix perf by only firing events for the focused element, and when aNotify is true 3) Fix leaks (not sure where they're from yet) 4) Fix unsafe firing Bz, do you recommend I use a PLEvent to fire the event and make it safe?
Reporter | ||
Comment 4•19 years ago
|
||
Yeah, if that works for accessibility, that would be great.
Assignee | ||
Comment 5•19 years ago
|
||
Reporter | ||
Comment 6•19 years ago
|
||
I'm not really that familiar with our event stuff.... that looks like it should generally work. But it's still firing synchronously and unsafely; I don't see any PLEvents around.
Assignee | ||
Comment 7•19 years ago
|
||
I haven't looked into the balsa leaks reported in bug 300833 yet. This should fix the perf regression reported in bug 290354.
Attachment #189505 -
Attachment is obsolete: true
Attachment #190321 -
Flags: superreview?(bzbarsky)
Attachment #190321 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 8•19 years ago
|
||
Actually the perf regression was bug 300818.
Reporter | ||
Comment 9•19 years ago
|
||
So I've been thinking about this... accessibility is already an nsIDocumentObserver, right? Is there a reason that ContentStatesChanged() can't be used here? Doesn't it happen exactly when we'd want it to?
Assignee | ||
Updated•19 years ago
|
Attachment #190321 -
Flags: superreview?(bzbarsky)
Attachment #190321 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 10•19 years ago
|
||
Attachment #190321 -
Attachment is obsolete: true
Attachment #190373 -
Flags: superreview?(bzbarsky)
Attachment #190373 -
Flags: review?(bzbarsky)
Reporter | ||
Comment 11•19 years ago
|
||
Comment on attachment 190373 [details] [diff] [review] Use ContentStatesChanged(). This means we can get rid of the changes from bug 290354 in nsHTMLOptionElement. We still need the nsListControlFrame changes for when DOMMenuItemActive is fired. >Index: accessible/src/html/nsHTMLSelectAccessible.cpp >+ accService->GetAccessibleFor(optionNode, getter_AddRefs(optionAccessible)); >+ if (!optionNode) { I assume that should be a check of optionAccessible? r+sr=bzbarsky with that
Attachment #190373 -
Flags: superreview?(bzbarsky)
Attachment #190373 -
Flags: superreview+
Attachment #190373 -
Flags: review?(bzbarsky)
Attachment #190373 -
Flags: review+
Assignee | ||
Updated•19 years ago
|
Attachment #190373 -
Flags: approval1.8b4?
Comment 12•19 years ago
|
||
Comment on attachment 190373 [details] [diff] [review] Use ContentStatesChanged(). This means we can get rid of the changes from bug 290354 in nsHTMLOptionElement. We still need the nsListControlFrame changes for when DOMMenuItemActive is fired. a=mkaply - don't forget bz's change
Attachment #190373 -
Flags: approval1.8b4? → approval1.8b4+
Assignee | ||
Comment 13•19 years ago
|
||
Bz's change is in Checking in accessible/src/base/nsDocAccessible.cpp; /cvsroot/mozilla/accessible/src/base/nsDocAccessible.cpp,v <-- nsDocAccessible.cpp new revision: 1.70; previous revision: 1.69 done Checking in accessible/src/html/nsHTMLSelectAccessible.cpp; /cvsroot/mozilla/accessible/src/html/nsHTMLSelectAccessible.cpp,v <-- nsHTMLSelectAccessible.cpp new revision: 1.46; previous revision: 1.45 done Checking in accessible/src/html/nsHTMLSelectAccessible.h; /cvsroot/mozilla/accessible/src/html/nsHTMLSelectAccessible.h,v <-- nsHTMLSelectAccessible.h new revision: 1.28; previous revision: 1.27 done Checking in content/html/content/src/nsHTMLOptionElement.cpp; /cvsroot/mozilla/content/html/content/src/nsHTMLOptionElement.cpp,v <-- nsHTMLOptionElement.cpp new revision: 1.136; previous revision: 1.135 done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•