Closed Bug 391562 Opened 18 years ago Closed 18 years ago

Pass aExtraState as nsnull to GetFinalState() if not needed

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: aaronlev)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(1 file)

When a caller doesn't need the extra states, it can call GetFinalState() with a 2nd argument of nsnull. This is more optimal. Looking through the GetFinalState() callers there are a few obvious ones to fix.
I didn't catch the bug issue. The summary says to make optional second argument but it's interface method, how we can do it. > When a caller doesn't need the extra states, it can call GetFinalState() with a > 2nd argument of nsnull. This is more optimal. But this is presented behaviour I think.
> But this is presented behaviour I think. Not sure what that means. We can pass aExtraState as null.
Summary: Don't pass aExtraState to GetFinalState() if not needed → Pass aExtraState as nsnull to GetFinalState() if not needed
(In reply to comment #2) > > But this is presented behaviour I think. > Not sure what that means. > > We can pass aExtraState as null. > Right, we can and we do. Can you point a wrong code we shoudl fix?
One example was here: http://lxr.mozilla.org/seamonkey/source/accessible/src/msaa/nsAccessibleWrap.cpp#502 I also saw that we could sometimes pass in null where we call it from nsAccessibleEventData.cpp. After that I stopped looking, because it's not important for this release.
Ah, I thought you talking about ability to pass nsnull! But you are talking about to pass nsnull where extraState is not needed.
Attachment #278175 - Flags: review?(surkov.alexander)
Comment on attachment 278175 [details] [diff] [review] Pass null for extraState in 4 places that we don't need it It's not important cleanup in the light of mergin state and extra state, though it's nice to have I guess for now :)
Attachment #278175 - Flags: review?(surkov.alexander) → review+
Attachment #278175 - Flags: approval1.9?
Comment on attachment 278175 [details] [diff] [review] Pass null for extraState in 4 places that we don't need it It avoids some extra work on every node. Since many ATs walk the entire tree on page load, that can be a lot of savings. Also, low risk.
Attachment #278175 - Flags: approval1.9? → approval1.9+
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: