diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-10-06 11:23:58 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-06 11:26:34 +0200 |
commit | b9557bf8766f6c94aee541418d040dae3e8bb599 (patch) | |
tree | a37b541711f4eba2b6e966c33f37d1cd634f2299 /Libraries/LibHTML/Layout/LayoutText.h | |
parent | c8e5039418e2e02537a2b9f107307537e57355ff (diff) | |
download | serenity-b9557bf8766f6c94aee541418d040dae3e8bb599.zip |
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.
Diffstat (limited to 'Libraries/LibHTML/Layout/LayoutText.h')
-rw-r--r-- | Libraries/LibHTML/Layout/LayoutText.h | 5 |
1 files changed, 0 insertions, 5 deletions
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 <LibHTML/DOM/Text.h> #include <LibHTML/Layout/LayoutNode.h> -class Font; class LineBoxFragment; class LayoutText : public LayoutNode { @@ -29,8 +28,4 @@ private: void for_each_word(Callback) const; template<typename Callback> void for_each_source_line(Callback) const; - - void load_font(); - - RefPtr<Font> m_font; }; |