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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLTreeBuilderSimulator.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/html/parser/HTMLTreeBuilderSimulator.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilderSimulator.cpp b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilderSimulator.cpp
index 80cf6c18511a31d9cc6065c5b68b080457eca32b..cc551e93e6081a4d896c036efc4b67a5920e67a0 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilderSimulator.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilderSimulator.cpp
@@ -111,7 +111,7 @@ HTMLTreeBuilderSimulator::State HTMLTreeBuilderSimulator::stateFor(
else if (record->namespaceURI() == MathMLNames::mathmlNamespaceURI)
currentNamespace = MathML;
- if (namespaceStack.isEmpty() || namespaceStack.last() != currentNamespace)
+ if (namespaceStack.isEmpty() || namespaceStack.back() != currentNamespace)
namespaceStack.append(currentNamespace);
}
namespaceStack.reverse();
@@ -131,8 +131,8 @@ HTMLTreeBuilderSimulator::SimulatedToken HTMLTreeBuilderSimulator::simulate(
m_namespaceStack.append(MathML);
if (inForeignContent() && tokenExitsForeignContent(token))
m_namespaceStack.pop_back();
- if ((m_namespaceStack.last() == SVG && tokenExitsSVG(token)) ||
- (m_namespaceStack.last() == MathML && tokenExitsMath(token)))
+ if ((m_namespaceStack.back() == SVG && tokenExitsSVG(token)) ||
+ (m_namespaceStack.back() == MathML && tokenExitsMath(token)))
m_namespaceStack.append(HTML);
if (!inForeignContent()) {
// FIXME: This is just a copy of Tokenizer::updateStateFor which uses
@@ -160,13 +160,13 @@ HTMLTreeBuilderSimulator::SimulatedToken HTMLTreeBuilderSimulator::simulate(
if (token.type() == HTMLToken::EndTag) {
const String& tagName = token.data();
- if ((m_namespaceStack.last() == SVG &&
+ if ((m_namespaceStack.back() == SVG &&
threadSafeMatch(tagName, SVGNames::svgTag)) ||
- (m_namespaceStack.last() == MathML &&
+ (m_namespaceStack.back() == MathML &&
threadSafeMatch(tagName, MathMLNames::mathTag)) ||
- (m_namespaceStack.contains(SVG) && m_namespaceStack.last() == HTML &&
+ (m_namespaceStack.contains(SVG) && m_namespaceStack.back() == HTML &&
tokenExitsSVG(token)) ||
- (m_namespaceStack.contains(MathML) && m_namespaceStack.last() == HTML &&
+ (m_namespaceStack.contains(MathML) && m_namespaceStack.back() == HTML &&
tokenExitsMath(token)))
m_namespaceStack.pop_back();
if (threadSafeMatch(tagName, scriptTag)) {

Powered by Google App Engine
This is Rietveld 408576698