RenderTheme does not need to be per-page
[WebKit-https.git] / Source / WebCore / platform / wpe / RenderThemeWPE.cpp
index b59e33b..4d293d8 100644 (file)
 
 namespace WebCore {
 
-Ref<RenderTheme> RenderTheme::themeForPage(Page*)
+RenderTheme& RenderTheme::singleton()
 {
-    static RenderTheme& theme = RenderThemeWPE::create().leakRef();
-    return theme;
+    static NeverDestroyed<Ref<RenderTheme>> theme(RenderThemeWPE::create());
+    return theme.get();
 }
 
 void RenderThemeWPE::updateCachedSystemFontDescription(CSSValueID, FontCascadeDescription&) const