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

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

Issue 495763005: Switch to using accessibilityEnabled and inlineTextBoxAccessibilityEnabled from settings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make WebAXObject methods noops Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/accessibility/AXObjectCache.h » ('j') | Source/core/dom/Document.cpp » ('J')
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 14 matching lines...) Expand all
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
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/accessibility/AXObjectCache.h » ('j') | Source/core/dom/Document.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698