diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-06 12:48:11 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:33:43 +0000 |
commit | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (patch) | |
tree | fa14ba0ca8d2683ba2efdabd246dc9b18a1229c6 /chromium/third_party/blink/renderer/core/loader/image_loader.h | |
parent | 79b4f909db1049fca459c07cca55af56a9b54fe3 (diff) | |
download | qtwebengine-chromium-7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3.tar.gz |
BASELINE: Update Chromium to 84.0.4147.141
Change-Id: Ib85eb4cfa1cbe2b2b81e5022c8cad5c493969535
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/loader/image_loader.h')
-rw-r--r-- | chromium/third_party/blink/renderer/core/loader/image_loader.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/chromium/third_party/blink/renderer/core/loader/image_loader.h b/chromium/third_party/blink/renderer/core/loader/image_loader.h index 181069a59f9..a2c3147fbc0 100644 --- a/chromium/third_party/blink/renderer/core/loader/image_loader.h +++ b/chromium/third_party/blink/renderer/core/loader/image_loader.h @@ -160,20 +160,17 @@ class CORE_EXPORT ImageLoader : public GarbageCollected<ImageLoader>, enum class LazyImageLoadState { kNone, // LazyImages not active. kDeferred, // Full image load not started, and image load event will not be - // fired. If image dimensions is present, document load event - // will be unblocked. Otherwise placeholder fetch will start, - // and once its done document load event is unblocked. + // fired. Image will not block the document's load event. kFullImage // Full image is loading/loaded, due to element coming near the - // viewport or if a placeholder load actually fetched the full - // image. image_complete_ can differentiate if the fetch is - // complete or not. After the fetch, image load event is fired. + // viewport. image_complete_ can be used to differentiate if the + // fetch is complete or not. After the fetch, image load event + // is fired. }; // Called from the task or from updateFromElement to initiate the load. void DoUpdateFromElement( BypassMainWorldBehavior, UpdateFromElementBehavior, - const KURL&, network::mojom::ReferrerPolicy = network::mojom::ReferrerPolicy::kDefault, UpdateType = UpdateType::kAsync); @@ -197,8 +194,7 @@ class CORE_EXPORT ImageLoader : public GarbageCollected<ImageLoader>, void ClearFailedLoadURL(); void DispatchErrorEvent(); void CrossSiteOrCSPViolationOccurred(AtomicString); - void EnqueueImageLoadingMicroTask(const KURL&, - UpdateFromElementBehavior, + void EnqueueImageLoadingMicroTask(UpdateFromElementBehavior, network::mojom::ReferrerPolicy); KURL ImageSourceToKURL(AtomicString) const; @@ -252,7 +248,12 @@ class CORE_EXPORT ImageLoader : public GarbageCollected<ImageLoader>, bool image_complete_ : 1; bool suppress_error_events_ : 1; - bool was_fully_deferred_ : 1; // Used by LazyImageLoad. + // Tracks whether or not an image whose load was deferred was explicitly lazy + // (i.e., had developer-supplied `loading=lazy`). This matters because images + // that were not explicitly lazy but were deferred via automatic lazy image + // loading should continue to block the window load event, whereas explicitly + // lazy images should never block the window load event. + bool was_deferred_explicitly_ : 1; LazyImageLoadState lazy_image_load_state_; |