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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 return ImageRole; | 297 return ImageRole; |
298 } | 298 } |
299 | 299 |
300 // Note: if JavaScript is disabled, the renderer won't be a RenderHTMLCanvas
. | 300 // Note: if JavaScript is disabled, the renderer won't be a RenderHTMLCanvas
. |
301 if (isHTMLCanvasElement(node) && m_renderer->isCanvas()) | 301 if (isHTMLCanvasElement(node) && m_renderer->isCanvas()) |
302 return CanvasRole; | 302 return CanvasRole; |
303 | 303 |
304 if (cssBox && cssBox->isRenderView()) | 304 if (cssBox && cssBox->isRenderView()) |
305 return WebAreaRole; | 305 return WebAreaRole; |
306 | 306 |
307 if (cssBox && cssBox->isTextField()) | |
308 return TextFieldRole; | |
309 | |
310 if (cssBox && cssBox->isTextArea()) | 307 if (cssBox && cssBox->isTextArea()) |
311 return TextAreaRole; | 308 return TextAreaRole; |
312 | 309 |
313 if (isHTMLInputElement(node)) { | 310 if (isHTMLInputElement(node)) { |
314 HTMLInputElement& input = toHTMLInputElement(*node); | 311 HTMLInputElement& input = toHTMLInputElement(*node); |
315 const AtomicString& type = input.type(); | 312 const AtomicString& type = input.type(); |
316 if (type == InputTypeNames::button) { | 313 if (type == InputTypeNames::button) { |
317 if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) ||
(parentObject() && parentObject()->roleValue() == MenuRole)) | 314 if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) ||
(parentObject() && parentObject()->roleValue() == MenuRole)) |
318 return MenuItemRole; | 315 return MenuItemRole; |
319 return buttonRoleType(); | 316 return buttonRoleType(); |
(...skipping 16 matching lines...) Expand all Loading... |
336 return RadioButtonRole; | 333 return RadioButtonRole; |
337 } | 334 } |
338 if (type == InputTypeNames::number) | 335 if (type == InputTypeNames::number) |
339 return SpinButtonRole; | 336 return SpinButtonRole; |
340 if (input.isTextButton()) | 337 if (input.isTextButton()) |
341 return buttonRoleType(); | 338 return buttonRoleType(); |
342 if (type == InputTypeNames::color) | 339 if (type == InputTypeNames::color) |
343 return ColorWellRole; | 340 return ColorWellRole; |
344 if (type == InputTypeNames::time) | 341 if (type == InputTypeNames::time) |
345 return TimeRole; | 342 return TimeRole; |
| 343 return TextFieldRole; |
346 } | 344 } |
347 | 345 |
348 if (isFileUploadButton()) | 346 if (isFileUploadButton()) |
349 return ButtonRole; | 347 return ButtonRole; |
350 | 348 |
351 if (cssBox && cssBox->isMenuList()) | 349 if (cssBox && cssBox->isMenuList()) |
352 return PopUpButtonRole; | 350 return PopUpButtonRole; |
353 | 351 |
354 if (headingLevel()) | 352 if (headingLevel()) |
355 return HeadingRole; | 353 return HeadingRole; |
(...skipping 2087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2443 if (label && label->renderer()) { | 2441 if (label && label->renderer()) { |
2444 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2442 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
2445 result.unite(labelRect); | 2443 result.unite(labelRect); |
2446 } | 2444 } |
2447 } | 2445 } |
2448 | 2446 |
2449 return result; | 2447 return result; |
2450 } | 2448 } |
2451 | 2449 |
2452 } // namespace blink | 2450 } // namespace blink |
OLD | NEW |