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