mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-18 23:42:17 +00:00
LibWeb: Move resolution of font weights and slopes to StyleValue
This isn't exactly ideal factoring (though I'm not sure what is) but this will make it possible to reuse this code in the parser.
This commit is contained in:
parent
17d6ab2416
commit
be10360350
Notes:
sideshowbarker
2024-07-17 05:13:53 +09:00
Author: https://github.com/awesomekling
Commit: be10360350
Pull-request: https://github.com/SerenityOS/serenity/pull/19021
3 changed files with 63 additions and 50 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2018-2023, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
|
||||
* Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2022-2023, MacDue <macdue@dueutil.tech>
|
||||
|
@ -304,6 +304,9 @@ public:
|
|||
virtual float to_integer() const { return 0; }
|
||||
virtual ErrorOr<String> to_string() const = 0;
|
||||
|
||||
[[nodiscard]] int to_font_weight() const;
|
||||
[[nodiscard]] int to_font_slope() const;
|
||||
|
||||
virtual bool equals(StyleValue const& other) const = 0;
|
||||
|
||||
bool operator==(StyleValue const& other) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue