Repository navigation
DevTools: Show HTML tree - #32655
DevTools: Show HTML tree#32655
Conversation
|
Amazing. As someone working on Servo's layout, I can't wait for this to land. At the moment if something isn't laying out correctly, it is not at all easy to work out why, and being able to interactively inspect the layout and the styles would be a complete game changer. |
In the meantime, you can also use |
Oh, thanks. That looks really helpful. Although I'm still really looking forward to the interactive inspector, as I find that debug trees printed out in full are very verbose and hard to debug through (better than nothing though! And perhaps I can reduce my examples down to find the relevant parts of the tree) |
38e1d15 to
5936960
Compare
Signed-off-by: eri <[email protected]>
Signed-off-by: eri <[email protected]>
Signed-off-by: eri <[email protected]>
Signed-off-by: eri <[email protected]>
Signed-off-by: eri <[email protected]>
Signed-off-by: eri <[email protected]>
Signed-off-by: eri <[email protected]>
46d446f to
57f8ab4
Compare
Signed-off-by: eri <[email protected]>
Signed-off-by: eri <[email protected]>
820dcef to
43c1ddd
Compare
Signed-off-by: eri <[email protected]>
Signed-off-by: eri <[email protected]>
0399bbd to
34542da
Compare
Signed-off-by: eri <[email protected]>
Signed-off-by: eri <[email protected]>
31caf17 to
a9cdb2d
Compare
Signed-off-by: eri <[email protected]>
2133d52 to
ca51072
Compare
| Ok(ActorMessageStatus::Ignored) | ||
| Ok(match msg_type { | ||
| "start" => { | ||
| // TODO: Create an observer on "reflows" events |
There was a problem hiding this comment.
| // TODO: Create an observer on "reflows" events | |
| // TODO: Create an observer on "reflows" events. |
|
|
||
| /// The network parent actor can handle the following messages: | ||
| /// | ||
| /// - `setSaveRequestAndResponseBodies`: Doesn't do anything yet |
There was a problem hiding this comment.
| /// - `setSaveRequestAndResponseBodies`: Doesn't do anything yet | |
| /// - `setSaveRequestAndResponseBodies`: Doesn't do anything yet |
Fix a few nits in comments Signed-off-by: Martin Robinson <[email protected]>
|
I'm mainly rubber-stamping this one as there are many changes we need to make to the data structures and messages to become compatible with the newer version of the DevTools protocol. Nothing here seems out-of-line with that idea. Thanks! |
* feat: watch root node Signed-off-by: eri <[email protected]> * reafactor: divide inspector in components Signed-off-by: eri <[email protected]> * feat: add css properties actor Signed-off-by: eri <[email protected]> * feat: accesibility actor Signed-off-by: eri <[email protected]> * feat: layout actor Signed-off-by: eri <[email protected]> * feat: network parent and refactor Signed-off-by: eri <[email protected]> * feat: progress on the inspector messages Signed-off-by: eri <[email protected]> * feat: more progress on inspector Signed-off-by: eri <[email protected]> * feat: try to fix nodes showing Signed-off-by: eri <[email protected]> * feat: initial dom tree Signed-off-by: eri <[email protected]> * feat: some more messages Signed-off-by: eri <[email protected]> * feat: clean and add documentation Signed-off-by: eri <[email protected]> * refactor: add more docs and clean Signed-off-by: eri <[email protected]> * fix: restore deleted node attributes field Signed-off-by: eri <[email protected]> * Apply suggestions from code review Fix a few nits in comments Signed-off-by: Martin Robinson <[email protected]> --------- Signed-off-by: eri <[email protected]> Signed-off-by: Martin Robinson <[email protected]> Co-authored-by: Martin Robinson <[email protected]>

This PR partly restores the HTML inspector functionality for the DevTools implementation. The inspector is probably the part of the devtools that has more associated actors. There were quite a few API changes since the last working implementation, so making it work again requires both fixing existing actors and creating new ones.
Some of the new actors and messages are placeholders that don't contain correct information yet, but they are required for the flow of messages to continue, since Firefox waits until a reply is issued for some of them to emit others.
Right now the DOM tree outline is showing, with two caveats that will be addressed in future PRs (since this has already gotten quite big):
A few actors and message fields also seem to be outdated, namely Emulation, Performance and Timeline. Since Emulation was only a placeholder I removed it, but I kept the other two since they had work done in them that might be useful.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errors