LibWebView: Add a storage tab to the Inspector to manage cookies

This adds a storage tab which contains just a cookie viewer for now. In
the future, storage like Local Storage and Indexed DB can be added here
as well.

In this patch, the cookie table is read-only.
This commit is contained in:
Timothy Flynn 2024-09-06 12:08:50 -04:00 committed by Andreas Kling
commit 3c5650f846
Notes: github-actions[bot] 2024-09-07 09:11:43 +00:00
5 changed files with 97 additions and 0 deletions

View file

@ -51,6 +51,8 @@ private:
String generate_accessibility_tree(JsonObject const&);
void select_node(i32 node_id);
void load_cookies();
void request_console_messages();
void handle_console_message(i32 message_index);
void handle_console_messages(i32 start_index, ReadonlySpan<ByteString> message_types, ReadonlySpan<ByteString> messages);
@ -82,6 +84,8 @@ private:
HashMap<int, Vector<Attribute>> m_dom_node_attributes;
Vector<Web::Cookie::Cookie> m_cookies;
i32 m_highest_notified_message_index { -1 };
i32 m_highest_received_message_index { -1 };
bool m_waiting_for_messages { false };