|
@@ -18,6 +18,7 @@
|
|
|
#include <LibWeb/CSS/Parser/TokenStream.h>
|
|
|
#include <LibWeb/CSS/Selector.h>
|
|
|
#include <LibWeb/CSS/StyleProperties.h>
|
|
|
+#include <LibWeb/FontCache.h>
|
|
|
#include <LibWeb/Forward.h>
|
|
|
|
|
|
namespace Web::CSS {
|
|
@@ -67,6 +68,8 @@ public:
|
|
|
DOM::Document& document() { return m_document; }
|
|
|
DOM::Document const& document() const { return m_document; }
|
|
|
|
|
|
+ FontCache& font_cache() const { return m_font_cache; }
|
|
|
+
|
|
|
NonnullRefPtr<StyleProperties> create_document_style() const;
|
|
|
|
|
|
ErrorOr<NonnullRefPtr<StyleProperties>> compute_style(DOM::Element&, Optional<CSS::Selector::PseudoElement> = {}) const;
|
|
@@ -201,6 +204,8 @@ private:
|
|
|
OwnPtr<RuleCache> m_author_rule_cache;
|
|
|
OwnPtr<RuleCache> m_user_agent_rule_cache;
|
|
|
|
|
|
+ mutable FontCache m_font_cache;
|
|
|
+
|
|
|
HashMap<FontFaceKey, NonnullOwnPtr<FontLoader>> m_loaded_fonts;
|
|
|
|
|
|
Length::FontMetrics m_default_font_metrics;
|