mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-27 12:46:06 +00:00
LibWeb: Make resolution calculable
No tests unfortunately, because no CSS property we currently support accepts `<resolution>`.
This commit is contained in:
parent
e907ad44c3
commit
30dcbc306c
Notes:
sideshowbarker
2024-07-17 18:08:55 +09:00
Author: https://github.com/AtkinsSJ
Commit: 30dcbc306c
Pull-request: https://github.com/SerenityOS/serenity/pull/22476
Reviewed-by: https://github.com/Lubrsi
7 changed files with 67 additions and 2 deletions
|
@ -22,10 +22,14 @@ public:
|
|||
static Optional<Type> unit_from_name(StringView);
|
||||
|
||||
Resolution(double value, Type type);
|
||||
static Resolution make_dots_per_pixel(double);
|
||||
|
||||
String to_string() const;
|
||||
double to_dots_per_pixel() const;
|
||||
|
||||
Type type() const { return m_type; }
|
||||
double raw_value() const { return m_value; }
|
||||
|
||||
bool operator==(Resolution const& other) const
|
||||
{
|
||||
return m_type == other.m_type && m_value == other.m_value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue