| 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 21 matching lines...) Expand all Loading... |
| 32 #include "core/dom/Document.h" | 32 #include "core/dom/Document.h" |
| 33 #include "core/frame/FrameView.h" | 33 #include "core/frame/FrameView.h" |
| 34 #include "core/frame/LocalFrame.h" | 34 #include "core/frame/LocalFrame.h" |
| 35 #include "core/frame/Settings.h" | 35 #include "core/frame/Settings.h" |
| 36 #include "core/html/HTMLAreaElement.h" | 36 #include "core/html/HTMLAreaElement.h" |
| 37 #include "core/html/HTMLImageElement.h" | 37 #include "core/html/HTMLImageElement.h" |
| 38 #include "core/html/HTMLInputElement.h" | 38 #include "core/html/HTMLInputElement.h" |
| 39 #include "core/html/HTMLLabelElement.h" | 39 #include "core/html/HTMLLabelElement.h" |
| 40 #include "core/html/HTMLOptionElement.h" | 40 #include "core/html/HTMLOptionElement.h" |
| 41 #include "core/html/HTMLSelectElement.h" | 41 #include "core/html/HTMLSelectElement.h" |
| 42 #include "core/html/forms/FormController.h" |
| 42 #include "core/layout/LayoutListBox.h" | 43 #include "core/layout/LayoutListBox.h" |
| 43 #include "core/layout/LayoutMenuList.h" | 44 #include "core/layout/LayoutMenuList.h" |
| 44 #include "core/layout/LayoutProgress.h" | 45 #include "core/layout/LayoutProgress.h" |
| 45 #include "core/layout/LayoutSlider.h" | 46 #include "core/layout/LayoutSlider.h" |
| 46 #include "core/layout/LayoutTable.h" | 47 #include "core/layout/LayoutTable.h" |
| 47 #include "core/layout/LayoutTableCell.h" | 48 #include "core/layout/LayoutTableCell.h" |
| 48 #include "core/layout/LayoutTableRow.h" | 49 #include "core/layout/LayoutTableRow.h" |
| 49 #include "core/layout/LayoutView.h" | 50 #include "core/layout/LayoutView.h" |
| 50 #include "core/layout/line/AbstractInlineTextBox.h" | 51 #include "core/layout/line/AbstractInlineTextBox.h" |
| 51 #include "core/page/ChromeClient.h" | 52 #include "core/page/ChromeClient.h" |
| 52 #include "core/page/FocusController.h" | 53 #include "core/page/FocusController.h" |
| 53 #include "core/page/Page.h" | 54 #include "core/page/Page.h" |
| 54 #include "modules/accessibility/AXARIAGrid.h" | 55 #include "modules/accessibility/AXARIAGrid.h" |
| 55 #include "modules/accessibility/AXARIAGridCell.h" | 56 #include "modules/accessibility/AXARIAGridCell.h" |
| 56 #include "modules/accessibility/AXARIAGridRow.h" | 57 #include "modules/accessibility/AXARIAGridRow.h" |
| 57 #include "modules/accessibility/AXImageMapLink.h" | 58 #include "modules/accessibility/AXImageMapLink.h" |
| 58 #include "modules/accessibility/AXInlineTextBox.h" | 59 #include "modules/accessibility/AXInlineTextBox.h" |
| 59 #include "modules/accessibility/AXLayoutObject.h" | 60 #include "modules/accessibility/AXLayoutObject.h" |
| 60 #include "modules/accessibility/AXList.h" | 61 #include "modules/accessibility/AXList.h" |
| 61 #include "modules/accessibility/AXListBox.h" | 62 #include "modules/accessibility/AXListBox.h" |
| 62 #include "modules/accessibility/AXListBoxOption.h" | 63 #include "modules/accessibility/AXListBoxOption.h" |
| 63 #include "modules/accessibility/AXMediaControls.h" | 64 #include "modules/accessibility/AXMediaControls.h" |
| 64 #include "modules/accessibility/AXMenuList.h" | 65 #include "modules/accessibility/AXMenuList.h" |
| 65 #include "modules/accessibility/AXMenuListOption.h" | 66 #include "modules/accessibility/AXMenuListOption.h" |
| 66 #include "modules/accessibility/AXMenuListPopup.h" | 67 #include "modules/accessibility/AXMenuListPopup.h" |
| 67 #include "modules/accessibility/AXProgressIndicator.h" | 68 #include "modules/accessibility/AXProgressIndicator.h" |
| 69 #include "modules/accessibility/AXRadioInput.h" |
| 68 #include "modules/accessibility/AXSVGRoot.h" | 70 #include "modules/accessibility/AXSVGRoot.h" |
| 69 #include "modules/accessibility/AXSlider.h" | 71 #include "modules/accessibility/AXSlider.h" |
| 70 #include "modules/accessibility/AXSpinButton.h" | 72 #include "modules/accessibility/AXSpinButton.h" |
| 71 #include "modules/accessibility/AXTable.h" | 73 #include "modules/accessibility/AXTable.h" |
| 72 #include "modules/accessibility/AXTableCell.h" | 74 #include "modules/accessibility/AXTableCell.h" |
| 73 #include "modules/accessibility/AXTableColumn.h" | 75 #include "modules/accessibility/AXTableColumn.h" |
| 74 #include "modules/accessibility/AXTableHeaderContainer.h" | 76 #include "modules/accessibility/AXTableHeaderContainer.h" |
| 75 #include "modules/accessibility/AXTableRow.h" | 77 #include "modules/accessibility/AXTableRow.h" |
| 76 #include "wtf/PassRefPtr.h" | 78 #include "wtf/PassRefPtr.h" |
| 77 | 79 |
| (...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")) | 300 if (nodeHasRole(node, "gridcell") || nodeHasRole(node, "columnheader") || no
deHasRole(node, "rowheader")) |
| 299 return AXARIAGridCell::create(layoutObject, *this); | 301 return AXARIAGridCell::create(layoutObject, *this); |
| 300 | 302 |
| 301 // media controls | 303 // media controls |
| 302 if (node && node->isMediaControlElement()) | 304 if (node && node->isMediaControlElement()) |
| 303 return AccessibilityMediaControl::create(layoutObject, *this); | 305 return AccessibilityMediaControl::create(layoutObject, *this); |
| 304 | 306 |
| 305 if (isHTMLOptionElement(node)) | 307 if (isHTMLOptionElement(node)) |
| 306 return AXListBoxOption::create(layoutObject, *this); | 308 return AXListBoxOption::create(layoutObject, *this); |
| 307 | 309 |
| 310 if (isHTMLInputElement(node) && toHTMLInputElement(node)->isRadioButton()) |
| 311 return AXRadioInput::create(layoutObject, *this); |
| 312 |
| 308 if (layoutObject->isSVGRoot()) | 313 if (layoutObject->isSVGRoot()) |
| 309 return AXSVGRoot::create(layoutObject, *this); | 314 return AXSVGRoot::create(layoutObject, *this); |
| 310 | 315 |
| 311 if (layoutObject->isBoxModelObject()) { | 316 if (layoutObject->isBoxModelObject()) { |
| 312 LayoutBoxModelObject* cssBox = toLayoutBoxModelObject(layoutObject); | 317 LayoutBoxModelObject* cssBox = toLayoutBoxModelObject(layoutObject); |
| 313 if (cssBox->isListBox()) | 318 if (cssBox->isListBox()) |
| 314 return AXListBox::create(toLayoutListBox(cssBox), *this); | 319 return AXListBox::create(toLayoutListBox(cssBox), *this); |
| 315 if (cssBox->isMenuList()) | 320 if (cssBox->isMenuList()) |
| 316 return AXMenuList::create(toLayoutMenuList(cssBox), *this); | 321 return AXMenuList::create(toLayoutMenuList(cssBox), *this); |
| 317 | 322 |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 | 920 |
| 916 void AXObjectCacheImpl::listboxActiveIndexChanged(HTMLSelectElement* select) | 921 void AXObjectCacheImpl::listboxActiveIndexChanged(HTMLSelectElement* select) |
| 917 { | 922 { |
| 918 AXObject* obj = get(select); | 923 AXObject* obj = get(select); |
| 919 if (!obj || !obj->isAXListBox()) | 924 if (!obj || !obj->isAXListBox()) |
| 920 return; | 925 return; |
| 921 | 926 |
| 922 toAXListBox(obj)->activeIndexChanged(); | 927 toAXListBox(obj)->activeIndexChanged(); |
| 923 } | 928 } |
| 924 | 929 |
| 930 void AXObjectCacheImpl::radiobuttonPositionChanged(HTMLInputElement* radioinput,
int position) |
| 931 { |
| 932 AXObject* obj = get(radioinput); |
| 933 if (!obj || !obj->isAXRadioInput()) |
| 934 return; |
| 935 |
| 936 toAXRadioInput(obj)->posInSetChanged(position); |
| 937 } |
| 938 |
| 925 void AXObjectCacheImpl::handleLayoutComplete(LayoutObject* layoutObject) | 939 void AXObjectCacheImpl::handleLayoutComplete(LayoutObject* layoutObject) |
| 926 { | 940 { |
| 927 if (!layoutObject) | 941 if (!layoutObject) |
| 928 return; | 942 return; |
| 929 | 943 |
| 930 m_modificationCount++; | 944 m_modificationCount++; |
| 931 | 945 |
| 932 // Create the AXObject if it didn't yet exist - that's always safe at the en
d of a layout, and it | 946 // Create the AXObject if it didn't yet exist - that's always safe at the en
d of a layout, and it |
| 933 // allows an AX notification to be sent when a page has its first layout, ra
ther than when the | 947 // allows an AX notification to be sent when a page has its first layout, ra
ther than when the |
| 934 // document first loads. | 948 // document first loads. |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1262 visitor->trace(m_nodeObjectMapping); | 1276 visitor->trace(m_nodeObjectMapping); |
| 1263 #endif | 1277 #endif |
| 1264 | 1278 |
| 1265 visitor->trace(m_objects); | 1279 visitor->trace(m_objects); |
| 1266 visitor->trace(m_notificationsToPost); | 1280 visitor->trace(m_notificationsToPost); |
| 1267 | 1281 |
| 1268 AXObjectCache::trace(visitor); | 1282 AXObjectCache::trace(visitor); |
| 1269 } | 1283 } |
| 1270 | 1284 |
| 1271 } // namespace blink | 1285 } // namespace blink |
| OLD | NEW |