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

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
« no previous file with comments | « Source/core/css/CSSGrammar.y.in ('k') | Source/core/css/CSSParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSParser.h
diff --git a/Source/core/css/CSSParser.h b/Source/core/css/CSSParser.h
index aec52612b9f4a2e3f484e47959277e0c392fffe0..58876a3a8fb3c9930f65db226358d15f7e5bbebe 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); }
@@ -409,7 +414,6 @@ public:
static KURL completeURL(const CSSParserContext&, const String& url);
CSSParserLocation currentLocation();
- CSSParserLocation getSource(const CSSParserLocation& begin, const CSSParserLocation& end) const;
private:
enum PropertyType {
@@ -569,6 +573,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;
@@ -678,9 +685,7 @@ private:
struct CSSParserLocation {
int lineNumber;
- CSSParserString content;
-
- CSSParserLocation trimTrailingWhitespace() const;
+ CSSParserString token;
};
class CSSParser::SourceDataHandler {
« no previous file with comments | « Source/core/css/CSSGrammar.y.in ('k') | Source/core/css/CSSParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698