| 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 13 matching lines...) Expand all Loading... |
| 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/Document.h" | 33 #include "core/dom/Document.h" |
| 34 #include "core/dom/TaskRunnerHelper.h" |
| 34 #include "core/editing/EditingUtilities.h" | 35 #include "core/editing/EditingUtilities.h" |
| 35 #include "core/frame/FrameView.h" | 36 #include "core/frame/FrameView.h" |
| 36 #include "core/frame/LocalFrame.h" | 37 #include "core/frame/LocalFrame.h" |
| 37 #include "core/frame/Settings.h" | 38 #include "core/frame/Settings.h" |
| 38 #include "core/html/HTMLAreaElement.h" | 39 #include "core/html/HTMLAreaElement.h" |
| 39 #include "core/html/HTMLCanvasElement.h" | 40 #include "core/html/HTMLCanvasElement.h" |
| 40 #include "core/html/HTMLImageElement.h" | 41 #include "core/html/HTMLImageElement.h" |
| 41 #include "core/html/HTMLInputElement.h" | 42 #include "core/html/HTMLInputElement.h" |
| 42 #include "core/html/HTMLLabelElement.h" | 43 #include "core/html/HTMLLabelElement.h" |
| 43 #include "core/html/HTMLOptionElement.h" | 44 #include "core/html/HTMLOptionElement.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 using namespace HTMLNames; | 87 using namespace HTMLNames; |
| 87 | 88 |
| 88 // static | 89 // static |
| 89 AXObjectCache* AXObjectCacheImpl::create(Document& document) { | 90 AXObjectCache* AXObjectCacheImpl::create(Document& document) { |
| 90 return new AXObjectCacheImpl(document); | 91 return new AXObjectCacheImpl(document); |
| 91 } | 92 } |
| 92 | 93 |
| 93 AXObjectCacheImpl::AXObjectCacheImpl(Document& document) | 94 AXObjectCacheImpl::AXObjectCacheImpl(Document& document) |
| 94 : m_document(document), | 95 : m_document(document), |
| 95 m_modificationCount(0), | 96 m_modificationCount(0), |
| 96 m_notificationPostTimer(this, | 97 m_notificationPostTimer( |
| 97 &AXObjectCacheImpl::notificationPostTimerFired) { | 98 TaskRunnerHelper::get(TaskType::UnspecedTimer, &document), |
| 98 } | 99 this, |
| 100 &AXObjectCacheImpl::notificationPostTimerFired) {} |
| 99 | 101 |
| 100 AXObjectCacheImpl::~AXObjectCacheImpl() { | 102 AXObjectCacheImpl::~AXObjectCacheImpl() { |
| 101 ASSERT(m_hasBeenDisposed); | 103 ASSERT(m_hasBeenDisposed); |
| 102 } | 104 } |
| 103 | 105 |
| 104 void AXObjectCacheImpl::dispose() { | 106 void AXObjectCacheImpl::dispose() { |
| 105 m_notificationPostTimer.stop(); | 107 m_notificationPostTimer.stop(); |
| 106 | 108 |
| 107 for (auto& entry : m_objects) { | 109 for (auto& entry : m_objects) { |
| 108 AXObject* obj = entry.value; | 110 AXObject* obj = entry.value; |
| (...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 visitor->trace(m_document); | 1252 visitor->trace(m_document); |
| 1251 visitor->trace(m_nodeObjectMapping); | 1253 visitor->trace(m_nodeObjectMapping); |
| 1252 | 1254 |
| 1253 visitor->trace(m_objects); | 1255 visitor->trace(m_objects); |
| 1254 visitor->trace(m_notificationsToPost); | 1256 visitor->trace(m_notificationsToPost); |
| 1255 | 1257 |
| 1256 AXObjectCache::trace(visitor); | 1258 AXObjectCache::trace(visitor); |
| 1257 } | 1259 } |
| 1258 | 1260 |
| 1259 } // namespace blink | 1261 } // namespace blink |
| OLD | NEW |