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

Unified Diff: Source/core/html/forms/FileInputType.cpp

Issue 72683003: Auto-generate InputTypeNames source from InputTypeNames.in. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/forms/FileInputType.cpp
diff --git a/Source/core/html/forms/FileInputType.cpp b/Source/core/html/forms/FileInputType.cpp
index 0a2975f659f4e091aa319a69f10a21df8d97aa65..8b9b694c59920531457f692f538353fd282f3678 100644
--- a/Source/core/html/forms/FileInputType.cpp
+++ b/Source/core/html/forms/FileInputType.cpp
@@ -23,6 +23,7 @@
#include "core/html/forms/FileInputType.h"
#include "HTMLNames.h"
+#include "InputTypeNames.h"
#include "RuntimeEnabledFeatures.h"
#include "bindings/v8/ExceptionStatePlaceholder.h"
#include "core/dom/shadow/ShadowRoot.h"
@@ -32,7 +33,6 @@
#include "core/html/FormDataList.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/forms/FormController.h"
-#include "core/html/forms/InputTypeNames.h"
#include "core/page/Chrome.h"
#include "core/page/DragData.h"
#include "core/rendering/RenderFileUploadControl.h"
@@ -73,7 +73,7 @@ Vector<FileChooserFileInfo> FileInputType::filesFromFormControlState(const FormC
const AtomicString& FileInputType::formControlType() const
{
- return InputTypeNames::file();
+ return InputTypeNames::file;
}
FormControlState FileInputType::saveFormControlState() const
@@ -248,7 +248,7 @@ void FileInputType::createShadowSubtree()
{
ASSERT(element().shadow());
RefPtr<HTMLInputElement> button = HTMLInputElement::create(element().document(), 0, false);
- button->setType(InputTypeNames::button());
+ button->setType(InputTypeNames::button);
button->setAttribute(valueAttr, locale().queryString(element().multiple() ? WebLocalizedString::FileButtonChooseMultipleFilesLabel : WebLocalizedString::FileButtonChooseFileLabel));
button->setPart(AtomicString("-webkit-file-upload-button", AtomicString::ConstructFromLiteral));
element().userAgentShadowRoot()->appendChild(button.release());

Powered by Google App Engine
This is Rietveld 408576698