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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSParserToken.h

Issue 1905163003: Fix CSSParserToken::operator== for NumberTokens (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: third_party/WebKit/Source/core/css/parser/CSSParserToken.h
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserToken.h b/third_party/WebKit/Source/core/css/parser/CSSParserToken.h
index 9ee58f45386c234e5727537a24c5b512c4bb3d3b..f857b3d9e4747a7f16e8abfbcb6bbec315029fac 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParserToken.h
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserToken.h
@@ -82,38 +82,7 @@ public:
CSSParserToken(HashTokenType, CSSParserString);
- bool operator==(const CSSParserToken& other) const
- {
- if (m_type != other.m_type)
- return false;
- switch (m_type) {
- case DelimiterToken:
- return delimiter() == other.delimiter();
- case HashToken:
- if (m_hashTokenType != other.m_hashTokenType)
- return false;
- // fallthrough
- case IdentToken:
- case FunctionToken:
- case StringToken:
- case UrlToken:
- return m_valueDataCharRaw == other.m_valueDataCharRaw && m_valueLength == other.m_valueLength && m_valueIs8Bit == other.m_valueIs8Bit;
- case NumberToken:
- if (m_numericSign != other.m_numericSign)
- return false;
- // fallthrough
- case DimensionToken:
- if (m_valueDataCharRaw != other.m_valueDataCharRaw || m_valueLength != other.m_valueLength || m_valueIs8Bit != other.m_valueIs8Bit)
- return false;
- // fallthrough
- case PercentageToken:
- return m_numericValue == other.m_numericValue && m_numericValueType == other.m_numericValueType;
- case UnicodeRangeToken:
- return m_unicodeRange.start == other.m_unicodeRange.start && m_unicodeRange.end == other.m_unicodeRange.end;
- default:
- return true;
- }
- }
+ bool operator==(const CSSParserToken& other) const;
// Converts NumberToken to DimensionToken.
void convertToDimensionWithUnit(CSSParserString);

Powered by Google App Engine
This is Rietveld 408576698