LibWeb: Avoid setting definite {width,height} when "auto" is specified
Auto is not specified at all.
This commit is contained in:
parent
6c15eeb367
commit
ef22a1b2dc
Notes:
sideshowbarker
2024-07-18 03:54:52 +09:00
Author: https://github.com/TobyAsE Commit: https://github.com/SerenityOS/serenity/commit/ef22a1b2dc8 Pull-request: https://github.com/SerenityOS/serenity/pull/10043
1 changed files with 1 additions and 1 deletions
|
@ -329,7 +329,7 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style)
|
||||||
if (computed_values.opacity() == 0)
|
if (computed_values.opacity() == 0)
|
||||||
m_visible = false;
|
m_visible = false;
|
||||||
|
|
||||||
if (auto width = specified_style.property(CSS::PropertyID::Width); width.has_value())
|
if (auto width = specified_style.property(CSS::PropertyID::Width); width.has_value() && !width.value()->is_auto())
|
||||||
m_has_definite_width = true;
|
m_has_definite_width = true;
|
||||||
computed_values.set_width(specified_style.length_or_fallback(CSS::PropertyID::Width, {}));
|
computed_values.set_width(specified_style.length_or_fallback(CSS::PropertyID::Width, {}));
|
||||||
computed_values.set_min_width(specified_style.length_or_fallback(CSS::PropertyID::MinWidth, {}));
|
computed_values.set_min_width(specified_style.length_or_fallback(CSS::PropertyID::MinWidth, {}));
|
||||||
|
|
Loading…
Add table
Reference in a new issue