Closed Bug 1685078 Opened 2 years ago Closed 2 years ago

Support full <image> syntax in list-style-image as per spec.


(Core :: Layout: Generated Content, Lists, and Counters, defect)




86 Branch
Tracking Status
firefox86 --- fixed


(Reporter: emilio, Assigned: emilio)




(Keywords: dev-doc-complete)


(6 files, 1 obsolete file)

And simplify nsBulletFrame while at it.

Blocks: image-set

This allows supporting image-set(), etc, and simplifies the bullet frame
code significantly, too thanks to two changes:

  • Instead of manually managing the image request, use the CSS image
    loader, with the REQUEST_REQUIRES_REFLOW flag, to handle image
    loads correctly. This didn't exist when this code was initially
    implemented, but we can nicely use it now.

  • Instead of re-implementing another WebRender command-builder thing,
    we can just reuse the nsImageRenderer code.

Keywords: dev-doc-needed
Severity: -- → S3
Pushed by
Support full <image> syntax in list-style-image as per spec. r=jrmuizel,TYLin

The current test relies on the explicit decoding that we start
triggering unconditionally right now, and which my previous patch

Remove the text so that the animation polling stuff detects when the
image loads (otherwise it sees a non-blank paint and starts thinking
that stuff is loaded, taking the reference snapshot too early).

Depends on D100774

For bullets we don't want to start blocking onload. It shouldn't matter
anyhow but it's simpler and easier not to change behavior.

While at it avoid some expensive includes in ImageLoader.h

Attachment #9195882 - Attachment description: Bug 1685078 - Separate the "requires reflow" from the "blocks onload" flag in the image loader. r=TyLin,#layout-reviewers → Bug 1685078 - Don't block the load event on image decode + reflow for bullets. r=TyLin

These will make the following patch clearer.

Depends on D101070

Without blocking onload (which preserves behavior before this patch
series) or requiring a decode for stuff like invisible bullets.

Depends on D101071

Attachment #9195882 - Attachment is obsolete: true
Flags: needinfo?(emilio)
Pushed by
Support full <image> syntax in list-style-image as per spec. r=jrmuizel,TYLin
Fix test_bullet_animation.html. r=tnikkel
Remove some useless includes from ImageLoader.h. r=TYLin
Use enum classes and more explicit names for ImageLoader flags. r=TYLin
Refactor some ImageLoader code for legibility / code reuse. r=TYLin
Add a flag to reflow when the size is available, and use it for bullets. r=TYLin
Pushed by
Don't return incomplete draw result for errored images.
Pushed by
Correctly keep sync-decoding images.

(In reply to Pulsebot from comment #13)

Pushed by
Correctly keep sync-decoding images.

Jeff, mind sanity-checking this commit? It's basically ensuring we pass the right flags to nsImageRenderer, which prevents intermittent reftest failures that the sheriffs pinged me about. Should be pretty straight-forward, but ended up touching a bit more code than I initially thought so probably deserves another look.

Flags: needinfo?(jmuizelaar)

Yeah, seems fine.

Flags: needinfo?(jmuizelaar)
Pushed by
More explicitly fall back for broken images, as sync decoding will happily paint blank in that case.
Regressions: 1686220

Added to release note, docs updated with a non URL example, and a note added to BCD.

You need to log in before you can comment on or make changes to this bug.