Index: third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp |
diff --git a/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp b/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp |
index 1489935dda61b3d49b85ce06356f2bc97132f7ee..78962418e1598c1b888fc6fd7b2b743a3b680ccf 100644 |
--- a/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp |
+++ b/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp |
@@ -25,6 +25,7 @@ |
#include "bindings/core/v8/ExceptionState.h" |
#include "core/CSSPropertyNames.h" |
+#include "core/css/CSSIdentifierValue.h" |
#include "core/css/CSSPrimitiveValue.h" |
#include "core/css/CSSPrimitiveValueMappings.h" |
#include "core/css/CSSPropertyIDTemplates.h" |
@@ -412,7 +413,7 @@ const CSSValue* CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeywor |
return nullptr; |
if (int keywordSize = style->getFontDescription().keywordSize()) |
- return CSSPrimitiveValue::createIdentifier(cssIdentifierForFontSizeKeyword(keywordSize)); |
+ return CSSIdentifierValue::create(cssIdentifierForFontSizeKeyword(keywordSize)); |
return zoomAdjustedPixelValue(style->getFontDescription().computedPixelSize(), *style); |
@@ -599,13 +600,12 @@ String CSSComputedStyleDeclaration::item(unsigned i) const |
bool CSSComputedStyleDeclaration::cssPropertyMatches(CSSPropertyID propertyID, const CSSValue* propertyValue) const |
{ |
- if (propertyID == CSSPropertyFontSize && propertyValue->isPrimitiveValue() && m_node) { |
+ if (propertyID == CSSPropertyFontSize && (propertyValue->isPrimitiveValue() || propertyValue->isIdentifierValue()) && m_node) { |
m_node->document().updateStyleAndLayoutIgnorePendingStylesheets(); |
const ComputedStyle* style = m_node->ensureComputedStyle(m_pseudoElementSpecifier); |
if (style && style->getFontDescription().keywordSize()) { |
CSSValueID sizeValue = cssIdentifierForFontSizeKeyword(style->getFontDescription().keywordSize()); |
- const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(propertyValue); |
- if (primitiveValue->isValueID() && primitiveValue->getValueID() == sizeValue) |
+ if (propertyValue->isIdentifierValue() && toCSSIdentifierValue(propertyValue)->getValueID() == sizeValue) |
return true; |
} |
} |