Bug 179495 - AX: AOM: Implement string type properties
Summary: AX: AOM: Implement string type properties
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 179255
  Show dependency treegraph
 
Reported: 2017-11-09 11:27 PST by Nan Wang
Modified: 2017-11-16 18:24 PST (History)
17 users (show)

See Also:


Attachments
patch (43.81 KB, patch)
2017-11-16 13:28 PST, Nan Wang
no flags Details | Formatted Diff | Diff
patch (74.32 KB, patch)
2017-11-16 16:52 PST, Nan Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nan Wang 2017-11-09 11:27:52 PST
AOM Phase 1:
Implement all of the string type properties.

Spec: https://wicg.github.io/aom/spec/

<rdar://problems/35077884>
Comment 1 Nan Wang 2017-11-16 13:28:04 PST
Created attachment 327101 [details]
patch
Comment 2 chris fleizach 2017-11-16 15:51:39 PST
Comment on attachment 327101 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=327101&action=review

> Source/WebCore/accessibility/AccessibilityObject.cpp:2500
> +    const AtomicString& ariaPlaceholder = stringValueForProperty(AXPropertyName::Placeholder);

if this is still atomic why did the return type change?

> Source/WebCore/accessibility/AccessibilityObject.h:704
> +    const String ariaKeyShortcutsValue() const;

should we remove aria as a prefix since this does AOM and aria

> Source/WebCore/accessibility/AccessibilityObject.h:985
> +    virtual const String ariaLiveRegionRelevant() const { return nullAtom(); }

ditto about these method names with aria
Comment 3 Nan Wang 2017-11-16 15:59:12 PST
Comment on attachment 327101 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=327101&action=review

>> Source/WebCore/accessibility/AccessibilityObject.cpp:2500
>> +    const AtomicString& ariaPlaceholder = stringValueForProperty(AXPropertyName::Placeholder);
> 
> if this is still atomic why did the return type change?

Because stringValueForProperty() is not returning the reference, so here if we don't change it would be error that returning reference to local temporary object.
const AtomicString& ariaPlaceholder = stringValueForProperty(AXPropertyName::Placeholder); is to prolong the lifetime of the String object within this function.
I tried to change stringValueForProperty() by returning a reference, but getting the string value that's being set from JS would hit the assertion where "The atomic string comes from an other thread!"

>> Source/WebCore/accessibility/AccessibilityObject.h:704
>> +    const String ariaKeyShortcutsValue() const;
> 
> should we remove aria as a prefix since this does AOM and aria

Ok

>> Source/WebCore/accessibility/AccessibilityObject.h:985
>> +    virtual const String ariaLiveRegionRelevant() const { return nullAtom(); }
> 
> ditto about these method names with aria

Ok
Comment 4 Nan Wang 2017-11-16 16:52:28 PST
Created attachment 327129 [details]
patch

Removed aria prefix
Comment 5 WebKit Commit Bot 2017-11-16 18:24:57 PST
Comment on attachment 327129 [details]
patch

Clearing flags on attachment: 327129

Committed r224953: <https://trac.webkit.org/changeset/224953>
Comment 6 WebKit Commit Bot 2017-11-16 18:24:59 PST
All reviewed patches have been landed.  Closing bug.