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

Unified Diff: Source/core/css/CSSParser.h

Issue 15660004: Reporing invalid CSS selectors. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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: Source/core/css/CSSParser.h
diff --git a/Source/core/css/CSSParser.h b/Source/core/css/CSSParser.h
index aec52612b9f4a2e3f484e47959277e0c392fffe0..b128652d75c3addb08b6352017189e07b949e7e7 100644
--- a/Source/core/css/CSSParser.h
+++ b/Source/core/css/CSSParser.h
@@ -79,6 +79,8 @@ public:
PropertyDeclarationError,
InvalidPropertyValueError,
InvalidPropertyError,
+ InvalidSelectorError,
+ InvalidRuleError,
GeneralError
};
@@ -368,7 +370,7 @@ public:
bool m_hasFontFaceOnlyValues;
bool m_hadSyntacticallyValidCSSRule;
bool m_logErrors;
- bool m_ignoreErrorsInDeclaration;
+ bool m_ignoreErrors;
bool m_inFilterRule;
@@ -388,7 +390,10 @@ public:
void startProperty();
void endProperty(bool isImportantFound, bool isPropertyParsed, ErrorType = NoError);
void startEndUnknownRule();
+
+ void endInvalidRuleHeader();
void reportError(const CSSParserLocation&, ErrorType = GeneralError);
+ void resumeErrorLogging() { m_ignoreErrors = false; }
inline int lex(void* yylval) { return (this->*m_lexFunc)(yylval); }
@@ -569,6 +574,9 @@ private:
int m_lineNumber;
int m_tokenStartLineNumber;
int m_lastSelectorLineNumber;
+ CSSRuleSourceData::Type m_ruleHeaderType;
+ unsigned m_ruleHeaderStartOffset;
+ int m_ruleHeaderStartLineNumber;
bool m_allowImportRules;
bool m_allowNamespaceDeclarations;
@@ -679,8 +687,6 @@ private:
struct CSSParserLocation {
int lineNumber;
CSSParserString content;
-
- CSSParserLocation trimTrailingWhitespace() const;
};
class CSSParser::SourceDataHandler {

Powered by Google App Engine
This is Rietveld 408576698