Chromium Code Reviews| Index: components/html_viewer/ax_provider_impl.cc |
| diff --git a/components/html_viewer/ax_provider_impl.cc b/components/html_viewer/ax_provider_impl.cc |
| index ecb69b47f2743d388bf79f5d040ff8a00f688fa0..67c636e618adf3468b3235765efa846d68f3cabb 100644 |
| --- a/components/html_viewer/ax_provider_impl.cc |
| +++ b/components/html_viewer/ax_provider_impl.cc |
| @@ -81,10 +81,14 @@ AxNodePtr AxProviderImpl::ConvertAxNode(const WebAXObject& ax_object, |
| if (ax_object.isAnchor()) { |
| result->link = mojo::AxLink::New(); |
| result->link->url = String::From(ax_object.url().string()); |
| - } else if (ax_object.childCount() == 0 && |
| - !ax_object.stringValue().isEmpty()) { |
| - result->text = mojo::AxText::New(); |
| - result->text->content = String::From(ax_object.stringValue()); |
| + } else if (ax_object.childCount() == 0) { |
| + blink::WebAXNameFrom nameFrom; |
| + blink::WebVector<WebAXObject> nameObjects; |
| + blink::WebString name = ax_object.name(nameFrom, nameObjects); |
|
aboxhall
2015/11/13 23:13:48
Would it make sense to create a version of name()
dmazzoni
2015/11/16 18:52:03
Done.
|
| + if (!name.isEmpty()) { |
| + result->text = mojo::AxText::New(); |
| + result->text->content = String::From(name); |
| + } |
| } |
| return result.Pass(); |