Index: Source/core/inspector/InspectorCSSAgent.cpp |
diff --git a/Source/core/inspector/InspectorCSSAgent.cpp b/Source/core/inspector/InspectorCSSAgent.cpp |
index 5021fc96cae387b6eab850e2d8f083747b6ddd50..2a5c24998f36851c18606a8d225a6a5a69c1a9c6 100644 |
--- a/Source/core/inspector/InspectorCSSAgent.cpp |
+++ b/Source/core/inspector/InspectorCSSAgent.cpp |
@@ -1065,11 +1065,15 @@ void InspectorCSSAgent::collectPlatformFontsForRenderer(RenderText* renderer, Ha |
} |
void InspectorCSSAgent::getPlatformFontsForNode(ErrorString* errorString, int nodeId, |
- RefPtr<TypeBuilder::Array<TypeBuilder::CSS::PlatformFontUsage> >& platformFontUsage) |
+ String* cssFamilyName, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::PlatformFontUsage> >& platformFonts) |
{ |
Node* node = m_domAgent->assertNode(errorString, nodeId); |
if (!node) |
return; |
+ |
+ RefPtr<CSSComputedStyleDeclaration> computedStyleInfo = CSSComputedStyleDeclaration::create(node, true); |
+ *cssFamilyName = computedStyleInfo->getPropertyValue(CSSPropertyFontFamily); |
+ |
Vector<Node*> textNodes; |
if (node->nodeType() == Node::TEXT_NODE) { |
if (node->renderer()) |
@@ -1097,12 +1101,12 @@ void InspectorCSSAgent::getPlatformFontsForNode(ErrorString* errorString, int no |
} |
} |
- platformFontUsage = TypeBuilder::Array<TypeBuilder::CSS::PlatformFontUsage>::create(); |
+ platformFonts = TypeBuilder::Array<TypeBuilder::CSS::PlatformFontUsage>::create(); |
for (HashMap<String, int>::iterator it = fontStats.begin(), end = fontStats.end(); it != end; ++it) { |
RefPtr<TypeBuilder::CSS::PlatformFontUsage> platformFont = TypeBuilder::CSS::PlatformFontUsage::create() |
.setFamilyName(it->key) |
.setGlyphCount(it->value); |
- platformFontUsage->addItem(platformFont); |
+ platformFonts->addItem(platformFont); |
} |
} |