OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 fileList->append(File::createForUserProvidedFile(files[i].path, file
s[i].displayName)); | 235 fileList->append(File::createForUserProvidedFile(files[i].path, file
s[i].displayName)); |
236 } else { | 236 } else { |
237 fileList->append(File::createForFileSystemFile(files[i].fileSystemUR
L, files[i].metadata, File::IsUserVisible)); | 237 fileList->append(File::createForFileSystemFile(files[i].fileSystemUR
L, files[i].metadata, File::IsUserVisible)); |
238 } | 238 } |
239 } | 239 } |
240 return fileList; | 240 return fileList; |
241 } | 241 } |
242 | 242 |
243 void FileInputType::countUsage() | 243 void FileInputType::countUsage() |
244 { | 244 { |
245 // It is required by isPrivilegedContext() but isn't | 245 // It is required by isSecureContext() but isn't |
246 // actually used. This could be used later if a warning is shown in the | 246 // actually used. This could be used later if a warning is shown in the |
247 // developer console. | 247 // developer console. |
248 String insecureOriginMsg; | 248 String insecureOriginMsg; |
249 Document* document = &element().document(); | 249 Document* document = &element().document(); |
250 if (document->isPrivilegedContext(insecureOriginMsg)) | 250 if (document->isSecureContext(insecureOriginMsg)) |
251 UseCounter::count(*document, UseCounter::InputTypeFileInsecureOrigin); | 251 UseCounter::count(*document, UseCounter::InputTypeFileInsecureOrigin); |
252 else | 252 else |
253 UseCounter::count(*document, UseCounter::InputTypeFileSecureOrigin); | 253 UseCounter::count(*document, UseCounter::InputTypeFileSecureOrigin); |
254 } | 254 } |
255 | 255 |
256 void FileInputType::createShadowSubtree() | 256 void FileInputType::createShadowSubtree() |
257 { | 257 { |
258 ASSERT(element().shadow()); | 258 ASSERT(element().shadow()); |
259 RefPtrWillBeRawPtr<HTMLInputElement> button = HTMLInputElement::create(eleme
nt().document(), 0, false); | 259 RefPtrWillBeRawPtr<HTMLInputElement> button = HTMLInputElement::create(eleme
nt().document(), 0, false); |
260 button->setType(InputTypeNames::button); | 260 button->setType(InputTypeNames::button); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 StringBuilder names; | 376 StringBuilder names; |
377 for (size_t i = 0; i < listSize; ++i) { | 377 for (size_t i = 0; i < listSize; ++i) { |
378 names.append(fileList->item(i)->name()); | 378 names.append(fileList->item(i)->name()); |
379 if (i != listSize - 1) | 379 if (i != listSize - 1) |
380 names.append('\n'); | 380 names.append('\n'); |
381 } | 381 } |
382 return names.toString(); | 382 return names.toString(); |
383 } | 383 } |
384 | 384 |
385 } // namespace blink | 385 } // namespace blink |
OLD | NEW |