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 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1170 | 1170 |
1171 void AXObjectCacheImpl::handleLoadComplete(Document* document) { | 1171 void AXObjectCacheImpl::handleLoadComplete(Document* document) { |
1172 postNotification(getOrCreate(document), AXObjectCache::AXLoadComplete); | 1172 postNotification(getOrCreate(document), AXObjectCache::AXLoadComplete); |
1173 } | 1173 } |
1174 | 1174 |
1175 void AXObjectCacheImpl::handleLayoutComplete(Document* document) { | 1175 void AXObjectCacheImpl::handleLayoutComplete(Document* document) { |
1176 postNotification(getOrCreate(document), AXObjectCache::AXLayoutComplete); | 1176 postNotification(getOrCreate(document), AXObjectCache::AXLayoutComplete); |
1177 } | 1177 } |
1178 | 1178 |
1179 void AXObjectCacheImpl::handleScrolledToAnchor(const Node* anchorNode) { | 1179 void AXObjectCacheImpl::handleScrolledToAnchor(const Node* anchorNode) { |
1180 // The anchor node may not be accessible. Post the notification for the | 1180 if (!anchorNode) |
1181 // first accessible object. | 1181 return; |
1182 postPlatformNotification(firstAccessibleObjectFromNode(anchorNode), | 1182 AXObject* obj = getOrCreate(anchorNode->layoutObject()); |
1183 AXScrolledToAnchor); | 1183 if (!obj) |
| 1184 return; |
| 1185 if (obj->accessibilityIsIgnored()) |
| 1186 obj = obj->parentObjectUnignored(); |
| 1187 postPlatformNotification(obj, AXScrolledToAnchor); |
1184 } | 1188 } |
1185 | 1189 |
1186 void AXObjectCacheImpl::handleScrollPositionChanged(FrameView* frameView) { | 1190 void AXObjectCacheImpl::handleScrollPositionChanged(FrameView* frameView) { |
1187 AXObject* targetAXObject = getOrCreate(frameView->frame().document()); | 1191 AXObject* targetAXObject = getOrCreate(frameView->frame().document()); |
1188 postPlatformNotification(targetAXObject, AXScrollPositionChanged); | 1192 postPlatformNotification(targetAXObject, AXScrollPositionChanged); |
1189 } | 1193 } |
1190 | 1194 |
1191 void AXObjectCacheImpl::handleScrollPositionChanged( | 1195 void AXObjectCacheImpl::handleScrollPositionChanged( |
1192 LayoutObject* layoutObject) { | 1196 LayoutObject* layoutObject) { |
1193 postPlatformNotification(getOrCreate(layoutObject), AXScrollPositionChanged); | 1197 postPlatformNotification(getOrCreate(layoutObject), AXScrollPositionChanged); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 visitor->trace(m_document); | 1243 visitor->trace(m_document); |
1240 visitor->trace(m_nodeObjectMapping); | 1244 visitor->trace(m_nodeObjectMapping); |
1241 | 1245 |
1242 visitor->trace(m_objects); | 1246 visitor->trace(m_objects); |
1243 visitor->trace(m_notificationsToPost); | 1247 visitor->trace(m_notificationsToPost); |
1244 | 1248 |
1245 AXObjectCache::trace(visitor); | 1249 AXObjectCache::trace(visitor); |
1246 } | 1250 } |
1247 | 1251 |
1248 } // namespace blink | 1252 } // namespace blink |
OLD | NEW |