Closed Bug 1800378 Opened 2 years ago Closed 2 years ago

Product images are not displayed until scroll to bottom and back

Categories

(Core :: DOM: Core & HTML, defect)

74 Branch
Desktop
Windows 10
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: alice0775, Unassigned)

References

(Regression, )

Details

(Keywords: nightly-community, regression)

Steps to reproduce:

  1. Clear all cache
  2. open https://www.buffalo.jp/product/category/power.html
  3. Click 取扱商品 link at menu
    ---- No product images are displayed --- BUG

Optionally
4. Scroll to bottom and back
---- The product images are displayed

Actual results:
Product images are not displayed until scroll to bottom and back.
Screencast: https://youtu.be/WL_RDz0amK0

Expected results:
The product images are displayed without scroll back

Is this a regression?

Flags: needinfo?(alice0775)
Component: Graphics: WebRender → DOM: Core & HTML
Flags: needinfo?(alice0775)
Keywords: regression
Regressed by: 1613611
Version: Trunk → 74 Branch

:hiro, since you are the author of the regressor, bug 1613611, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

Flags: needinfo?(hikezoe.birchill)

Workaround
Set dom.image-lazy-loading.root-margin.bottom.percentage to true.
or
Set dom.image-lazy-loading.enabled to true.

A relevant part code of this issue is here in our speculative loading. When we parse the img element there's loading=lazy attribute, so we skip loading the img src speculatively. After that, when we bind the img element to DOM tree, there has already been no loading=lazy attribute, thus we trigger loading the img src at here in HTMLImageElement::LoadSelectedImage. (and I do see the img element has been loaded in devtools)

Honestly I don't quite understand why the image doesn't appear there. This issue is more or less related to our speculative loading feature.

If DOM team thinks this is high priority severe bug, I will take more time on this. (CCing Henri, he might have some insight on this)

Flags: needinfo?(hikezoe.birchill)
Severity: -- → S3
See Also: → 1650288
Flags: needinfo?(hsivonen)

Omitting a speculative load should never prevent an image from being loaded later, and it's not immediately obvious to me why the behavior here differs from script-inserted images that the speculative loader obviously has never seen.

Of the people who are active these days, blame suggests that Emilio and Edgar know the relevant image loading code better than I do.

Flags: needinfo?(hsivonen)
Flags: needinfo?(emilio)
Flags: needinfo?(echen)

I don't think this should be considered a speculative parsing bug either.

However I can't reproduce this on Linux at least, tho... Alice, has the site been fixed or can you still reproduce somehow? Is there any prefs needed to repro this that aren't default? e.g. in comment 4 you say "dom.image-lazy-loading.enabled to true" (which should be the default). I assume that's a typo and you meant false, but if that's not the case the site might depend on lazy loading being enabled?

Flags: needinfo?(emilio) → needinfo?(alice0775)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #7)

However I can't reproduce this on Linux at least, tho... Alice, has the site been fixed or can you still reproduce somehow?

The issue is no longer reproduced.

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(alice0775)
Resolution: --- → WORKSFORME
Flags: needinfo?(echen)
You need to log in before you can comment on or make changes to this bug.