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

Unified Diff: Source/core/css/parser/CSSParserImpl.h

Issue 799003003: CSS Parser: Implement parseRule (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@attoken
Patch Set: Created 6 years 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/parser/CSSParserImpl.h
diff --git a/Source/core/css/parser/CSSParserImpl.h b/Source/core/css/parser/CSSParserImpl.h
index 15301b98a6146ec4a30e6b360b68121e16413bb7..311fff3efc931743a198bc3932cbf62a7e96bcd1 100644
--- a/Source/core/css/parser/CSSParserImpl.h
+++ b/Source/core/css/parser/CSSParserImpl.h
@@ -16,6 +16,8 @@
namespace blink {
+class StyleRule;
+class StyleRuleBase;
class ImmutableStylePropertySet;
class Element;
class MutableStylePropertySet;
@@ -27,8 +29,15 @@ public:
static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String&, bool important, const CSSParserContext&);
static PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> parseInlineStyleDeclaration(const String&, Element*);
static bool parseDeclaration(MutableStylePropertySet*, const String&, const CSSParserContext&);
+ static PassRefPtrWillBeRawPtr<StyleRuleBase> parseRule(const String&, const CSSParserContext&);
private:
+ // These two functions update the range they're given
+ PassRefPtrWillBeRawPtr<StyleRuleBase> consumeAtRule(CSSParserTokenRange&);
+ PassRefPtrWillBeRawPtr<StyleRuleBase> consumeQualifiedRule(CSSParserTokenRange&);
+
+ PassRefPtrWillBeRawPtr<StyleRule> consumeStyleRule(CSSParserTokenRange prelude, CSSParserTokenRange block);
+
// FIXME: We should use a CSSRule::Type here
void consumeDeclarationList(CSSParserTokenRange, CSSRuleSourceData::Type);
void consumeDeclaration(CSSParserTokenRange, CSSRuleSourceData::Type);

Powered by Google App Engine
This is Rietveld 408576698