| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014, Google Inc. All rights reserved. | 2 * Copyright (C) 2014, 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "modules/accessibility/AXInlineTextBox.h" | 58 #include "modules/accessibility/AXInlineTextBox.h" |
| 59 #include "modules/accessibility/AXLayoutObject.h" | 59 #include "modules/accessibility/AXLayoutObject.h" |
| 60 #include "modules/accessibility/AXList.h" | 60 #include "modules/accessibility/AXList.h" |
| 61 #include "modules/accessibility/AXListBox.h" | 61 #include "modules/accessibility/AXListBox.h" |
| 62 #include "modules/accessibility/AXListBoxOption.h" | 62 #include "modules/accessibility/AXListBoxOption.h" |
| 63 #include "modules/accessibility/AXMediaControls.h" | 63 #include "modules/accessibility/AXMediaControls.h" |
| 64 #include "modules/accessibility/AXMenuList.h" | 64 #include "modules/accessibility/AXMenuList.h" |
| 65 #include "modules/accessibility/AXMenuListOption.h" | 65 #include "modules/accessibility/AXMenuListOption.h" |
| 66 #include "modules/accessibility/AXMenuListPopup.h" | 66 #include "modules/accessibility/AXMenuListPopup.h" |
| 67 #include "modules/accessibility/AXProgressIndicator.h" | 67 #include "modules/accessibility/AXProgressIndicator.h" |
| 68 #include "modules/accessibility/AXRadioInput.h" |
| 68 #include "modules/accessibility/AXSVGRoot.h" | 69 #include "modules/accessibility/AXSVGRoot.h" |
| 69 #include "modules/accessibility/AXSlider.h" | 70 #include "modules/accessibility/AXSlider.h" |
| 70 #include "modules/accessibility/AXSpinButton.h" | 71 #include "modules/accessibility/AXSpinButton.h" |
| 71 #include "modules/accessibility/AXTable.h" | 72 #include "modules/accessibility/AXTable.h" |
| 72 #include "modules/accessibility/AXTableCell.h" | 73 #include "modules/accessibility/AXTableCell.h" |
| 73 #include "modules/accessibility/AXTableColumn.h" | 74 #include "modules/accessibility/AXTableColumn.h" |
| 74 #include "modules/accessibility/AXTableHeaderContainer.h" | 75 #include "modules/accessibility/AXTableHeaderContainer.h" |
| 75 #include "modules/accessibility/AXTableRow.h" | 76 #include "modules/accessibility/AXTableRow.h" |
| 76 #include "wtf/PassRefPtr.h" | 77 #include "wtf/PassRefPtr.h" |
| 77 | 78 |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 if (nodeHasRole(node, "gridcell") || nodeHasRole(node, "columnheader") || no
deHasRole(node, "rowheader")) | 299 if (nodeHasRole(node, "gridcell") || nodeHasRole(node, "columnheader") || no
deHasRole(node, "rowheader")) |
| 299 return AXARIAGridCell::create(layoutObject, *this); | 300 return AXARIAGridCell::create(layoutObject, *this); |
| 300 | 301 |
| 301 // media controls | 302 // media controls |
| 302 if (node && node->isMediaControlElement()) | 303 if (node && node->isMediaControlElement()) |
| 303 return AccessibilityMediaControl::create(layoutObject, *this); | 304 return AccessibilityMediaControl::create(layoutObject, *this); |
| 304 | 305 |
| 305 if (isHTMLOptionElement(node)) | 306 if (isHTMLOptionElement(node)) |
| 306 return AXListBoxOption::create(layoutObject, *this); | 307 return AXListBoxOption::create(layoutObject, *this); |
| 307 | 308 |
| 309 if (isHTMLInputElement(node) && toHTMLInputElement(node)->isRadioButton()) |
| 310 return AXRadioInput::create(layoutObject, *this); |
| 311 |
| 308 if (layoutObject->isSVGRoot()) | 312 if (layoutObject->isSVGRoot()) |
| 309 return AXSVGRoot::create(layoutObject, *this); | 313 return AXSVGRoot::create(layoutObject, *this); |
| 310 | 314 |
| 311 if (layoutObject->isBoxModelObject()) { | 315 if (layoutObject->isBoxModelObject()) { |
| 312 LayoutBoxModelObject* cssBox = toLayoutBoxModelObject(layoutObject); | 316 LayoutBoxModelObject* cssBox = toLayoutBoxModelObject(layoutObject); |
| 313 if (cssBox->isListBox()) | 317 if (cssBox->isListBox()) |
| 314 return AXListBox::create(toLayoutListBox(cssBox), *this); | 318 return AXListBox::create(toLayoutListBox(cssBox), *this); |
| 315 if (cssBox->isMenuList()) | 319 if (cssBox->isMenuList()) |
| 316 return AXMenuList::create(toLayoutMenuList(cssBox), *this); | 320 return AXMenuList::create(toLayoutMenuList(cssBox), *this); |
| 317 | 321 |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 | 929 |
| 926 void AXObjectCacheImpl::listboxActiveIndexChanged(HTMLSelectElement* select) | 930 void AXObjectCacheImpl::listboxActiveIndexChanged(HTMLSelectElement* select) |
| 927 { | 931 { |
| 928 AXObject* obj = get(select); | 932 AXObject* obj = get(select); |
| 929 if (!obj || !obj->isAXListBox()) | 933 if (!obj || !obj->isAXListBox()) |
| 930 return; | 934 return; |
| 931 | 935 |
| 932 toAXListBox(obj)->activeIndexChanged(); | 936 toAXListBox(obj)->activeIndexChanged(); |
| 933 } | 937 } |
| 934 | 938 |
| 939 void AXObjectCacheImpl::radiobuttonRemovedFromGroup(HTMLInputElement* groupMembe
r) |
| 940 { |
| 941 AXObject* obj = get(groupMember); |
| 942 if (!obj || !obj->isAXRadioInput()) |
| 943 return; |
| 944 |
| 945 // The 'posInSet' and 'setSize' attributes should be updated from the first
node, |
| 946 // as the removed node is already detached from tree. |
| 947 HTMLInputElement* firstRadio = toAXRadioInput(obj)->findFirstFocusableRadioB
uttonInGroup(groupMember); |
| 948 AXObject* firstObj = get(firstRadio); |
| 949 if (!firstObj || !firstObj->isAXRadioInput()) |
| 950 return; |
| 951 |
| 952 toAXRadioInput(firstObj)->updatePosAndSetSize(1); |
| 953 postNotification(firstObj, AXAriaAttributeChanged); |
| 954 toAXRadioInput(firstObj)->requestUpdateToNextNode(true); |
| 955 } |
| 956 |
| 935 void AXObjectCacheImpl::handleLayoutComplete(LayoutObject* layoutObject) | 957 void AXObjectCacheImpl::handleLayoutComplete(LayoutObject* layoutObject) |
| 936 { | 958 { |
| 937 if (!layoutObject) | 959 if (!layoutObject) |
| 938 return; | 960 return; |
| 939 | 961 |
| 940 m_modificationCount++; | 962 m_modificationCount++; |
| 941 | 963 |
| 942 // Create the AXObject if it didn't yet exist - that's always safe at the en
d of a layout, and it | 964 // Create the AXObject if it didn't yet exist - that's always safe at the en
d of a layout, and it |
| 943 // allows an AX notification to be sent when a page has its first layout, ra
ther than when the | 965 // allows an AX notification to be sent when a page has its first layout, ra
ther than when the |
| 944 // document first loads. | 966 // document first loads. |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1272 visitor->trace(m_nodeObjectMapping); | 1294 visitor->trace(m_nodeObjectMapping); |
| 1273 #endif | 1295 #endif |
| 1274 | 1296 |
| 1275 visitor->trace(m_objects); | 1297 visitor->trace(m_objects); |
| 1276 visitor->trace(m_notificationsToPost); | 1298 visitor->trace(m_notificationsToPost); |
| 1277 | 1299 |
| 1278 AXObjectCache::trace(visitor); | 1300 AXObjectCache::trace(visitor); |
| 1279 } | 1301 } |
| 1280 | 1302 |
| 1281 } // namespace blink | 1303 } // namespace blink |
| OLD | NEW |