Commit 939e375b authored by rajendrant's avatar rajendrant Committed by Commit Bot

Fix lazyloaded image moved between document test

When an image is cleared (src='' or img element moved) lazyload state
should be reset. This allows proper lazyload handling to happen when src
is set again.

TBR=hiroshige@chromium.org

Fixed: 10019689
Change-Id: I6f5a2500d63db4e82b3400f49592e183244b12e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2164106
Commit-Queue: rajendrant <rajendrant@chromium.org>
Reviewed-by: default avatarDominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762633}
parent e0ffe65d
......@@ -447,7 +447,7 @@ void ImageLoader::UpdateImageState(ImageResourceContent* new_image_content) {
image_complete_ = true;
if (lazy_image_load_state_ == LazyImageLoadState::kDeferred) {
LazyImageHelper::StopMonitoring(GetElement());
lazy_image_load_state_ = LazyImageLoadState::kFullImage;
lazy_image_load_state_ = LazyImageLoadState::kNone;
}
} else {
image_complete_ = false;
......
This is a testharness.js-based test.
FAIL Test that <img> below viewport is not loaded when moved to another document and then scrolled to assert_unreached: The below viewport image should not load Reached unreachable code
Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment