ladybird/Libraries/LibWebView/DOMNodeProperties.h
Sam Atkins 52e1d30404 LibWeb+LibDevTools: Report applied style rules to Firefox
Collect the style rules that apply to an inspected element and expose
them through the existing DOM node inspection path. This gives Firefox's
Rules panel real rule forms instead of the previous empty getApplied
response.
2026-06-04 20:54:33 +01:00

37 lines
646 B
C++

/*
* Copyright (c) 2025, Tim Flynn <trflynn89@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/JsonValue.h>
#include <LibIPC/Forward.h>
#include <LibWebView/Forward.h>
namespace WebView {
struct WEBVIEW_API DOMNodeProperties {
enum class Type {
AppliedStyleRules,
ComputedStyle,
Layout,
UsedFonts,
};
Type type { Type::ComputedStyle };
JsonValue properties;
};
}
namespace IPC {
template<>
WEBVIEW_API ErrorOr<void> encode(Encoder&, WebView::DOMNodeProperties const&);
template<>
WEBVIEW_API ErrorOr<WebView::DOMNodeProperties> decode(Decoder&);
}