mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:27:45 +00:00
Browser+LibWeb+WebContent: Show style for pseudo-elements :^)
This expands the InspectorWidget::Selection to include an optional PseudoElement, which is then passed over IPC to request style information for it. As noted, this has some pretty big limitations because pseudo-elements don't have DOM nodes: - Declared style has to be recalculated when it's requested. - We don't display the computed style. - We don't display custom properties.
This commit is contained in:
parent
2c970b9516
commit
0326ad34df
9 changed files with 69 additions and 20 deletions
|
@ -2,6 +2,7 @@
|
|||
#include <LibCore/AnonymousBuffer.h>
|
||||
#include <LibGfx/ShareableBitmap.h>
|
||||
#include <LibWeb/CSS/PreferredColorScheme.h>
|
||||
#include <LibWeb/CSS/Selector.h>
|
||||
|
||||
endpoint WebContentServer
|
||||
{
|
||||
|
@ -29,7 +30,7 @@ endpoint WebContentServer
|
|||
debug_request(String request, String argument) =|
|
||||
get_source() =|
|
||||
inspect_dom_tree() =|
|
||||
inspect_dom_node(i32 node_id) => (bool has_style, String specified_style, String computed_style, String custom_properties, String node_box_sizing)
|
||||
inspect_dom_node(i32 node_id, Optional<Web::CSS::Selector::PseudoElement> pseudo_element) => (bool has_style, String specified_style, String computed_style, String custom_properties, String node_box_sizing)
|
||||
get_hovered_node_id() => (i32 node_id)
|
||||
js_console_input(String js_source) =|
|
||||
js_console_request_messages(i32 start_index) =|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue