Title: [280332] trunk/Source/WebCore
Revision
280332
Author
[email protected]
Date
2021-07-26 17:37:07 -0700 (Mon, 26 Jul 2021)

Log Message

This is responding to feedback on r280310.
https://bugs.webkit.org/show_bug.cgi?id=227718

Patch by Johnson Zhou <[email protected]> on 2021-07-26
Reviewed by Alex Christensen.

* dom/FormDataEvent.h:
(WebCore::FormDataEvent::formData const):
* html/DOMFormData.cpp:
(WebCore::DOMFormData::create):
(WebCore::DOMFormData::clone const):
(WebCore::DOMFormData::clone): Deleted.
* html/DOMFormData.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (280331 => 280332)


--- trunk/Source/WebCore/ChangeLog	2021-07-27 00:34:11 UTC (rev 280331)
+++ trunk/Source/WebCore/ChangeLog	2021-07-27 00:37:07 UTC (rev 280332)
@@ -1,3 +1,18 @@
+2021-07-26  Johnson Zhou  <[email protected]>
+
+        This is responding to feedback on r280310.
+        https://bugs.webkit.org/show_bug.cgi?id=227718
+
+        Reviewed by Alex Christensen.
+
+        * dom/FormDataEvent.h:
+        (WebCore::FormDataEvent::formData const):
+        * html/DOMFormData.cpp:
+        (WebCore::DOMFormData::create):
+        (WebCore::DOMFormData::clone const):
+        (WebCore::DOMFormData::clone): Deleted.
+        * html/DOMFormData.h:
+
 2021-07-26  Jean-Yves Avenard  <[email protected]>
 
         Video pauses after scrubbing with Touch Bar

Modified: trunk/Source/WebCore/dom/FormDataEvent.h (280331 => 280332)


--- trunk/Source/WebCore/dom/FormDataEvent.h	2021-07-27 00:34:11 UTC (rev 280331)
+++ trunk/Source/WebCore/dom/FormDataEvent.h	2021-07-27 00:37:07 UTC (rev 280332)
@@ -42,7 +42,7 @@
     static Ref<FormDataEvent> create(const AtomString&, Init&&);
     static Ref<FormDataEvent> create(const AtomString&, CanBubble, IsCancelable, IsComposed, Ref<DOMFormData>&&);
 
-    DOMFormData& formData() const { return m_formData.get(); }
+    const DOMFormData& formData() const { return m_formData.get(); }
     
 private:
     FormDataEvent(const AtomString&, Init&&);

Modified: trunk/Source/WebCore/html/DOMFormData.cpp (280331 => 280332)


--- trunk/Source/WebCore/html/DOMFormData.cpp	2021-07-27 00:34:11 UTC (rev 280331)
+++ trunk/Source/WebCore/html/DOMFormData.cpp	2021-07-27 00:37:07 UTC (rev 280332)
@@ -43,11 +43,11 @@
 
 ExceptionOr<Ref<DOMFormData>> DOMFormData::create(HTMLFormElement* form)
 {
-    auto domFormData = adoptRef(*new DOMFormData());
+    auto formData = adoptRef(*new DOMFormData);
     if (!form)
-        return domFormData;
+        return WTFMove(formData);
     
-    auto result = form->constructEntryList(WTFMove(domFormData), nullptr, HTMLFormElement::IsMultipartForm::Yes);
+    auto result = form->constructEntryList(WTFMove(formData), nullptr, HTMLFormElement::IsMultipartForm::Yes);
     
     if (!result)
         return Exception { InvalidStateError, "Already constructing Form entry list."_s };
@@ -60,7 +60,7 @@
     return adoptRef(*new DOMFormData(encoding));
 }
 
-Ref<DOMFormData> DOMFormData::clone()
+Ref<DOMFormData> DOMFormData::clone() const
 {
     auto newFormData = adoptRef(*new DOMFormData(this->encoding()));
     newFormData->m_items = m_items;

Modified: trunk/Source/WebCore/html/DOMFormData.h (280331 => 280332)


--- trunk/Source/WebCore/html/DOMFormData.h	2021-07-27 00:34:11 UTC (rev 280331)
+++ trunk/Source/WebCore/html/DOMFormData.h	2021-07-27 00:37:07 UTC (rev 280332)
@@ -30,9 +30,7 @@
 
 #pragma once
 
-#include "ExceptionOr.h"
 #include "File.h"
-#include "FormState.h"
 #include "TextEncoding.h"
 #include <wtf/RefCounted.h>
 #include <wtf/Variant.h>
@@ -40,6 +38,7 @@
 
 namespace WebCore {
 
+template<typename> class ExceptionOr;
 class HTMLFormElement;
 
 class DOMFormData : public RefCounted<DOMFormData> {
@@ -65,7 +64,7 @@
     bool has(const String& name);
     void set(const String& name, const String& value);
     void set(const String& name, Blob&, const String& filename = { });
-    Ref<DOMFormData> clone();
+    Ref<DOMFormData> clone() const;
 
     class Iterator {
     public:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to