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

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

Issue 216553004: [Oilpan]: Move CSSPropertySourceData, InspectorStyleProperty, CSSStyleSourceData, and CSSRuleSource… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 unsigned offset; 75 unsigned offset;
76 unsigned lineNumber; 76 unsigned lineNumber;
77 CSSParserString token; 77 CSSParserString token;
78 }; 78 };
79 79
80 class BisonCSSParser { 80 class BisonCSSParser {
81 STACK_ALLOCATED(); 81 STACK_ALLOCATED();
82 friend inline int cssyylex(void*, BisonCSSParser*); 82 friend inline int cssyylex(void*, BisonCSSParser*);
83 public: 83 public:
84 BisonCSSParser(const CSSParserContext&); 84 BisonCSSParser(const CSSParserContext&);
85 BisonCSSParser(Document*); 85 BisonCSSParser(Document*);
haraken 2014/03/28 14:15:00 Add explicit to these constructors.
wibling-chromium 2014/03/31 09:38:28 Done.
86 ~BisonCSSParser(); 86 ~BisonCSSParser();
87 87
88 void rollbackLastProperties(int num); 88 void rollbackLastProperties(int num);
89 void setCurrentProperty(CSSPropertyID); 89 void setCurrentProperty(CSSPropertyID);
90 90
91 void parseSheet(StyleSheetContents*, const String&, const TextPosition& star tPosition = TextPosition::minimumPosition(), CSSParserObserver* = 0, bool = fals e); 91 void parseSheet(StyleSheetContents*, const String&, const TextPosition& star tPosition = TextPosition::minimumPosition(), CSSParserObserver* = 0, bool = fals e);
92 PassRefPtrWillBeRawPtr<StyleRuleBase> parseRule(StyleSheetContents*, const S tring&); 92 PassRefPtrWillBeRawPtr<StyleRuleBase> parseRule(StyleSheetContents*, const S tring&);
93 PassRefPtrWillBeRawPtr<StyleKeyframe> parseKeyframeRule(StyleSheetContents*, const String&); 93 PassRefPtrWillBeRawPtr<StyleKeyframe> parseKeyframeRule(StyleSheetContents*, const String&);
94 bool parseSupportsCondition(const String&); 94 bool parseSupportsCondition(const String&);
95 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String &, bool important, CSSParserMode, StyleSheetContents*); 95 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String &, bool important, CSSParserMode, StyleSheetContents*);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 StyleRuleBase* createMediaRule(MediaQuerySet*, RuleList*); 131 StyleRuleBase* createMediaRule(MediaQuerySet*, RuleList*);
132 RuleList* createRuleList(); 132 RuleList* createRuleList();
133 RuleList* appendRule(RuleList*, StyleRuleBase*); 133 RuleList* appendRule(RuleList*, StyleRuleBase*);
134 StyleRuleBase* createStyleRule(Vector<OwnPtr<CSSParserSelector> >* selectors ); 134 StyleRuleBase* createStyleRule(Vector<OwnPtr<CSSParserSelector> >* selectors );
135 StyleRuleBase* createFontFaceRule(); 135 StyleRuleBase* createFontFaceRule();
136 StyleRuleBase* createPageRule(PassOwnPtr<CSSParserSelector> pageSelector); 136 StyleRuleBase* createPageRule(PassOwnPtr<CSSParserSelector> pageSelector);
137 StyleRuleBase* createMarginAtRule(CSSSelector::MarginBoxType); 137 StyleRuleBase* createMarginAtRule(CSSSelector::MarginBoxType);
138 StyleRuleBase* createSupportsRule(bool conditionIsSupported, RuleList*); 138 StyleRuleBase* createSupportsRule(bool conditionIsSupported, RuleList*);
139 void markSupportsRuleHeaderStart(); 139 void markSupportsRuleHeaderStart();
140 void markSupportsRuleHeaderEnd(); 140 void markSupportsRuleHeaderEnd();
141 PassRefPtr<CSSRuleSourceData> popSupportsRuleData(); 141 PassRefPtrWillBeRawPtr<CSSRuleSourceData> popSupportsRuleData();
142 StyleRuleBase* createHostRule(RuleList* rules); 142 StyleRuleBase* createHostRule(RuleList* rules);
143 143
144 void startDeclarationsForMarginBox(); 144 void startDeclarationsForMarginBox();
145 void endDeclarationsForMarginBox(); 145 void endDeclarationsForMarginBox();
146 146
147 MediaQueryExp* createFloatingMediaQueryExp(const AtomicString&, CSSParserVal ueList*); 147 MediaQueryExp* createFloatingMediaQueryExp(const AtomicString&, CSSParserVal ueList*);
148 PassOwnPtrWillBeRawPtr<MediaQueryExp> sinkFloatingMediaQueryExp(MediaQueryEx p*); 148 PassOwnPtrWillBeRawPtr<MediaQueryExp> sinkFloatingMediaQueryExp(MediaQueryEx p*);
149 WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> >* createFloatingMediaQue ryExpList(); 149 WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> >* createFloatingMediaQue ryExpList();
150 PassOwnPtrWillBeRawPtr<WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> > > sinkFloatingMediaQueryExpList(WillBeHeapVector<OwnPtrWillBeMember<MediaQueryEx p> >*); 150 PassOwnPtrWillBeRawPtr<WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> > > sinkFloatingMediaQueryExpList(WillBeHeapVector<OwnPtrWillBeMember<MediaQueryEx p> >*);
151 MediaQuery* createFloatingMediaQuery(MediaQuery::Restrictor, const AtomicStr ing&, PassOwnPtrWillBeRawPtr<WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> > >); 151 MediaQuery* createFloatingMediaQuery(MediaQuery::Restrictor, const AtomicStr ing&, PassOwnPtrWillBeRawPtr<WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> > >);
(...skipping 20 matching lines...) Expand all
172 172
173 void clearProperties(); 173 void clearProperties();
174 174
175 PassRefPtr<ImmutableStylePropertySet> createStylePropertySet(); 175 PassRefPtr<ImmutableStylePropertySet> createStylePropertySet();
176 176
177 CSSParserContext m_context; 177 CSSParserContext m_context;
178 178
179 bool m_important; 179 bool m_important;
180 CSSPropertyID m_id; 180 CSSPropertyID m_id;
181 StyleSheetContents* m_styleSheet; 181 StyleSheetContents* m_styleSheet;
182 RefPtrWillBePersistent<StyleRuleBase> m_rule; 182 RefPtrWillBeMember<StyleRuleBase> m_rule;
183 RefPtrWillBePersistent<StyleKeyframe> m_keyframe; 183 RefPtrWillBeMember<StyleKeyframe> m_keyframe;
184 RefPtrWillBePersistent<MediaQuerySet> m_mediaList; 184 RefPtrWillBeMember<MediaQuerySet> m_mediaList;
185 OwnPtr<CSSParserValueList> m_valueList; 185 OwnPtr<CSSParserValueList> m_valueList;
186 bool m_supportsCondition; 186 bool m_supportsCondition;
187 187
188 WillBePersistentHeapVector<CSSProperty, 256> m_parsedProperties; 188 WillBeHeapVector<CSSProperty, 256> m_parsedProperties;
189 CSSSelectorList* m_selectorListForParseSelector; 189 CSSSelectorList* m_selectorListForParseSelector;
190 190
191 unsigned m_numParsedPropertiesBeforeMarginBox; 191 unsigned m_numParsedPropertiesBeforeMarginBox;
192 192
193 bool m_hasFontFaceOnlyValues; 193 bool m_hasFontFaceOnlyValues;
194 bool m_hadSyntacticallyValidCSSRule; 194 bool m_hadSyntacticallyValidCSSRule;
195 bool m_logErrors; 195 bool m_logErrors;
196 bool m_ignoreErrors; 196 bool m_ignoreErrors;
197 197
198 AtomicString m_defaultNamespace; 198 AtomicString m_defaultNamespace;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 bool m_ruleHasHeader; 285 bool m_ruleHasHeader;
286 286
287 bool m_allowImportRules; 287 bool m_allowImportRules;
288 bool m_allowNamespaceDeclarations; 288 bool m_allowNamespaceDeclarations;
289 289
290 bool m_inViewport; 290 bool m_inViewport;
291 291
292 CSSParserLocation m_locationLabel; 292 CSSParserLocation m_locationLabel;
293 293
294 WillBePersistentHeapVector<RefPtrWillBeMember<StyleRuleBase> > m_parsedRules ; 294 WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase> > m_parsedRules;
295 WillBePersistentHeapVector<RefPtrWillBeMember<StyleKeyframe> > m_parsedKeyfr ames; 295 WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> > m_parsedKeyframes;
296 WillBePersistentHeapVector<RefPtrWillBeMember<MediaQuerySet> > m_parsedMedia QuerySets; 296 WillBeHeapVector<RefPtrWillBeMember<MediaQuerySet> > m_parsedMediaQuerySets;
297 WillBePersistentHeapVector<OwnPtrWillBeMember<RuleList> > m_parsedRuleLists; 297 WillBeHeapVector<OwnPtrWillBeMember<RuleList> > m_parsedRuleLists;
298 Vector<CSSParserSelector*> m_floatingSelectors; 298 Vector<CSSParserSelector*> m_floatingSelectors;
299 Vector<Vector<OwnPtr<CSSParserSelector> >*> m_floatingSelectorVectors; 299 Vector<Vector<OwnPtr<CSSParserSelector> >*> m_floatingSelectorVectors;
300 Vector<CSSParserValueList*> m_floatingValueLists; 300 Vector<CSSParserValueList*> m_floatingValueLists;
301 Vector<CSSParserFunction*> m_floatingFunctions; 301 Vector<CSSParserFunction*> m_floatingFunctions;
302 302
303 OwnPtrWillBePersistent<MediaQuery> m_floatingMediaQuery; 303 OwnPtrWillBeMember<MediaQuery> m_floatingMediaQuery;
304 OwnPtrWillBePersistent<MediaQueryExp> m_floatingMediaQueryExp; 304 OwnPtrWillBeMember<MediaQueryExp> m_floatingMediaQueryExp;
305 OwnPtrWillBePersistent<WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> > > m_floatingMediaQueryExpList; 305 OwnPtrWillBeMember<WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> > > m_ floatingMediaQueryExpList;
306 306
307 OwnPtrWillBePersistent<WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> > > m_floatingKeyframeVector; 307 OwnPtrWillBeMember<WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> > > m_ floatingKeyframeVector;
308 308
309 Vector<OwnPtr<CSSParserSelector> > m_reusableSelectorVector; 309 Vector<OwnPtr<CSSParserSelector> > m_reusableSelectorVector;
310 310
311 OwnPtr<RuleSourceDataList> m_supportsRuleDataStack; 311 OwnPtrWillBeMember<RuleSourceDataList> m_supportsRuleDataStack;
312 312
313 bool isLoggingErrors(); 313 bool isLoggingErrors();
314 void logError(const String& message, const CSSParserLocation&); 314 void logError(const String& message, const CSSParserLocation&);
315 315
316 CSSTokenizer m_tokenizer; 316 CSSTokenizer m_tokenizer;
317 317
318 friend class TransformOperationInfo; 318 friend class TransformOperationInfo;
319 friend class FilterOperationInfo; 319 friend class FilterOperationInfo;
320 }; 320 };
321 321
322 inline int cssyylex(void* yylval, BisonCSSParser* parser) 322 inline int cssyylex(void* yylval, BisonCSSParser* parser)
323 { 323 {
324 return parser->m_tokenizer.lex(yylval); 324 return parser->m_tokenizer.lex(yylval);
325 } 325 }
326 326
327 bool isValidNthToken(const CSSParserString&); 327 bool isValidNthToken(const CSSParserString&);
328 328
329 } // namespace WebCore 329 } // namespace WebCore
330 330
331 #endif // BisonCSSParser_h 331 #endif // BisonCSSParser_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698