| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 } | 370 } |
| 371 if (type == InputTypeNames::number) | 371 if (type == InputTypeNames::number) |
| 372 return SpinButtonRole; | 372 return SpinButtonRole; |
| 373 if (input.isTextButton()) | 373 if (input.isTextButton()) |
| 374 return buttonRoleType(); | 374 return buttonRoleType(); |
| 375 if (type == InputTypeNames::range) | 375 if (type == InputTypeNames::range) |
| 376 return SliderRole; | 376 return SliderRole; |
| 377 if (type == InputTypeNames::color) | 377 if (type == InputTypeNames::color) |
| 378 return ColorWellRole; | 378 return ColorWellRole; |
| 379 if (type == InputTypeNames::time) | 379 if (type == InputTypeNames::time) |
| 380 return TimeRole; | 380 return InputTimeRole; |
| 381 return TextFieldRole; | 381 return TextFieldRole; |
| 382 } | 382 } |
| 383 | 383 |
| 384 if (isHTMLSelectElement(*node())) { | 384 if (isHTMLSelectElement(*node())) { |
| 385 HTMLSelectElement& selectElement = toHTMLSelectElement(*node()); | 385 HTMLSelectElement& selectElement = toHTMLSelectElement(*node()); |
| 386 return selectElement.multiple() ? ListBoxRole : PopUpButtonRole; | 386 return selectElement.multiple() ? ListBoxRole : PopUpButtonRole; |
| 387 } | 387 } |
| 388 | 388 |
| 389 if (isHTMLTextAreaElement(*node())) | 389 if (isHTMLTextAreaElement(*node())) |
| 390 return TextFieldRole; | 390 return TextFieldRole; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 | 479 |
| 480 if (node()->hasTagName(captionTag)) | 480 if (node()->hasTagName(captionTag)) |
| 481 return CaptionRole; | 481 return CaptionRole; |
| 482 | 482 |
| 483 if (node()->hasTagName(figcaptionTag)) | 483 if (node()->hasTagName(figcaptionTag)) |
| 484 return FigcaptionRole; | 484 return FigcaptionRole; |
| 485 | 485 |
| 486 if (node()->hasTagName(figureTag)) | 486 if (node()->hasTagName(figureTag)) |
| 487 return FigureRole; | 487 return FigureRole; |
| 488 | 488 |
| 489 if (node()->nodeName() == "TIME") |
| 490 return TimeRole; |
| 491 |
| 489 if (isEmbeddedObject()) | 492 if (isEmbeddedObject()) |
| 490 return EmbeddedObjectRole; | 493 return EmbeddedObjectRole; |
| 491 | 494 |
| 492 return UnknownRole; | 495 return UnknownRole; |
| 493 } | 496 } |
| 494 | 497 |
| 495 AccessibilityRole AXNodeObject::determineAccessibilityRole() | 498 AccessibilityRole AXNodeObject::determineAccessibilityRole() |
| 496 { | 499 { |
| 497 if (!node()) | 500 if (!node()) |
| 498 return UnknownRole; | 501 return UnknownRole; |
| (...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2340 ariaLabeledByElements(elements); | 2343 ariaLabeledByElements(elements); |
| 2341 | 2344 |
| 2342 for (const auto& element : elements) { | 2345 for (const auto& element : elements) { |
| 2343 RefPtr<AXObject> axElement = axObjectCache()->getOrCreate(element); | 2346 RefPtr<AXObject> axElement = axObjectCache()->getOrCreate(element); |
| 2344 textOrder.append(AccessibilityText(ariaLabeledBy, AlternativeText, a
xElement)); | 2347 textOrder.append(AccessibilityText(ariaLabeledBy, AlternativeText, a
xElement)); |
| 2345 } | 2348 } |
| 2346 } | 2349 } |
| 2347 } | 2350 } |
| 2348 | 2351 |
| 2349 } // namespace blink | 2352 } // namespace blink |
| OLD | NEW |