mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 03:29:49 +00:00
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.
This commit is contained in:
parent
19529590b9
commit
daca9f5995
Notes:
github-actions[bot]
2025-03-20 08:02:26 +00:00
Author: https://github.com/trflynn89
Commit: daca9f5995
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4006
Reviewed-by: https://github.com/gmta ✅
18 changed files with 287 additions and 276 deletions
35
Libraries/LibWebView/DOMNodeProperties.h
Normal file
35
Libraries/LibWebView/DOMNodeProperties.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* 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&);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue