1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 01:51:03 +09:00

LibWeb: Use fit-content width if button's computed width is "auto"

Implements following line from the spec:
"If the computed value of 'inline-size' is 'auto', then the used value
is the fit-content inline size."
This commit is contained in:
Aliaksandr Kalenik 2023-09-09 17:13:41 +02:00 committed by Andreas Kling
parent 7eee3f6952
commit 63939445b1
Notes: sideshowbarker 2024-07-17 04:57:23 +09:00
5 changed files with 54 additions and 1 deletions

View file

@ -68,6 +68,8 @@ public:
virtual DeprecatedString value() const override;
private:
virtual bool is_html_button_element() const override { return true; }
HTMLButtonElement(DOM::Document&, DOM::QualifiedName);
// ^DOM::Element
@ -75,3 +77,8 @@ private:
};
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLButtonElement>() const { return is_html_button_element(); }
}