Closed
Bug 828141
Opened 11 years ago
Closed 11 years ago
windows shouldn't hold onto text change events
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: tbsaunde, Assigned: tbsaunde)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file, 1 obsolete file)
8.59 KB,
patch
|
surkov
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #699561 -
Flags: review?(surkov.alexander)
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #699561 -
Attachment is obsolete: true
Attachment #699561 -
Flags: review?(surkov.alexander)
Attachment #699938 -
Flags: review?(surkov.alexander)
Comment 3•11 years ago
|
||
could you give a short description of the bug for the record otherwise it might be hard to say why it was necessary in half of year? or it might be better: add a descriptive blocking meta bug. btw, how do you want to handle XPCOM event wrappers?
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to alexander :surkov from comment #3) > could you give a short description of the bug for the record otherwise it > might be hard to say why it was necessary in half of year? or it might be > better: add a descriptive blocking meta bug. holding onto the evnethas two bad effects, one it holds onto objects we don't really need, and it means events need to be refcounted which otherwise they don't really need to be. > btw, how do you want to handle XPCOM event wrappers? I think my plan is to autogenerate C++ from idl similar to DOM events. The xpcom events will copy the data they need from the AccEvent when created. How does it sound?
Comment 5•11 years ago
|
||
(In reply to Trevor Saunders (:tbsaunde) from comment #4) > (In reply to alexander :surkov from comment #3) > > could you give a short description of the bug for the record otherwise it > > might be hard to say why it was necessary in half of year? or it might be > > better: add a descriptive blocking meta bug. > > holding onto the evnethas two bad effects, one it holds onto objects we > don't really need, and it means events need to be refcounted which otherwise > they don't really need to be. thanks > > btw, how do you want to handle XPCOM event wrappers? > > I think my plan is to autogenerate C++ from idl similar to DOM events. The > xpcom events will copy the data they need from the AccEvent when created. > How does it sound? It should be ok, I don't have other ideas.
Comment 6•11 years ago
|
||
Comment on attachment 699938 [details] [diff] [review] bug 828141 - windows shouldn't hold onto events Review of attachment 699938 [details] [diff] [review]: ----------------------------------------------------------------- ::: accessible/src/msaa/HyperTextAccessibleWrap.cpp @@ +16,5 @@ > > +StaticRefPtr<Accessible> HyperTextAccessibleWrap::sLastTextChangedAcc; > +StaticAutoPtr<nsString> HyperTextAccessibleWrap::sLastTextChangedString; > +uint32_t HyperTextAccessibleWrap::sLasttextChangeStart = 0; > +uint32_t HyperTextAccessibleWrap::sLasttextChangeEnd = 0; nit: pls uppercase 'text' in sLasttextChange' in both cases btw, first two are named sLastTextChanged, but two following are named sLastTextChange, without 'd' in the end. @@ +17,5 @@ > +StaticRefPtr<Accessible> HyperTextAccessibleWrap::sLastTextChangedAcc; > +StaticAutoPtr<nsString> HyperTextAccessibleWrap::sLastTextChangedString; > +uint32_t HyperTextAccessibleWrap::sLasttextChangeStart = 0; > +uint32_t HyperTextAccessibleWrap::sLasttextChangeEnd = 0; > +bool HyperTextAccessibleWrap::sLastTextChangeWasInsert = false; would you rather have a struct having all these fields? @@ +59,5 @@ > Accessible* accessible = aEvent->GetAccessible(); > + if (accessible && accessible->IsHyperText()) { > + sLastTextChangedAcc = accessible; > + if (!sLastTextChangedString) > + sLastTextChangedString = new nsString; nit: I think I would prefer new nsString()
Attachment #699938 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to alexander :surkov from comment #6) > Comment on attachment 699938 [details] [diff] [review] > bug 828141 - windows shouldn't hold onto events > > Review of attachment 699938 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: accessible/src/msaa/HyperTextAccessibleWrap.cpp > @@ +16,5 @@ > > > > +StaticRefPtr<Accessible> HyperTextAccessibleWrap::sLastTextChangedAcc; > > +StaticAutoPtr<nsString> HyperTextAccessibleWrap::sLastTextChangedString; > > +uint32_t HyperTextAccessibleWrap::sLasttextChangeStart = 0; > > +uint32_t HyperTextAccessibleWrap::sLasttextChangeEnd = 0; > > nit: pls uppercase 'text' in sLasttextChange' in both cases > > btw, first two are named sLastTextChanged, but two following are named > sLastTextChange, without 'd' in the end. which do you prefer? > @@ +17,5 @@ > > +StaticRefPtr<Accessible> HyperTextAccessibleWrap::sLastTextChangedAcc; > > +StaticAutoPtr<nsString> HyperTextAccessibleWrap::sLastTextChangedString; > > +uint32_t HyperTextAccessibleWrap::sLasttextChangeStart = 0; > > +uint32_t HyperTextAccessibleWrap::sLasttextChangeEnd = 0; > > +bool HyperTextAccessibleWrap::sLastTextChangeWasInsert = false; > > would you rather have a struct having all these fields? I think not, it seems silly unless we find some other place it would be used. > @@ +59,5 @@ > > Accessible* accessible = aEvent->GetAccessible(); > > + if (accessible && accessible->IsHyperText()) { > > + sLastTextChangedAcc = accessible; > > + if (!sLastTextChangedString) > > + sLastTextChangedString = new nsString; > > nit: I think I would prefer new nsString() ok
Comment 8•11 years ago
|
||
(In reply to Trevor Saunders (:tbsaunde) from comment #7) > > nit: pls uppercase 'text' in sLasttextChange' in both cases > > > > btw, first two are named sLastTextChanged, but two following are named > > sLastTextChange, without 'd' in the end. > > which do you prefer? TextChange without 'd' to stay closer to used naming (AccTextChangeEvent) > > @@ +17,5 @@ > > > +StaticRefPtr<Accessible> HyperTextAccessibleWrap::sLastTextChangedAcc; > > > +StaticAutoPtr<nsString> HyperTextAccessibleWrap::sLastTextChangedString; > > > +uint32_t HyperTextAccessibleWrap::sLasttextChangeStart = 0; > > > +uint32_t HyperTextAccessibleWrap::sLasttextChangeEnd = 0; > > > +bool HyperTextAccessibleWrap::sLastTextChangeWasInsert = false; > > > > would you rather have a struct having all these fields? > > I think not, it seems silly unless we find some other place it would be used. ok
Assignee | ||
Comment 9•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/7b53f4c1ef7c
Comment 10•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7b53f4c1ef7c
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Comment 11•11 years ago
|
||
Pushed mingw linkage failure (we compile with -fno-keep-inline-dllexport, so all includes must be included in .cpp files that use them): https://hg.mozilla.org/integration/mozilla-inbound/rev/4b8c19604f12
You need to log in
before you can comment on or make changes to this bug.
Description
•