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

Side by Side Diff: Source/core/dom/SelectorQuery.h

Issue 1153873004: Handle ::content and :host-context correctly in SelectorQuery. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix test naming. Created 5 years, 7 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) 2011, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
3 * Copyright (C) 2014 Samsung Electronics. All rights reserved. 3 * Copyright (C) 2014 Samsung Electronics. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 bool selectorListMatches(ContainerNode& rootNode, Element&, typename Selecto rQueryTrait::OutputType&) const; 73 bool selectorListMatches(ContainerNode& rootNode, Element&, typename Selecto rQueryTrait::OutputType&) const;
74 template <typename SelectorQueryTrait> 74 template <typename SelectorQueryTrait>
75 void executeSlow(ContainerNode& rootNode, typename SelectorQueryTrait::Outpu tType&) const; 75 void executeSlow(ContainerNode& rootNode, typename SelectorQueryTrait::Outpu tType&) const;
76 template <typename SelectorQueryTrait> 76 template <typename SelectorQueryTrait>
77 void executeSlowTraversingShadowTree(ContainerNode& rootNode, typename Selec torQueryTrait::OutputType&) const; 77 void executeSlowTraversingShadowTree(ContainerNode& rootNode, typename Selec torQueryTrait::OutputType&) const;
78 template <typename SelectorQueryTrait> 78 template <typename SelectorQueryTrait>
79 void execute(ContainerNode& rootNode, typename SelectorQueryTrait::OutputTyp e&) const; 79 void execute(ContainerNode& rootNode, typename SelectorQueryTrait::OutputTyp e&) const;
80 const CSSSelector* selectorForIdLookup(const CSSSelector&) const; 80 const CSSSelector* selectorForIdLookup(const CSSSelector&) const;
81 81
82 Vector<const CSSSelector*> m_selectors; 82 Vector<const CSSSelector*> m_selectors;
83 bool m_crossesTreeBoundary; 83 bool m_crossesTreeBoundary : 1;
84 bool m_needsUpdatedDistribution : 1;
84 }; 85 };
85 86
86 class SelectorQuery { 87 class SelectorQuery {
87 WTF_MAKE_NONCOPYABLE(SelectorQuery); 88 WTF_MAKE_NONCOPYABLE(SelectorQuery);
88 WTF_MAKE_FAST_ALLOCATED(SelectorQuery); 89 WTF_MAKE_FAST_ALLOCATED(SelectorQuery);
89 public: 90 public:
90 static PassOwnPtr<SelectorQuery> adopt(CSSSelectorList&); 91 static PassOwnPtr<SelectorQuery> adopt(CSSSelectorList&);
91 92
92 bool matches(Element&) const; 93 bool matches(Element&) const;
93 Element* closest(Element&) const; 94 Element* closest(Element&) const;
(...skipping 12 matching lines...) Expand all
106 SelectorQuery* add(const AtomicString&, const Document&, ExceptionState&); 107 SelectorQuery* add(const AtomicString&, const Document&, ExceptionState&);
107 void invalidate(); 108 void invalidate();
108 109
109 private: 110 private:
110 HashMap<AtomicString, OwnPtr<SelectorQuery>> m_entries; 111 HashMap<AtomicString, OwnPtr<SelectorQuery>> m_entries;
111 }; 112 };
112 113
113 } 114 }
114 115
115 #endif 116 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698