Chromium Code Reviews| Index: Source/modules/accessibility/AXRenderObject.cpp |
| diff --git a/Source/modules/accessibility/AXRenderObject.cpp b/Source/modules/accessibility/AXRenderObject.cpp |
| index aaccaacbfc23aac6aa405be6ee28755266f7de4e..ca3077ec993db8602a6282c468681e9b5ac1eece 100644 |
| --- a/Source/modules/accessibility/AXRenderObject.cpp |
| +++ b/Source/modules/accessibility/AXRenderObject.cpp |
| @@ -848,15 +848,35 @@ const AtomicString& AXRenderObject::accessKey() const |
| AccessibilityOrientation AXRenderObject::orientation() const |
| { |
| const AtomicString& ariaOrientation = getAttribute(aria_orientationAttr); |
| - if (equalIgnoringCase(ariaOrientation, "horizontal")) |
| - return AccessibilityOrientationHorizontal; |
| - if (equalIgnoringCase(ariaOrientation, "vertical")) |
| - return AccessibilityOrientationVertical; |
| + AccessibilityOrientation axorientation = AccessibilityOrientationUndefined; |
| - if (isScrollbar()) |
| - return AccessibilityOrientationVertical; |
| + switch (roleValue()) { |
| + case ComboBoxRole: |
| + case ListBoxRole: |
| + case MenuRole: |
| + case ScrollBarRole: |
| + case TreeRole: |
| + axorientation = AccessibilityOrientationVertical; |
| + break; |
| + case MenuBarRole: |
| + case SliderRole: |
| + case SplitterRole: |
| + case TabListRole: |
| + case ToolbarRole: |
| + axorientation = AccessibilityOrientationHorizontal; |
| + break; |
| + case RadioGroupRole: |
| + case TreeGridRole: |
|
shreeramk
2014/11/21 11:07:47
Here, TreeGridRole case is not true.
Reason: role
dmazzoni
2014/11/24 17:36:59
The logic sounds great.
To make the code more rea
shreeramk
2014/11/25 08:58:37
Added code for TreeGridRole.
|
| + break; |
| + default: |
| + return AXObject::orientation(); |
| + } |
| - return AXObject::orientation(); |
| + if (equalIgnoringCase(ariaOrientation, "horizontal")) |
| + axorientation = AccessibilityOrientationHorizontal; |
| + if (equalIgnoringCase(ariaOrientation, "vertical")) |
| + axorientation = AccessibilityOrientationVertical; |
| + return axorientation; |
| } |
| String AXRenderObject::text() const |