summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML/Layout/LayoutText.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-10-06 11:23:58 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-10-06 11:26:34 +0200
commitb9557bf8766f6c94aee541418d040dae3e8bb599 (patch)
treea37b541711f4eba2b6e966c33f37d1cd634f2299 /Libraries/LibHTML/Layout/LayoutText.h
parentc8e5039418e2e02537a2b9f107307537e57355ff (diff)
downloadserenity-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.h5
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;
};