mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-26 18:09:45 +00:00
LibWeb: Allow to pass pseudo-element type in computed properties getter
...and setter. We had lots of places where we check if pseudo-element type is specified and then use `pseudo_element_computed_properties()` or `computed_properties()`. This change moves these checks from caller side to the getter and setter.
This commit is contained in:
parent
86dc3ce001
commit
2fc405f1b2
Notes:
github-actions[bot]
2025-07-18 19:20:46 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 2fc405f1b2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5510
7 changed files with 48 additions and 70 deletions
|
|
@ -461,13 +461,7 @@ void ConnectionFromClient::inspect_dom_node(u64 page_id, WebView::DOMNodePropert
|
|||
auto& element = as<Web::DOM::Element>(*node);
|
||||
node->document().set_inspected_node(node);
|
||||
|
||||
GC::Ptr<Web::CSS::ComputedProperties> properties;
|
||||
if (pseudo_element.has_value()) {
|
||||
if (auto pseudo_element_node = element.get_pseudo_element_node(*pseudo_element))
|
||||
properties = element.pseudo_element_computed_properties(*pseudo_element);
|
||||
} else {
|
||||
properties = element.computed_properties();
|
||||
}
|
||||
auto properties = element.computed_properties(pseudo_element);
|
||||
|
||||
if (!properties) {
|
||||
async_did_inspect_dom_node(page_id, { property_type, {} });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue