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

Patch by Johnson Zhou <qiaosong_zhou@apple.com> 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:

Canonical link: https://commits.webkit.org/239979@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
jszhou-apple authored and webkit-commit-queue committed Jul 27, 2021
1 parent 34b3828 commit d6d0a694bc567d11faf1909efb4ad066bcb34519
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
@@ -1,3 +1,18 @@
2021-07-26 Johnson Zhou <qiaosong_zhou@apple.com>

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 <jya@apple.com>

Video pauses after scrubbing with Touch Bar
@@ -42,7 +42,7 @@ class FormDataEvent : public Event {
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&&);
@@ -43,11 +43,11 @@ DOMFormData::DOMFormData(const TextEncoding& encoding)

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 @@ Ref<DOMFormData> DOMFormData::create(const TextEncoding& encoding)
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;
@@ -30,16 +30,15 @@

#pragma once

#include "ExceptionOr.h"
#include "File.h"
#include "FormState.h"
#include "TextEncoding.h"
#include <wtf/RefCounted.h>
#include <wtf/Variant.h>
#include <wtf/text/WTFString.h>

namespace WebCore {

template<typename> class ExceptionOr;
class HTMLFormElement;

class DOMFormData : public RefCounted<DOMFormData> {
@@ -65,7 +64,7 @@ class DOMFormData : public RefCounted<DOMFormData> {
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:

0 comments on commit d6d0a69

Please sign in to comment.