Chromium Code Reviews| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 197 if (isHTMLSummaryElement(*node())) { | 197 if (isHTMLSummaryElement(*node())) { |
| 198 if (node()->parentNode() && isHTMLDetailsElement(node()->parentNode())) | 198 if (node()->parentNode() && isHTMLDetailsElement(node()->parentNode())) |
| 199 return DisclosureTriangleRole; | 199 return DisclosureTriangleRole; |
| 200 return UnknownRole; | 200 return UnknownRole; |
| 201 } | 201 } |
| 202 | 202 |
| 203 if (isHTMLInputElement(*node())) { | 203 if (isHTMLInputElement(*node())) { |
| 204 HTMLInputElement& input = toHTMLInputElement(*node()); | 204 HTMLInputElement& input = toHTMLInputElement(*node()); |
| 205 const AtomicString& type = input.type(); | 205 const AtomicString& type = input.type(); |
| 206 if (type == InputTypeNames::button) { | 206 if (type == InputTypeNames::button) { |
| 207 if (node()->parentNode() && isHTMLMenuElement(node()->parentNode())) | 207 if (node()->parentNode() && (isHTMLMenuElement(node()->parentNode()) || parentObject()->roleValue() == MenuRole)) |
|
dmazzoni
2014/10/06 15:25:43
It's possible parentObject() could return null, so
| |
| 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()) || parentObject()->roleValue() == MenuRole)) |
| 213 return CheckBoxMenuItemRole; | 213 return CheckBoxMenuItemRole; |
| 214 return CheckBoxRole; | 214 return CheckBoxRole; |
| 215 } | 215 } |
| 216 if (type == InputTypeNames::date) | 216 if (type == InputTypeNames::date) |
| 217 return DateRole; | 217 return DateRole; |
| 218 if (type == InputTypeNames::datetime | 218 if (type == InputTypeNames::datetime |
| 219 || type == InputTypeNames::datetime_local | 219 || type == InputTypeNames::datetime_local |
| 220 || type == InputTypeNames::month | 220 || type == InputTypeNames::month |
| 221 || type == InputTypeNames::week) | 221 || type == InputTypeNames::week) |
| 222 return DateTimeRole; | 222 return DateTimeRole; |
| (...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1737 float range = maxValueForRange() - minValueForRange(); | 1737 float range = maxValueForRange() - minValueForRange(); |
| 1738 float value = valueForRange(); | 1738 float value = valueForRange(); |
| 1739 | 1739 |
| 1740 value += range * (percentChange / 100); | 1740 value += range * (percentChange / 100); |
| 1741 setValue(String::number(value)); | 1741 setValue(String::number(value)); |
| 1742 | 1742 |
| 1743 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e); | 1743 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e); |
| 1744 } | 1744 } |
| 1745 | 1745 |
| 1746 } // namespace blink | 1746 } // namespace blink |
| OLD | NEW |