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

Unified Diff: third_party/WebKit/Source/core/dom/TreeScope.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/dom/TreeScope.cpp
diff --git a/third_party/WebKit/Source/core/dom/TreeScope.cpp b/third_party/WebKit/Source/core/dom/TreeScope.cpp
index 189c39f471c2d6b34d26e11b056d79112e3a7683..00f8cfe069f532fabe8f675da43b5452d5212bcd 100644
--- a/third_party/WebKit/Source/core/dom/TreeScope.cpp
+++ b/third_party/WebKit/Source/core/dom/TreeScope.cpp
@@ -315,7 +315,7 @@ HeapVector<Member<Element>> TreeScope::elementsFromHitTestResult(
if (rootNode().isDocumentNode()) {
if (Element* rootElement = toDocument(rootNode()).documentElement()) {
- if (elements.isEmpty() || elements.last() != rootElement)
+ if (elements.isEmpty() || elements.back() != rootElement)
elements.append(rootElement);
}
}
@@ -503,8 +503,8 @@ const TreeScope* TreeScope::commonAncestorTreeScope(
// returned.
const TreeScope* lastAncestor = nullptr;
while (!thisChain.isEmpty() && !otherChain.isEmpty() &&
- thisChain.last() == otherChain.last()) {
- lastAncestor = thisChain.last();
+ thisChain.back() == otherChain.back()) {
+ lastAncestor = thisChain.back();
thisChain.pop_back();
otherChain.pop_back();
}

Powered by Google App Engine
This is Rietveld 408576698