LibGfx+LibWeb: Store Typeface and Font-related types in RefPtr to const

This commit is contained in:
Andrew Kaster 2025-04-15 15:48:14 -06:00 committed by Andrew Kaster
commit be2dd91289
Notes: github-actions[bot] 2025-04-16 16:44:15 +00:00
13 changed files with 28 additions and 28 deletions

View file

@ -559,7 +559,7 @@ public:
protected:
struct {
Color caret_color { InitialValues::caret_color() };
RefPtr<Gfx::FontCascadeList> font_list {};
RefPtr<Gfx::FontCascadeList const> font_list {};
CSSPixels font_size { InitialValues::font_size() };
int font_weight { InitialValues::font_weight() };
Optional<Gfx::FontVariantAlternates> font_variant_alternates;
@ -749,7 +749,7 @@ public:
void set_aspect_ratio(AspectRatio aspect_ratio) { m_noninherited.aspect_ratio = move(aspect_ratio); }
void set_caret_color(Color caret_color) { m_inherited.caret_color = caret_color; }
void set_font_list(NonnullRefPtr<Gfx::FontCascadeList> font_list) { m_inherited.font_list = move(font_list); }
void set_font_list(NonnullRefPtr<Gfx::FontCascadeList const> font_list) { m_inherited.font_list = move(font_list); }
void set_font_size(CSSPixels font_size) { m_inherited.font_size = font_size; }
void set_font_weight(int font_weight) { m_inherited.font_weight = font_weight; }
void set_font_variant_alternates(Optional<Gfx::FontVariantAlternates> font_variant_alternates) { m_inherited.font_variant_alternates = font_variant_alternates; }