Closed Bug 1653869 Opened 5 months ago Closed 2 months ago

WebP support for SeaMonkey

Categories

(SeaMonkey :: General, enhancement)

SeaMonkey 2.53 Branch
enhancement

Tracking

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

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

People

(Reporter: dmitry, Assigned: dmitry)

Details

(Whiteboard: SM2.53.5)

Attachments

(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:
https://developers.google.com/speed/webp/gallery1
animation:
https://mathiasbynens.be/demo/animated-webp
http://littlesvr.ca/apng/gif_apng_webp.html

Splitted stuff follows.

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

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

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

Part3.2
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.

Part4:
1294490-5, bug #1294490 p5, rebased https://hg.mozilla.org/mozilla-central/rev/99d6a3b6e120,
Add --with-system-webp switch to build.

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

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

Part6:
1503935, bug #1503935, rebased https://hg.mozilla.org/mozilla-central/rev/5223058ac4ff without tests.
Fix some WebP decoder implementation bugs.

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

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

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

Part10:
1511603, bug #1511603, just "back-reformatted" commit https://hg.mozilla.org/mozilla-central/rev/0112129c8f4d
Ignore grayscale color profiles in webp images because webp images are never grayscale.

Part11:
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.

Part12:
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
Status: UNCONFIRMED → ASSIGNED
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.

Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.