mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +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
Notes:
sideshowbarker
2024-07-17 17:37:32 +09:00
Author: https://github.com/AtkinsSJ
Commit: 0326ad34df
Pull-request: https://github.com/SerenityOS/serenity/pull/12873
9 changed files with 69 additions and 20 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <AK/HashMap.h>
|
||||
#include <AK/JsonObject.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibWeb/CSS/Selector.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
namespace Web {
|
||||
|
@ -30,7 +31,7 @@ public:
|
|||
virtual GUI::ModelIndex index(int row, int column, const GUI::ModelIndex& parent = GUI::ModelIndex()) const override;
|
||||
virtual GUI::ModelIndex parent_index(const GUI::ModelIndex&) const override;
|
||||
|
||||
GUI::ModelIndex index_for_node(i32 node_id) const;
|
||||
GUI::ModelIndex index_for_node(i32 node_id, Optional<Web::CSS::Selector::PseudoElement> pseudo_element) const;
|
||||
|
||||
private:
|
||||
DOMTreeModel(JsonObject, GUI::TreeView&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue