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

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: Rebase + plugin finds Created 6 years, 8 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
« no previous file with comments | « Source/core/css/CSSPropertySourceData.cpp ('k') | Source/core/css/parser/BisonCSSParser-in.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 120 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 19 matching lines...) Expand all
171 Vector<OwnPtr<CSSParserSelector> >* reusableSelectorVector() { return &m_reu sableSelectorVector; } 171 Vector<OwnPtr<CSSParserSelector> >* reusableSelectorVector() { return &m_reu sableSelectorVector; }
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 RawPtrWillBeMember<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 22 matching lines...) Expand all
221 void tokenToLowerCase(const CSSParserString& token); 221 void tokenToLowerCase(const CSSParserString& token);
222 222
223 void markViewportRuleBodyStart() { m_inViewport = true; } 223 void markViewportRuleBodyStart() { m_inViewport = true; }
224 void markViewportRuleBodyEnd() { m_inViewport = false; } 224 void markViewportRuleBodyEnd() { m_inViewport = false; }
225 StyleRuleBase* createViewportRule(); 225 StyleRuleBase* createViewportRule();
226 226
227 CSSParserLocation currentLocation() { return m_tokenizer.currentLocation(); } 227 CSSParserLocation currentLocation() { return m_tokenizer.currentLocation(); }
228 228
229 private: 229 private:
230 class StyleDeclarationScope { 230 class StyleDeclarationScope {
231 STACK_ALLOCATED();
231 WTF_MAKE_NONCOPYABLE(StyleDeclarationScope); 232 WTF_MAKE_NONCOPYABLE(StyleDeclarationScope);
232 public: 233 public:
233 StyleDeclarationScope(BisonCSSParser* parser, const StylePropertySet* de claration) 234 StyleDeclarationScope(BisonCSSParser* parser, const StylePropertySet* de claration)
234 : m_parser(parser) 235 : m_parser(parser)
235 , m_mode(declaration->cssParserMode()) 236 , m_mode(declaration->cssParserMode())
236 { 237 {
237 if (isCSSViewportParsingEnabledForMode(m_mode)) { 238 if (isCSSViewportParsingEnabledForMode(m_mode)) {
238 ASSERT(!m_parser->inViewport()); 239 ASSERT(!m_parser->inViewport());
239 m_parser->markViewportRuleBodyStart(); 240 m_parser->markViewportRuleBodyStart();
240 } 241 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 283
283 bool m_ruleHasHeader; 284 bool m_ruleHasHeader;
284 285
285 bool m_allowImportRules; 286 bool m_allowImportRules;
286 bool m_allowNamespaceDeclarations; 287 bool m_allowNamespaceDeclarations;
287 288
288 bool m_inViewport; 289 bool m_inViewport;
289 290
290 CSSParserLocation m_locationLabel; 291 CSSParserLocation m_locationLabel;
291 292
292 WillBePersistentHeapVector<RefPtrWillBeMember<StyleRuleBase> > m_parsedRules ; 293 WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase> > m_parsedRules;
293 WillBePersistentHeapVector<RefPtrWillBeMember<StyleKeyframe> > m_parsedKeyfr ames; 294 WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> > m_parsedKeyframes;
294 WillBePersistentHeapVector<RefPtrWillBeMember<MediaQuerySet> > m_parsedMedia QuerySets; 295 WillBeHeapVector<RefPtrWillBeMember<MediaQuerySet> > m_parsedMediaQuerySets;
295 WillBePersistentHeapVector<OwnPtrWillBeMember<RuleList> > m_parsedRuleLists; 296 WillBeHeapVector<OwnPtrWillBeMember<RuleList> > m_parsedRuleLists;
296 Vector<CSSParserSelector*> m_floatingSelectors; 297 Vector<CSSParserSelector*> m_floatingSelectors;
297 Vector<Vector<OwnPtr<CSSParserSelector> >*> m_floatingSelectorVectors; 298 Vector<Vector<OwnPtr<CSSParserSelector> >*> m_floatingSelectorVectors;
298 Vector<CSSParserValueList*> m_floatingValueLists; 299 Vector<CSSParserValueList*> m_floatingValueLists;
299 Vector<CSSParserFunction*> m_floatingFunctions; 300 Vector<CSSParserFunction*> m_floatingFunctions;
300 301
301 OwnPtrWillBePersistent<MediaQuery> m_floatingMediaQuery; 302 OwnPtrWillBeMember<MediaQuery> m_floatingMediaQuery;
302 OwnPtrWillBePersistent<MediaQueryExp> m_floatingMediaQueryExp; 303 OwnPtrWillBeMember<MediaQueryExp> m_floatingMediaQueryExp;
303 OwnPtrWillBePersistent<WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> > > m_floatingMediaQueryExpList; 304 OwnPtrWillBeMember<WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> > > m_ floatingMediaQueryExpList;
304 305
305 OwnPtrWillBePersistent<WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> > > m_floatingKeyframeVector; 306 OwnPtrWillBeMember<WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> > > m_ floatingKeyframeVector;
306 307
307 Vector<OwnPtr<CSSParserSelector> > m_reusableSelectorVector; 308 Vector<OwnPtr<CSSParserSelector> > m_reusableSelectorVector;
308 309
309 OwnPtr<RuleSourceDataList> m_supportsRuleDataStack; 310 OwnPtrWillBeMember<RuleSourceDataList> m_supportsRuleDataStack;
310 311
311 bool isLoggingErrors(); 312 bool isLoggingErrors();
312 void logError(const String& message, const CSSParserLocation&); 313 void logError(const String& message, const CSSParserLocation&);
313 314
314 CSSTokenizer m_tokenizer; 315 CSSTokenizer m_tokenizer;
315 316
316 friend class TransformOperationInfo; 317 friend class TransformOperationInfo;
317 friend class FilterOperationInfo; 318 friend class FilterOperationInfo;
318 }; 319 };
319 320
320 inline int cssyylex(void* yylval, BisonCSSParser* parser) 321 inline int cssyylex(void* yylval, BisonCSSParser* parser)
321 { 322 {
322 return parser->m_tokenizer.lex(yylval); 323 return parser->m_tokenizer.lex(yylval);
323 } 324 }
324 325
325 bool isValidNthToken(const CSSParserString&); 326 bool isValidNthToken(const CSSParserString&);
326 327
327 } // namespace WebCore 328 } // namespace WebCore
328 329
329 #endif // BisonCSSParser_h 330 #endif // BisonCSSParser_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSPropertySourceData.cpp ('k') | Source/core/css/parser/BisonCSSParser-in.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698