OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |