mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibWeb+WebContent: Do not embed attributes as data in the Inspector HTML
Attribute values may contain HTML, and may contain invalid HTML at that. If the latter occurs, let's not generate invalid Inspector HTML when we embed the attribute values as data attributes. Instead, cache the values in the InspectorClient, and embed just a lookup index into the HTML. This also nicely reduces the size of the generated HTML. The Inspector on https://github.com/SerenityOS/serenity reduces from 2.3MB to 1.9MB (about 318KB, or 13.8%).
This commit is contained in:
committed by
Andreas Kling
parent
939779cad3
commit
f07f5a2622
@@ -174,8 +174,8 @@ public:
|
||||
Function<void(i32, String const&)> on_inspector_set_dom_node_text;
|
||||
Function<void(i32, String const&)> on_inspector_set_dom_node_tag;
|
||||
Function<void(i32, Vector<Attribute> const&)> on_inspector_added_dom_node_attributes;
|
||||
Function<void(i32, String const&, Vector<Attribute> const&)> on_inspector_replaced_dom_node_attribute;
|
||||
Function<void(i32, Gfx::IntPoint, String const&, Optional<String> const&, Optional<Attribute> const&)> on_inspector_requested_dom_tree_context_menu;
|
||||
Function<void(i32, size_t, Vector<Attribute> const&)> on_inspector_replaced_dom_node_attribute;
|
||||
Function<void(i32, Gfx::IntPoint, String const&, Optional<String> const&, Optional<size_t> const&)> on_inspector_requested_dom_tree_context_menu;
|
||||
Function<void(String const&)> on_inspector_executed_console_script;
|
||||
Function<SocketPair()> on_request_worker_agent;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user