mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
LibDevTools+LibWebView: Implement getting document style sheets
This commit is contained in:
parent
cf601a49bb
commit
0b86bcfba7
Notes:
github-actions[bot]
2025-03-13 20:57:24 +00:00
Author: https://github.com/trflynn89
Commit: 0b86bcfba7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3920
10 changed files with 274 additions and 6 deletions
38
Libraries/LibDevTools/Actors/StyleSheetsActor.h
Normal file
38
Libraries/LibDevTools/Actors/StyleSheetsActor.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Tim Flynn <trflynn89@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <LibDevTools/Actor.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
namespace DevTools {
|
||||
|
||||
class StyleSheetsActor final : public Actor {
|
||||
public:
|
||||
static constexpr auto base_name = "style-sheets"sv;
|
||||
|
||||
static NonnullRefPtr<StyleSheetsActor> create(DevToolsServer&, String name, WeakPtr<TabActor>);
|
||||
virtual ~StyleSheetsActor() override;
|
||||
|
||||
void set_style_sheets(Vector<Web::CSS::StyleSheetIdentifier>);
|
||||
|
||||
private:
|
||||
StyleSheetsActor(DevToolsServer&, String name, WeakPtr<TabActor>);
|
||||
|
||||
virtual void handle_message(Message const&) override;
|
||||
|
||||
void style_sheet_source_received(Web::CSS::StyleSheetIdentifier const&, String source);
|
||||
|
||||
WeakPtr<TabActor> m_tab;
|
||||
|
||||
Vector<Web::CSS::StyleSheetIdentifier> m_style_sheets;
|
||||
HashMap<size_t, Message> m_pending_style_sheet_source_requests;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue