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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 virtual void setNodeName(ErrorString*, int nodeId, const String& name, int*
newId) OVERRIDE; | 124 virtual void setNodeName(ErrorString*, int nodeId, const String& name, int*
newId) OVERRIDE; |
125 virtual void getOuterHTML(ErrorString*, int nodeId, WTF::String* outerHTML)
OVERRIDE; | 125 virtual void getOuterHTML(ErrorString*, int nodeId, WTF::String* outerHTML)
OVERRIDE; |
126 virtual void setOuterHTML(ErrorString*, int nodeId, const String& outerHTML)
OVERRIDE; | 126 virtual void setOuterHTML(ErrorString*, int nodeId, const String& outerHTML)
OVERRIDE; |
127 virtual void setNodeValue(ErrorString*, int nodeId, const String& value) OVE
RRIDE; | 127 virtual void setNodeValue(ErrorString*, int nodeId, const String& value) OVE
RRIDE; |
128 virtual void getEventListenersForNode(ErrorString*, int nodeId, const WTF::S
tring* objectGroup, RefPtr<TypeBuilder::Array<TypeBuilder::DOM::EventListener> >
& listenersArray) OVERRIDE; | 128 virtual void getEventListenersForNode(ErrorString*, int nodeId, const WTF::S
tring* objectGroup, RefPtr<TypeBuilder::Array<TypeBuilder::DOM::EventListener> >
& listenersArray) OVERRIDE; |
129 virtual void performSearch(ErrorString*, const String& whitespaceTrimmedQuer
y, String* searchId, int* resultCount) OVERRIDE; | 129 virtual void performSearch(ErrorString*, const String& whitespaceTrimmedQuer
y, String* searchId, int* resultCount) OVERRIDE; |
130 virtual void getSearchResults(ErrorString*, const String& searchId, int from
Index, int toIndex, RefPtr<TypeBuilder::Array<int> >&) OVERRIDE; | 130 virtual void getSearchResults(ErrorString*, const String& searchId, int from
Index, int toIndex, RefPtr<TypeBuilder::Array<int> >&) OVERRIDE; |
131 virtual void discardSearchResults(ErrorString*, const String& searchId) OVER
RIDE; | 131 virtual void discardSearchResults(ErrorString*, const String& searchId) OVER
RIDE; |
132 virtual void resolveNode(ErrorString*, int nodeId, const String* objectGroup
, RefPtr<TypeBuilder::Runtime::RemoteObject>& result) OVERRIDE; | 132 virtual void resolveNode(ErrorString*, int nodeId, const String* objectGroup
, RefPtr<TypeBuilder::Runtime::RemoteObject>& result) OVERRIDE; |
133 virtual void getAttributes(ErrorString*, int nodeId, RefPtr<TypeBuilder::Arr
ay<String> >& result) OVERRIDE; | 133 virtual void getAttributes(ErrorString*, int nodeId, RefPtr<TypeBuilder::Arr
ay<String> >& result) OVERRIDE; |
134 virtual void setInspectModeEnabled(ErrorString*, bool enabled, const bool* i
nspectShadowDOM, const RefPtr<JSONObject>* highlightConfig) OVERRIDE; | 134 virtual void setInspectModeEnabled(ErrorString*, bool enabled, const bool* i
nspectUAShadowDOM, const RefPtr<JSONObject>* highlightConfig) OVERRIDE; |
135 virtual void requestNode(ErrorString*, const String& objectId, int* nodeId)
OVERRIDE; | 135 virtual void requestNode(ErrorString*, const String& objectId, int* nodeId)
OVERRIDE; |
136 virtual void pushNodeByPathToFrontend(ErrorString*, const String& path, int*
nodeId) OVERRIDE; | 136 virtual void pushNodeByPathToFrontend(ErrorString*, const String& path, int*
nodeId) OVERRIDE; |
137 virtual void pushNodesByBackendIdsToFrontend(ErrorString*, const RefPtr<JSON
Array>& nodeIds, RefPtr<TypeBuilder::Array<int> >&) OVERRIDE; | 137 virtual void pushNodesByBackendIdsToFrontend(ErrorString*, const RefPtr<JSON
Array>& nodeIds, RefPtr<TypeBuilder::Array<int> >&) OVERRIDE; |
138 virtual void releaseBackendNodeIds(ErrorString*, const String& nodeGroup) OV
ERRIDE; | 138 virtual void releaseBackendNodeIds(ErrorString*, const String& nodeGroup) OV
ERRIDE; |
139 virtual void hideHighlight(ErrorString*) OVERRIDE; | 139 virtual void hideHighlight(ErrorString*) OVERRIDE; |
140 virtual void highlightRect(ErrorString*, int x, int y, int width, int height
, const RefPtr<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERR
IDE; | 140 virtual void highlightRect(ErrorString*, int x, int y, int width, int height
, const RefPtr<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERR
IDE; |
141 virtual void highlightQuad(ErrorString*, const RefPtr<JSONArray>& quad, cons
t RefPtr<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERRIDE; | 141 virtual void highlightQuad(ErrorString*, const RefPtr<JSONArray>& quad, cons
t RefPtr<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERRIDE; |
142 virtual void highlightNode(ErrorString*, const RefPtr<JSONObject>& highlight
Config, const int* nodeId, const String* objectId) OVERRIDE; | 142 virtual void highlightNode(ErrorString*, const RefPtr<JSONObject>& highlight
Config, const int* nodeId, const String* objectId) OVERRIDE; |
143 virtual void highlightFrame(ErrorString*, const String& frameId, const RefPt
r<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERRIDE; | 143 virtual void highlightFrame(ErrorString*, const String& frameId, const RefPt
r<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERRIDE; |
144 | 144 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 static Node* innerPreviousSibling(Node*); | 198 static Node* innerPreviousSibling(Node*); |
199 static unsigned innerChildNodeCount(Node*); | 199 static unsigned innerChildNodeCount(Node*); |
200 static Node* innerParentNode(Node*); | 200 static Node* innerParentNode(Node*); |
201 static bool isWhitespace(Node*); | 201 static bool isWhitespace(Node*); |
202 | 202 |
203 Node* assertNode(ErrorString*, int nodeId); | 203 Node* assertNode(ErrorString*, int nodeId); |
204 Element* assertElement(ErrorString*, int nodeId); | 204 Element* assertElement(ErrorString*, int nodeId); |
205 Document* assertDocument(ErrorString*, int nodeId); | 205 Document* assertDocument(ErrorString*, int nodeId); |
206 | 206 |
207 private: | 207 private: |
208 enum SearchMode { NotSearching, SearchingForNormal, SearchingForShadow }; | 208 enum SearchMode { NotSearching, SearchingForNormal, SearchingForUAShadow }; |
209 | 209 |
210 InspectorDOMAgent(InspectorPageAgent*, InjectedScriptManager*, InspectorOver
lay*); | 210 InspectorDOMAgent(InspectorPageAgent*, InjectedScriptManager*, InspectorOver
lay*); |
211 | 211 |
212 void setSearchingForNode(ErrorString*, SearchMode, JSONObject* highlightConf
ig); | 212 void setSearchingForNode(ErrorString*, SearchMode, JSONObject* highlightConf
ig); |
213 PassOwnPtr<HighlightConfig> highlightConfigFromInspectorObject(ErrorString*,
JSONObject* highlightInspectorObject); | 213 PassOwnPtr<HighlightConfig> highlightConfigFromInspectorObject(ErrorString*,
JSONObject* highlightInspectorObject); |
214 | 214 |
215 // Node-related methods. | 215 // Node-related methods. |
216 typedef HashMap<RefPtr<Node>, int> NodeToIdMap; | 216 typedef HashMap<RefPtr<Node>, int> NodeToIdMap; |
217 int bind(Node*, NodeToIdMap*); | 217 int bind(Node*, NodeToIdMap*); |
218 void unbind(Node*, NodeToIdMap*); | 218 void unbind(Node*, NodeToIdMap*); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 OwnPtr<HighlightConfig> m_inspectModeHighlightConfig; | 272 OwnPtr<HighlightConfig> m_inspectModeHighlightConfig; |
273 OwnPtr<InspectorHistory> m_history; | 273 OwnPtr<InspectorHistory> m_history; |
274 OwnPtr<DOMEditor> m_domEditor; | 274 OwnPtr<DOMEditor> m_domEditor; |
275 bool m_suppressAttributeModifiedEvent; | 275 bool m_suppressAttributeModifiedEvent; |
276 }; | 276 }; |
277 | 277 |
278 | 278 |
279 } // namespace WebCore | 279 } // namespace WebCore |
280 | 280 |
281 #endif // !defined(InspectorDOMAgent_h) | 281 #endif // !defined(InspectorDOMAgent_h) |
OLD | NEW |