mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:57:44 +00:00
LibWeb: Store JSON pointers in the OOPWV DOM Inspector model indices
Currently, the DOM Inspector stores a numeric ID for each DOM node. This is used to look up the data for that node in the JSON representation of the DOM. The method to do this search performs a depth-first search through the JSON value, and is invoked quite frequently. Instead, we can just store a pointer to the JSON value in the index, and avoid this search altogether. This is similar to how the IPWV stores a pointer to the DOM node.
This commit is contained in:
parent
7604c2f38e
commit
067f7ae60a
2 changed files with 9 additions and 52 deletions
|
@ -39,11 +39,6 @@ private:
|
|||
JsonObject const* find_parent_of_child_with_internal_id(size_t) const;
|
||||
JsonObject const* find_parent_of_child_with_internal_id(JsonObject const&, size_t) const;
|
||||
|
||||
JsonObject const* find_child_with_internal_id(size_t) const;
|
||||
JsonObject const* find_child_with_internal_id(JsonObject const&, size_t) const;
|
||||
|
||||
JsonObject const& find_node(GUI::ModelIndex const&) const;
|
||||
|
||||
static size_t get_internal_id(const JsonObject& o);
|
||||
static JsonArray const* get_children(const JsonObject& o);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue