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

Side by Side Diff: Source/core/accessibility/AXRenderObject.cpp

Issue 615773002: Expose IA and IA2 role and state for HTML input type attributes related to date and time.(re-land) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/core/accessibility/AXObject.h ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 if (type == InputTypeNames::button) { 316 if (type == InputTypeNames::button) {
317 if (node->parentElement() && isHTMLMenuElement(node->parentElement() )) 317 if (node->parentElement() && isHTMLMenuElement(node->parentElement() ))
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->parentElement() && isHTMLMenuElement(node->parentElement() ))
323 return CheckBoxMenuItemRole; 323 return CheckBoxMenuItemRole;
324 return CheckBoxRole; 324 return CheckBoxRole;
325 } 325 }
326 if (type == InputTypeNames::date)
327 return DateRole;
328 if (type == InputTypeNames::datetime
329 || type == InputTypeNames::datetime_local
330 || type == InputTypeNames::month
331 || type == InputTypeNames::week)
332 return DateTimeRole;
326 if (type == InputTypeNames::radio) 333 if (type == InputTypeNames::radio)
327 return RadioButtonRole; 334 return RadioButtonRole;
328 if (input.isTextButton()) 335 if (input.isTextButton())
329 return buttonRoleType(); 336 return buttonRoleType();
330 if (type == InputTypeNames::color) 337 if (type == InputTypeNames::color)
331 return ColorWellRole; 338 return ColorWellRole;
339 if (type == InputTypeNames::time)
340 return TimeRole;
332 } 341 }
333 342
334 if (isFileUploadButton()) 343 if (isFileUploadButton())
335 return ButtonRole; 344 return ButtonRole;
336 345
337 if (cssBox && cssBox->isMenuList()) 346 if (cssBox && cssBox->isMenuList())
338 return PopUpButtonRole; 347 return PopUpButtonRole;
339 348
340 if (headingLevel()) 349 if (headingLevel())
341 return HeadingRole; 350 return HeadingRole;
(...skipping 2020 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 if (label && label->renderer()) { 2371 if (label && label->renderer()) {
2363 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2372 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2364 result.unite(labelRect); 2373 result.unite(labelRect);
2365 } 2374 }
2366 } 2375 }
2367 2376
2368 return result; 2377 return result;
2369 } 2378 }
2370 2379
2371 } // namespace blink 2380 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/accessibility/AXObject.h ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698