OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
669 updateCachedAttributeValuesIfNeeded(); | 669 updateCachedAttributeValuesIfNeeded(); |
670 return m_cachedHasInheritedPresentationalRole; | 670 return m_cachedHasInheritedPresentationalRole; |
671 } | 671 } |
672 | 672 |
673 bool AXObject::isPresentationalChild() const | 673 bool AXObject::isPresentationalChild() const |
674 { | 674 { |
675 updateCachedAttributeValuesIfNeeded(); | 675 updateCachedAttributeValuesIfNeeded(); |
676 return m_cachedIsPresentationalChild; | 676 return m_cachedIsPresentationalChild; |
677 } | 677 } |
678 | 678 |
679 String AXObject::computedName() const | |
680 { | |
681 AXNameFrom nameFrom; | |
682 AXObject::AXObjectVector nameObjects; | |
683 return name(nameFrom, &nameObjects); | |
684 } | |
685 | |
679 String AXObject::name(AXNameFrom& nameFrom, AXObject::AXObjectVector* nameObject s) const | 686 String AXObject::name(AXNameFrom& nameFrom, AXObject::AXObjectVector* nameObject s) const |
680 { | 687 { |
681 HeapHashSet<Member<const AXObject>> visited; | 688 HeapHashSet<Member<const AXObject>> visited; |
682 AXRelatedObjectVector relatedObjects; | 689 AXRelatedObjectVector relatedObjects; |
683 String text = textAlternative(false, false, visited, nameFrom, &relatedObjec ts, nullptr); | 690 String text = textAlternative(false, false, visited, nameFrom, &relatedObjec ts, nullptr); |
684 | 691 |
685 if (!node() || !isHTMLBRElement(node())) | 692 if (!node() || !isHTMLBRElement(node())) |
686 text = text.simplifyWhiteSpace(isHTMLSpace<UChar>); | 693 text = text.simplifyWhiteSpace(isHTMLSpace<UChar>, WTF::DoNotStripWhiteS pace); |
687 | 694 |
688 if (nameObjects) { | 695 if (nameObjects) { |
689 nameObjects->clear(); | 696 nameObjects->clear(); |
690 for (size_t i = 0; i < relatedObjects.size(); i++) | 697 for (size_t i = 0; i < relatedObjects.size(); i++) |
691 nameObjects->append(relatedObjects[i]->object); | 698 nameObjects->append(relatedObjects[i]->object); |
692 } | 699 } |
693 return text; | 700 return text; |
694 } | 701 } |
695 | 702 |
696 String AXObject::name(NameSources* nameSources) const | 703 String AXObject::name(NameSources* nameSources) const |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1473 case DisclosureTriangleRole: | 1480 case DisclosureTriangleRole: |
1474 case HeadingRole: | 1481 case HeadingRole: |
1475 case LineBreakRole: | 1482 case LineBreakRole: |
1476 case LinkRole: | 1483 case LinkRole: |
1477 case ListBoxOptionRole: | 1484 case ListBoxOptionRole: |
1478 case ListItemRole: | 1485 case ListItemRole: |
1479 case MenuItemRole: | 1486 case MenuItemRole: |
1480 case MenuItemCheckBoxRole: | 1487 case MenuItemCheckBoxRole: |
1481 case MenuItemRadioRole: | 1488 case MenuItemRadioRole: |
1482 case MenuListOptionRole: | 1489 case MenuListOptionRole: |
1490 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
| |
1483 case RadioButtonRole: | 1491 case RadioButtonRole: |
1484 case StaticTextRole: | 1492 case StaticTextRole: |
1485 case StatusRole: | 1493 case StatusRole: |
1486 case SwitchRole: | 1494 case SwitchRole: |
1487 case TabRole: | 1495 case TabRole: |
1488 case ToggleButtonRole: | 1496 case ToggleButtonRole: |
1489 case TreeItemRole: | |
dmazzoni
2015/11/16 18:52:04
Same here - I don't care what the spec says, this
| |
1490 return true; | 1497 return true; |
1491 default: | 1498 default: |
1492 return false; | 1499 return false; |
1493 } | 1500 } |
1494 } | 1501 } |
1495 | 1502 |
1496 AccessibilityRole AXObject::buttonRoleType() const | 1503 AccessibilityRole AXObject::buttonRoleType() const |
1497 { | 1504 { |
1498 // If aria-pressed is present, then it should be exposed as a toggle button. | 1505 // If aria-pressed is present, then it should be exposed as a toggle button. |
1499 // http://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed | 1506 // http://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed |
(...skipping 23 matching lines...) Expand all Loading... | |
1523 | 1530 |
1524 DEFINE_TRACE(AXObject) | 1531 DEFINE_TRACE(AXObject) |
1525 { | 1532 { |
1526 visitor->trace(m_children); | 1533 visitor->trace(m_children); |
1527 visitor->trace(m_parent); | 1534 visitor->trace(m_parent); |
1528 visitor->trace(m_cachedLiveRegionRoot); | 1535 visitor->trace(m_cachedLiveRegionRoot); |
1529 visitor->trace(m_axObjectCache); | 1536 visitor->trace(m_axObjectCache); |
1530 } | 1537 } |
1531 | 1538 |
1532 } // namespace blink | 1539 } // namespace blink |
OLD | NEW |