mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 07:57:49 +00:00
LibWeb: Implement DOMTreeModel::index_for_node()
This will be used to find the index to select when the DOM Inspector is told to inspect a specific node.
This commit is contained in:
parent
fe820f6d5a
commit
e824454ab4
2 changed files with 21 additions and 0 deletions
|
@ -33,6 +33,8 @@ 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;
|
||||
|
||||
private:
|
||||
explicit DOMTreeModel(JsonObject);
|
||||
|
||||
|
@ -57,6 +59,7 @@ private:
|
|||
GUI::Icon m_text_icon;
|
||||
JsonObject m_dom_tree;
|
||||
HashMap<JsonObject const*, JsonObject const*> m_dom_node_to_parent_map;
|
||||
HashMap<i32, JsonObject const*> m_node_id_to_dom_node_map;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue