Changeset 161380 in webkit
- Timestamp:
- Jan 6, 2014 3:35:52 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r161379 r161380 1 2014-01-06 Seokju Kwon <seokju@webkit.org> 2 3 Web Inspector: Get rid of DOM.setFileInputFiles from Protocol 4 https://bugs.webkit.org/show_bug.cgi?id=126312 5 6 Reviewed by Joseph Pecoraro. 7 8 * inspector-protocol/dom/setFileInputFiles-expected.txt: Removed. 9 * inspector-protocol/dom/setFileInputFiles.html: Removed. 10 1 11 2014-01-06 Brent Fulgham <bfulgham@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r161378 r161380 1 2014-01-06 Seokju Kwon <seokju@webkit.org> 2 3 Web Inspector: Get rid of DOM.setFileInputFiles from Protocol 4 https://bugs.webkit.org/show_bug.cgi?id=126312 5 6 Reviewed by Joseph Pecoraro. 7 8 No new tests, No changes in behavior. 9 10 It is a dead code as all ports in WebKit don't support it. 11 And this patch removes all things related to DOM.setFileInputFiles in Frontend. 12 13 * inspector/InspectorClient.h: 14 * inspector/InspectorController.cpp: 15 (WebCore::InspectorController::InspectorController): 16 * inspector/InspectorDOMAgent.cpp: 17 (WebCore::InspectorDOMAgent::InspectorDOMAgent): 18 * inspector/InspectorDOMAgent.h: 19 (WebCore::InspectorDOMAgent::create): 20 * inspector/protocol/DOM.json: 21 1 22 2014-01-06 Brent Fulgham <bfulgham@apple.com> 2 23 -
trunk/Source/WebCore/inspector/InspectorClient.h
r160457 r161380 96 96 virtual bool handleJavaScriptDialog(bool, const String*) { return false; } 97 97 98 virtual bool canSetFileInputFiles() { return false; }99 100 98 static bool doDispatchMessageOnFrontendPage(Page* frontendPage, const String& message); 101 99 }; -
trunk/Source/WebCore/inspector/InspectorController.cpp
r160946 r161380 102 102 m_agents.append(pageAgentPtr.release()); 103 103 104 OwnPtr<InspectorDOMAgent> domAgentPtr(InspectorDOMAgent::create(m_instrumentingAgents.get(), pageAgent, m_injectedScriptManager.get(), m_overlay.get() , inspectorClient));104 OwnPtr<InspectorDOMAgent> domAgentPtr(InspectorDOMAgent::create(m_instrumentingAgents.get(), pageAgent, m_injectedScriptManager.get(), m_overlay.get())); 105 105 m_domAgent = domAgentPtr.get(); 106 106 m_agents.append(domAgentPtr.release()); -
trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp
r160955 r161380 58 58 #include "EventNames.h" 59 59 #include "EventTarget.h" 60 #include "File.h"61 #include "FileList.h"62 60 #include "FrameTree.h" 63 61 #include "HTMLElement.h" 64 62 #include "HTMLFrameOwnerElement.h" 65 #include "HTMLInputElement.h"66 63 #include "HTMLNames.h" 67 64 #include "HTMLTemplateElement.h" … … 69 66 #include "IdentifiersFactory.h" 70 67 #include "InjectedScriptManager.h" 71 #include "InspectorClient.h"72 68 #include "InspectorHistory.h" 73 69 #include "InspectorNodeFinder.h" … … 214 210 } 215 211 216 InspectorDOMAgent::InspectorDOMAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay , InspectorClient* client)212 InspectorDOMAgent::InspectorDOMAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay) 217 213 : InspectorAgentBase(ASCIILiteral("DOM"), instrumentingAgents) 218 214 , m_pageAgent(pageAgent) 219 215 , m_injectedScriptManager(injectedScriptManager) 220 216 , m_overlay(overlay) 221 , m_client(client)222 217 , m_domListener(0) 223 218 , m_lastNodeId(1) … … 1189 1184 } 1190 1185 1191 void InspectorDOMAgent::setFileInputFiles(ErrorString* errorString, int nodeId, const RefPtr<InspectorArray>& files)1192 {1193 if (!m_client->canSetFileInputFiles()) {1194 *errorString = "Cannot set file input files";1195 return;1196 }1197 1198 Node* node = assertNode(errorString, nodeId);1199 if (!node)1200 return;1201 HTMLInputElement* element = node->toInputElement();1202 if (!element || !element->isFileUpload()) {1203 *errorString = "Node is not a file input element";1204 return;1205 }1206 1207 RefPtr<FileList> fileList = FileList::create();1208 for (InspectorArray::const_iterator iter = files->begin(); iter != files->end(); ++iter) {1209 String path;1210 if (!(*iter)->asString(&path)) {1211 *errorString = "Files must be strings";1212 return;1213 }1214 fileList->append(File::create(path));1215 }1216 element->setFiles(fileList);1217 }1218 1219 1186 void InspectorDOMAgent::resolveNode(ErrorString* errorString, int nodeId, const String* const objectGroup, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result) 1220 1187 { -
trunk/Source/WebCore/inspector/InspectorDOMAgent.h
r160955 r161380 62 62 class Element; 63 63 class Event; 64 class InspectorClient;65 64 class InspectorHistory; 66 65 class InspectorOverlay; … … 106 105 }; 107 106 108 static PassOwnPtr<InspectorDOMAgent> create(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay , InspectorClient* client)107 static PassOwnPtr<InspectorDOMAgent> create(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay) 109 108 { 110 return adoptPtr(new InspectorDOMAgent(instrumentingAgents, pageAgent, injectedScriptManager, overlay , client));109 return adoptPtr(new InspectorDOMAgent(instrumentingAgents, pageAgent, injectedScriptManager, overlay)); 111 110 } 112 111 … … 156 155 virtual void markUndoableState(ErrorString*); 157 156 virtual void focus(ErrorString*, int nodeId); 158 virtual void setFileInputFiles(ErrorString*, int nodeId, const RefPtr<Inspector::InspectorArray>& files);159 157 160 158 void getEventListeners(Node*, Vector<EventListenerInfo>& listenersArray, bool includeAncestors); … … 216 214 217 215 private: 218 InspectorDOMAgent(InstrumentingAgents*, InspectorPageAgent*, InjectedScriptManager*, InspectorOverlay* , InspectorClient*);216 InspectorDOMAgent(InstrumentingAgents*, InspectorPageAgent*, InjectedScriptManager*, InspectorOverlay*); 219 217 220 218 void setSearchingForNode(ErrorString*, bool enabled, Inspector::InspectorObject* highlightConfig); … … 251 249 InjectedScriptManager* m_injectedScriptManager; 252 250 InspectorOverlay* m_overlay; 253 InspectorClient* m_client;254 251 std::unique_ptr<Inspector::InspectorDOMFrontendDispatcher> m_frontendDispatcher; 255 252 RefPtr<Inspector::InspectorDOMBackendDispatcher> m_backendDispatcher; -
trunk/Source/WebCore/inspector/protocol/DOM.json
r160683 r161380 378 378 ], 379 379 "description": "Focuses the given element." 380 },381 {382 "name": "setFileInputFiles",383 "parameters": [384 { "name": "nodeId", "$ref": "NodeId", "description": "Id of the file input node to set files for." },385 { "name": "files", "type": "array", "items": { "type": "string" }, "description": "Array of file paths to set." }386 ],387 "description": "Sets files for the given file input element."388 380 } 389 381 ], -
trunk/Source/WebInspectorUI/ChangeLog
r160985 r161380 1 2014-01-06 Seokju Kwon <seokju@webkit.org> 2 3 Web Inspector: Get rid of DOM.setFileInputFiles from Protocol 4 https://bugs.webkit.org/show_bug.cgi?id=126312 5 6 Reviewed by Joseph Pecoraro. 7 8 Update InspectorWebBackendCommands.js after removing DOM.setFileInputFiles. 9 10 * UserInterface/InspectorWebBackendCommands.js: 11 1 12 2013-12-22 Martin Robinson <mrobinson@igalia.com> 2 13 -
trunk/Source/WebInspectorUI/UserInterface/InspectorWebBackendCommands.js
r160588 r161380 127 127 InspectorBackend.registerCommand("DOM.markUndoableState", [], []); 128 128 InspectorBackend.registerCommand("DOM.focus", [{"name": "nodeId", "type": "number", "optional": false}], []); 129 InspectorBackend.registerCommand("DOM.setFileInputFiles", [{"name": "nodeId", "type": "number", "optional": false}, {"name": "files", "type": "object", "optional": false}], []);130 129 131 130 // DOMDebugger.
Note: See TracChangeset
for help on using the changeset viewer.