Index: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
diff --git a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
index 52ecb9ff71f585200c1f3391178697417f1baa80..68ea5151aff987cef4dbe195ce369819c64ede17 100644 |
--- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
+++ b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
@@ -824,10 +824,10 @@ const AtomicString& AXLayoutObject::accessKey() const |
RGBA32 AXLayoutObject::backgroundColor() const |
{ |
- if (!m_layoutObject) |
+ if (!layoutObject()) |
return AXNodeObject::backgroundColor(); |
- const ComputedStyle* style = m_layoutObject->style(); |
+ const ComputedStyle* style = layoutObject()->style(); |
if (!style || !style->hasBackground()) |
return AXNodeObject::backgroundColor(); |
@@ -837,10 +837,10 @@ RGBA32 AXLayoutObject::backgroundColor() const |
RGBA32 AXLayoutObject::color() const |
{ |
- if (!m_layoutObject || isColorWell()) |
+ if (!layoutObject() || isColorWell()) |
return AXNodeObject::color(); |
- const ComputedStyle* style = m_layoutObject->style(); |
+ const ComputedStyle* style = layoutObject()->style(); |
if (!style) |
return AXNodeObject::color(); |
@@ -848,13 +848,26 @@ RGBA32 AXLayoutObject::color() const |
return color.rgb(); |
} |
+String AXLayoutObject::fontFamily() const |
+{ |
+ if (!layoutObject()) |
+ return AXNodeObject::fontFamily(); |
+ |
+ const ComputedStyle* style = layoutObject()->style(); |
+ if (!style) |
+ return AXNodeObject::fontFamily(); |
+ |
+ FontDescription& fontDescription = const_cast<FontDescription&>(style->fontDescription()); |
+ return fontDescription.firstFamily().family(); |
+} |
+ |
// Font size is in pixels. |
float AXLayoutObject::fontSize() const |
{ |
- if (!m_layoutObject) |
+ if (!layoutObject()) |
return AXNodeObject::fontSize(); |
- const ComputedStyle* style = m_layoutObject->style(); |
+ const ComputedStyle* style = layoutObject()->style(); |
if (!style) |
return AXNodeObject::fontSize(); |
@@ -939,10 +952,10 @@ int AXLayoutObject::textLength() const |
TextStyle AXLayoutObject::getTextStyle() const |
{ |
- if (!m_layoutObject) |
+ if (!layoutObject()) |
return AXNodeObject::getTextStyle(); |
- const ComputedStyle* style = m_layoutObject->style(); |
+ const ComputedStyle* style = layoutObject()->style(); |
if (!style) |
return AXNodeObject::getTextStyle(); |