mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Remove unnecessary ComputedProperties::maybe_null_property
We know that all (longhand) properties have a value so this is unnecessary.
This commit is contained in:
parent
6bccc7c242
commit
912ffc3f84
Notes:
github-actions[bot]
2025-08-26 10:18:59 +00:00
Author: https://github.com/Calme1709
Commit: 912ffc3f84
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5984
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/gmta ✅
6 changed files with 15 additions and 39 deletions
|
|
@ -328,8 +328,7 @@ void ConnectionFromClient::debug_request(u64 page_id, ByteString request, ByteSt
|
|||
auto dump_style = [](String const& title, Web::CSS::ComputedProperties const& style, HashMap<FlyString, Web::CSS::StyleProperty> const& custom_properties) {
|
||||
dbgln("+ {}", title);
|
||||
for (size_t i = to_underlying(Web::CSS::first_longhand_property_id); i < to_underlying(Web::CSS::last_longhand_property_id); ++i) {
|
||||
auto property = style.maybe_null_property(static_cast<Web::CSS::PropertyID>(i));
|
||||
dbgln("| {} = {}", Web::CSS::string_from_property_id(static_cast<Web::CSS::PropertyID>(i)), property ? property->to_string(Web::CSS::SerializationMode::Normal) : ""_string);
|
||||
dbgln("| {} = {}", Web::CSS::string_from_property_id(static_cast<Web::CSS::PropertyID>(i)), style.property(static_cast<Web::CSS::PropertyID>(i)).to_string(Web::CSS::SerializationMode::Normal));
|
||||
}
|
||||
for (auto const& [name, property] : custom_properties) {
|
||||
dbgln("| {} = {}", name, property.value->to_string(Web::CSS::SerializationMode::Normal));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue