Commit graph

9 commits

Author SHA1 Message Date
Sam Atkins
49776b2669 Tests: Add DevTools navigation reload fixtures
Split the test delegate navigation helpers so tests can simulate start
and finish independently.

Add a second DOM tree fixture for navigation reload coverage without
changing existing navigation tests.
2026-06-01 15:09:25 +01:00
Sam Atkins
97070f836c LibDevTools: Add walker node picker protocol support
Firefox starts element picking by sending pick to the walker actor. Add
matching protocol handling so Ladybird can enter picker mode, send
hover, preview, pick, and cancel events, and serialize picked nodes in
the shape Firefox expects.

Picker hit testing can return text nodes, but Firefox only selects
elements in this mode. Normalize picker events to the closest element
ancestor and include the parent chain so Firefox can materialize missing
tree nodes before selecting the target.
2026-05-29 17:01:34 +01:00
Sam Atkins
2000fd38c1 DevTools+WebContent: Support the flexbox highlighter 2026-05-28 12:58:46 +01:00
Sam Atkins
d465a5f32f DevTools: Implement Firefox flexbox layout actors 2026-05-28 12:58:46 +01:00
Sam Atkins
1caa3b9188 DevTools: Allocate fresh highlighter actors for each request
Firefox creates a new custom highlighter actor for each
getHighlighterByType request. Its frontend decides when to cache and
reuse those actors, while grid highlighting uses distinct actors so
multiple grids and subgrid parent overlays can remain visible at the
same time.

Match that allocation model by removing InspectorActor's server-side
highlighter cache. Also unregister highlighter actors after release or
finalize, and make each actor clear only the highlight state it owns.
2026-05-27 17:47:50 +01:00
Sam Atkins
fb96cdd7a1 DevTools: Include subframe grids in layout inspection
Firefox's grid inspector builds its subgrid tree from two protocol
signals: isSubgrid on each GridActor form, and
Walker.getParentGridNode() for each subgrid container. Teach the walker
to answer the parent grid lookup so Firefox can attach subgrids below
their parent grid in the Layout panel.
2026-05-27 17:47:50 +01:00
Sam Atkins
ad541dca7f DevTools: Support the CSS grid highlighter
Create typed highlighter actors for Firefox's highlighter requests.
The actor keeps the requested type so CssGridHighlighter can use grid
highlighting while the other highlighter types keep the existing box
model-compatible behavior.
2026-05-27 17:47:50 +01:00
Sam Atkins
5c551ac6aa DevTools: Implement Firefox grid layout actors
Teach the walker to vend a layout inspector actor and serialize node
display types.

The layout inspector now returns Firefox-compatible grid actor forms
for getGrids and getCurrentGrid. It also supports Firefox's fallback
walker.getNodeFromActor(grid, ["containerEl"]) path, which the grid
panel uses when a grid form does not already contain a container node
actor ID.
2026-05-27 17:47:50 +01:00
Sam Atkins
c985f9cad5 Tests: Add a LibDevTools test suite
Use a fake delegate to cover root, target, inspector, styles, network,
navigation, and accessibility behavior. This is not in-depth, but should
be enough to catch regressions.
2026-05-27 08:55:02 +01:00