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

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

Issue 176853004: Oilpan: move core/fileapi to oilpan's heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 9 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
« no previous file with comments | « Source/core/html/forms/InputType.cpp ('k') | Source/core/loader/FormSubmission.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 void InspectorDOMAgent::setFileInputFiles(ErrorString* errorString, int nodeId, const RefPtr<JSONArray>& files) 1321 void InspectorDOMAgent::setFileInputFiles(ErrorString* errorString, int nodeId, const RefPtr<JSONArray>& files)
1322 { 1322 {
1323 Node* node = assertNode(errorString, nodeId); 1323 Node* node = assertNode(errorString, nodeId);
1324 if (!node) 1324 if (!node)
1325 return; 1325 return;
1326 if (!node->hasTagName(inputTag) || !toHTMLInputElement(node)->isFileUpload() ) { 1326 if (!node->hasTagName(inputTag) || !toHTMLInputElement(node)->isFileUpload() ) {
1327 *errorString = "Node is not a file input element"; 1327 *errorString = "Node is not a file input element";
1328 return; 1328 return;
1329 } 1329 }
1330 1330
1331 RefPtr<FileList> fileList = FileList::create(); 1331 RefPtrWillBeRawPtr<FileList> fileList = FileList::create();
1332 for (JSONArray::const_iterator iter = files->begin(); iter != files->end(); ++iter) { 1332 for (JSONArray::const_iterator iter = files->begin(); iter != files->end(); ++iter) {
1333 String path; 1333 String path;
1334 if (!(*iter)->asString(&path)) { 1334 if (!(*iter)->asString(&path)) {
1335 *errorString = "Files must be strings"; 1335 *errorString = "Files must be strings";
1336 return; 1336 return;
1337 } 1337 }
1338 fileList->append(File::create(path)); 1338 fileList->append(File::create(path));
1339 } 1339 }
1340 toHTMLInputElement(node)->setFiles(fileList); 1340 toHTMLInputElement(node)->setFiles(fileList);
1341 } 1341 }
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
2051 if (!m_documentNodeToIdMap.contains(m_document)) { 2051 if (!m_documentNodeToIdMap.contains(m_document)) {
2052 RefPtr<TypeBuilder::DOM::Node> root; 2052 RefPtr<TypeBuilder::DOM::Node> root;
2053 getDocument(errorString, root); 2053 getDocument(errorString, root);
2054 return errorString->isEmpty(); 2054 return errorString->isEmpty();
2055 } 2055 }
2056 return true; 2056 return true;
2057 } 2057 }
2058 2058
2059 } // namespace WebCore 2059 } // namespace WebCore
2060 2060
OLDNEW
« no previous file with comments | « Source/core/html/forms/InputType.cpp ('k') | Source/core/loader/FormSubmission.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698