mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-25 05:55:13 +00:00
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.
35 lines
551 B
C++
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&);
|
|
|
|
}
|