ladybird/Libraries/LibWebView/DOMNodeProperties.h
Timothy Flynn daca9f5995 LibDevTools+LibWebView+WebContent: Selectively fetch DOM node properties
When we inspect a DOM node, we currently serialize many properties for
that node, including its layout, computed style, used fonts, etc. Now
that we aren't piggy-backing on the Inspector interface, we can instead
only serialize the specific information required by DevTools.
2025-03-20 09:01:26 +01:00

35 lines
551 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>
namespace WebView {
struct DOMNodeProperties {
enum class Type {
ComputedStyle,
Layout,
UsedFonts,
};
Type type { Type::ComputedStyle };
JsonValue properties;
};
}
namespace IPC {
template<>
ErrorOr<void> encode(Encoder&, WebView::DOMNodeProperties const&);
template<>
ErrorOr<WebView::DOMNodeProperties> decode(Decoder&);
}