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

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

Issue 1099963003: Support type selector for camel-cased SVG elements in HTML. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix performance regression. tagMatches() became too big to be inlined on Linux. Created 5 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
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 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 WTF_MAKE_FAST_ALLOCATED(CSSParserFunction); 208 WTF_MAKE_FAST_ALLOCATED(CSSParserFunction);
209 public: 209 public:
210 CSSValueID id; 210 CSSValueID id;
211 OwnPtr<CSSParserValueList> args; 211 OwnPtr<CSSParserValueList> args;
212 }; 212 };
213 213
214 class CSSParserSelector { 214 class CSSParserSelector {
215 WTF_MAKE_NONCOPYABLE(CSSParserSelector); WTF_MAKE_FAST_ALLOCATED(CSSParserSe lector); 215 WTF_MAKE_NONCOPYABLE(CSSParserSelector); WTF_MAKE_FAST_ALLOCATED(CSSParserSe lector);
216 public: 216 public:
217 CSSParserSelector(); 217 CSSParserSelector();
218 explicit CSSParserSelector(const QualifiedName&, bool isImplicit = false); 218 explicit CSSParserSelector(const QualifiedName&, bool isImplicit = false, Ta gSelectorCase = TagLowerCase);
219 219
220 static PassOwnPtr<CSSParserSelector> create() { return adoptPtr(new CSSParse rSelector); } 220 static PassOwnPtr<CSSParserSelector> create() { return adoptPtr(new CSSParse rSelector); }
221 static PassOwnPtr<CSSParserSelector> create(const QualifiedName& name, bool isImplicit = false) { return adoptPtr(new CSSParserSelector(name, isImplicit)); } 221 static PassOwnPtr<CSSParserSelector> create(const QualifiedName& name, bool isImplicit = false, TagSelectorCase tagSelectorCase = TagLowerCase) { return ado ptPtr(new CSSParserSelector(name, isImplicit, tagSelectorCase)); }
222 222
223 ~CSSParserSelector(); 223 ~CSSParserSelector();
224 224
225 PassOwnPtr<CSSSelector> releaseSelector() { return m_selector.release(); } 225 PassOwnPtr<CSSSelector> releaseSelector() { return m_selector.release(); }
226 226
227 CSSSelector::Relation relation() const { return m_selector->relation(); } 227 CSSSelector::Relation relation() const { return m_selector->relation(); }
228 void setValue(const AtomicString& value) { m_selector->setValue(value); } 228 void setValue(const AtomicString& value) { m_selector->setValue(value); }
229 void setAttribute(const QualifiedName& value, CSSSelector::AttributeMatchTyp e matchType) { m_selector->setAttribute(value, matchType); } 229 void setAttribute(const QualifiedName& value, CSSSelector::AttributeMatchTyp e matchType) { m_selector->setAttribute(value, matchType); }
230 void setArgument(const AtomicString& value) { m_selector->setArgument(value) ; } 230 void setArgument(const AtomicString& value) { m_selector->setArgument(value) ; }
231 void setMatch(CSSSelector::Match value) { m_selector->setMatch(value); } 231 void setMatch(CSSSelector::Match value) { m_selector->setMatch(value); }
(...skipping 13 matching lines...) Expand all
245 bool crossesTreeScopes() const { return isCustomPseudoElement() || pseudoTyp e() == CSSSelector::PseudoCue || pseudoType() == CSSSelector::PseudoShadow; } 245 bool crossesTreeScopes() const { return isCustomPseudoElement() || pseudoTyp e() == CSSSelector::PseudoCue || pseudoType() == CSSSelector::PseudoShadow; }
246 246
247 bool isSimple() const; 247 bool isSimple() const;
248 bool hasShadowPseudo() const; 248 bool hasShadowPseudo() const;
249 249
250 CSSParserSelector* tagHistory() const { return m_tagHistory.get(); } 250 CSSParserSelector* tagHistory() const { return m_tagHistory.get(); }
251 void setTagHistory(PassOwnPtr<CSSParserSelector> selector) { m_tagHistory = selector; } 251 void setTagHistory(PassOwnPtr<CSSParserSelector> selector) { m_tagHistory = selector; }
252 void clearTagHistory() { m_tagHistory.clear(); } 252 void clearTagHistory() { m_tagHistory.clear(); }
253 void insertTagHistory(CSSSelector::Relation before, PassOwnPtr<CSSParserSele ctor>, CSSSelector::Relation after); 253 void insertTagHistory(CSSSelector::Relation before, PassOwnPtr<CSSParserSele ctor>, CSSSelector::Relation after);
254 void appendTagHistory(CSSSelector::Relation, PassOwnPtr<CSSParserSelector>); 254 void appendTagHistory(CSSSelector::Relation, PassOwnPtr<CSSParserSelector>);
255 void prependTagSelector(const QualifiedName&, bool tagIsImplicit = false); 255 void prependTagSelector(const QualifiedName&, bool tagIsImplicit = false, Ta gSelectorCase = TagLowerCase);
256 256
257 private: 257 private:
258 OwnPtr<CSSSelector> m_selector; 258 OwnPtr<CSSSelector> m_selector;
259 OwnPtr<CSSParserSelector> m_tagHistory; 259 OwnPtr<CSSParserSelector> m_tagHistory;
260 }; 260 };
261 261
262 inline bool CSSParserSelector::hasShadowPseudo() const 262 inline bool CSSParserSelector::hasShadowPseudo() const
263 { 263 {
264 return m_selector->relation() == CSSSelector::ShadowPseudo; 264 return m_selector->relation() == CSSSelector::ShadowPseudo;
265 } 265 }
(...skipping 29 matching lines...) Expand all
295 { 295 {
296 id = CSSValueInvalid; 296 id = CSSValueInvalid;
297 this->valueList = valueList.leakPtr(); 297 this->valueList = valueList.leakPtr();
298 unit = ValueList; 298 unit = ValueList;
299 isInt = false; 299 isInt = false;
300 } 300 }
301 301
302 } 302 }
303 303
304 #endif 304 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698