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

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

Issue 589383004: IA2 role is not correct for input type attribute in button and checkbox state with menu as parent (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 | « no previous file | Source/core/accessibility/AXObject.h » ('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) 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 return DetailsRole; 195 return DetailsRole;
196 if (isHTMLSummaryElement(*node())) { 196 if (isHTMLSummaryElement(*node())) {
197 if (node()->parentNode() && isHTMLDetailsElement(node()->parentNode())) 197 if (node()->parentNode() && isHTMLDetailsElement(node()->parentNode()))
198 return DisclosureTriangleRole; 198 return DisclosureTriangleRole;
199 return UnknownRole; 199 return UnknownRole;
200 } 200 }
201 201
202 if (isHTMLInputElement(*node())) { 202 if (isHTMLInputElement(*node())) {
203 HTMLInputElement& input = toHTMLInputElement(*node()); 203 HTMLInputElement& input = toHTMLInputElement(*node());
204 const AtomicString& type = input.type(); 204 const AtomicString& type = input.type();
205 if (type == InputTypeNames::checkbox) 205 if (type == InputTypeNames::button) {
206 if (node()->parentNode() && isHTMLMenuElement(node()->parentNode()))
207 return MenuItemRole;
208 return buttonRoleType();
209 }
210 if (type == InputTypeNames::checkbox) {
211 if (node()->parentNode() && isHTMLMenuElement(node()->parentNode()))
212 return CheckBoxMenuItemRole;
206 return CheckBoxRole; 213 return CheckBoxRole;
214 }
207 if (type == InputTypeNames::radio) 215 if (type == InputTypeNames::radio)
208 return RadioButtonRole; 216 return RadioButtonRole;
209 if (input.isTextButton()) 217 if (input.isTextButton())
210 return buttonRoleType(); 218 return buttonRoleType();
211 if (type == InputTypeNames::range) 219 if (type == InputTypeNames::range)
212 return SliderRole; 220 return SliderRole;
213 if (type == InputTypeNames::color) 221 if (type == InputTypeNames::color)
214 return ColorWellRole; 222 return ColorWellRole;
215 return TextFieldRole; 223 return TextFieldRole;
216 } 224 }
(...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1704 float range = maxValueForRange() - minValueForRange(); 1712 float range = maxValueForRange() - minValueForRange();
1705 float value = valueForRange(); 1713 float value = valueForRange();
1706 1714
1707 value += range * (percentChange / 100); 1715 value += range * (percentChange / 100);
1708 setValue(String::number(value)); 1716 setValue(String::number(value));
1709 1717
1710 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e); 1718 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e);
1711 } 1719 }
1712 1720
1713 } // namespace blink 1721 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/accessibility/AXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698