mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-21 09:41:53 +00:00
LibWebView: Display layouting information in devtools
Specifically, you can now see whether an element is visible, scrollable or creates a stacking context in the devtools.
This commit is contained in:
parent
0320494c3f
commit
d4d335ebda
Notes:
github-actions[bot]
2024-12-04 19:51:07 +00:00
Author: https://github.com/Psychpsyo
Commit: d4d335ebda
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2443
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/konradekk
2 changed files with 57 additions and 26 deletions
|
@ -1430,6 +1430,18 @@ void Node::serialize_tree_as_json(JsonObjectSerializer<StringBuilder>& object) c
|
|||
MUST(children.finish());
|
||||
}
|
||||
}
|
||||
|
||||
if (paintable_box()) {
|
||||
if (paintable_box()->is_scrollable()) {
|
||||
MUST(object.add("scrollable"sv, true));
|
||||
}
|
||||
if (!paintable_box()->is_visible()) {
|
||||
MUST(object.add("invisible"sv, true));
|
||||
}
|
||||
if (paintable_box()->has_stacking_context()) {
|
||||
MUST(object.add("stackingContext"sv, true));
|
||||
}
|
||||
}
|
||||
} else if (is_text()) {
|
||||
MUST(object.add("type"sv, "text"));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue