summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/css
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/css')
-rw-r--r--Source/WebCore/css/CSSStyleSelector.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/WebCore/css/CSSStyleSelector.cpp b/Source/WebCore/css/CSSStyleSelector.cpp
index 2424349..d81cc9d 100644
--- a/Source/WebCore/css/CSSStyleSelector.cpp
+++ b/Source/WebCore/css/CSSStyleSelector.cpp
@@ -1285,8 +1285,11 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForElement(Element* e, RenderStyl
if (m_parentStyle)
m_style->inheritFrom(m_parentStyle);
- else
+ else {
m_parentStyle = style();
+ // Make sure our fonts are initialized if we don't inherit them from our parent style.
+ m_style->font().update(0);
+ }
if (e->isLink()) {
m_style->setIsLink(true);