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

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: Back to previous patchset, ready to land Created 3 years, 7 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 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 return ax_object && ax_object->IsTextControl(); 1093 return ax_object && ax_object->IsTextControl();
1093 } 1094 }
1094 1095
1095 bool IsNodeAriaVisible(Node* node) { 1096 bool IsNodeAriaVisible(Node* node) {
1096 if (!node) 1097 if (!node)
1097 return false; 1098 return false;
1098 1099
1099 if (!node->IsElementNode()) 1100 if (!node->IsElementNode())
1100 return false; 1101 return false;
1101 1102
1102 return EqualIgnoringASCIICase(ToElement(node)->getAttribute(aria_hiddenAttr), 1103 bool is_null = true;
1103 "false"); 1104 bool hidden = AccessibleNode::GetPropertyOrARIAAttribute(
1105 ToElement(node), AOMBooleanProperty::kHidden, is_null);
1106 return !is_null && !hidden;
1104 } 1107 }
1105 1108
1106 void AXObjectCacheImpl::PostPlatformNotification(AXObjectImpl* obj, 1109 void AXObjectCacheImpl::PostPlatformNotification(AXObjectImpl* obj,
1107 AXNotification notification) { 1110 AXNotification notification) {
1108 if (!obj || !obj->GetDocument() || !obj->DocumentFrameView() || 1111 if (!obj || !obj->GetDocument() || !obj->DocumentFrameView() ||
1109 !obj->DocumentFrameView()->GetFrame().GetPage()) 1112 !obj->DocumentFrameView()->GetFrame().GetPage())
1110 return; 1113 return;
1111 1114
1112 ChromeClient& client = 1115 ChromeClient& client =
1113 obj->GetDocument()->AxObjectCacheOwner().GetPage()->GetChromeClient(); 1116 obj->GetDocument()->AxObjectCacheOwner().GetPage()->GetChromeClient();
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 visitor->Trace(document_); 1257 visitor->Trace(document_);
1255 visitor->Trace(node_object_mapping_); 1258 visitor->Trace(node_object_mapping_);
1256 1259
1257 visitor->Trace(objects_); 1260 visitor->Trace(objects_);
1258 visitor->Trace(notifications_to_post_); 1261 visitor->Trace(notifications_to_post_);
1259 1262
1260 AXObjectCache::Trace(visitor); 1263 AXObjectCache::Trace(visitor);
1261 } 1264 }
1262 1265
1263 } // namespace blink 1266 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698