From b9557bf8766f6c94aee541418d040dae3e8bb599 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 6 Oct 2019 11:23:58 +0200 Subject: LibHTML: Move font loading from LayoutText to StyleProperties Since LayoutText inherits all of its style information from its parent Element anyway, it makes more sense to load the font at a higher level. And since the font depends only on the style and nothing else, this patch moves font loading (and caching) into StyleProperties. This could be made a lot smarter to avoid loading the same font many times, etc. --- Libraries/LibHTML/Layout/LayoutText.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'Libraries/LibHTML/Layout/LayoutText.h') diff --git a/Libraries/LibHTML/Layout/LayoutText.h b/Libraries/LibHTML/Layout/LayoutText.h index 9a70eb23f8..9b70ecdc4c 100644 --- a/Libraries/LibHTML/Layout/LayoutText.h +++ b/Libraries/LibHTML/Layout/LayoutText.h @@ -3,7 +3,6 @@ #include #include -class Font; class LineBoxFragment; class LayoutText : public LayoutNode { @@ -29,8 +28,4 @@ private: void for_each_word(Callback) const; template void for_each_source_line(Callback) const; - - void load_font(); - - RefPtr m_font; }; -- cgit v1.2.3