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

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

Issue 92083002: Add fast path for tag#id selector queries (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move emptyVector Created 7 years 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
« no previous file with comments | « Source/core/dom/SelectorQuery.cpp ('k') | Source/core/dom/TreeScope.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) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 Google Inc. All Rights Reserved.
3 * Copyright (C) 2012 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2012 Apple Inc. 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 class TreeScope { 50 class TreeScope {
51 friend class Document; 51 friend class Document;
52 friend class TreeScopeAdopter; 52 friend class TreeScopeAdopter;
53 53
54 public: 54 public:
55 TreeScope* parentTreeScope() const { return m_parentTreeScope; } 55 TreeScope* parentTreeScope() const { return m_parentTreeScope; }
56 void setParentTreeScope(TreeScope*); 56 void setParentTreeScope(TreeScope*);
57 57
58 Element* adjustedFocusedElement() const; 58 Element* adjustedFocusedElement() const;
59 Element* getElementById(const AtomicString&) const; 59 Element* getElementById(const AtomicString&) const;
60 const Vector<Element*>& getAllElementsById(const AtomicString&) const;
60 bool hasElementWithId(StringImpl* id) const; 61 bool hasElementWithId(StringImpl* id) const;
61 bool containsMultipleElementsWithId(const AtomicString& id) const; 62 bool containsMultipleElementsWithId(const AtomicString& id) const;
62 void addElementById(const AtomicString& elementId, Element*); 63 void addElementById(const AtomicString& elementId, Element*);
63 void removeElementById(const AtomicString& elementId, Element*); 64 void removeElementById(const AtomicString& elementId, Element*);
64 65
65 Document* documentScope() const { return m_documentScope; } 66 Document* documentScope() const { return m_documentScope; }
66 67
67 Node* ancestorInThisScope(Node*) const; 68 Node* ancestorInThisScope(Node*) const;
68 69
69 void addImageMap(HTMLMapElement*); 70 void addImageMap(HTMLMapElement*);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 inline bool operator!=(const TreeScope& a, const TreeScope& b) { return !(a == b ); } 187 inline bool operator!=(const TreeScope& a, const TreeScope& b) { return !(a == b ); }
187 inline bool operator!=(const TreeScope& a, const TreeScope* b) { return !(a == b ); } 188 inline bool operator!=(const TreeScope& a, const TreeScope* b) { return !(a == b ); }
188 inline bool operator!=(const TreeScope* a, const TreeScope& b) { return !(a == b ); } 189 inline bool operator!=(const TreeScope* a, const TreeScope& b) { return !(a == b ); }
189 190
190 RenderObject* rendererFromPoint(Document*, int x, int y, LayoutPoint* localPoint = 0); 191 RenderObject* rendererFromPoint(Document*, int x, int y, LayoutPoint* localPoint = 0);
191 TreeScope* commonTreeScope(Node*, Node*); 192 TreeScope* commonTreeScope(Node*, Node*);
192 193
193 } // namespace WebCore 194 } // namespace WebCore
194 195
195 #endif // TreeScope_h 196 #endif // TreeScope_h
OLDNEW
« no previous file with comments | « Source/core/dom/SelectorQuery.cpp ('k') | Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698