diff --git a/Libraries/LibGfx/Font/ScaledFont.cpp b/Libraries/LibGfx/Font/ScaledFont.cpp index 2ce25e07faa..2427aba1679 100644 --- a/Libraries/LibGfx/Font/ScaledFont.cpp +++ b/Libraries/LibGfx/Font/ScaledFont.cpp @@ -16,7 +16,7 @@ namespace Gfx { -ScaledFont::ScaledFont(NonnullRefPtr typeface, float point_width, float point_height, unsigned dpi_x, unsigned dpi_y) +ScaledFont::ScaledFont(NonnullRefPtr typeface, float point_width, float point_height, unsigned dpi_x, unsigned dpi_y) : m_typeface(move(typeface)) , m_point_width(point_width) , m_point_height(point_height) diff --git a/Libraries/LibGfx/Font/ScaledFont.h b/Libraries/LibGfx/Font/ScaledFont.h index 93fd84d79da..23d02479204 100644 --- a/Libraries/LibGfx/Font/ScaledFont.h +++ b/Libraries/LibGfx/Font/ScaledFont.h @@ -17,7 +17,7 @@ namespace Gfx { class ScaledFont final : public Gfx::Font { public: - ScaledFont(NonnullRefPtr, float point_width, float point_height, unsigned dpi_x = DEFAULT_DPI, unsigned dpi_y = DEFAULT_DPI); + ScaledFont(NonnullRefPtr, float point_width, float point_height, unsigned dpi_x = DEFAULT_DPI, unsigned dpi_y = DEFAULT_DPI); ScaledFontMetrics metrics() const; // ^Gfx::Font @@ -45,7 +45,7 @@ public: SkFont skia_font(float scale) const; private: - NonnullRefPtr m_typeface; + NonnullRefPtr m_typeface; float m_x_scale { 0.0f }; float m_y_scale { 0.0f }; float m_point_width { 0.0f }; diff --git a/Libraries/LibGfx/FontCascadeList.cpp b/Libraries/LibGfx/FontCascadeList.cpp index 4deafb0986d..1f38b90417d 100644 --- a/Libraries/LibGfx/FontCascadeList.cpp +++ b/Libraries/LibGfx/FontCascadeList.cpp @@ -8,12 +8,12 @@ namespace Gfx { -void FontCascadeList::add(NonnullRefPtr font) +void FontCascadeList::add(NonnullRefPtr font) { m_fonts.append({ move(font), {} }); } -void FontCascadeList::add(NonnullRefPtr font, Vector unicode_ranges) +void FontCascadeList::add(NonnullRefPtr font, Vector unicode_ranges) { m_fonts.append({ move(font), move(unicode_ranges) }); } diff --git a/Libraries/LibGfx/FontCascadeList.h b/Libraries/LibGfx/FontCascadeList.h index be4181e9a86..e41a659bd22 100644 --- a/Libraries/LibGfx/FontCascadeList.h +++ b/Libraries/LibGfx/FontCascadeList.h @@ -29,8 +29,8 @@ public: callback(font); } - void add(NonnullRefPtr font); - void add(NonnullRefPtr font, Vector unicode_ranges); + void add(NonnullRefPtr font); + void add(NonnullRefPtr font, Vector unicode_ranges); void extend(FontCascadeList const& other); @@ -39,7 +39,7 @@ public: bool equals(FontCascadeList const& other) const; struct Entry { - NonnullRefPtr font; + NonnullRefPtr font; Optional> unicode_ranges; }; diff --git a/Libraries/LibGfx/TextLayout.h b/Libraries/LibGfx/TextLayout.h index 10a8cdaa660..0c7f1ed98b6 100644 --- a/Libraries/LibGfx/TextLayout.h +++ b/Libraries/LibGfx/TextLayout.h @@ -44,7 +44,7 @@ public: Rtl, }; - GlyphRun(Vector&& glyphs, NonnullRefPtr font, TextType text_type, float width) + GlyphRun(Vector&& glyphs, NonnullRefPtr font, TextType text_type, float width) : m_glyphs(move(glyphs)) , m_font(move(font)) , m_text_type(text_type) @@ -63,7 +63,7 @@ public: private: Vector m_glyphs; - NonnullRefPtr m_font; + NonnullRefPtr m_font; TextType m_text_type; float m_width { 0 }; }; diff --git a/Libraries/LibWeb/CSS/ComputedProperties.h b/Libraries/LibWeb/CSS/ComputedProperties.h index abb692fb021..fcf0dbf04ad 100644 --- a/Libraries/LibWeb/CSS/ComputedProperties.h +++ b/Libraries/LibWeb/CSS/ComputedProperties.h @@ -198,7 +198,7 @@ public: return *m_first_available_computed_font; } - void set_computed_font_list(NonnullRefPtr font_list) + void set_computed_font_list(NonnullRefPtr font_list) { m_font_list = move(font_list); // https://drafts.csswg.org/css-fonts/#first-available-font @@ -251,8 +251,8 @@ private: HashMap> m_animated_property_values; int m_math_depth { InitialValues::math_depth() }; - RefPtr m_font_list; - RefPtr m_first_available_computed_font; + RefPtr m_font_list; + RefPtr m_first_available_computed_font; Optional m_line_height; diff --git a/Libraries/LibWeb/CSS/ComputedValues.h b/Libraries/LibWeb/CSS/ComputedValues.h index d5e5fa0ca6f..cf05b01654a 100644 --- a/Libraries/LibWeb/CSS/ComputedValues.h +++ b/Libraries/LibWeb/CSS/ComputedValues.h @@ -559,7 +559,7 @@ public: protected: struct { Color caret_color { InitialValues::caret_color() }; - RefPtr font_list {}; + RefPtr font_list {}; CSSPixels font_size { InitialValues::font_size() }; int font_weight { InitialValues::font_weight() }; Optional 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 font_list) { m_inherited.font_list = move(font_list); } + void set_font_list(NonnullRefPtr 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 font_variant_alternates) { m_inherited.font_variant_alternates = font_variant_alternates; } diff --git a/Libraries/LibWeb/CSS/FontFace.cpp b/Libraries/LibWeb/CSS/FontFace.cpp index 4ad0188b709..4cf9f189e5d 100644 --- a/Libraries/LibWeb/CSS/FontFace.cpp +++ b/Libraries/LibWeb/CSS/FontFace.cpp @@ -27,9 +27,9 @@ namespace Web::CSS { -static NonnullRefPtr>> load_vector_font(JS::Realm& realm, ByteBuffer const& data) +static NonnullRefPtr>> load_vector_font(JS::Realm& realm, ByteBuffer const& data) { - auto promise = Core::Promise>::construct(); + auto promise = Core::Promise>::construct(); // FIXME: 'Asynchronously' shouldn't mean 'later on the main thread'. // Can we defer this to a background thread? diff --git a/Libraries/LibWeb/CSS/FontFace.h b/Libraries/LibWeb/CSS/FontFace.h index 97eb4ecc5c5..92a5ef497e1 100644 --- a/Libraries/LibWeb/CSS/FontFace.h +++ b/Libraries/LibWeb/CSS/FontFace.h @@ -107,8 +107,8 @@ private: Vector m_urls; // [[Urls]] ByteBuffer m_binary_data {}; // [[Data]] - RefPtr m_parsed_font; - RefPtr>> m_font_load_promise; + RefPtr m_parsed_font; + RefPtr>> m_font_load_promise; // https://drafts.csswg.org/css-font-loading/#css-connected bool m_is_css_connected { false }; diff --git a/Libraries/LibWeb/CSS/StyleComputer.cpp b/Libraries/LibWeb/CSS/StyleComputer.cpp index 10dbd5e5e99..ab549353406 100644 --- a/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -229,7 +229,7 @@ void FontLoader::resource_did_load_or_fail() m_style_computer.did_load_font(m_family_name); } -RefPtr FontLoader::font_with_point_size(float point_size) +RefPtr FontLoader::font_with_point_size(float point_size) { if (!m_vector_font) { if (!resource()) @@ -261,7 +261,7 @@ void FontLoader::start_loading_next_url() set_resource(ResourceLoader::the().load_resource(Resource::Type::Generic, request)); } -ErrorOr> FontLoader::try_load_font() +ErrorOr> FontLoader::try_load_font() { // FIXME: This could maybe use the format() provided in @font-face as well, since often the mime type is just application/octet-stream and we have to try every format auto mime_type = MimeSniff::MimeType::parse(resource()->mime_type()); @@ -295,7 +295,7 @@ struct StyleComputer::MatchingFontCandidate { [[nodiscard]] RefPtr font_with_point_size(float point_size) const { - RefPtr font_list = Gfx::FontCascadeList::create(); + auto font_list = Gfx::FontCascadeList::create(); if (auto* loader_list = loader_or_typeface.get_pointer(); loader_list) { for (auto const& loader : **loader_list) { if (auto font = loader->font_with_point_size(point_size); font) diff --git a/Libraries/LibWeb/CSS/StyleComputer.h b/Libraries/LibWeb/CSS/StyleComputer.h index f64e6f7c866..3859ffdda27 100644 --- a/Libraries/LibWeb/CSS/StyleComputer.h +++ b/Libraries/LibWeb/CSS/StyleComputer.h @@ -320,9 +320,9 @@ public: virtual ~FontLoader() override; Vector const& unicode_ranges() const { return m_unicode_ranges; } - RefPtr vector_font() const { return m_vector_font; } + RefPtr vector_font() const { return m_vector_font; } - RefPtr font_with_point_size(float point_size); + RefPtr font_with_point_size(float point_size); void start_loading_next_url(); bool is_loading() const { return resource() && resource()->is_pending(); } @@ -334,12 +334,12 @@ private: void resource_did_load_or_fail(); - ErrorOr> try_load_font(); + ErrorOr> try_load_font(); StyleComputer& m_style_computer; FlyString m_family_name; Vector m_unicode_ranges; - RefPtr m_vector_font; + RefPtr m_vector_font; Vector<::URL::URL> m_urls; Function m_on_load; Function m_on_fail; diff --git a/Libraries/LibWeb/Layout/TextNode.h b/Libraries/LibWeb/Layout/TextNode.h index 96255b37a29..c750124706d 100644 --- a/Libraries/LibWeb/Layout/TextNode.h +++ b/Libraries/LibWeb/Layout/TextNode.h @@ -30,7 +30,7 @@ public: struct Chunk { Utf8View view; - NonnullRefPtr font; + NonnullRefPtr font; size_t start { 0 }; size_t length { 0 }; bool has_breaking_newline { false }; diff --git a/Libraries/LibWeb/Painting/MediaPaintable.h b/Libraries/LibWeb/Painting/MediaPaintable.h index 08d5b2dfd68..6cbcae75afa 100644 --- a/Libraries/LibWeb/Painting/MediaPaintable.h +++ b/Libraries/LibWeb/Painting/MediaPaintable.h @@ -31,7 +31,7 @@ private: DevicePixelRect timeline_rect; String timestamp; - RefPtr timestamp_font; + RefPtr timestamp_font; DevicePixelRect timestamp_rect; DevicePixelRect speaker_button_rect;