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

Unified Diff: third_party/WebKit/Source/core/css/SelectorFilter.cpp

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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/SelectorFilter.cpp
diff --git a/third_party/WebKit/Source/core/css/SelectorFilter.cpp b/third_party/WebKit/Source/core/css/SelectorFilter.cpp
index addb845076283299a60b97bbdf26961a76f2516c..d038dff570d17fe017a7f4922e46c6cbfd4ec502 100644
--- a/third_party/WebKit/Source/core/css/SelectorFilter.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorFilter.cpp
@@ -66,10 +66,10 @@ static inline void collectElementIdentifierHashes(
void SelectorFilter::pushParentStackFrame(Element& parent) {
ASSERT(m_ancestorIdentifierFilter);
ASSERT(m_parentStack.isEmpty() ||
- m_parentStack.last().element == parent.parentOrShadowHostElement());
+ m_parentStack.back().element == parent.parentOrShadowHostElement());
ASSERT(!m_parentStack.isEmpty() || !parent.parentOrShadowHostElement());
m_parentStack.append(ParentStackFrame(parent));
- ParentStackFrame& parentFrame = m_parentStack.last();
+ ParentStackFrame& parentFrame = m_parentStack.back();
// Mix tags, class names and ids into some sort of weird bouillabaisse.
// The filter is used for fast rejection of child and descendant selectors.
collectElementIdentifierHashes(parent, parentFrame.identifierHashes);
@@ -81,7 +81,7 @@ void SelectorFilter::pushParentStackFrame(Element& parent) {
void SelectorFilter::popParentStackFrame() {
ASSERT(!m_parentStack.isEmpty());
ASSERT(m_ancestorIdentifierFilter);
- const ParentStackFrame& parentFrame = m_parentStack.last();
+ const ParentStackFrame& parentFrame = m_parentStack.back();
size_t count = parentFrame.identifierHashes.size();
for (size_t i = 0; i < count; ++i)
m_ancestorIdentifierFilter->remove(parentFrame.identifierHashes[i]);
@@ -105,7 +105,7 @@ void SelectorFilter::pushParent(Element& parent) {
ASSERT(m_ancestorIdentifierFilter);
// We may get invoked for some random elements in some wacky cases during
// style resolve. Pause maintaining the stack in this case.
- if (m_parentStack.last().element != parent.parentOrShadowHostElement())
+ if (m_parentStack.back().element != parent.parentOrShadowHostElement())
return;
pushParentStackFrame(parent);
}
« no previous file with comments | « third_party/WebKit/Source/core/css/SelectorFilter.h ('k') | third_party/WebKit/Source/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698