Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibWebView: Display layouting information in devtools #2443

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

Psychpsyo
Copy link
Contributor

@Psychpsyo Psychpsyo commented Nov 19, 2024

This adds some extra info to the side of nodes in the devtools to indicate whether they are scrollable, invisible or create a stacking context.

It indents a large chunk of the code in InspectorClient.cpp so that these can show up on non-element nodes as well, sine those used to early-exit.

Examples:
Note: "stacking context" has been replaced with "isolated" since.
image

image

Specifically, you can now see whether an element is visible,
scrollable or creates a stacking context in the devtools.
@Psychpsyo Psychpsyo force-pushed the devtool-layout-hints branch from ff2b492 to 76c2da4 Compare November 26, 2024 23:51
extra.append("invisible"_string);
}
if (node.get_bool("stackingContext"sv).value_or(false)) {
extra.append("isolated"_string);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the image advertises it as stacking context; yet i still like this name better! 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I switched it after the initial PR and asking on the Discord.
Pros: It is an adjective, also shorter and less awkward
Cons: Many things beyond isolation: isolate; cause an element to create a stacking context.

Copy link
Member

@AtkinsSJ AtkinsSJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is neat! Thanks :^)

@AtkinsSJ AtkinsSJ merged commit d4d335e into LadybirdBrowser:master Dec 4, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants