Closed Bug 1653869 Opened 1 year ago Closed 1 year ago

WebP support for SeaMonkey


(SeaMonkey :: General, enhancement)

SeaMonkey 2.53 Branch


(seamonkey2.53 fixed, seamonkey2.57esr fixed)

Tracking Status
seamonkey2.53 --- fixed
seamonkey2.57esr --- fixed


(Reporter: buc, Assigned: buc)


(Whiteboard: SM2.53.5)


(11 files)

WebP starts to be used at the growing numer of sites. It could be fine to have support for it in SeaMonkey.

(Palemoon and Waterfox Classic already backport WebP for quite some time.)

Seeing that Waterfox Classic already supports WebP, I decided to go scouting along the trail towards the esr68.

Omitting all the testing stuff for simplicity, it takes about 12 commits, and about 5 manual rebases needed.

The whole all-in-one patch (intended for Fedora downstream), about 1.6Mb, is (temporary) available here.
Make sure you have "image.webp.enabled" in about:config .

Things seem to work.

Some links for testing:
right column at:

Splitted stuff follows.

1294490-1, bug #1294490 p1, c519480f7d6290b39cf5ac05fb21cd50606a68bc
Add libwebp to source tree.

1294490-2, bug #1294490 p2, ceb0fe9822473904ca40b5772242459b5eba4f8a
Add build files to support libwebp decoding.

1294490-3, bug #1294490, just unchanged "image/decoders/*" part of the commit 8d76871100bea172d77b2132daec9accc0bdb6a5
Implement WebP decoder.

1294490-3, bug #1294490 p3, other stuff of 8d76871100bea172d77b2132daec9accc0bdb6a5, need to be rebased.

Note: 1294490-4 is skipped since it seems to be telemetry only.

1294490-5, bug #1294490 p5, rebased,
Add --with-system-webp switch to build.

Note: 1294490-6 skipped since it is tests only.

1472145-1, bug #1472145 p1, 2a57944df012f4654b8f929132d7e3c5ab4193d0
(applies with some offsets)
Add support for identifying the WebP images MIME type.

1503935, bug #1503935, rebased without tests.
Fix some WebP decoder implementation bugs.

1504016, bug #1504016, b8d0312c16dcd6884de7a8be5791655f60ef40e4
Disable webp's NEON on aarch64-windows due to bustage.

1504237, bug #1504237, commit 5fb87d2312ea4881026ecaac6488fbdc2e4a7725 without tests.
Ensure partial animated frames always use BGRA instead of BGRX.

1504448, bug #1504448, commit 1262664295ff6c471a0515b64a57b56d3c57b6ee without tests.
Fix buffering problems in WebPDecoder.

1511603, bug #1511603, just "back-reformatted" commit
Ignore grayscale color profiles in webp images because webp images are never grayscale.

1527951, bug #1527951, commit 1c887a569595636763f17265af1e7c8cced30d50 without tests, applied with ignoring space differencies.
Ignore WebP image's alpha channel when a frame is marked as opaque.

Since we still not apply bug #523950 (part2, DecoderType etc.) and bug #1462355 (part-1a, AnimationParams.h and maybe more), some backward fixes needed.

Final notes:

Prefs "image.webp.enabled" remains false after above. (upstream enabled it in bug #1503653)

There is bug #1507691, regarding include image/webp to http accept headers. It seems there was some discussion in general about */* etc.
Probably we should not advertise image/webp support in headers for now, since things seem to work without it. Just in a case of a choice it probably causes to send old formats instead of new.

There is bug #1526731, but it looks like all saved properly now.

All the patches above are against 2.53.3-final.

Flags: needinfo?(iann_bugzilla)
Flags: needinfo?(frgrahl)

Thanks Dmitry. Had it on the long to do list for later but patches form others are fine :)

I will check the patches later. In general we want the tests too and they should be complete. If something is left out I usually put comments in the code or add .later files with the rejects. Thinks like bug 523950 and prerequisites are on the shortlist for sure.

Assignee: nobody → dmitry
Ever confirmed: true
Flags: needinfo?(frgrahl)

Part4 needs some changes for 2.53.4.

All other remain the same (somewhere with little offsets).

The whole all-in-one patch for 2.53.4 is (temporary) available here.

Flags: needinfo?(iann_bugzilla)

Now in 2.53.5b1 pre. 2.57 next.

Backported to bother 2.53.5 and 2.57 now.
Thanks Dmitry
Backports only so no checkin information.

Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.