Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/Element.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp |
| index 65a83f23f495d473434e00c38afb79a3d409491b..e5ec4443f9e0b5535712c0b257741e657c7c15c1 100644 |
| --- a/third_party/WebKit/Source/core/dom/Element.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp |
| @@ -2824,6 +2824,18 @@ bool Element::SupportsSpatialNavigationFocus() const { |
| HasEventListeners(EventTypeNames::focusout)); |
| } |
| +Vector<AtomicString> Element::getAttributeNames() const { |
|
tkent
2017/06/01 23:48:10
nit: I'd like to move this next to attributesForBi
Shanmuga Pandi
2017/06/02 05:21:51
Done.
|
| + Vector<AtomicString> attributesVector; |
| + if (!hasAttributes()) |
| + return attributesVector; |
| + |
| + AttributeCollection attributes = element_data_->Attributes(); |
| + attributesVector.ReserveInitialCapacity(attributes.size()); |
| + for (const Attribute& attr : attributes) |
| + attributesVector.UncheckedAppend(attr.GetName().ToString()); |
| + return attributesVector; |
| +} |
| + |
| bool Element::IsFocusable() const { |
| // Style cannot be cleared out for non-active documents, so in that case the |
| // needsLayoutTreeUpdateForNode check is invalid. |