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 14 matching lines...) Expand all Loading... | |
| 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "config.h" | 29 #include "config.h" |
| 30 #include "core/accessibility/AXNodeObject.h" | 30 #include "core/accessibility/AXNodeObject.h" |
| 31 | 31 |
| 32 #include "core/accessibility/AXObjectCache.h" | 32 #include "core/accessibility/AXObjectCache.h" |
| 33 #include "core/dom/NodeTraversal.h" | 33 #include "core/dom/NodeTraversal.h" |
| 34 #include "core/dom/Text.h" | 34 #include "core/dom/Text.h" |
| 35 #include "core/frame/Settings.h" | |
| 35 #include "core/html/HTMLFieldSetElement.h" | 36 #include "core/html/HTMLFieldSetElement.h" |
| 36 #include "core/html/HTMLFrameElementBase.h" | 37 #include "core/html/HTMLFrameElementBase.h" |
| 37 #include "core/html/HTMLInputElement.h" | 38 #include "core/html/HTMLInputElement.h" |
| 38 #include "core/html/HTMLLabelElement.h" | 39 #include "core/html/HTMLLabelElement.h" |
| 39 #include "core/html/HTMLLegendElement.h" | 40 #include "core/html/HTMLLegendElement.h" |
| 40 #include "core/html/HTMLPlugInElement.h" | 41 #include "core/html/HTMLPlugInElement.h" |
| 41 #include "core/html/HTMLSelectElement.h" | 42 #include "core/html/HTMLSelectElement.h" |
| 42 #include "core/html/HTMLTextAreaElement.h" | 43 #include "core/html/HTMLTextAreaElement.h" |
| 43 #include "core/rendering/RenderObject.h" | 44 #include "core/rendering/RenderObject.h" |
| 44 #include "platform/UserGestureIndicator.h" | 45 #include "platform/UserGestureIndicator.h" |
| (...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1389 case ButtonRole: | 1390 case ButtonRole: |
| 1390 case PopUpButtonRole: | 1391 case PopUpButtonRole: |
| 1391 case CheckBoxRole: | 1392 case CheckBoxRole: |
| 1392 case RadioButtonRole: | 1393 case RadioButtonRole: |
| 1393 case TabRole: | 1394 case TabRole: |
| 1394 case ToggleButtonRole: | 1395 case ToggleButtonRole: |
| 1395 case ListBoxOptionRole: | 1396 case ListBoxOptionRole: |
| 1396 case ScrollBarRole: | 1397 case ScrollBarRole: |
| 1397 return false; | 1398 return false; |
| 1398 case StaticTextRole: | 1399 case StaticTextRole: |
| 1399 if (!axObjectCache()->inlineTextBoxAccessibility()) | 1400 if (!document()->settings() || !document()->settings()->inlineTextBoxAcc essibilityEnabled()) |
|
dmazzoni
2014/08/23 05:36:01
I think it might be cleaner to implement convenien
aboxhall
2014/08/27 15:26:33
Good idea, done.
| |
| 1400 return false; | 1401 return false; |
| 1401 default: | 1402 default: |
| 1402 return true; | 1403 return true; |
| 1403 } | 1404 } |
| 1404 } | 1405 } |
| 1405 | 1406 |
| 1406 Element* AXNodeObject::actionElement() const | 1407 Element* AXNodeObject::actionElement() const |
| 1407 { | 1408 { |
| 1408 Node* node = this->node(); | 1409 Node* node = this->node(); |
| 1409 if (!node) | 1410 if (!node) |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1704 float range = maxValueForRange() - minValueForRange(); | 1705 float range = maxValueForRange() - minValueForRange(); |
| 1705 float value = valueForRange(); | 1706 float value = valueForRange(); |
| 1706 | 1707 |
| 1707 value += range * (percentChange / 100); | 1708 value += range * (percentChange / 100); |
| 1708 setValue(String::number(value)); | 1709 setValue(String::number(value)); |
| 1709 | 1710 |
| 1710 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e); | 1711 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e); |
| 1711 } | 1712 } |
| 1712 | 1713 |
| 1713 } // namespace blink | 1714 } // namespace blink |
| OLD | NEW |