| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 if (cssBox && cssBox->isTextField()) | 307 if (cssBox && cssBox->isTextField()) |
| 308 return TextFieldRole; | 308 return TextFieldRole; |
| 309 | 309 |
| 310 if (cssBox && cssBox->isTextArea()) | 310 if (cssBox && cssBox->isTextArea()) |
| 311 return TextAreaRole; | 311 return TextAreaRole; |
| 312 | 312 |
| 313 if (isHTMLInputElement(node)) { | 313 if (isHTMLInputElement(node)) { |
| 314 HTMLInputElement& input = toHTMLInputElement(*node); | 314 HTMLInputElement& input = toHTMLInputElement(*node); |
| 315 const AtomicString& type = input.type(); | 315 const AtomicString& type = input.type(); |
| 316 if (type == InputTypeNames::button) { | 316 if (type == InputTypeNames::button) { |
| 317 if (node->parentElement() && isHTMLMenuElement(node->parentElement()
)) | 317 if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) ||
(parentObject() && parentObject()->roleValue() == MenuRole)) |
| 318 return MenuItemRole; | 318 return MenuItemRole; |
| 319 return buttonRoleType(); | 319 return buttonRoleType(); |
| 320 } | 320 } |
| 321 if (type == InputTypeNames::checkbox) { | 321 if (type == InputTypeNames::checkbox) { |
| 322 if (node->parentElement() && isHTMLMenuElement(node->parentElement()
)) | 322 if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) ||
(parentObject() && parentObject()->roleValue() == MenuRole)) |
| 323 return CheckBoxMenuItemRole; | 323 return CheckBoxMenuItemRole; |
| 324 return CheckBoxRole; | 324 return CheckBoxRole; |
| 325 } | 325 } |
| 326 if (type == InputTypeNames::date) | 326 if (type == InputTypeNames::date) |
| 327 return DateRole; | 327 return DateRole; |
| 328 if (type == InputTypeNames::datetime | 328 if (type == InputTypeNames::datetime |
| 329 || type == InputTypeNames::datetime_local | 329 || type == InputTypeNames::datetime_local |
| 330 || type == InputTypeNames::month | 330 || type == InputTypeNames::month |
| 331 || type == InputTypeNames::week) | 331 || type == InputTypeNames::week) |
| 332 return DateTimeRole; | 332 return DateTimeRole; |
| (...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2374 if (label && label->renderer()) { | 2374 if (label && label->renderer()) { |
| 2375 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2375 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
| 2376 result.unite(labelRect); | 2376 result.unite(labelRect); |
| 2377 } | 2377 } |
| 2378 } | 2378 } |
| 2379 | 2379 |
| 2380 return result; | 2380 return result; |
| 2381 } | 2381 } |
| 2382 | 2382 |
| 2383 } // namespace blink | 2383 } // namespace blink |
| OLD | NEW |