mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibDevTools: Don't assume computed layout values are strings
Width and height are doubles, so get_string() will return nothing and fail. We just want a JsonValue here without caring what type it is, so let's just use get() instead.
This commit is contained in:
parent
b8fa9ac7e7
commit
11a6b6f38f
|
|
@ -30,7 +30,7 @@ static void received_layout(JsonObject& response, JsonValue const& node_box_sizi
|
|||
response.set(key, MUST(String::formatted("{}px", pixel_value(key))));
|
||||
};
|
||||
auto set_computed_value = [&](auto key) {
|
||||
response.set(key, node_box_sizing.as_object().get_string(key).value_or(String {}));
|
||||
response.set(key, node_box_sizing.as_object().get(key).value_or(String {}));
|
||||
};
|
||||
|
||||
// FIXME: This response should also contain "top", "right", "bottom", and "left", but our box model metrics in
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user