Title: [171833] trunk/Source/WebCore
Revision
171833
Author
[email protected]
Date
2014-07-30 20:16:52 -0700 (Wed, 30 Jul 2014)

Log Message

Remove UploadButtonElement::shadowPseudoId()
https://bugs.webkit.org/show_bug.cgi?id=135435

Patch by Benjamin Poulain <[email protected]> on 2014-07-30
Reviewed by Andreas Kling.

Use the generic pseudo() path instead of a custom shadowPseudoId().

* html/FileInputType.cpp:
(WebCore::UploadButtonElement::create):
(WebCore::UploadButtonElement::createForMultiple):
(WebCore::UploadButtonElement::UploadButtonElement):
Set the type in the common constructor instead of the call sites.
(WebCore::UploadButtonElement::shadowPseudoId): Deleted.
* html/FileInputType.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (171832 => 171833)


--- trunk/Source/WebCore/ChangeLog	2014-07-31 03:16:05 UTC (rev 171832)
+++ trunk/Source/WebCore/ChangeLog	2014-07-31 03:16:52 UTC (rev 171833)
@@ -1,5 +1,22 @@
 2014-07-30  Benjamin Poulain  <[email protected]>
 
+        Remove UploadButtonElement::shadowPseudoId()
+        https://bugs.webkit.org/show_bug.cgi?id=135435
+
+        Reviewed by Andreas Kling.
+
+        Use the generic pseudo() path instead of a custom shadowPseudoId().
+
+        * html/FileInputType.cpp:
+        (WebCore::UploadButtonElement::create):
+        (WebCore::UploadButtonElement::createForMultiple):
+        (WebCore::UploadButtonElement::UploadButtonElement):
+        Set the type in the common constructor instead of the call sites.
+        (WebCore::UploadButtonElement::shadowPseudoId): Deleted.
+        * html/FileInputType.h:
+
+2014-07-30  Benjamin Poulain  <[email protected]>
+
         Remove SpinButtonElement::shadowPseudoId
         https://bugs.webkit.org/show_bug.cgi?id=135436
 

Modified: trunk/Source/WebCore/html/FileInputType.cpp (171832 => 171833)


--- trunk/Source/WebCore/html/FileInputType.cpp	2014-07-31 03:16:05 UTC (rev 171832)
+++ trunk/Source/WebCore/html/FileInputType.cpp	2014-07-31 03:16:52 UTC (rev 171833)
@@ -45,21 +45,18 @@
 
 using namespace HTMLNames;
 
-class UploadButtonElement : public HTMLInputElement {
+class UploadButtonElement final : public HTMLInputElement {
 public:
     static PassRefPtr<UploadButtonElement> create(Document&);
     static PassRefPtr<UploadButtonElement> createForMultiple(Document&);
 
 private:
     UploadButtonElement(Document&);
-
-    virtual const AtomicString& shadowPseudoId() const override;
 };
 
 PassRefPtr<UploadButtonElement> UploadButtonElement::create(Document& document)
 {
     RefPtr<UploadButtonElement> button = adoptRef(new UploadButtonElement(document));
-    button->setType("button");
     button->setValue(fileButtonChooseFileLabel());
     return button.release();
 }
@@ -67,7 +64,6 @@
 PassRefPtr<UploadButtonElement> UploadButtonElement::createForMultiple(Document& document)
 {
     RefPtr<UploadButtonElement> button = adoptRef(new UploadButtonElement(document));
-    button->setType("button");
     button->setValue(fileButtonChooseMultipleFilesLabel());
     return button.release();
 }
@@ -75,14 +71,10 @@
 UploadButtonElement::UploadButtonElement(Document& document)
     : HTMLInputElement(inputTag, document, 0, false)
 {
+    setType(ASCIILiteral("button"));
+    setPseudo(AtomicString("-webkit-file-upload-button", AtomicString::ConstructFromLiteral));
 }
 
-const AtomicString& UploadButtonElement::shadowPseudoId() const
-{
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, pseudoId, ("-webkit-file-upload-button", AtomicString::ConstructFromLiteral));
-    return pseudoId;
-}
-
 FileInputType::FileInputType(HTMLInputElement& element)
     : BaseClickableWithKeyInputType(element)
     , m_fileList(FileList::create())

Modified: trunk/Source/WebCore/html/FileInputType.h (171832 => 171833)


--- trunk/Source/WebCore/html/FileInputType.h	2014-07-31 03:16:05 UTC (rev 171832)
+++ trunk/Source/WebCore/html/FileInputType.h	2014-07-31 03:16:52 UTC (rev 171833)
@@ -43,7 +43,7 @@
 class FileList;
 class Icon;
 
-class FileInputType : public BaseClickableWithKeyInputType, private FileChooserClient, private FileIconLoaderClient {
+class FileInputType final : public BaseClickableWithKeyInputType, private FileChooserClient, private FileIconLoaderClient {
 public:
     explicit FileInputType(HTMLInputElement&);
     virtual ~FileInputType();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to