Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: Source/modules/accessibility/AXNodeObject.cpp

Issue 1134103002: Revert of Handles AX role for time element. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 InputTimeRole; 380 return TimeRole;
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
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
492 if (isEmbeddedObject()) 489 if (isEmbeddedObject())
493 return EmbeddedObjectRole; 490 return EmbeddedObjectRole;
494 491
495 return UnknownRole; 492 return UnknownRole;
496 } 493 }
497 494
498 AccessibilityRole AXNodeObject::determineAccessibilityRole() 495 AccessibilityRole AXNodeObject::determineAccessibilityRole()
499 { 496 {
500 if (!node()) 497 if (!node())
501 return UnknownRole; 498 return UnknownRole;
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after
2343 ariaLabeledByElements(elements); 2340 ariaLabeledByElements(elements);
2344 2341
2345 for (const auto& element : elements) { 2342 for (const auto& element : elements) {
2346 RefPtr<AXObject> axElement = axObjectCache()->getOrCreate(element); 2343 RefPtr<AXObject> axElement = axObjectCache()->getOrCreate(element);
2347 textOrder.append(AccessibilityText(ariaLabeledBy, AlternativeText, a xElement)); 2344 textOrder.append(AccessibilityText(ariaLabeledBy, AlternativeText, a xElement));
2348 } 2345 }
2349 } 2346 }
2350 } 2347 }
2351 2348
2352 } // namespace blink 2349 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXLayoutObject.cpp ('k') | Source/modules/accessibility/AXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698