WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
179496
AX: AOM: Implement boolean type properties
https://bugs.webkit.org/show_bug.cgi?id=179496
Summary
AX: AOM: Implement boolean type properties
Nan Wang
Reported
2017-11-09 11:31:30 PST
AOM Phase 1: Implement boolean type properties Spec:
https://wicg.github.io/aom/spec/
<
rdar://problem/35077917
>
Attachments
patch
(70.13 KB, patch)
2017-11-17 12:46 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
patch
(70.16 KB, patch)
2017-11-17 12:52 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
patch
(69.96 KB, patch)
2017-11-17 14:21 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Nan Wang
Comment 1
2017-11-17 12:46:59 PST
Created
attachment 327216
[details]
patch
Nan Wang
Comment 2
2017-11-17 12:52:07 PST
Created
attachment 327217
[details]
patch fix build
chris fleizach
Comment 3
2017-11-17 13:54:31 PST
Comment on
attachment 327217
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=327217&action=review
> Source/WebCore/accessibility/AXObjectCache.cpp:120 > +static const Seconds accessibilityFocusAXModalNodeNotificationInterval { 50_ms };
I think the AX might be redundant, since we're already in the AX code base. I think that can just be removed that comment applies to everything below here too
> Source/WebCore/accessibility/AccessibilityObject.cpp:2166 > + return std::nullopt;
should we just return false here instead of using optionals? do we check null opt anywhere?
> Source/WebCore/accessibility/AccessibleNode.cpp:124 > + default:
we should remove the default case so we know everything is handled always
> Source/WebCore/accessibility/AccessibleNode.cpp:127 > +}
then we return false here
> LayoutTests/accessibility/mac/AOM-bool-properties.html:59 > + shouldBeNull("node.accessibleNode.atomic");
is this expected behavior? or should it return false?
Nan Wang
Comment 4
2017-11-17 13:59:18 PST
Comment on
attachment 327217
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=327217&action=review
>> Source/WebCore/accessibility/AXObjectCache.cpp:120 >> +static const Seconds accessibilityFocusAXModalNodeNotificationInterval { 50_ms }; > > I think the AX might be redundant, since we're already in the AX code base. I think that can just be removed > that comment applies to everything below here too
Ok I will change this except for AXHidden since we do have another isHidden() check
>> Source/WebCore/accessibility/AccessibilityObject.cpp:2166 >> + return std::nullopt; > > should we just return false here instead of using optionals? > do we check null opt anywhere?
Yes we check this at all the places to make sure the property is actually being set
>> Source/WebCore/accessibility/AccessibleNode.cpp:127 >> +} > > then we return false here
Ok
>> LayoutTests/accessibility/mac/AOM-bool-properties.html:59 >> + shouldBeNull("node.accessibleNode.atomic"); > > is this expected behavior? or should it return false?
Yes by default all the property value should be null.
Nan Wang
Comment 5
2017-11-17 14:08:25 PST
Comment on
attachment 327217
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=327217&action=review
>>> Source/WebCore/accessibility/AccessibleNode.cpp:127 >>> +} >> >> then we return false here > > Ok
Actually this is giving an error "17 enumeration values not handled in switch:" if without the default case
chris fleizach
Comment 6
2017-11-17 14:16:38 PST
Comment on
attachment 327217
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=327217&action=review
>>>> Source/WebCore/accessibility/AccessibleNode.cpp:127 >>>> +} >>> >>> then we return false here >> >> Ok > > Actually this is giving an error "17 enumeration values not handled in switch:" if without the default case
what are the unhandled values? all the string values?
Nan Wang
Comment 7
2017-11-17 14:17:27 PST
(In reply to chris fleizach from
comment #6
)
> Comment on
attachment 327217
[details]
> patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=327217&action=review
> > >>>> Source/WebCore/accessibility/AccessibleNode.cpp:127 > >>>> +} > >>> > >>> then we return false here > >> > >> Ok > > > > Actually this is giving an error "17 enumeration values not handled in switch:" if without the default case > > what are the unhandled values? all the string values?
enum class items
Nan Wang
Comment 8
2017-11-17 14:18:28 PST
(In reply to Nan Wang from
comment #7
)
> (In reply to chris fleizach from
comment #6
) > > Comment on
attachment 327217
[details]
> > patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=327217&action=review
> > > > >>>> Source/WebCore/accessibility/AccessibleNode.cpp:127 > > >>>> +} > > >>> > > >>> then we return false here > > >> > > >> Ok > > > > > > Actually this is giving an error "17 enumeration values not handled in switch:" if without the default case > > > > what are the unhandled values? all the string values? > > enum class items
AXPropertyName::None, AXPropertyName::Autocomplete, etc.
Nan Wang
Comment 9
2017-11-17 14:21:58 PST
Created
attachment 327237
[details]
patch Removed redundant "AX" prefix
chris fleizach
Comment 10
2017-11-17 14:38:49 PST
Comment on
attachment 327237
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=327237&action=review
> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:3200 > + return [NSNumber numberWithBool:m_object->ariaIsMultiline()];
there must be iOS changes required too right?
> LayoutTests/accessibility/mac/AOM-bool-properties.html:144 > + function testRequired() {
missing tests for Atomic Busy
Nan Wang
Comment 11
2017-11-17 14:43:50 PST
Comment on
attachment 327237
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=327237&action=review
>> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:3200 >> + return [NSNumber numberWithBool:m_object->ariaIsMultiline()]; > > there must be iOS changes required too right?
I only added this to support test and the test is only available on Mac. I think we might need to expose more stuff in future to make this test cross platform. Right now I just used the macOS attribute names to test most properties.
>> LayoutTests/accessibility/mac/AOM-bool-properties.html:144 >> + function testRequired() { > > missing tests for > Atomic > Busy
Atomic is covered in testClearBooleanProperty(). and there is a testBusy();
WebKit Commit Bot
Comment 12
2017-11-17 15:14:22 PST
Comment on
attachment 327237
[details]
patch Clearing flags on attachment: 327237 Committed
r224992
: <
https://trac.webkit.org/changeset/224992
>
WebKit Commit Bot
Comment 13
2017-11-17 15:14:23 PST
All reviewed patches have been landed. Closing bug.
Ryosuke Niwa
Comment 14
2017-11-18 01:58:32 PST
Comment on
attachment 327237
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=327237&action=review
> Source/WebCore/accessibility/AXObjectCache.cpp:2885 > + std::optional<bool> hiddenValue = AccessibleNode::effectiveBoolValueForElement(downcast<Element>(*testNode), AXPropertyName::Hidden);
Use auto in these cases.
> Source/WebCore/accessibility/AccessibilityARIAGrid.cpp:85 > + std::optional<bool> multiSelectable = boolValueForProperty(AXPropertyName::Multiselectable);
Use auto.
> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:628 > + if (std::optional<bool> disabled = object->boolValueForProperty(AXPropertyName::Disabled)) {
Use auto.
> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:707 > + std::optional<bool> multiSelectable = boolValueForProperty(AXPropertyName::Multiselectable);
Use auto.
Nan Wang
Comment 15
2017-11-18 09:56:26 PST
(In reply to Ryosuke Niwa from
comment #14
)
> Comment on
attachment 327237
[details]
> patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=327237&action=review
> > > Source/WebCore/accessibility/AXObjectCache.cpp:2885 > > + std::optional<bool> hiddenValue = AccessibleNode::effectiveBoolValueForElement(downcast<Element>(*testNode), AXPropertyName::Hidden); > > Use auto in these cases. > > > Source/WebCore/accessibility/AccessibilityARIAGrid.cpp:85 > > + std::optional<bool> multiSelectable = boolValueForProperty(AXPropertyName::Multiselectable); > > Use auto. > > > Source/WebCore/accessibility/AccessibilityNodeObject.cpp:628 > > + if (std::optional<bool> disabled = object->boolValueForProperty(AXPropertyName::Disabled)) { > > Use auto. > > > Source/WebCore/accessibility/AccessibilityNodeObject.cpp:707 > > + std::optional<bool> multiSelectable = boolValueForProperty(AXPropertyName::Multiselectable); > > Use auto.
Ok I will update these in
https://bugs.webkit.org/show_bug.cgi?id=179497
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug