| 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 m_lastKnownIsIgnoredValue = accessibilityIsIgnored() ? IgnoreObject : In
cludeObject; | 330 m_lastKnownIsIgnoredValue = accessibilityIsIgnored() ? IgnoreObject : In
cludeObject; |
| 331 | 331 |
| 332 return m_lastKnownIsIgnoredValue == IgnoreObject; | 332 return m_lastKnownIsIgnoredValue == IgnoreObject; |
| 333 } | 333 } |
| 334 | 334 |
| 335 void AXObject::setLastKnownIsIgnoredValue(bool isIgnored) | 335 void AXObject::setLastKnownIsIgnoredValue(bool isIgnored) |
| 336 { | 336 { |
| 337 m_lastKnownIsIgnoredValue = isIgnored ? IgnoreObject : IncludeObject; | 337 m_lastKnownIsIgnoredValue = isIgnored ? IgnoreObject : IncludeObject; |
| 338 } | 338 } |
| 339 | 339 |
| 340 // Lacking concrete evidence of orientation, horizontal means width > height. ve
rtical is height > width; | 340 // In ARIA 1.1, the default value for aria-orientation changed from horizontal t
o undefined. |
| 341 AccessibilityOrientation AXObject::orientation() const | 341 AccessibilityOrientation AXObject::orientation() const |
| 342 { | 342 { |
| 343 LayoutRect bounds = elementRect(); | 343 return AccessibilityOrientationUndefined; |
| 344 if (bounds.size().width() > bounds.size().height()) | |
| 345 return AccessibilityOrientationHorizontal; | |
| 346 if (bounds.size().height() > bounds.size().width()) | |
| 347 return AccessibilityOrientationVertical; | |
| 348 | |
| 349 // A tie goes to horizontal. | |
| 350 return AccessibilityOrientationHorizontal; | |
| 351 } | 344 } |
| 352 | 345 |
| 353 static String queryString(WebLocalizedString::Name name) | 346 static String queryString(WebLocalizedString::Name name) |
| 354 { | 347 { |
| 355 return Locale::defaultLocale().queryString(name); | 348 return Locale::defaultLocale().queryString(name); |
| 356 } | 349 } |
| 357 | 350 |
| 358 String AXObject::actionVerb() const | 351 String AXObject::actionVerb() const |
| 359 { | 352 { |
| 360 // FIXME: Need to add verbs for select elements. | 353 // FIXME: Need to add verbs for select elements. |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 return ToggleButtonRole; | 972 return ToggleButtonRole; |
| 980 if (ariaHasPopup()) | 973 if (ariaHasPopup()) |
| 981 return PopUpButtonRole; | 974 return PopUpButtonRole; |
| 982 // We don't contemplate RadioButtonRole, as it depends on the input | 975 // We don't contemplate RadioButtonRole, as it depends on the input |
| 983 // type. | 976 // type. |
| 984 | 977 |
| 985 return ButtonRole; | 978 return ButtonRole; |
| 986 } | 979 } |
| 987 | 980 |
| 988 } // namespace blink | 981 } // namespace blink |
| OLD | NEW |