Chromium Code Reviews

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: logspam Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/accessibility/AXObjectCache.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 22 matching lines...)
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/html/HTMLFieldSetElement.h" 35 #include "core/html/HTMLFieldSetElement.h"
36 #include "core/html/HTMLFrameElementBase.h" 36 #include "core/html/HTMLFrameElementBase.h"
37 #include "core/html/HTMLInputElement.h" 37 #include "core/html/HTMLInputElement.h"
38 #include "core/html/HTMLLabelElement.h" 38 #include "core/html/HTMLLabelElement.h"
39 #include "core/html/HTMLLegendElement.h" 39 #include "core/html/HTMLLegendElement.h"
40 #include "core/html/HTMLPlugInElement.h" 40 #include "core/html/HTMLPlugInElement.h"
41 #include "core/html/HTMLSelectElement.h" 41 #include "core/html/HTMLSelectElement.h"
42 #include "core/html/HTMLTextAreaElement.h" 42 #include "core/html/HTMLTextAreaElement.h"
43 #include "core/frame/Settings.h"
43 #include "core/rendering/RenderObject.h" 44 #include "core/rendering/RenderObject.h"
44 #include "platform/UserGestureIndicator.h" 45 #include "platform/UserGestureIndicator.h"
45 #include "wtf/text/StringBuilder.h" 46 #include "wtf/text/StringBuilder.h"
46 47
47 48
48 namespace blink { 49 namespace blink {
49 50
50 using namespace HTMLNames; 51 using namespace HTMLNames;
51 52
52 AXNodeObject::AXNodeObject(Node* node) 53 AXNodeObject::AXNodeObject(Node* node)
(...skipping 1336 matching lines...)
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()->inlineTextBoxAcces sibilityEnabled())
dmazzoni 2014/08/22 18:16:09 This test got reversed
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...)
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') | no next file with comments »

Powered by Google App Engine