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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp

Issue 2105463003: Add inline capacity to CSSTokenizer::m_blockStack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months 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
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSTokenizer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
index 9a8075e707f9a94ee415539a3cade2ec853efe23..6a9ae43ed668075c5dea1f480d0b279f927eaed7 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
@@ -125,15 +125,6 @@ CSSParserToken CSSTokenizer::whiteSpace(UChar cc)
return CSSParserToken(WhitespaceToken);
}
-static bool popIfBlockMatches(Vector<CSSParserTokenType>& blockStack, CSSParserTokenType type)
esprehn 2016/06/27 22:16:18 I merged this into the function so I don't need a
-{
- if (!blockStack.isEmpty() && blockStack.last() == type) {
- blockStack.removeLast();
- return true;
- }
- return false;
-}
-
CSSParserToken CSSTokenizer::blockStart(CSSParserTokenType type)
{
m_blockStack.append(type);
@@ -148,8 +139,10 @@ CSSParserToken CSSTokenizer::blockStart(CSSParserTokenType blockType, CSSParserT
CSSParserToken CSSTokenizer::blockEnd(CSSParserTokenType type, CSSParserTokenType startType)
{
- if (popIfBlockMatches(m_blockStack, startType))
+ if (!m_blockStack.isEmpty() && m_blockStack.last() == type) {
+ m_blockStack.removeLast();
return CSSParserToken(type, CSSParserToken::BlockEnd);
+ }
return CSSParserToken(type);
}
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSTokenizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698