};
class BisonCSSParser {
+ STACK_ALLOCATED();
friend inline int cssyylex(void*, BisonCSSParser*);
-
public:
- BisonCSSParser(const CSSParserContext&);
+ explicit BisonCSSParser(const CSSParserContext&);
~BisonCSSParser();
void rollbackLastProperties(int num);
StyleRuleBase* createSupportsRule(bool conditionIsSupported, RuleList*);
void markSupportsRuleHeaderStart();
void markSupportsRuleHeaderEnd();
- PassRefPtr<CSSRuleSourceData> popSupportsRuleData();
+ PassRefPtrWillBeRawPtr<CSSRuleSourceData> popSupportsRuleData();
StyleRuleBase* createHostRule(RuleList* rules);
void startDeclarationsForMarginBox();
bool m_important;
CSSPropertyID m_id;
- StyleSheetContents* m_styleSheet;
- RefPtrWillBePersistent<StyleRuleBase> m_rule;
- RefPtrWillBePersistent<StyleKeyframe> m_keyframe;
- RefPtrWillBePersistent<MediaQuerySet> m_mediaList;
+ RawPtrWillBeMember<StyleSheetContents> m_styleSheet;
+ RefPtrWillBeMember<StyleRuleBase> m_rule;
+ RefPtrWillBeMember<StyleKeyframe> m_keyframe;
+ RefPtrWillBeMember<MediaQuerySet> m_mediaList;
OwnPtr<CSSParserValueList> m_valueList;
bool m_supportsCondition;
- WillBePersistentHeapVector<CSSProperty, 256> m_parsedProperties;
+ WillBeHeapVector<CSSProperty, 256> m_parsedProperties;
CSSSelectorList* m_selectorListForParseSelector;
unsigned m_numParsedPropertiesBeforeMarginBox;
void setLocationLabel(const CSSParserLocation& location) { m_locationLabel = location; }
const CSSParserLocation& lastLocationLabel() const { return m_locationLabel; }
- void tokenToLowerCase(const CSSParserString& token);
+ void tokenToLowerCase(CSSParserString& token);
void markViewportRuleBodyStart() { m_inViewport = true; }
void markViewportRuleBodyEnd() { m_inViewport = false; }
private:
class StyleDeclarationScope {
+ STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(StyleDeclarationScope);
public:
StyleDeclarationScope(BisonCSSParser* parser, const StylePropertySet* declaration)
CSSParserLocation m_locationLabel;
- WillBePersistentHeapVector<RefPtrWillBeMember<StyleRuleBase> > m_parsedRules;
- WillBePersistentHeapVector<RefPtrWillBeMember<StyleKeyframe> > m_parsedKeyframes;
- WillBePersistentHeapVector<RefPtrWillBeMember<MediaQuerySet> > m_parsedMediaQuerySets;
- WillBePersistentHeapVector<OwnPtrWillBeMember<RuleList> > m_parsedRuleLists;
+ WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase> > m_parsedRules;
+ WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> > m_parsedKeyframes;
+ WillBeHeapVector<RefPtrWillBeMember<MediaQuerySet> > m_parsedMediaQuerySets;
+ WillBeHeapVector<OwnPtrWillBeMember<RuleList> > m_parsedRuleLists;
Vector<CSSParserSelector*> m_floatingSelectors;
Vector<Vector<OwnPtr<CSSParserSelector> >*> m_floatingSelectorVectors;
Vector<CSSParserValueList*> m_floatingValueLists;
Vector<CSSParserFunction*> m_floatingFunctions;
- OwnPtrWillBePersistent<MediaQuery> m_floatingMediaQuery;
- OwnPtrWillBePersistent<MediaQueryExp> m_floatingMediaQueryExp;
- OwnPtrWillBePersistent<WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> > > m_floatingMediaQueryExpList;
+ OwnPtrWillBeMember<MediaQuery> m_floatingMediaQuery;
+ OwnPtrWillBeMember<MediaQueryExp> m_floatingMediaQueryExp;
+ OwnPtrWillBeMember<WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> > > m_floatingMediaQueryExpList;
- OwnPtrWillBePersistent<WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> > > m_floatingKeyframeVector;
+ OwnPtrWillBeMember<WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> > > m_floatingKeyframeVector;
Vector<OwnPtr<CSSParserSelector> > m_reusableSelectorVector;
- OwnPtr<RuleSourceDataList> m_supportsRuleDataStack;
+ OwnPtrWillBeMember<RuleSourceDataList> m_supportsRuleDataStack;
bool isLoggingErrors();
void logError(const String& message, const CSSParserLocation&);