1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:07:35 +00:00

LibWeb: Rename XHR's ReadyState / m_ready_state to just State / m_state

This is what the spec calls it.
This commit is contained in:
Linus Groh 2022-11-13 13:55:40 +00:00
parent 7649feb26f
commit 04eaff3bb4
2 changed files with 24 additions and 27 deletions

View file

@ -30,7 +30,7 @@ class XMLHttpRequest final : public XMLHttpRequestEventTarget {
WEB_PLATFORM_OBJECT(XMLHttpRequest, XMLHttpRequestEventTarget);
public:
enum class ReadyState : u16 {
enum class State : u16 {
Unsent = 0,
Opened = 1,
HeadersReceived = 2,
@ -42,7 +42,7 @@ public:
virtual ~XMLHttpRequest() override;
ReadyState ready_state() const { return m_ready_state; };
State ready_state() const { return m_state; };
Fetch::Infrastructure::Status status() const { return m_status; };
WebIDL::ExceptionOr<String> response_text() const;
WebIDL::ExceptionOr<JS::Value> response();
@ -72,7 +72,6 @@ private:
virtual void visit_edges(Cell::Visitor&) override;
virtual bool must_survive_garbage_collection() const override;
void set_ready_state(ReadyState);
void set_status(Fetch::Infrastructure::Status status) { m_status = status; }
void fire_progress_event(String const&, u64, u64);
@ -86,7 +85,7 @@ private:
JS::NonnullGCPtr<HTML::Window> m_window;
ReadyState m_ready_state { ReadyState::Unsent };
State m_state { State::Unsent };
Fetch::Infrastructure::Status m_status { 0 };
bool m_send { false };
u32 m_timeout { 0 };