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

Side by Side Diff: Source/core/dom/shadow/SelectRuleFeatureSet.h

Issue 149513011: Pass around CSSSelector by reference instead of pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 #include "core/dom/Element.h" 35 #include "core/dom/Element.h"
36 36
37 namespace WebCore { 37 namespace WebCore {
38 38
39 class SelectRuleFeatureSet { 39 class SelectRuleFeatureSet {
40 public: 40 public:
41 SelectRuleFeatureSet(); 41 SelectRuleFeatureSet();
42 42
43 void add(const SelectRuleFeatureSet&); 43 void add(const SelectRuleFeatureSet&);
44 void clear(); 44 void clear();
45 void collectFeaturesFromSelector(const CSSSelector*); 45 void collectFeaturesFromSelector(const CSSSelector&);
46 46
47 bool hasSelectorForId(const AtomicString&) const; 47 bool hasSelectorForId(const AtomicString&) const;
48 bool hasSelectorForClass(const AtomicString&) const; 48 bool hasSelectorForClass(const AtomicString&) const;
49 bool hasSelectorForAttribute(const AtomicString&) const; 49 bool hasSelectorForAttribute(const AtomicString&) const;
50 50
51 bool hasSelectorForChecked() const { return hasSelectorFor(AffectedSelectorC hecked); } 51 bool hasSelectorForChecked() const { return hasSelectorFor(AffectedSelectorC hecked); }
52 bool hasSelectorForEnabled() const { return hasSelectorFor(AffectedSelectorE nabled); } 52 bool hasSelectorForEnabled() const { return hasSelectorFor(AffectedSelectorE nabled); }
53 bool hasSelectorForDisabled() const { return hasSelectorFor(AffectedSelector Disabled); } 53 bool hasSelectorForDisabled() const { return hasSelectorFor(AffectedSelector Disabled); }
54 bool hasSelectorForIndeterminate() const { return hasSelectorFor(AffectedSel ectorIndeterminate); } 54 bool hasSelectorForIndeterminate() const { return hasSelectorFor(AffectedSel ectorIndeterminate); }
55 bool hasSelectorForLink() const { return hasSelectorFor(AffectedSelectorLink ); } 55 bool hasSelectorForLink() const { return hasSelectorFor(AffectedSelectorLink ); }
(...skipping 23 matching lines...) Expand all
79 79
80 inline bool SelectRuleFeatureSet::hasSelectorForAttribute(const AtomicString& at tributeName) const 80 inline bool SelectRuleFeatureSet::hasSelectorForAttribute(const AtomicString& at tributeName) const
81 { 81 {
82 ASSERT(!attributeName.isEmpty()); 82 ASSERT(!attributeName.isEmpty());
83 return m_cssRuleFeatureSet.hasSelectorForAttribute(attributeName); 83 return m_cssRuleFeatureSet.hasSelectorForAttribute(attributeName);
84 } 84 }
85 85
86 } 86 }
87 87
88 #endif 88 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/ElementShadow.cpp ('k') | Source/core/dom/shadow/SelectRuleFeatureSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698