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

Side by Side Diff: third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.cpp

Issue 2459003003: WTF/std normalization: replace WTF::Vector::removeLast with ::pop_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 #include "core/dom/custom/CustomElementReactionStack.h" 5 #include "core/dom/custom/CustomElementReactionStack.h"
6 6
7 #include "bindings/core/v8/Microtask.h" 7 #include "bindings/core/v8/Microtask.h"
8 #include "core/dom/Element.h" 8 #include "core/dom/Element.h"
9 #include "core/dom/custom/CEReactionsScope.h" 9 #include "core/dom/custom/CEReactionsScope.h"
10 #include "core/dom/custom/CustomElementReactionQueue.h" 10 #include "core/dom/custom/CustomElementReactionQueue.h"
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 void CustomElementReactionStack::push() { 37 void CustomElementReactionStack::push() {
38 m_stack.append(nullptr); 38 m_stack.append(nullptr);
39 } 39 }
40 40
41 void CustomElementReactionStack::popInvokingReactions() { 41 void CustomElementReactionStack::popInvokingReactions() {
42 ElementQueue* queue = m_stack.last(); 42 ElementQueue* queue = m_stack.last();
43 if (queue) 43 if (queue)
44 invokeReactions(*queue); 44 invokeReactions(*queue);
45 m_stack.removeLast(); 45 m_stack.pop_back();
46 } 46 }
47 47
48 void CustomElementReactionStack::invokeReactions(ElementQueue& queue) { 48 void CustomElementReactionStack::invokeReactions(ElementQueue& queue) {
49 for (size_t i = 0; i < queue.size(); ++i) { 49 for (size_t i = 0; i < queue.size(); ++i) {
50 Element* element = queue[i]; 50 Element* element = queue[i];
51 if (CustomElementReactionQueue* reactions = m_map.get(element)) { 51 if (CustomElementReactionQueue* reactions = m_map.get(element)) {
52 reactions->invokeReactions(element); 52 reactions->invokeReactions(element);
53 CHECK(reactions->isEmpty()); 53 CHECK(reactions->isEmpty());
54 m_map.remove(element); 54 m_map.remove(element);
55 } 55 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 CustomElementReactionStack* 115 CustomElementReactionStack*
116 CustomElementReactionStackTestSupport::setCurrentForTest( 116 CustomElementReactionStackTestSupport::setCurrentForTest(
117 CustomElementReactionStack* newStack) { 117 CustomElementReactionStack* newStack) {
118 Persistent<CustomElementReactionStack>& stack = customElementReactionStack(); 118 Persistent<CustomElementReactionStack>& stack = customElementReactionStack();
119 CustomElementReactionStack* oldStack = stack.get(); 119 CustomElementReactionStack* oldStack = stack.get();
120 stack = newStack; 120 stack = newStack;
121 return oldStack; 121 return oldStack;
122 } 122 }
123 123
124 } // namespace blink 124 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698