| Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp
|
| diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
|
| index ad626b2ac61dbe69366729cc585de45edfb25b38..892723a84d7e03de947b86e7310c57d4535a3b16 100644
|
| --- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
|
| +++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
|
| @@ -79,7 +79,6 @@ static const int defaultFontSize = 10;
|
| static const char defaultFontFamily[] = "sans-serif";
|
| static const char defaultFont[] = "10px sans-serif";
|
| static const char inherit[] = "inherit";
|
| -static const char initial[] = "initial";
|
| static const char rtl[] = "rtl";
|
| static const char ltr[] = "ltr";
|
| static const double TryRestoreContextInterval = 0.5;
|
| @@ -1682,10 +1681,10 @@ void CanvasRenderingContext2D::setFont(const String& newFont)
|
| }
|
| if (parsedStyle->isEmpty())
|
| return;
|
| - String fontValue = parsedStyle->getPropertyValue(CSSPropertyFont);
|
| // According to http://lists.w3.org/Archives/Public/public-html/2009Jul/0947.html,
|
| // the "inherit" and "initial" values must be ignored.
|
| - if (fontValue == inherit || fontValue == initial)
|
| + RefPtrWillBeRawPtr<CSSValue> fontValue = parsedStyle->getPropertyCSSValue(CSSPropertyFontSize);
|
| + if (fontValue && (fontValue->isInitialValue() || fontValue->isInheritedValue()))
|
| return;
|
| m_fetchedFonts.add(newFont, parsedStyle);
|
| }
|
|
|