Closed Bug 1685078 Opened 4 years ago Closed 4 years ago

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

Categories

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

defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

()

Details

(Keywords: dev-doc-complete)

Attachments

(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 ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/47c73e5e08a4 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
removes:

https://searchfox.org/mozilla-central/rev/519f913527b0d9d5097d290d5731cff6b2991fe0/layout/generic/nsBulletFrame.cpp#1065

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 ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/66d167aa16ea Support full <image> syntax in list-style-image as per spec. r=jrmuizel,TYLin https://hg.mozilla.org/integration/autoland/rev/0da6fc5419b3 Fix test_bullet_animation.html. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/9084c962424d Remove some useless includes from ImageLoader.h. r=TYLin https://hg.mozilla.org/integration/autoland/rev/eff6aadf75c0 Use enum classes and more explicit names for ImageLoader flags. r=TYLin https://hg.mozilla.org/integration/autoland/rev/277a1d56fccd Refactor some ImageLoader code for legibility / code reuse. r=TYLin https://hg.mozilla.org/integration/autoland/rev/04b98b03122f Add a flag to reflow when the size is available, and use it for bullets. r=TYLin
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/1771307a8438 Don't return incomplete draw result for errored images.

(In reply to Pulsebot from comment #13)

Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/329ab5768e51
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 emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/645a4d6461ca 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.

Attachment

General

Created:
Updated:
Size: