Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Side by Side Diff: third_party/WebKit/Source/core/dom/custom/CustomElementTestHelpers.h

Issue 2502413004: WTF/std normalization: replace WTF::Vector::last with ::back (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CustomElementTestHelpers_h 5 #ifndef CustomElementTestHelpers_h
6 #define CustomElementTestHelpers_h 6 #define CustomElementTestHelpers_h
7 7
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/dom/Element.h" 10 #include "core/dom/Element.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 TestCustomElementDefinition(const CustomElementDescriptor& descriptor, 48 TestCustomElementDefinition(const CustomElementDescriptor& descriptor,
49 const HashSet<AtomicString>& observedAttributes) 49 const HashSet<AtomicString>& observedAttributes)
50 : CustomElementDefinition(descriptor, observedAttributes) {} 50 : CustomElementDefinition(descriptor, observedAttributes) {}
51 51
52 ~TestCustomElementDefinition() override = default; 52 ~TestCustomElementDefinition() override = default;
53 53
54 ScriptValue getConstructorForScript() override { return ScriptValue(); } 54 ScriptValue getConstructorForScript() override { return ScriptValue(); }
55 55
56 bool runConstructor(Element* element) override { 56 bool runConstructor(Element* element) override {
57 if (constructionStack().isEmpty() || constructionStack().last() != element) 57 if (constructionStack().isEmpty() || constructionStack().back() != element)
58 return false; 58 return false;
59 constructionStack().last().clear(); 59 constructionStack().back().clear();
60 return true; 60 return true;
61 } 61 }
62 62
63 HTMLElement* createElementSync(Document& document, 63 HTMLElement* createElementSync(Document& document,
64 const QualifiedName&) override { 64 const QualifiedName&) override {
65 return createElementForConstructor(document); 65 return createElementForConstructor(document);
66 } 66 }
67 67
68 bool hasConnectedCallback() const override { return false; } 68 bool hasConnectedCallback() const override { return false; }
69 bool hasDisconnectedCallback() const override { return false; } 69 bool hasDisconnectedCallback() const override { return false; }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 private: 132 private:
133 Member<Document> m_document; 133 Member<Document> m_document;
134 AtomicString m_namespaceURI; 134 AtomicString m_namespaceURI;
135 AtomicString m_localName; 135 AtomicString m_localName;
136 std::vector<std::pair<QualifiedName, AtomicString>> m_attributes; 136 std::vector<std::pair<QualifiedName, AtomicString>> m_attributes;
137 }; 137 };
138 138
139 } // namespace blink 139 } // namespace blink
140 140
141 #endif // CustomElementTestHelpers_h 141 #endif // CustomElementTestHelpers_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698