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

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

Issue 609403005: Revert of Expose IA and IA2 role and state for HTML input type attributes related to date and time. (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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 if (type == InputTypeNames::button) { 206 if (type == InputTypeNames::button) {
207 if (node()->parentNode() && isHTMLMenuElement(node()->parentNode())) 207 if (node()->parentNode() && isHTMLMenuElement(node()->parentNode()))
208 return MenuItemRole; 208 return MenuItemRole;
209 return buttonRoleType(); 209 return buttonRoleType();
210 } 210 }
211 if (type == InputTypeNames::checkbox) { 211 if (type == InputTypeNames::checkbox) {
212 if (node()->parentNode() && isHTMLMenuElement(node()->parentNode())) 212 if (node()->parentNode() && isHTMLMenuElement(node()->parentNode()))
213 return CheckBoxMenuItemRole; 213 return CheckBoxMenuItemRole;
214 return CheckBoxRole; 214 return CheckBoxRole;
215 } 215 }
216 if (type == InputTypeNames::date)
217 return DateRole;
218 if (type == InputTypeNames::datetime
219 || type == InputTypeNames::datetime_local
220 || type == InputTypeNames::month
221 || type == InputTypeNames::week)
222 return DateTimeRole;
223 if (type == InputTypeNames::radio) 216 if (type == InputTypeNames::radio)
224 return RadioButtonRole; 217 return RadioButtonRole;
225 if (input.isTextButton()) 218 if (input.isTextButton())
226 return buttonRoleType(); 219 return buttonRoleType();
227 if (type == InputTypeNames::range) 220 if (type == InputTypeNames::range)
228 return SliderRole; 221 return SliderRole;
229 if (type == InputTypeNames::color) 222 if (type == InputTypeNames::color)
230 return ColorWellRole; 223 return ColorWellRole;
231 if (type == InputTypeNames::time)
232 return TimeRole;
233 return TextFieldRole; 224 return TextFieldRole;
234 } 225 }
235 if (isHTMLSelectElement(*node())) { 226 if (isHTMLSelectElement(*node())) {
236 HTMLSelectElement& selectElement = toHTMLSelectElement(*node()); 227 HTMLSelectElement& selectElement = toHTMLSelectElement(*node());
237 return selectElement.multiple() ? ListBoxRole : PopUpButtonRole; 228 return selectElement.multiple() ? ListBoxRole : PopUpButtonRole;
238 } 229 }
239 if (isHTMLTextAreaElement(*node())) 230 if (isHTMLTextAreaElement(*node()))
240 return TextAreaRole; 231 return TextAreaRole;
241 if (headingLevel()) 232 if (headingLevel())
242 return HeadingRole; 233 return HeadingRole;
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1724 float range = maxValueForRange() - minValueForRange(); 1715 float range = maxValueForRange() - minValueForRange();
1725 float value = valueForRange(); 1716 float value = valueForRange();
1726 1717
1727 value += range * (percentChange / 100); 1718 value += range * (percentChange / 100);
1728 setValue(String::number(value)); 1719 setValue(String::number(value));
1729 1720
1730 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e); 1721 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e);
1731 } 1722 }
1732 1723
1733 } // namespace blink 1724 } // 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