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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 return IgnoreObject; | 282 return IgnoreObject; |
283 | 283 |
284 if (isPresentationalChildOfAriaRole()) | 284 if (isPresentationalChildOfAriaRole()) |
285 return IgnoreObject; | 285 return IgnoreObject; |
286 | 286 |
287 return accessibilityPlatformIncludesObject(); | 287 return accessibilityPlatformIncludesObject(); |
288 } | 288 } |
289 | 289 |
290 bool AXObject::isInertOrAriaHidden() const | 290 bool AXObject::isInertOrAriaHidden() const |
291 { | 291 { |
292 if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "true")) | 292 bool mightBeInInertSubtree = true; |
293 return true; | 293 for (const AXObject* object = this; object; object = object->parentObject())
{ |
294 if (node() && node()->isInert()) | |
295 return true; | |
296 | |
297 for (AXObject* object = parentObject(); object; object = object->parentObjec
t()) { | |
298 if (equalIgnoringCase(object->getAttribute(aria_hiddenAttr), "true")) | 294 if (equalIgnoringCase(object->getAttribute(aria_hiddenAttr), "true")) |
299 return true; | 295 return true; |
| 296 if (mightBeInInertSubtree && object->node()) { |
| 297 if (object->node()->isInert()) |
| 298 return true; |
| 299 mightBeInInertSubtree = false; |
| 300 } |
300 } | 301 } |
301 | 302 |
302 return false; | 303 return false; |
303 } | 304 } |
304 | 305 |
305 bool AXObject::lastKnownIsIgnoredValue() | 306 bool AXObject::lastKnownIsIgnoredValue() |
306 { | 307 { |
307 if (m_lastKnownIsIgnoredValue == DefaultBehavior) | 308 if (m_lastKnownIsIgnoredValue == DefaultBehavior) |
308 m_lastKnownIsIgnoredValue = accessibilityIsIgnored() ? IgnoreObject : In
cludeObject; | 309 m_lastKnownIsIgnoredValue = accessibilityIsIgnored() ? IgnoreObject : In
cludeObject; |
309 | 310 |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 offsetY -= (scrollPosition.y() + point.y()); | 810 offsetY -= (scrollPosition.y() + point.y()); |
810 point.move(scrollPosition.x() - innerRect.x(), scrollPosition.y() -
innerRect.y()); | 811 point.move(scrollPosition.x() - innerRect.x(), scrollPosition.y() -
innerRect.y()); |
811 } else if (inner->isAXScrollView()) { | 812 } else if (inner->isAXScrollView()) { |
812 // Otherwise, if the inner object is a scroll view, reset the coordi
nate transformation. | 813 // Otherwise, if the inner object is a scroll view, reset the coordi
nate transformation. |
813 offsetX = 0; | 814 offsetX = 0; |
814 offsetY = 0; | 815 offsetY = 0; |
815 } | 816 } |
816 } | 817 } |
817 } | 818 } |
818 | 819 |
819 void AXObject::notifyIfIgnoredValueChanged() | 820 bool AXObject::notifyIfIgnoredValueChanged() |
820 { | 821 { |
821 bool isIgnored = accessibilityIsIgnored(); | 822 bool isIgnored = accessibilityIsIgnored(); |
822 if (lastKnownIsIgnoredValue() != isIgnored) { | 823 if (lastKnownIsIgnoredValue() != isIgnored) { |
823 axObjectCache()->childrenChanged(parentObject()); | 824 axObjectCache()->childrenChanged(parentObject()); |
824 setLastKnownIsIgnoredValue(isIgnored); | 825 setLastKnownIsIgnoredValue(isIgnored); |
| 826 return true; |
825 } | 827 } |
| 828 return false; |
826 } | 829 } |
827 | 830 |
828 void AXObject::selectionChanged() | 831 void AXObject::selectionChanged() |
829 { | 832 { |
830 if (AXObject* parent = parentObjectIfExists()) | 833 if (AXObject* parent = parentObjectIfExists()) |
831 parent->selectionChanged(); | 834 parent->selectionChanged(); |
832 } | 835 } |
833 | 836 |
834 int AXObject::lineForPosition(const VisiblePosition& visiblePos) const | 837 int AXObject::lineForPosition(const VisiblePosition& visiblePos) const |
835 { | 838 { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 return ToggleButtonRole; | 900 return ToggleButtonRole; |
898 if (ariaHasPopup()) | 901 if (ariaHasPopup()) |
899 return PopUpButtonRole; | 902 return PopUpButtonRole; |
900 // We don't contemplate RadioButtonRole, as it depends on the input | 903 // We don't contemplate RadioButtonRole, as it depends on the input |
901 // type. | 904 // type. |
902 | 905 |
903 return ButtonRole; | 906 return ButtonRole; |
904 } | 907 } |
905 | 908 |
906 } // namespace WebCore | 909 } // namespace WebCore |
OLD | NEW |