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

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

Issue 699083007: Input type button in group role is not exposed correctly on Mac(blink) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: updating correct condition Created 6 years, 1 month 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/AXNodeObject.cpp ('k') | no next file » | 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::button) { 316 if (type == InputTypeNames::button) {
317 if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->roleValue() == MenuRole)) 317 if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->ariaRoleAttribute() == MenuRole))
318 return MenuItemRole; 318 return MenuItemRole;
319 if (parentObject() && parentObject()->ariaRoleAttribute() == GroupRo le)
320 return MenuButtonRole;
319 return buttonRoleType(); 321 return buttonRoleType();
320 } 322 }
321 if (type == InputTypeNames::checkbox) { 323 if (type == InputTypeNames::checkbox) {
322 if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->roleValue() == MenuRole)) 324 if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->ariaRoleAttribute() == MenuRole))
323 return MenuItemCheckBoxRole; 325 return MenuItemCheckBoxRole;
324 return CheckBoxRole; 326 return CheckBoxRole;
325 } 327 }
326 if (type == InputTypeNames::date) 328 if (type == InputTypeNames::date)
327 return DateRole; 329 return DateRole;
328 if (type == InputTypeNames::datetime 330 if (type == InputTypeNames::datetime
329 || type == InputTypeNames::datetime_local 331 || type == InputTypeNames::datetime_local
330 || type == InputTypeNames::month 332 || type == InputTypeNames::month
331 || type == InputTypeNames::week) 333 || type == InputTypeNames::week)
332 return DateTimeRole; 334 return DateTimeRole;
333 if (type == InputTypeNames::radio) { 335 if (type == InputTypeNames::radio) {
334 if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->roleValue() == MenuRole)) 336 if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->ariaRoleAttribute() == MenuRole))
335 return MenuItemRadioRole; 337 return MenuItemRadioRole;
336 return RadioButtonRole; 338 return RadioButtonRole;
337 } 339 }
338 if (input.isTextButton()) 340 if (input.isTextButton())
339 return buttonRoleType(); 341 return buttonRoleType();
340 if (type == InputTypeNames::color) 342 if (type == InputTypeNames::color)
341 return ColorWellRole; 343 return ColorWellRole;
342 if (type == InputTypeNames::time) 344 if (type == InputTypeNames::time)
343 return TimeRole; 345 return TimeRole;
344 } 346 }
(...skipping 2050 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 if (label && label->renderer()) { 2397 if (label && label->renderer()) {
2396 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2398 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2397 result.unite(labelRect); 2399 result.unite(labelRect);
2398 } 2400 }
2399 } 2401 }
2400 2402
2401 return result; 2403 return result;
2402 } 2404 }
2403 2405
2404 } // namespace blink 2406 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/accessibility/AXNodeObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698