| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, Google 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 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1248 HTMLInputElement* inputElement = toHTMLInputElement(node()); | 1248 HTMLInputElement* inputElement = toHTMLInputElement(node()); |
| 1249 placeholder = inputElement->strippedPlaceholder(); | 1249 placeholder = inputElement->strippedPlaceholder(); |
| 1250 } else if (isHTMLTextAreaElement(*node())) { | 1250 } else if (isHTMLTextAreaElement(*node())) { |
| 1251 HTMLTextAreaElement* textAreaElement = toHTMLTextAreaElement(node())
; | 1251 HTMLTextAreaElement* textAreaElement = toHTMLTextAreaElement(node())
; |
| 1252 placeholder = textAreaElement->strippedPlaceholder(); | 1252 placeholder = textAreaElement->strippedPlaceholder(); |
| 1253 } | 1253 } |
| 1254 } | 1254 } |
| 1255 return placeholder; | 1255 return placeholder; |
| 1256 } | 1256 } |
| 1257 | 1257 |
| 1258 AccessibilityOrientation AXNodeObject::orientation() const |
| 1259 { |
| 1260 const AtomicString& ariaOrientation = getAttribute(aria_orientationAttr); |
| 1261 AccessibilityOrientation orientation = AccessibilityOrientationUndefined; |
| 1262 |
| 1263 switch (roleValue()) { |
| 1264 case ComboBoxRole: |
| 1265 case ListBoxRole: |
| 1266 case MenuRole: |
| 1267 case ScrollBarRole: |
| 1268 case TreeRole: |
| 1269 orientation = AccessibilityOrientationVertical; |
| 1270 if (equalIgnoringCase(ariaOrientation, "horizontal")) |
| 1271 orientation = AccessibilityOrientationHorizontal; |
| 1272 |
| 1273 return orientation; |
| 1274 case MenuBarRole: |
| 1275 case SliderRole: |
| 1276 case SplitterRole: |
| 1277 case TabListRole: |
| 1278 case ToolbarRole: |
| 1279 orientation = AccessibilityOrientationHorizontal; |
| 1280 if (equalIgnoringCase(ariaOrientation, "vertical")) |
| 1281 orientation = AccessibilityOrientationVertical; |
| 1282 |
| 1283 return orientation; |
| 1284 default: |
| 1285 return AXObject::orientation(); |
| 1286 } |
| 1287 } |
| 1288 |
| 1258 String AXNodeObject::text() const | 1289 String AXNodeObject::text() const |
| 1259 { | 1290 { |
| 1260 // If this is a user defined static text, use the accessible name computatio
n. | 1291 // If this is a user defined static text, use the accessible name computatio
n. |
| 1261 if (ariaRoleAttribute() == StaticTextRole) | 1292 if (ariaRoleAttribute() == StaticTextRole) |
| 1262 return ariaAccessibilityDescription(); | 1293 return ariaAccessibilityDescription(); |
| 1263 | 1294 |
| 1264 if (!isTextControl()) | 1295 if (!isTextControl()) |
| 1265 return String(); | 1296 return String(); |
| 1266 | 1297 |
| 1267 Node* node = this->node(); | 1298 Node* node = this->node(); |
| (...skipping 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2784 return textAlternative; | 2815 return textAlternative; |
| 2785 } | 2816 } |
| 2786 | 2817 |
| 2787 DEFINE_TRACE(AXNodeObject) | 2818 DEFINE_TRACE(AXNodeObject) |
| 2788 { | 2819 { |
| 2789 visitor->trace(m_node); | 2820 visitor->trace(m_node); |
| 2790 AXObject::trace(visitor); | 2821 AXObject::trace(visitor); |
| 2791 } | 2822 } |
| 2792 | 2823 |
| 2793 } // namespace blink | 2824 } // namespace blink |
| OLD | NEW |