| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 return equalIgnoringCase(toElement(node)->getAttribute(roleAttr), role); | 252 return equalIgnoringCase(toElement(node)->getAttribute(roleAttr), role); |
| 253 } | 253 } |
| 254 | 254 |
| 255 PassRefPtr<AXObject> AXObjectCacheImpl::createFromRenderer(LayoutObject* layoutO
bject) | 255 PassRefPtr<AXObject> AXObjectCacheImpl::createFromRenderer(LayoutObject* layoutO
bject) |
| 256 { | 256 { |
| 257 // FIXME: How could layoutObject->node() ever not be an Element? | 257 // FIXME: How could layoutObject->node() ever not be an Element? |
| 258 Node* node = layoutObject->node(); | 258 Node* node = layoutObject->node(); |
| 259 | 259 |
| 260 // If the node is aria role="list" or the aria role is empty and its a | 260 // If the node is aria role="list" or the aria role is empty and its a |
| 261 // ul/ol/dl type (it shouldn't be a list if aria says otherwise). | 261 // ul/ol/dl type (it shouldn't be a list if aria says otherwise). |
| 262 if (node && ((nodeHasRole(node, "list") || nodeHasRole(node, "directory")) | 262 if (nodeHasRole(node, "list") || nodeHasRole(node, "directory") |
| 263 || (nodeHasRole(node, nullAtom) && (isHTMLUListElement(*node) || isHTMLO
ListElement(*node) || isHTMLDListElement(*node))))) | 263 || (nodeHasRole(node, nullAtom) && (isHTMLUListElement(node) || isHTMLOL
istElement(node) || isHTMLDListElement(node)))) |
| 264 return AXList::create(layoutObject, this); | 264 return AXList::create(layoutObject, this); |
| 265 | 265 |
| 266 // aria tables | 266 // aria tables |
| 267 if (nodeHasRole(node, "grid") || nodeHasRole(node, "treegrid")) | 267 if (nodeHasRole(node, "grid") || nodeHasRole(node, "treegrid")) |
| 268 return AXARIAGrid::create(layoutObject, this); | 268 return AXARIAGrid::create(layoutObject, this); |
| 269 if (nodeHasRole(node, "row")) | 269 if (nodeHasRole(node, "row")) |
| 270 return AXARIAGridRow::create(layoutObject, this); | 270 return AXARIAGridRow::create(layoutObject, this); |
| 271 if (nodeHasRole(node, "gridcell") || nodeHasRole(node, "columnheader") || no
deHasRole(node, "rowheader")) | 271 if (nodeHasRole(node, "gridcell") || nodeHasRole(node, "columnheader") || no
deHasRole(node, "rowheader")) |
| 272 return AXARIAGridCell::create(layoutObject, this); | 272 return AXARIAGridCell::create(layoutObject, this); |
| 273 | 273 |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1121 void AXObjectCacheImpl::setCanvasObjectBounds(Element* element, const LayoutRect
& rect) | 1121 void AXObjectCacheImpl::setCanvasObjectBounds(Element* element, const LayoutRect
& rect) |
| 1122 { | 1122 { |
| 1123 AXObject* obj = getOrCreate(element); | 1123 AXObject* obj = getOrCreate(element); |
| 1124 if (!obj) | 1124 if (!obj) |
| 1125 return; | 1125 return; |
| 1126 | 1126 |
| 1127 obj->setElementRect(rect); | 1127 obj->setElementRect(rect); |
| 1128 } | 1128 } |
| 1129 | 1129 |
| 1130 } // namespace blink | 1130 } // namespace blink |
| OLD | NEW |