| Index: Source/core/dom/Element.h
|
| diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
|
| index c80686971fb8641e7e8c0d9db065e3dd8e55a0f9..c7381fad51967a617097a425d67c9e524aba9316 100644
|
| --- a/Source/core/dom/Element.h
|
| +++ b/Source/core/dom/Element.h
|
| @@ -168,13 +168,10 @@ public:
|
| // so this function is not suitable for non-style uses.
|
| const AtomicString& idForStyleResolution() const;
|
|
|
| - // Internal methods that assume the existence of attribute storage, one should use hasAttributes()
|
| - // before calling them. This is not a trivial getter and its return value should be cached for
|
| + // Internal method that assumes the existence of attribute storage, one should use hasAttributes()
|
| + // before calling it. This is not a trivial getter and its return value should be cached for
|
| // performance.
|
| AttributeCollection attributes() const;
|
| - const Attribute* findAttributeByName(const QualifiedName&) const;
|
| - size_t findAttributeIndexByName(const QualifiedName& name) const { return elementData()->attributes().findIndex(name); }
|
| - size_t findAttributeIndexByName(const AtomicString& name, bool shouldIgnoreAttributeCase) const { return elementData()->attributes().findIndex(name, shouldIgnoreAttributeCase); }
|
|
|
| void scrollIntoView(bool alignToTop = true);
|
| void scrollIntoViewIfNeeded(bool centerIfNeeded = true);
|
| @@ -699,14 +696,14 @@ inline Element* Node::parentElement() const
|
| inline bool Element::fastHasAttribute(const QualifiedName& name) const
|
| {
|
| ASSERT(fastAttributeLookupAllowed(name));
|
| - return elementData() && findAttributeByName(name);
|
| + return elementData() && attributes().findIndex(name) != kNotFound;
|
| }
|
|
|
| inline const AtomicString& Element::fastGetAttribute(const QualifiedName& name) const
|
| {
|
| ASSERT(fastAttributeLookupAllowed(name));
|
| if (elementData()) {
|
| - if (const Attribute* attribute = findAttributeByName(name))
|
| + if (const Attribute* attribute = attributes().find(name))
|
| return attribute->value();
|
| }
|
| return nullAtom;
|
| @@ -769,12 +766,6 @@ inline const SpaceSplitString& Element::classNames() const
|
| return elementData()->classNames();
|
| }
|
|
|
| -inline const Attribute* Element::findAttributeByName(const QualifiedName& name) const
|
| -{
|
| - ASSERT(elementData());
|
| - return elementData()->attributes().find(name);
|
| -}
|
| -
|
| inline bool Element::hasID() const
|
| {
|
| return elementData() && elementData()->hasID();
|
|
|