Closed
Bug 1323449
Opened 8 years ago
Closed 8 years ago
implement is() method for testing boolean characteristics
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: surkov, Assigned: surkov)
References
Details
Attachments
(2 files, 1 obsolete file)
4.02 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
718 bytes,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #8818549 -
Flags: review?(bugs)
Comment 1•8 years ago
|
||
Comment on attachment 8818549 [details] [diff] [review]
patch
Isn't the API a bit odd. It checks role and/or states, but "defunct" isn't necessarily part of states here. Seems like an odd inconsistency. And "unknown" role isn't possible either. Yet .states may contain "defunct" or .role be "unknown"
I think I need a spec to read to understand what the API should be here.
Couldn't find the spec. Bug 1313691 links to http://a11y-api.github.io/a11y-api/spec/ but that isn't available.
Feel free to ask review again, if you can provide a link to the spec explaining the expected behavior, and explain why "defunct" or "unknown" aren't accepted.
Attachment #8818549 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 2•8 years ago
|
||
the method comes from https://wicg.github.io/a11yapi/
"unknown" is not really valid role, and it shouldn't happen in real life, "defunct" state will be matched if the states contains it. I guess it makes sense to consider an accessible object as defunct too if it has null mIntl member. Was that your point?
Flags: needinfo?(bugs)
Comment 3•8 years ago
|
||
Your patch doesn't match "defunct" since "defunct" is explicitly added by AccessibleNode::GetStates, but the patch uses lower level GetOrCreateAccService()->GetStringStates.
Or, "defunct" is matched if someone has called .states before, since then it is cached in mStates. But that is just wrong if the behavior of is() depends on whether .states has been accessed.
Flags: needinfo?(bugs)
Comment 4•8 years ago
|
||
(hmm, can't AccessibleNode::GetStates crash? What guarantees mStates points to a non-null value when "defunct" is added to it)
Assignee | ||
Comment 5•8 years ago
|
||
(In reply to alexander :surkov from comment #2)
> the method comes from https://wicg.github.io/a11yapi/
>
> "unknown" is not really valid role
oh, I see, you concerned about 'unknown' value used in AccessibleNode::GetRole() as a fallback, I think I should add those parts for consistency.
Assignee | ||
Comment 6•8 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #3)
> Your patch doesn't match "defunct" since "defunct" is explicitly added by
> AccessibleNode::GetStates, but the patch uses lower level
> GetOrCreateAccService()->GetStringStates.
> Or, "defunct" is matched if someone has called .states before, since then it
> is cached in mStates. But that is just wrong if the behavior of is() depends
> on whether .states has been accessed.
(In reply to Olli Pettay [:smaug] from comment #4)
> (hmm, can't AccessibleNode::GetStates crash? What guarantees mStates points
> to a non-null value when "defunct" is added to it)
I was supposed to use aStates instead mStates I think. I'll file a patch for this bit.
Assignee | ||
Comment 7•8 years ago
|
||
Assignee: nobody → surkov.alexander
Attachment #8818571 -
Flags: review?(bugs)
Assignee | ||
Comment 8•8 years ago
|
||
Attachment #8818549 -
Attachment is obsolete: true
Attachment #8818572 -
Flags: review?(bugs)
Updated•8 years ago
|
Attachment #8818572 -
Flags: review?(bugs) → review+
Updated•8 years ago
|
Attachment #8818571 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 9•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a73ed8c73a01f41b59dc09f2b6e834521dc1064
Bug 1323449 - implement is() method for testing boolean characteristics, r=smaug
Assignee | ||
Comment 10•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c94ca0caa6f2f07505fb9ed3889ce0de6ed6fd23
Bug 1323449 - AOM .states may crash if not attached to internal object, r=smaug
Comment 11•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Comment 12•8 years ago
|
||
bugherder |
Comment 13•8 years ago
|
||
Did the right stuff land here? I mean, wasn't only one of the patches landed?
Flags: needinfo?(surkov.alexander)
Assignee | ||
Comment 14•8 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #13)
> Did the right stuff land here? I mean, wasn't only one of the patches landed?
they two went in separate commits (comment 11 and comment 12)
Flags: needinfo?(surkov.alexander)
Comment 15•8 years ago
|
||
ah, ok, missed the other one.
You need to log in
before you can comment on or make changes to this bug.
Description
•