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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 | 306 |
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::checkbox) | 316 if (type == InputTypeNames::button) { |
| 317 if (node->parentElement() && isHTMLMenuElement(node->parentElement()
)) |
| 318 return MenuItemRole; |
| 319 return buttonRoleType(); |
| 320 } |
| 321 if (type == InputTypeNames::checkbox) { |
| 322 if (node->parentElement() && isHTMLMenuElement(node->parentElement()
)) |
| 323 return CheckBoxMenuItemRole; |
317 return CheckBoxRole; | 324 return CheckBoxRole; |
| 325 } |
318 if (type == InputTypeNames::radio) | 326 if (type == InputTypeNames::radio) |
319 return RadioButtonRole; | 327 return RadioButtonRole; |
320 if (input.isTextButton()) | 328 if (input.isTextButton()) |
321 return buttonRoleType(); | 329 return buttonRoleType(); |
322 if (type == InputTypeNames::color) | 330 if (type == InputTypeNames::color) |
323 return ColorWellRole; | 331 return ColorWellRole; |
324 } | 332 } |
325 | 333 |
326 if (isFileUploadButton()) | 334 if (isFileUploadButton()) |
327 return ButtonRole; | 335 return ButtonRole; |
(...skipping 2026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2354 if (label && label->renderer()) { | 2362 if (label && label->renderer()) { |
2355 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2363 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
2356 result.unite(labelRect); | 2364 result.unite(labelRect); |
2357 } | 2365 } |
2358 } | 2366 } |
2359 | 2367 |
2360 return result; | 2368 return result; |
2361 } | 2369 } |
2362 | 2370 |
2363 } // namespace blink | 2371 } // namespace blink |
OLD | NEW |