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

Side by Side Diff: Source/core/css/parser/BisonCSSParser.h

Issue 951213004: Make CSSRuleSourceData use the CSSRule Type enum (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use StyleRule::Type Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 - 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserve d. 5 * Copyright (C) 2009 - 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserve d.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 bool m_ignoreErrors; 178 bool m_ignoreErrors;
179 179
180 AtomicString m_defaultNamespace; 180 AtomicString m_defaultNamespace;
181 181
182 // tokenizer methods and data 182 // tokenizer methods and data
183 CSSParserObserver* m_observer; 183 CSSParserObserver* m_observer;
184 184
185 // Local functions which just call into CSSParserObserver if non-null. 185 // Local functions which just call into CSSParserObserver if non-null.
186 void startRule(); 186 void startRule();
187 void endRule(bool valid); 187 void endRule(bool valid);
188 void startRuleHeader(CSSRuleSourceData::Type); 188 void startRuleHeader(StyleRule::Type);
189 void endRuleHeader(); 189 void endRuleHeader();
190 void startSelector(); 190 void startSelector();
191 void endSelector(); 191 void endSelector();
192 void startRuleBody(); 192 void startRuleBody();
193 void startProperty(); 193 void startProperty();
194 void endProperty(bool isImportantFound, bool isPropertyParsed, CSSParserErro r = NoCSSError); 194 void endProperty(bool isImportantFound, bool isPropertyParsed, CSSParserErro r = NoCSSError);
195 195
196 void endInvalidRuleHeader(); 196 void endInvalidRuleHeader();
197 void reportError(const CSSParserLocation&, CSSParserError = GeneralCSSError) ; 197 void reportError(const CSSParserLocation&, CSSParserError = GeneralCSSError) ;
198 void resumeErrorLogging() { m_ignoreErrors = false; } 198 void resumeErrorLogging() { m_ignoreErrors = false; }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 { 246 {
247 setupParser(prefix, prefixLength - 1, string, suffix, suffixLength - 1); 247 setupParser(prefix, prefixLength - 1, string, suffix, suffixLength - 1);
248 } 248 }
249 void setupParser(const char* prefix, unsigned prefixLength, const String&, c onst char* suffix, unsigned suffixLength); 249 void setupParser(const char* prefix, unsigned prefixLength, const String&, c onst char* suffix, unsigned suffixLength);
250 250
251 bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String&, bool important); 251 bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String&, bool important);
252 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> parseDeclaration(const Str ing&, StyleSheetContents* contextStyleSheet); 252 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> parseDeclaration(const Str ing&, StyleSheetContents* contextStyleSheet);
253 253
254 const String* m_source; 254 const String* m_source;
255 TextPosition m_startPosition; 255 TextPosition m_startPosition;
256 CSSRuleSourceData::Type m_ruleHeaderType; 256 StyleRule::Type m_ruleHeaderType;
257 unsigned m_ruleHeaderStartOffset; 257 unsigned m_ruleHeaderStartOffset;
258 int m_ruleHeaderStartLineNumber; 258 int m_ruleHeaderStartLineNumber;
259 OwnPtr<Vector<unsigned> > m_lineEndings; 259 OwnPtr<Vector<unsigned> > m_lineEndings;
260 260
261 bool m_ruleHasHeader; 261 bool m_ruleHasHeader;
262 262
263 bool m_allowImportRules; 263 bool m_allowImportRules;
264 bool m_allowNamespaceDeclarations; 264 bool m_allowNamespaceDeclarations;
265 265
266 bool m_inViewport; 266 bool m_inViewport;
(...skipping 27 matching lines...) Expand all
294 inline int cssyylex(void* yylval, BisonCSSParser* parser) 294 inline int cssyylex(void* yylval, BisonCSSParser* parser)
295 { 295 {
296 return parser->m_tokenizer.lex(yylval); 296 return parser->m_tokenizer.lex(yylval);
297 } 297 }
298 298
299 bool isValidNthToken(const CSSParserString&); 299 bool isValidNthToken(const CSSParserString&);
300 300
301 } // namespace blink 301 } // namespace blink
302 302
303 #endif // BisonCSSParser_h 303 #endif // BisonCSSParser_h
OLDNEW
« no previous file with comments | « Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp ('k') | Source/core/css/parser/BisonCSSParser-in.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698