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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp

Issue 2805493002: Boolean properties for Accessibility Object Model Phase 1 (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014, Google Inc. All rights reserved. 2 * Copyright (C) 2014, 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 12 matching lines...) Expand all
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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 "modules/accessibility/AXObjectCacheImpl.h" 29 #include "modules/accessibility/AXObjectCacheImpl.h"
30 30
31 #include "core/HTMLNames.h" 31 #include "core/HTMLNames.h"
32 #include "core/InputTypeNames.h" 32 #include "core/InputTypeNames.h"
33 #include "core/dom/AccessibleNode.h"
33 #include "core/dom/Document.h" 34 #include "core/dom/Document.h"
34 #include "core/dom/TaskRunnerHelper.h" 35 #include "core/dom/TaskRunnerHelper.h"
35 #include "core/editing/EditingUtilities.h" 36 #include "core/editing/EditingUtilities.h"
36 #include "core/frame/FrameView.h" 37 #include "core/frame/FrameView.h"
37 #include "core/frame/LocalFrame.h" 38 #include "core/frame/LocalFrame.h"
38 #include "core/frame/Settings.h" 39 #include "core/frame/Settings.h"
39 #include "core/html/HTMLAreaElement.h" 40 #include "core/html/HTMLAreaElement.h"
40 #include "core/html/HTMLCanvasElement.h" 41 #include "core/html/HTMLCanvasElement.h"
41 #include "core/html/HTMLImageElement.h" 42 #include "core/html/HTMLImageElement.h"
42 #include "core/html/HTMLInputElement.h" 43 #include "core/html/HTMLInputElement.h"
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 return axObject && axObject->isTextControl(); 1084 return axObject && axObject->isTextControl();
1084 } 1085 }
1085 1086
1086 bool isNodeAriaVisible(Node* node) { 1087 bool isNodeAriaVisible(Node* node) {
1087 if (!node) 1088 if (!node)
1088 return false; 1089 return false;
1089 1090
1090 if (!node->isElementNode()) 1091 if (!node->isElementNode())
1091 return false; 1092 return false;
1092 1093
1093 return equalIgnoringASCIICase(toElement(node)->getAttribute(aria_hiddenAttr), 1094 bool isNull = true;
1094 "false"); 1095 bool hidden = AccessibleNode::getProperty(
1096 toElement(node), AOMBooleanProperty::kHidden, isNull);
1097 return !isNull && !hidden;
1095 } 1098 }
1096 1099
1097 void AXObjectCacheImpl::postPlatformNotification(AXObject* obj, 1100 void AXObjectCacheImpl::postPlatformNotification(AXObject* obj,
1098 AXNotification notification) { 1101 AXNotification notification) {
1099 if (!obj || !obj->getDocument() || !obj->documentFrameView() || 1102 if (!obj || !obj->getDocument() || !obj->documentFrameView() ||
1100 !obj->documentFrameView()->frame().page()) 1103 !obj->documentFrameView()->frame().page())
1101 return; 1104 return;
1102 1105
1103 ChromeClient& client = 1106 ChromeClient& client =
1104 obj->getDocument()->axObjectCacheOwner().page()->chromeClient(); 1107 obj->getDocument()->axObjectCacheOwner().page()->chromeClient();
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 visitor->trace(m_document); 1246 visitor->trace(m_document);
1244 visitor->trace(m_nodeObjectMapping); 1247 visitor->trace(m_nodeObjectMapping);
1245 1248
1246 visitor->trace(m_objects); 1249 visitor->trace(m_objects);
1247 visitor->trace(m_notificationsToPost); 1250 visitor->trace(m_notificationsToPost);
1248 1251
1249 AXObjectCache::trace(visitor); 1252 AXObjectCache::trace(visitor);
1250 } 1253 }
1251 1254
1252 } // namespace blink 1255 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698