| Index: third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
|
| diff --git a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
|
| index a1e70fb3f7f54cf36e5acd8437fc828fb25c608c..68e6abacaed9db1274798d247ac7565087b33d38 100644
|
| --- a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
|
| +++ b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
|
| @@ -246,15 +246,15 @@ void fillWidgetStates(AXObject* axObject, protocol::Array<AXProperty>* propertie
|
| }
|
| }
|
|
|
| -PassOwnPtr<AXProperty> createRelatedNodeListProperty(const String& key, AXRelatedObjectVector& nodes)
|
| +std::unique_ptr<AXProperty> createRelatedNodeListProperty(const String& key, AXRelatedObjectVector& nodes)
|
| {
|
| - OwnPtr<AXValue> nodeListValue = createRelatedNodeListValue(nodes, AXValueTypeEnum::NodeList);
|
| + std::unique_ptr<AXValue> nodeListValue = createRelatedNodeListValue(nodes, AXValueTypeEnum::NodeList);
|
| return createProperty(key, std::move(nodeListValue));
|
| }
|
|
|
| -PassOwnPtr<AXProperty> createRelatedNodeListProperty(const String& key, AXObject::AXObjectVector& nodes, const QualifiedName& attr, AXObject* axObject)
|
| +std::unique_ptr<AXProperty> createRelatedNodeListProperty(const String& key, AXObject::AXObjectVector& nodes, const QualifiedName& attr, AXObject* axObject)
|
| {
|
| - OwnPtr<AXValue> nodeListValue = createRelatedNodeListValue(nodes);
|
| + std::unique_ptr<AXValue> nodeListValue = createRelatedNodeListValue(nodes);
|
| const AtomicString& attrValue = axObject->getAttribute(attr);
|
| nodeListValue->setValue(protocol::StringValue::create(attrValue));
|
| return createProperty(key, std::move(nodeListValue));
|
| @@ -288,10 +288,10 @@ void fillRelationships(AXObject* axObject, protocol::Array<AXProperty>* properti
|
| results.clear();
|
| }
|
|
|
| -PassOwnPtr<AXValue> createRoleNameValue(AccessibilityRole role)
|
| +std::unique_ptr<AXValue> createRoleNameValue(AccessibilityRole role)
|
| {
|
| AtomicString roleName = AXObject::roleName(role);
|
| - OwnPtr<AXValue> roleNameValue;
|
| + std::unique_ptr<AXValue> roleNameValue;
|
| if (!roleName.isNull()) {
|
| roleNameValue = createValue(roleName, AXValueTypeEnum::Role);
|
| } else {
|
| @@ -300,12 +300,12 @@ PassOwnPtr<AXValue> createRoleNameValue(AccessibilityRole role)
|
| return roleNameValue;
|
| }
|
|
|
| -PassOwnPtr<AXNode> buildObjectForIgnoredNode(Node* node, AXObject* axObject, AXObjectCacheImpl* cacheImpl)
|
| +std::unique_ptr<AXNode> buildObjectForIgnoredNode(Node* node, AXObject* axObject, AXObjectCacheImpl* cacheImpl)
|
| {
|
| AXObject::IgnoredReasons ignoredReasons;
|
|
|
| AXID axID = 0;
|
| - OwnPtr<AXNode> ignoredNodeObject = AXNode::create().setNodeId(String::number(axID)).setIgnored(true).build();
|
| + std::unique_ptr<AXNode> ignoredNodeObject = AXNode::create().setNodeId(String::number(axID)).setIgnored(true).build();
|
| if (axObject) {
|
| axObject->computeAccessibilityIsIgnored(&ignoredReasons);
|
| axID = axObject->axObjectID();
|
| @@ -315,7 +315,7 @@ PassOwnPtr<AXNode> buildObjectForIgnoredNode(Node* node, AXObject* axObject, AXO
|
| ignoredReasons.append(IgnoredReason(AXNotRendered));
|
| }
|
|
|
| - OwnPtr<protocol::Array<AXProperty>> ignoredReasonProperties = protocol::Array<AXProperty>::create();
|
| + std::unique_ptr<protocol::Array<AXProperty>> ignoredReasonProperties = protocol::Array<AXProperty>::create();
|
| for (size_t i = 0; i < ignoredReasons.size(); i++)
|
| ignoredReasonProperties->addItem(createProperty(ignoredReasons[i]));
|
| ignoredNodeObject->setIgnoredReasons(std::move(ignoredReasonProperties));
|
| @@ -323,18 +323,18 @@ PassOwnPtr<AXNode> buildObjectForIgnoredNode(Node* node, AXObject* axObject, AXO
|
| return ignoredNodeObject;
|
| }
|
|
|
| -PassOwnPtr<AXNode> buildObjectForNode(Node* node, AXObject* axObject, AXObjectCacheImpl* cacheImpl, PassOwnPtr<protocol::Array<AXProperty>> properties)
|
| +std::unique_ptr<AXNode> buildObjectForNode(Node* node, AXObject* axObject, AXObjectCacheImpl* cacheImpl, std::unique_ptr<protocol::Array<AXProperty>> properties)
|
| {
|
| AccessibilityRole role = axObject->roleValue();
|
| - OwnPtr<AXNode> nodeObject = AXNode::create().setNodeId(String::number(axObject->axObjectID())).setIgnored(false).build();
|
| + std::unique_ptr<AXNode> nodeObject = AXNode::create().setNodeId(String::number(axObject->axObjectID())).setIgnored(false).build();
|
| nodeObject->setRole(createRoleNameValue(role));
|
|
|
| AXObject::NameSources nameSources;
|
| String computedName = axObject->name(&nameSources);
|
| if (!nameSources.isEmpty()) {
|
| - OwnPtr<AXValue> name = createValue(computedName, AXValueTypeEnum::ComputedString);
|
| + std::unique_ptr<AXValue> name = createValue(computedName, AXValueTypeEnum::ComputedString);
|
| if (!nameSources.isEmpty()) {
|
| - OwnPtr<protocol::Array<AXValueSource>> nameSourceProperties = protocol::Array<AXValueSource>::create();
|
| + std::unique_ptr<protocol::Array<AXValueSource>> nameSourceProperties = protocol::Array<AXValueSource>::create();
|
| for (size_t i = 0; i < nameSources.size(); ++i) {
|
| NameSource& nameSource = nameSources[i];
|
| nameSourceProperties->addItem(createValueSource(nameSource));
|
| @@ -390,7 +390,7 @@ void InspectorAccessibilityAgent::getAXNode(ErrorString* errorString, int nodeId
|
| return;
|
| }
|
|
|
| - OwnPtr<protocol::Array<AXProperty>> properties = protocol::Array<AXProperty>::create();
|
| + std::unique_ptr<protocol::Array<AXProperty>> properties = protocol::Array<AXProperty>::create();
|
| fillLiveRegionProperties(axObject, properties.get());
|
| fillGlobalStates(axObject, properties.get());
|
| fillWidgetProperties(axObject, properties.get());
|
|
|