Closed Bug 377612 Opened 18 years ago Closed 18 years ago

move out state change events handling from atk

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: surkov, Assigned: surkov)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
No description provided.
Attachment #261643 - Flags: review?(ginn.chen)
why do this change? - else if (treeItemAccessible && eventType.EqualsLiteral("select")) { + + if (treeItemAccessible && eventType.EqualsLiteral("select")) { Nit: use same line wrap for + nsCOMPtr<nsIAccessibleStateChangeEvent> accEvent = + new nsAccStateChangeEvent(accessible, nsIAccessibleStates::STATE_CHECKED, + PR_FALSE, isEnabled); and + nsCOMPtr<nsIAccessibleStateChangeEvent> accEvent = + new nsAccStateChangeEvent(accessible, + nsIAccessibleStates::STATE_CHECKED, + PR_FALSE, isEnabled);
(In reply to comment #1) > why do this change? > > - else if (treeItemAccessible && eventType.EqualsLiteral("select")) { > + > + if (treeItemAccessible && eventType.EqualsLiteral("select")) { > because we don't need 'else if' anymore, previous 'if' has 'return' instruction. > Nit: > use same line wrap for > + nsCOMPtr<nsIAccessibleStateChangeEvent> accEvent = > + new nsAccStateChangeEvent(accessible, > nsIAccessibleStates::STATE_CHECKED, > + PR_FALSE, isEnabled); > and > + nsCOMPtr<nsIAccessibleStateChangeEvent> accEvent = > + new nsAccStateChangeEvent(accessible, > + nsIAccessibleStates::STATE_CHECKED, > + PR_FALSE, isEnabled); > Sorry, didn't get you, can you show me it?
Comment on attachment 261643 [details] [diff] [review] patch I mean first chunk of accessible/src/base/nsRootAccessible.cpp. + if (eventType.EqualsLiteral("RadioStateChange")) { + PRUint32 state = State(accessible); + PRBool isEnabled = state & nsIAccessibleStates::STATE_CHECKED; + + nsCOMPtr<nsIAccessibleStateChangeEvent> accEvent = + new nsAccStateChangeEvent(accessible, nsIAccessibleStates::STATE_CHECKED, + PR_FALSE, isEnabled); and + if (eventType.EqualsLiteral("CheckboxStateChange")) { + PRUint32 state = State(accessible); + + // prefPane tab is implemented as list items in A11y, so we need to + // check nsIAccessibleStates::STATE_SELECTED also. + PRBool isEnabled = (state & (nsIAccessibleStates::STATE_CHECKED | + nsIAccessibleStates::STATE_SELECTED)) != 0; + + nsCOMPtr<nsIAccessibleStateChangeEvent> accEvent = + new nsAccStateChangeEvent(accessible, + nsIAccessibleStates::STATE_CHECKED, + PR_FALSE, isEnabled); are line wrapped different for new nsAccStateChangeEvent(accessible, nsIAccessibleStates::STATE_CHECKED, PR_FALSE, isEnabled);
Attachment #261643 - Flags: review?(ginn.chen) → review+
with ginn's comment
Attachment #261643 - Attachment is obsolete: true
checked in
Status: ASSIGNED → 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: