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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #include "modules/accessibility/AXRadioInput.h" | 70 #include "modules/accessibility/AXRadioInput.h" |
71 #include "modules/accessibility/AXSVGRoot.h" | 71 #include "modules/accessibility/AXSVGRoot.h" |
72 #include "modules/accessibility/AXSlider.h" | 72 #include "modules/accessibility/AXSlider.h" |
73 #include "modules/accessibility/AXSpinButton.h" | 73 #include "modules/accessibility/AXSpinButton.h" |
74 #include "modules/accessibility/AXTable.h" | 74 #include "modules/accessibility/AXTable.h" |
75 #include "modules/accessibility/AXTableCell.h" | 75 #include "modules/accessibility/AXTableCell.h" |
76 #include "modules/accessibility/AXTableColumn.h" | 76 #include "modules/accessibility/AXTableColumn.h" |
77 #include "modules/accessibility/AXTableHeaderContainer.h" | 77 #include "modules/accessibility/AXTableHeaderContainer.h" |
78 #include "modules/accessibility/AXTableRow.h" | 78 #include "modules/accessibility/AXTableRow.h" |
79 #include "wtf/PassRefPtr.h" | 79 #include "wtf/PassRefPtr.h" |
| 80 #include "wtf/PtrUtil.h" |
80 | 81 |
81 namespace blink { | 82 namespace blink { |
82 | 83 |
83 using namespace HTMLNames; | 84 using namespace HTMLNames; |
84 | 85 |
85 // static | 86 // static |
86 AXObjectCache* AXObjectCacheImpl::create(Document& document) | 87 AXObjectCache* AXObjectCacheImpl::create(Document& document) |
87 { | 88 { |
88 return new AXObjectCacheImpl(document); | 89 return new AXObjectCacheImpl(document); |
89 } | 90 } |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 HashSet<String> currentIds = m_ariaOwnerToIdsMapping.get(owner->axObjectID()
); | 730 HashSet<String> currentIds = m_ariaOwnerToIdsMapping.get(owner->axObjectID()
); |
730 HashSet<String> newIds; | 731 HashSet<String> newIds; |
731 bool idsChanged = false; | 732 bool idsChanged = false; |
732 for (const String& id : idVector) { | 733 for (const String& id : idVector) { |
733 newIds.add(id); | 734 newIds.add(id); |
734 if (!currentIds.contains(id)) { | 735 if (!currentIds.contains(id)) { |
735 idsChanged = true; | 736 idsChanged = true; |
736 HashSet<AXID>* owners = m_idToAriaOwnersMapping.get(id); | 737 HashSet<AXID>* owners = m_idToAriaOwnersMapping.get(id); |
737 if (!owners) { | 738 if (!owners) { |
738 owners = new HashSet<AXID>(); | 739 owners = new HashSet<AXID>(); |
739 m_idToAriaOwnersMapping.set(id, adoptPtr(owners)); | 740 m_idToAriaOwnersMapping.set(id, wrapUnique(owners)); |
740 } | 741 } |
741 owners->add(owner->axObjectID()); | 742 owners->add(owner->axObjectID()); |
742 } | 743 } |
743 } | 744 } |
744 for (const String& id : currentIds) { | 745 for (const String& id : currentIds) { |
745 if (!newIds.contains(id)) { | 746 if (!newIds.contains(id)) { |
746 idsChanged = true; | 747 idsChanged = true; |
747 HashSet<AXID>* owners = m_idToAriaOwnersMapping.get(id); | 748 HashSet<AXID>* owners = m_idToAriaOwnersMapping.get(id); |
748 if (owners) { | 749 if (owners) { |
749 owners->remove(owner->axObjectID()); | 750 owners->remove(owner->axObjectID()); |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 visitor->trace(m_document); | 1278 visitor->trace(m_document); |
1278 visitor->trace(m_nodeObjectMapping); | 1279 visitor->trace(m_nodeObjectMapping); |
1279 | 1280 |
1280 visitor->trace(m_objects); | 1281 visitor->trace(m_objects); |
1281 visitor->trace(m_notificationsToPost); | 1282 visitor->trace(m_notificationsToPost); |
1282 | 1283 |
1283 AXObjectCache::trace(visitor); | 1284 AXObjectCache::trace(visitor); |
1284 } | 1285 } |
1285 | 1286 |
1286 } // namespace blink | 1287 } // namespace blink |
OLD | NEW |