[Webkit-unassigned] [Bug 179497] AX: AOM: Implement number type properties

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Nov 18 12:54:52 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=179497

--- Comment #4 from Nan Wang <n_wang at apple.com> ---
Comment on attachment 327302
  --> https://bugs.webkit.org/attachment.cgi?id=327302
patch

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

>> Source/WebCore/accessibility/AccessibleNode.cpp:203
>> +void AccessibleNode::setProperty(bool shouldRemove, PropertyValueVariant&& value, AXPropertyName propertyName)
> 
> can we remove the first argument and just check if value.has_value inside the method?
> 
> It seems more natural to have the PropertyName be the first argument, and the value be the second?

Ok I added a template function to cover the optional values
template<typename T> void setOptionalProperty(AXPropertyName, std::optional<T>);
And also setStringProperty()

>> Source/WebCore/accessibility/AccessibleNode.cpp:279
>> +        return element.attributeWithoutSynchronization(ariaAttributeMap().get(propertyName)).toInt();
> 
> toUnsigned()

There's no toUnsigned() on AtomicString, so I cast it to String and use toUInt()

>> Source/WebCore/accessibility/AccessibleNode.h:39
>> +typedef Variant<std::nullptr_t, String, bool, int, unsigned, double> PropertyValueVariant;
> 
> should this be float instead of double?

This is to match the JS API interface:
attribute double?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171118/f6139574/attachment.html>


More information about the webkit-unassigned mailing list