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