From a83668d8380eaaf8aee69eb8d7f645a27a3fc3f4 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Mon, 28 Aug 2023 17:38:05 +0200 Subject: [PATCH] LibWeb: Move XHR::FormDataEntry to its own header This avoids a circular dependency in a future commit --- Userland/Libraries/LibWeb/XHR/FormData.h | 9 +------ Userland/Libraries/LibWeb/XHR/FormDataEntry.h | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 Userland/Libraries/LibWeb/XHR/FormDataEntry.h diff --git a/Userland/Libraries/LibWeb/XHR/FormData.h b/Userland/Libraries/LibWeb/XHR/FormData.h index 893f5a1d53..4660a208dd 100644 --- a/Userland/Libraries/LibWeb/XHR/FormData.h +++ b/Userland/Libraries/LibWeb/XHR/FormData.h @@ -11,17 +11,10 @@ #include #include #include +#include namespace Web::XHR { -// https://xhr.spec.whatwg.org/#formdataentryvalue -using FormDataEntryValue = Variant, String>; - -struct FormDataEntry { - String name; - FormDataEntryValue value; -}; - // https://xhr.spec.whatwg.org/#interface-formdata class FormData : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(FormData, Bindings::PlatformObject); diff --git a/Userland/Libraries/LibWeb/XHR/FormDataEntry.h b/Userland/Libraries/LibWeb/XHR/FormDataEntry.h new file mode 100644 index 0000000000..bb9974b97a --- /dev/null +++ b/Userland/Libraries/LibWeb/XHR/FormDataEntry.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2023, Kenneth Myhra + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include +#include +#include +#include + +namespace Web::XHR { + +// https://xhr.spec.whatwg.org/#formdataentryvalue +using FormDataEntryValue = Variant, String>; + +struct FormDataEntry { + String name; + FormDataEntryValue value; +}; + +}