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

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

Issue 869813003: Implement elementsFromPoint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix typeo Created 5 years, 11 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) 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 22 matching lines...) Expand all
33 33
34 namespace blink { 34 namespace blink {
35 35
36 class ContainerNode; 36 class ContainerNode;
37 class DOMSelection; 37 class DOMSelection;
38 class Document; 38 class Document;
39 class Element; 39 class Element;
40 class HTMLLabelElement; 40 class HTMLLabelElement;
41 class HTMLMapElement; 41 class HTMLMapElement;
42 class HitTestResult; 42 class HitTestResult;
43 class HitTestRequest;
43 class IdTargetObserverRegistry; 44 class IdTargetObserverRegistry;
44 class ScopedStyleResolver; 45 class ScopedStyleResolver;
45 class Node; 46 class Node;
46 47
47 // A class which inherits both Node and TreeScope must call clearRareData() in i ts destructor 48 // A class which inherits both Node and TreeScope must call clearRareData() in i ts destructor
48 // so that the Node destructor no longer does problematic NodeList cache manipul ation in 49 // so that the Node destructor no longer does problematic NodeList cache manipul ation in
49 // the destructor. 50 // the destructor.
50 class TreeScope : public WillBeGarbageCollectedMixin { 51 class TreeScope : public WillBeGarbageCollectedMixin {
51 public: 52 public:
52 TreeScope* parentTreeScope() const { return m_parentTreeScope; } 53 TreeScope* parentTreeScope() const { return m_parentTreeScope; }
(...skipping 15 matching lines...) Expand all
68 return *m_document; 69 return *m_document;
69 } 70 }
70 71
71 Node* ancestorInThisScope(Node*) const; 72 Node* ancestorInThisScope(Node*) const;
72 73
73 void addImageMap(HTMLMapElement*); 74 void addImageMap(HTMLMapElement*);
74 void removeImageMap(HTMLMapElement*); 75 void removeImageMap(HTMLMapElement*);
75 HTMLMapElement* getImageMap(const String& url) const; 76 HTMLMapElement* getImageMap(const String& url) const;
76 77
77 Element* elementFromPoint(int x, int y) const; 78 Element* elementFromPoint(int x, int y) const;
79 Vector<Element*> elementsFromPoint(int x, int y) const;
78 80
79 // For accessibility. 81 // For accessibility.
80 bool shouldCacheLabelsByForAttribute() const { return m_labelsByForAttribute ; } 82 bool shouldCacheLabelsByForAttribute() const { return m_labelsByForAttribute ; }
81 void addLabel(const AtomicString& forAttributeValue, HTMLLabelElement*); 83 void addLabel(const AtomicString& forAttributeValue, HTMLLabelElement*);
82 void removeLabel(const AtomicString& forAttributeValue, HTMLLabelElement*); 84 void removeLabel(const AtomicString& forAttributeValue, HTMLLabelElement*);
83 HTMLLabelElement* labelElementForId(const AtomicString& forAttributeValue); 85 HTMLLabelElement* labelElementForId(const AtomicString& forAttributeValue);
84 86
85 DOMSelection* getSelection() const; 87 DOMSelection* getSelection() const;
86 88
87 // Find first anchor with the given name. 89 // Find first anchor with the given name.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 return m_elementsById && m_elementsById->contains(id); 201 return m_elementsById && m_elementsById->contains(id);
200 } 202 }
201 203
202 inline bool TreeScope::containsMultipleElementsWithId(const AtomicString& id) co nst 204 inline bool TreeScope::containsMultipleElementsWithId(const AtomicString& id) co nst
203 { 205 {
204 return m_elementsById && m_elementsById->containsMultiple(id); 206 return m_elementsById && m_elementsById->containsMultiple(id);
205 } 207 }
206 208
207 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(TreeScope) 209 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(TreeScope)
208 210
209 HitTestResult hitTestInDocument(const Document*, int x, int y); 211 HitTestResult hitTestInDocument(const Document*, int x, int y, HitTestRequest);
Rick Byers 2015/02/04 10:34:03 I think most places pass HitTestRequest by const r
pdr. 2015/02/17 04:10:13 Done
210 212
211 } // namespace blink 213 } // namespace blink
212 214
213 #endif // TreeScope_h 215 #endif // TreeScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698