summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/style/StyleTreeResolver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/style/StyleTreeResolver.cpp')
-rw-r--r--Source/WebCore/style/StyleTreeResolver.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/WebCore/style/StyleTreeResolver.cpp b/Source/WebCore/style/StyleTreeResolver.cpp
index d6be6658c..8ab152277 100644
--- a/Source/WebCore/style/StyleTreeResolver.cpp
+++ b/Source/WebCore/style/StyleTreeResolver.cpp
@@ -49,6 +49,7 @@
#include "RenderWidget.h"
#include "Settings.h"
#include "ShadowRoot.h"
+#include "StyleFontSizeFunctions.h"
#include "StyleResolver.h"
#include "Text.h"
@@ -105,6 +106,15 @@ static void ensurePlaceholderStyle(Document& document)
return;
placeholderStyle = &RenderStyle::create().leakRef();
placeholderStyle->setDisplay(NONE);
+
+ FontCascadeDescription fontDescription;
+ fontDescription.setOneFamily(standardFamily);
+ fontDescription.setKeywordSizeFromIdentifier(CSSValueMedium);
+ float size = Style::fontSizeForKeyword(CSSValueMedium, false, document);
+ fontDescription.setSpecifiedSize(size);
+ fontDescription.setComputedSize(size);
+ placeholderStyle->setFontDescription(fontDescription);
+
placeholderStyle->fontCascade().update(&document.fontSelector());
}