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 9b3b1c9265d311c50dace218d84bd43109089a82..b810a8c377361aa5d8e02fe250db4678c7657e81 100644 |
--- a/third_party/WebKit/Source/core/dom/Element.cpp |
+++ b/third_party/WebKit/Source/core/dom/Element.cpp |
@@ -324,6 +324,18 @@ NamedNodeMap* Element::attributesForBindings() const { |
return rare_data.AttributeMap(); |
} |
+Vector<AtomicString> Element::getAttributeNames() const { |
+ 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; |
+} |
+ |
ElementAnimations* Element::GetElementAnimations() const { |
if (HasRareData()) |
return GetElementRareData()->GetElementAnimations(); |