summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/css/CSSStyleSelector.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2012-04-12 18:31:02 +0100
committerSteve Block <steveblock@google.com>2012-04-12 18:43:52 +0100
commitbb0dba49203d72577b8eac34537c9c671ba9bec7 (patch)
treee8ef05cc29c74500038dc4f55243bc4ad7a04c11 /Source/WebCore/css/CSSStyleSelector.cpp
parent1da40458db9c373f30030565f5e2087f21683e0e (diff)
downloadexternal_webkit-bb0dba49203d72577b8eac34537c9c671ba9bec7.zip
external_webkit-bb0dba49203d72577b8eac34537c9c671ba9bec7.tar.gz
external_webkit-bb0dba49203d72577b8eac34537c9c671ba9bec7.tar.bz2
Cherry-pick WebKit change r96122 to fix a LayoutTest crash
fast/canvas/crash-set-font.html See http://trac.webkit.org/changeset/96122 Bug: 6328797 Change-Id: I9d9fdbffb19e61615d352c20e24946cf01306903
Diffstat (limited to 'Source/WebCore/css/CSSStyleSelector.cpp')
-rw-r--r--Source/WebCore/css/CSSStyleSelector.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/WebCore/css/CSSStyleSelector.cpp b/Source/WebCore/css/CSSStyleSelector.cpp
index 613bf4a..e49ad2a 100644
--- a/Source/WebCore/css/CSSStyleSelector.cpp
+++ b/Source/WebCore/css/CSSStyleSelector.cpp
@@ -4971,6 +4971,11 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
applyProperty(CSSPropertyFontStyle, font->style.get());
applyProperty(CSSPropertyFontVariant, font->variant.get());
applyProperty(CSSPropertyFontWeight, font->weight.get());
+ // The previous properties can dirty our font but they don't try to read the font's
+ // properties back, which is safe. However if font-size is using the 'ex' unit, it will
+ // need query the dirtied font's x-height to get the computed size. To be safe in this
+ // case, let's just update the font now.
+ updateFont();
applyProperty(CSSPropertyFontSize, font->size.get());
m_lineHeightValue = font->lineHeight.get();