Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Unified Diff: third_party/WebKit/Source/core/loader/ImageLoader.h

Issue 2859093003: Change the semantics of ImageLoader::has_pending_load_event_ (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/ImageLoader.h
diff --git a/third_party/WebKit/Source/core/loader/ImageLoader.h b/third_party/WebKit/Source/core/loader/ImageLoader.h
index 77f0886353aa429481670a579365b1676e6f4952..175b8c6d99bb4bd15238628ebd8d7a1198cace0a 100644
--- a/third_party/WebKit/Source/core/loader/ImageLoader.h
+++ b/third_party/WebKit/Source/core/loader/ImageLoader.h
@@ -110,9 +110,7 @@ class CORE_EXPORT ImageLoader : public GarbageCollectedFinalized<ImageLoader>,
return image_resource_for_image_document_;
}
- bool HasPendingActivity() const {
- return has_pending_load_event_ || has_pending_error_event_ || pending_task_;
- }
+ bool HasPendingActivity() const { return HasPendingEvent() || pending_task_; }
bool HasPendingError() const { return has_pending_error_event_; }
@@ -141,6 +139,7 @@ class CORE_EXPORT ImageLoader : public GarbageCollectedFinalized<ImageLoader>,
virtual void DispatchLoadEvent() = 0;
virtual void NoImageResourceToLoad() {}
+ bool HasPendingEvent() const;
void UpdatedHasPendingEvent();
void DispatchPendingLoadEvent();
@@ -207,8 +206,11 @@ class CORE_EXPORT ImageLoader : public GarbageCollectedFinalized<ImageLoader>,
std::unique_ptr<IncrementLoadEventDelayCount>
delay_until_image_notify_finished_;
+ // Indicates whether there is a pending task for the load/error event on
+ // EventSender. Will be replaced when EventSender is removed crbug/624697.
bool has_pending_load_event_ : 1;
bool has_pending_error_event_ : 1;
+
bool image_complete_ : 1;
bool loading_image_document_ : 1;
bool element_is_protected_ : 1;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698