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

Side by Side Diff: Source/core/inspector/InspectorDOMAgent.h

Issue 1311783003: Devtools[LayoutEditor]: Rework layout-editor workflow (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@resize
Patch Set: Created 5 years, 4 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) 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 void removeNode(ErrorString*, int nodeId) override; 116 void removeNode(ErrorString*, int nodeId) override;
117 void setNodeName(ErrorString*, int nodeId, const String& name, int* newId) o verride; 117 void setNodeName(ErrorString*, int nodeId, const String& name, int* newId) o verride;
118 void getOuterHTML(ErrorString*, int nodeId, WTF::String* outerHTML) override ; 118 void getOuterHTML(ErrorString*, int nodeId, WTF::String* outerHTML) override ;
119 void setOuterHTML(ErrorString*, int nodeId, const String& outerHTML) overrid e; 119 void setOuterHTML(ErrorString*, int nodeId, const String& outerHTML) overrid e;
120 void setNodeValue(ErrorString*, int nodeId, const String& value) override; 120 void setNodeValue(ErrorString*, int nodeId, const String& value) override;
121 void performSearch(ErrorString*, const String& whitespaceTrimmedQuery, const bool* includeUserAgentShadowDOM, String* searchId, int* resultCount) override; 121 void performSearch(ErrorString*, const String& whitespaceTrimmedQuery, const bool* includeUserAgentShadowDOM, String* searchId, int* resultCount) override;
122 void getSearchResults(ErrorString*, const String& searchId, int fromIndex, i nt toIndex, RefPtr<TypeBuilder::Array<int>>&) override; 122 void getSearchResults(ErrorString*, const String& searchId, int fromIndex, i nt toIndex, RefPtr<TypeBuilder::Array<int>>&) override;
123 void discardSearchResults(ErrorString*, const String& searchId) override; 123 void discardSearchResults(ErrorString*, const String& searchId) override;
124 void resolveNode(ErrorString*, int nodeId, const String* objectGroup, RefPtr <TypeBuilder::Runtime::RemoteObject>& result) override; 124 void resolveNode(ErrorString*, int nodeId, const String* objectGroup, RefPtr <TypeBuilder::Runtime::RemoteObject>& result) override;
125 void getAttributes(ErrorString*, int nodeId, RefPtr<TypeBuilder::Array<Strin g>>& result) override; 125 void getAttributes(ErrorString*, int nodeId, RefPtr<TypeBuilder::Array<Strin g>>& result) override;
126 void setInspectModeEnabled(ErrorString*, bool enabled, const bool* inspectUA ShadowDOM, const RefPtr<JSONObject>* highlightConfig) override; 126 void setInspectModeEnabled(ErrorString*, bool enabled, const String* mode, c onst RefPtr<JSONObject>* highlightConfig) override;
127 void requestNode(ErrorString*, const String& objectId, int* nodeId) override ; 127 void requestNode(ErrorString*, const String& objectId, int* nodeId) override ;
128 void pushNodeByPathToFrontend(ErrorString*, const String& path, int* nodeId) override; 128 void pushNodeByPathToFrontend(ErrorString*, const String& path, int* nodeId) override;
129 void pushNodesByBackendIdsToFrontend(ErrorString*, const RefPtr<JSONArray>& nodeIds, RefPtr<TypeBuilder::Array<int>>&) override; 129 void pushNodesByBackendIdsToFrontend(ErrorString*, const RefPtr<JSONArray>& nodeIds, RefPtr<TypeBuilder::Array<int>>&) override;
130 void setInspectedNode(ErrorString*, int nodeId) override; 130 void setInspectedNode(ErrorString*, int nodeId) override;
131 void hideHighlight(ErrorString*) override; 131 void hideHighlight(ErrorString*) override;
132 void highlightRect(ErrorString*, int x, int y, int width, int height, const RefPtr<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) override; 132 void highlightRect(ErrorString*, int x, int y, int width, int height, const RefPtr<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) override;
133 void highlightQuad(ErrorString*, const RefPtr<JSONArray>& quad, const RefPtr <JSONObject>* color, const RefPtr<JSONObject>* outlineColor) override; 133 void highlightQuad(ErrorString*, const RefPtr<JSONArray>& quad, const RefPtr <JSONObject>* color, const RefPtr<JSONObject>* outlineColor) override;
134 void highlightNode(ErrorString*, const RefPtr<JSONObject>& highlightConfig, const int* nodeId, const int* backendNodeId, const String* objectId) override; 134 void highlightNode(ErrorString*, const RefPtr<JSONObject>& highlightConfig, const int* nodeId, const int* backendNodeId, const String* objectId) override;
135 void highlightFrame(ErrorString*, const String& frameId, const RefPtr<JSONOb ject>* color, const RefPtr<JSONObject>* outlineColor) override; 135 void highlightFrame(ErrorString*, const String& frameId, const RefPtr<JSONOb ject>* color, const RefPtr<JSONObject>* outlineColor) override;
136 136
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 static String documentURLString(Document*); 175 static String documentURLString(Document*);
176 176
177 PassRefPtr<TypeBuilder::Runtime::RemoteObject> resolveNode(Node*, const Stri ng& objectGroup); 177 PassRefPtr<TypeBuilder::Runtime::RemoteObject> resolveNode(Node*, const Stri ng& objectGroup);
178 bool handleMousePress(); 178 bool handleMousePress();
179 bool handleGestureEvent(LocalFrame*, const PlatformGestureEvent&); 179 bool handleGestureEvent(LocalFrame*, const PlatformGestureEvent&);
180 bool handleTouchEvent(LocalFrame*, const PlatformTouchEvent&); 180 bool handleTouchEvent(LocalFrame*, const PlatformTouchEvent&);
181 bool handleMouseMove(LocalFrame*, const PlatformMouseEvent&); 181 bool handleMouseMove(LocalFrame*, const PlatformMouseEvent&);
182 182
183 InspectorHistory* history() { return m_history.get(); } 183 InspectorHistory* history() { return m_history.get(); }
184 184
185 void resumeSearchingForNode(Node*);
186
185 // We represent embedded doms as a part of the same hierarchy. Hence we trea t children of frame owners differently. 187 // We represent embedded doms as a part of the same hierarchy. Hence we trea t children of frame owners differently.
186 // We also skip whitespace text nodes conditionally. Following methods encap sulate these specifics. 188 // We also skip whitespace text nodes conditionally. Following methods encap sulate these specifics.
187 static Node* innerFirstChild(Node*); 189 static Node* innerFirstChild(Node*);
188 static Node* innerNextSibling(Node*); 190 static Node* innerNextSibling(Node*);
189 static Node* innerPreviousSibling(Node*); 191 static Node* innerPreviousSibling(Node*);
190 static unsigned innerChildNodeCount(Node*); 192 static unsigned innerChildNodeCount(Node*);
191 static Node* innerParentNode(Node*); 193 static Node* innerParentNode(Node*);
192 static bool isWhitespace(Node*); 194 static bool isWhitespace(Node*);
193 195
194 Node* assertNode(ErrorString*, int nodeId); 196 Node* assertNode(ErrorString*, int nodeId);
195 Element* assertElement(ErrorString*, int nodeId); 197 Element* assertElement(ErrorString*, int nodeId);
196 Document* assertDocument(ErrorString*, int nodeId); 198 Document* assertDocument(ErrorString*, int nodeId);
197 199
198 private: 200 private:
199 enum SearchMode { NotSearching, SearchingForNormal, SearchingForUAShadow }; 201 enum SearchMode { NotSearching, SearchingForNormal, SearchingForUAShadow, Se archingInLayoutEditor };
200 202
201 InspectorDOMAgent(InspectorPageAgent*, InjectedScriptManager*, InspectorOver lay*); 203 InspectorDOMAgent(InspectorPageAgent*, InjectedScriptManager*, InspectorOver lay*);
202 204
203 void setDocument(Document*); 205 void setDocument(Document*);
204 void innerEnable(); 206 void innerEnable();
205 207
206 void setSearchingForNode(ErrorString*, SearchMode, JSONObject* highlightConf ig); 208 void setSearchingForNode(ErrorString*, SearchMode, JSONObject* highlightConf ig);
207 PassOwnPtr<InspectorHighlightConfig> highlightConfigFromInspectorObject(Erro rString*, JSONObject* highlightInspectorObject); 209 PassOwnPtr<InspectorHighlightConfig> highlightConfigFromInspectorObject(Erro rString*, JSONObject* highlightInspectorObject);
208 210
209 // Node-related methods. 211 // Node-related methods.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 typedef WillBeHeapHashMap<String, WillBeHeapVector<RefPtrWillBeMember<Node> > > SearchResults; 257 typedef WillBeHeapHashMap<String, WillBeHeapVector<RefPtrWillBeMember<Node> > > SearchResults;
256 SearchResults m_searchResults; 258 SearchResults m_searchResults;
257 OwnPtrWillBeMember<InspectorRevalidateDOMTask> m_revalidateTask; 259 OwnPtrWillBeMember<InspectorRevalidateDOMTask> m_revalidateTask;
258 SearchMode m_searchingForNode; 260 SearchMode m_searchingForNode;
259 OwnPtr<InspectorHighlightConfig> m_inspectModeHighlightConfig; 261 OwnPtr<InspectorHighlightConfig> m_inspectModeHighlightConfig;
260 RefPtrWillBeMember<Node> m_hoveredNodeForInspectMode; 262 RefPtrWillBeMember<Node> m_hoveredNodeForInspectMode;
261 OwnPtrWillBeMember<InspectorHistory> m_history; 263 OwnPtrWillBeMember<InspectorHistory> m_history;
262 OwnPtrWillBeMember<DOMEditor> m_domEditor; 264 OwnPtrWillBeMember<DOMEditor> m_domEditor;
263 bool m_suppressAttributeModifiedEvent; 265 bool m_suppressAttributeModifiedEvent;
264 int m_backendNodeIdToInspect; 266 int m_backendNodeIdToInspect;
267 bool m_searchingInLayoutEditorPaused;
pfeldman 2015/08/24 23:18:13 m_layoutEditorEnabled
265 }; 268 };
266 269
267 270
268 } // namespace blink 271 } // namespace blink
269 272
270 #endif // !defined(InspectorDOMAgent_h) 273 #endif // !defined(InspectorDOMAgent_h)
OLDNEW
« no previous file with comments | « no previous file | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | Source/core/inspector/InspectorOverlayPage.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698