Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google 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 * | 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 169 void releaseDanglingNodes(); | 169 void releaseDanglingNodes(); |
| 170 | 170 |
| 171 void domContentLoadedEventFired(LocalFrame*); | 171 void domContentLoadedEventFired(LocalFrame*); |
| 172 void didCommitLoad(LocalFrame*, DocumentLoader*); | 172 void didCommitLoad(LocalFrame*, DocumentLoader*); |
| 173 | 173 |
| 174 void didInsertDOMNode(Node*); | 174 void didInsertDOMNode(Node*); |
| 175 void willRemoveDOMNode(Node*); | 175 void willRemoveDOMNode(Node*); |
| 176 void willModifyDOMAttr(Element*, const AtomicString& oldValue, const AtomicS tring& newValue); | 176 void willModifyDOMAttr(Element*, const AtomicString& oldValue, const AtomicS tring& newValue); |
| 177 void didModifyDOMAttr(Element*, const AtomicString& name, const AtomicString & value); | 177 void didModifyDOMAttr(Element*, const AtomicString& name, const AtomicString & value); |
| 178 void didRemoveDOMAttr(Element*, const AtomicString& name); | 178 void didRemoveDOMAttr(Element*, const AtomicString& name); |
| 179 void styleAttributeInvalidated(const Vector<Element*>& elements); | 179 void styleAttributeInvalidated(const WillBeHeapVector<RawPtrWillBeMember<Ele ment> >& elements); |
| 180 void characterDataModified(CharacterData*); | 180 void characterDataModified(CharacterData*); |
| 181 void didInvalidateStyleAttr(Node*); | 181 void didInvalidateStyleAttr(Node*); |
| 182 void didPushShadowRoot(Element* host, ShadowRoot*); | 182 void didPushShadowRoot(Element* host, ShadowRoot*); |
| 183 void willPopShadowRoot(Element* host, ShadowRoot*); | 183 void willPopShadowRoot(Element* host, ShadowRoot*); |
| 184 void frameDocumentUpdated(LocalFrame*); | 184 void frameDocumentUpdated(LocalFrame*); |
| 185 void pseudoElementCreated(PseudoElement*); | 185 void pseudoElementCreated(PseudoElement*); |
| 186 void pseudoElementDestroyed(PseudoElement*); | 186 void pseudoElementDestroyed(PseudoElement*); |
| 187 | 187 |
| 188 Node* nodeForId(int nodeId); | 188 Node* nodeForId(int nodeId); |
| 189 int boundNodeId(Node*); | 189 int boundNodeId(Node*); |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 214 | 214 |
| 215 private: | 215 private: |
| 216 enum SearchMode { NotSearching, SearchingForNormal, SearchingForUAShadow }; | 216 enum SearchMode { NotSearching, SearchingForNormal, SearchingForUAShadow }; |
| 217 | 217 |
| 218 InspectorDOMAgent(InspectorPageAgent*, InjectedScriptManager*, InspectorOver lay*); | 218 InspectorDOMAgent(InspectorPageAgent*, InjectedScriptManager*, InspectorOver lay*); |
| 219 | 219 |
| 220 void setSearchingForNode(ErrorString*, SearchMode, JSONObject* highlightConf ig); | 220 void setSearchingForNode(ErrorString*, SearchMode, JSONObject* highlightConf ig); |
| 221 PassOwnPtr<HighlightConfig> highlightConfigFromInspectorObject(ErrorString*, JSONObject* highlightInspectorObject); | 221 PassOwnPtr<HighlightConfig> highlightConfigFromInspectorObject(ErrorString*, JSONObject* highlightInspectorObject); |
| 222 | 222 |
| 223 // Node-related methods. | 223 // Node-related methods. |
| 224 typedef HashMap<RefPtr<Node>, int> NodeToIdMap; | 224 typedef WillBeHeapHashMap<RefPtrWillBeMember<Node>, int> NodeToIdMap; |
| 225 int bind(Node*, NodeToIdMap*); | 225 int bind(Node*, NodeToIdMap*); |
| 226 void unbind(Node*, NodeToIdMap*); | 226 void unbind(Node*, NodeToIdMap*); |
| 227 | 227 |
| 228 Node* assertEditableNode(ErrorString*, int nodeId); | 228 Node* assertEditableNode(ErrorString*, int nodeId); |
| 229 Element* assertEditableElement(ErrorString*, int nodeId); | 229 Element* assertEditableElement(ErrorString*, int nodeId); |
| 230 | 230 |
| 231 void inspect(Node*); | 231 void inspect(Node*); |
| 232 | 232 |
| 233 int pushNodePathToFrontend(Node*); | 233 int pushNodePathToFrontend(Node*); |
| 234 void pushChildNodesToFrontend(int nodeId, int depth = 1); | 234 void pushChildNodesToFrontend(int nodeId, int depth = 1); |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 251 | 251 |
| 252 void innerHighlightQuad(PassOwnPtr<FloatQuad>, const RefPtr<JSONObject>* col or, const RefPtr<JSONObject>* outlineColor); | 252 void innerHighlightQuad(PassOwnPtr<FloatQuad>, const RefPtr<JSONObject>* col or, const RefPtr<JSONObject>* outlineColor); |
| 253 | 253 |
| 254 bool pushDocumentUponHandlelessOperation(ErrorString*); | 254 bool pushDocumentUponHandlelessOperation(ErrorString*); |
| 255 | 255 |
| 256 InspectorPageAgent* m_pageAgent; | 256 InspectorPageAgent* m_pageAgent; |
| 257 InjectedScriptManager* m_injectedScriptManager; | 257 InjectedScriptManager* m_injectedScriptManager; |
| 258 InspectorOverlay* m_overlay; | 258 InspectorOverlay* m_overlay; |
| 259 InspectorFrontend::DOM* m_frontend; | 259 InspectorFrontend::DOM* m_frontend; |
| 260 DOMListener* m_domListener; | 260 DOMListener* m_domListener; |
| 261 NodeToIdMap m_documentNodeToIdMap; | 261 OwnPtrWillBePersistent<NodeToIdMap> m_documentNodeToIdMap; |
|
haraken
2014/06/06 07:17:04
I'm curious why you need to change this from NodeT
tkent
2014/06/06 07:59:45
I already explained it in the CL description.
| |
| 262 // Owns node mappings for dangling nodes. | 262 // Owns node mappings for dangling nodes. |
| 263 Vector<OwnPtr<NodeToIdMap> > m_danglingNodeToIdMaps; | 263 WillBePersistentHeapVector<OwnPtrWillBeMember<NodeToIdMap> > m_danglingNodeT oIdMaps; |
| 264 HashMap<int, Node*> m_idToNode; | 264 WillBePersistentHeapHashMap<int, RawPtrWillBeMember<Node> > m_idToNode; |
|
haraken
2014/06/06 07:17:04
I don't fully understand this map. Are you sure th
tkent
2014/06/06 07:59:45
This mapped Node is always in m_documentNodeToIdMa
| |
| 265 HashMap<int, NodeToIdMap*> m_idToNodesMap; | 265 WillBePersistentHeapHashMap<int, RawPtrWillBeMember<NodeToIdMap> > m_idToNod esMap; |
|
haraken
2014/06/06 07:17:04
Ditto. I couldn't find code to remove entries from
tkent
2014/06/06 07:59:45
Hmm, it seems we should clear m_idToNodesMap in In
yurys
2014/06/06 08:26:00
Looks like a bug to me. We should remove correspon
tkent
2014/06/06 08:26:07
Done.
| |
| 266 HashSet<int> m_childrenRequested; | 266 HashSet<int> m_childrenRequested; |
| 267 HashMap<int, int> m_cachedChildCount; | 267 HashMap<int, int> m_cachedChildCount; |
| 268 int m_lastNodeId; | 268 int m_lastNodeId; |
| 269 RefPtr<Document> m_document; | 269 RefPtrWillBePersistent<Document> m_document; |
| 270 typedef HashMap<String, Vector<RefPtr<Node> > > SearchResults; | 270 typedef WillBePersistentHeapHashMap<String, WillBeHeapVector<RefPtrWillBeMem ber<Node> > > SearchResults; |
| 271 SearchResults m_searchResults; | 271 SearchResults m_searchResults; |
| 272 OwnPtr<RevalidateStyleAttributeTask> m_revalidateStyleAttrTask; | 272 OwnPtr<RevalidateStyleAttributeTask> m_revalidateStyleAttrTask; |
| 273 SearchMode m_searchingForNode; | 273 SearchMode m_searchingForNode; |
| 274 OwnPtr<HighlightConfig> m_inspectModeHighlightConfig; | 274 OwnPtr<HighlightConfig> m_inspectModeHighlightConfig; |
| 275 OwnPtr<InspectorHistory> m_history; | 275 OwnPtr<InspectorHistory> m_history; |
| 276 OwnPtr<DOMEditor> m_domEditor; | 276 OwnPtr<DOMEditor> m_domEditor; |
| 277 bool m_suppressAttributeModifiedEvent; | 277 bool m_suppressAttributeModifiedEvent; |
| 278 Listener* m_listener; | 278 Listener* m_listener; |
| 279 }; | 279 }; |
| 280 | 280 |
| 281 | 281 |
| 282 } // namespace WebCore | 282 } // namespace WebCore |
| 283 | 283 |
| 284 #endif // !defined(InspectorDOMAgent_h) | 284 #endif // !defined(InspectorDOMAgent_h) |
| OLD | NEW |