| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights |
| 5 * reserved. | 5 * reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "core/loader/ImageLoader.h" | 23 #include "core/loader/ImageLoader.h" |
| 24 | 24 |
| 25 #include "bindings/core/v8/Microtask.h" | 25 #include "bindings/core/v8/Microtask.h" |
| 26 #include "bindings/core/v8/ScriptController.h" | 26 #include "bindings/core/v8/ScriptController.h" |
| 27 #include "bindings/core/v8/ScriptState.h" | 27 #include "bindings/core/v8/ScriptState.h" |
| 28 #include "bindings/core/v8/V8Binding.h" | 28 #include "bindings/core/v8/V8Binding.h" |
| 29 #include "bindings/core/v8/V8PerIsolateData.h" | 29 #include "bindings/core/v8/V8PerIsolateData.h" |
| 30 #include "core/dom/Document.h" | 30 #include "core/dom/Document.h" |
| 31 #include "core/dom/Element.h" | 31 #include "core/dom/Element.h" |
| 32 #include "core/dom/IncrementLoadEventDelayCount.h" | 32 #include "core/dom/IncrementLoadEventDelayCount.h" |
| 33 #include "core/dom/TaskRunnerHelper.h" | |
| 34 #include "core/events/Event.h" | 33 #include "core/events/Event.h" |
| 35 #include "core/events/EventSender.h" | 34 #include "core/events/EventSender.h" |
| 36 #include "core/fetch/FetchRequest.h" | 35 #include "core/fetch/FetchRequest.h" |
| 37 #include "core/fetch/MemoryCache.h" | 36 #include "core/fetch/MemoryCache.h" |
| 38 #include "core/fetch/ResourceFetcher.h" | 37 #include "core/fetch/ResourceFetcher.h" |
| 39 #include "core/fetch/ResourceLoadingLog.h" | 38 #include "core/fetch/ResourceLoadingLog.h" |
| 40 #include "core/frame/LocalFrame.h" | 39 #include "core/frame/LocalFrame.h" |
| 41 #include "core/frame/Settings.h" | 40 #include "core/frame/Settings.h" |
| 42 #include "core/frame/UseCounter.h" | 41 #include "core/frame/UseCounter.h" |
| 43 #include "core/html/CrossOriginAttribute.h" | 42 #include "core/html/CrossOriginAttribute.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 BypassMainWorldBehavior m_shouldBypassMainWorldCSP; | 148 BypassMainWorldBehavior m_shouldBypassMainWorldCSP; |
| 150 UpdateFromElementBehavior m_updateBehavior; | 149 UpdateFromElementBehavior m_updateBehavior; |
| 151 RefPtr<ScriptState> m_scriptState; | 150 RefPtr<ScriptState> m_scriptState; |
| 152 WeakPtrFactory<Task> m_weakFactory; | 151 WeakPtrFactory<Task> m_weakFactory; |
| 153 ReferrerPolicy m_referrerPolicy; | 152 ReferrerPolicy m_referrerPolicy; |
| 154 KURL m_requestURL; | 153 KURL m_requestURL; |
| 155 }; | 154 }; |
| 156 | 155 |
| 157 ImageLoader::ImageLoader(Element* element) | 156 ImageLoader::ImageLoader(Element* element) |
| 158 : m_element(element), | 157 : m_element(element), |
| 159 m_derefElementTimer(TaskRunnerHelper::get(TaskType::Networking, | 158 m_derefElementTimer(this, &ImageLoader::timerFired), |
| 160 element->document().frame()), | |
| 161 this, | |
| 162 &ImageLoader::timerFired), | |
| 163 m_hasPendingLoadEvent(false), | 159 m_hasPendingLoadEvent(false), |
| 164 m_hasPendingErrorEvent(false), | 160 m_hasPendingErrorEvent(false), |
| 165 m_imageComplete(true), | 161 m_imageComplete(true), |
| 166 m_loadingImageDocument(false), | 162 m_loadingImageDocument(false), |
| 167 m_elementIsProtected(false), | 163 m_elementIsProtected(false), |
| 168 m_suppressErrorEvents(false) { | 164 m_suppressErrorEvents(false) { |
| 169 RESOURCE_LOADING_DVLOG(1) << "new ImageLoader " << this; | 165 RESOURCE_LOADING_DVLOG(1) << "new ImageLoader " << this; |
| 170 } | 166 } |
| 171 | 167 |
| 172 ImageLoader::~ImageLoader() {} | 168 ImageLoader::~ImageLoader() {} |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 } | 634 } |
| 639 | 635 |
| 640 void ImageLoader::elementDidMoveToNewDocument() { | 636 void ImageLoader::elementDidMoveToNewDocument() { |
| 641 if (m_loadDelayCounter) | 637 if (m_loadDelayCounter) |
| 642 m_loadDelayCounter->documentChanged(m_element->document()); | 638 m_loadDelayCounter->documentChanged(m_element->document()); |
| 643 clearFailedLoadURL(); | 639 clearFailedLoadURL(); |
| 644 setImage(0); | 640 setImage(0); |
| 645 } | 641 } |
| 646 | 642 |
| 647 } // namespace blink | 643 } // namespace blink |
| OLD | NEW |