Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 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 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 840 Node* node = m_renderer->node(); | 840 Node* node = m_renderer->node(); |
| 841 if (!node) | 841 if (!node) |
| 842 return nullAtom; | 842 return nullAtom; |
| 843 if (!node->isElementNode()) | 843 if (!node->isElementNode()) |
| 844 return nullAtom; | 844 return nullAtom; |
| 845 return toElement(node)->getAttribute(accesskeyAttr); | 845 return toElement(node)->getAttribute(accesskeyAttr); |
| 846 } | 846 } |
| 847 | 847 |
| 848 AccessibilityOrientation AXRenderObject::orientation() const | 848 AccessibilityOrientation AXRenderObject::orientation() const |
| 849 { | 849 { |
| 850 const AtomicString& ariaOrientation = getAttribute(aria_orientationAttr); | 850 if (ariaRoleAttribute() == ComboBoxRole |
|
dmazzoni
2014/11/20 16:48:06
You're only checking the aria role, but some of th
| |
| 851 if (equalIgnoringCase(ariaOrientation, "horizontal")) | 851 || ariaRoleAttribute() == ListBoxRole |
| 852 return AccessibilityOrientationHorizontal; | 852 || ariaRoleAttribute() == MenuRole |
| 853 if (equalIgnoringCase(ariaOrientation, "vertical")) | 853 || ariaRoleAttribute() == MenuBarRole |
| 854 return AccessibilityOrientationVertical; | 854 || ariaRoleAttribute() == RadioGroupRole |
| 855 || ariaRoleAttribute() == ScrollBarRole | |
| 856 || ariaRoleAttribute() == SliderRole | |
| 857 || ariaRoleAttribute() == SplitterRole | |
| 858 || ariaRoleAttribute() == TabListRole | |
| 859 || ariaRoleAttribute() == ToolbarRole | |
| 860 || ariaRoleAttribute() == TreeRole | |
| 861 || ariaRoleAttribute() == TreeGridRole) { | |
| 855 | 862 |
| 856 if (isScrollbar()) | 863 const AtomicString& ariaOrientation = getAttribute(aria_orientationAttr) ; |
| 857 return AccessibilityOrientationVertical; | 864 |
| 865 // Adding implicit horizontal orientation | |
| 866 if (equalIgnoringCase(ariaOrientation, "horizontal") | |
| 867 || ariaRoleAttribute() == MenuBarRole | |
| 868 || ariaRoleAttribute() == SplitterRole | |
| 869 || ariaRoleAttribute() == SliderRole | |
| 870 || ariaRoleAttribute() == TabListRole | |
| 871 || ariaRoleAttribute() == ToolbarRole) | |
| 872 return AccessibilityOrientationHorizontal; | |
| 873 | |
| 874 // Adding implicit vertical orientation | |
| 875 if (equalIgnoringCase(ariaOrientation, "vertical") | |
| 876 || ariaRoleAttribute() == ComboBoxRole | |
| 877 || ariaRoleAttribute() == ListBoxRole | |
| 878 || ariaRoleAttribute() == MenuRole | |
| 879 || ariaRoleAttribute() == ScrollBarRole | |
| 880 || ariaRoleAttribute() == TreeRole) | |
| 881 return AccessibilityOrientationVertical; | |
| 882 } | |
| 858 | 883 |
| 859 return AXObject::orientation(); | 884 return AXObject::orientation(); |
| 860 } | 885 } |
| 861 | 886 |
| 862 String AXRenderObject::text() const | 887 String AXRenderObject::text() const |
| 863 { | 888 { |
| 864 if (isPasswordFieldAndShouldHideValue()) | 889 if (isPasswordFieldAndShouldHideValue()) |
| 865 return String(); | 890 return String(); |
| 866 | 891 |
| 867 return AXNodeObject::text(); | 892 return AXNodeObject::text(); |
| (...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2444 if (label && label->renderer()) { | 2469 if (label && label->renderer()) { |
| 2445 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); | 2470 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); |
| 2446 result.unite(labelRect); | 2471 result.unite(labelRect); |
| 2447 } | 2472 } |
| 2448 } | 2473 } |
| 2449 | 2474 |
| 2450 return result; | 2475 return result; |
| 2451 } | 2476 } |
| 2452 | 2477 |
| 2453 } // namespace blink | 2478 } // namespace blink |
| OLD | NEW |