Index: third_party/WebKit/Source/modules/accessibility/AXObject.cpp |
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp |
index a42851d0de31cac768b73194897a01fab759e9e3..f166c05eebaa4c81126a4b534e246c60a67b89f0 100644 |
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp |
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp |
@@ -676,6 +676,13 @@ bool AXObject::isPresentationalChild() const |
return m_cachedIsPresentationalChild; |
} |
+String AXObject::computedName() const |
+{ |
+ AXNameFrom nameFrom; |
+ AXObject::AXObjectVector nameObjects; |
+ return name(nameFrom, &nameObjects); |
+} |
+ |
String AXObject::name(AXNameFrom& nameFrom, AXObject::AXObjectVector* nameObjects) const |
{ |
HeapHashSet<Member<const AXObject>> visited; |
@@ -683,7 +690,7 @@ String AXObject::name(AXNameFrom& nameFrom, AXObject::AXObjectVector* nameObject |
String text = textAlternative(false, false, visited, nameFrom, &relatedObjects, nullptr); |
if (!node() || !isHTMLBRElement(node())) |
- text = text.simplifyWhiteSpace(isHTMLSpace<UChar>); |
+ text = text.simplifyWhiteSpace(isHTMLSpace<UChar>, WTF::DoNotStripWhiteSpace); |
if (nameObjects) { |
nameObjects->clear(); |
@@ -1480,13 +1487,13 @@ bool AXObject::nameFromContents() const |
case MenuItemCheckBoxRole: |
case MenuItemRadioRole: |
case MenuListOptionRole: |
+ case PopUpButtonRole: |
aboxhall
2015/11/13 23:13:49
Why has this changed?
dmazzoni
2015/11/16 18:52:04
For an ARIA pop-up button, it didn't seem to make
|
case RadioButtonRole: |
case StaticTextRole: |
case StatusRole: |
case SwitchRole: |
case TabRole: |
case ToggleButtonRole: |
- case TreeItemRole: |
dmazzoni
2015/11/16 18:52:04
Same here - I don't care what the spec says, this
|
return true; |
default: |
return false; |