Pale Moon
146ee036e0
Fix/remove some tests that depend on image load event timing.
...
Follow-up for #1360 .
2018-07-25 09:08:26 +08:00
Pale Moon
e7e1ae5d64
Fix async image load unit test for #1360 .
2018-07-25 09:08:18 +08:00
Pale Moon
85b2c30009
Don't fire the image load event until the decoder is fully finalized.
...
This resolves #1360 .
2018-07-25 09:08:11 +08:00
JustOff
4e3a64fcc7
Detect WEBP from content even if it's received with wrong mime type
2018-07-25 09:03:22 +08:00
janekptacijarabaci
a839da1f08
Fix build bustage when compiler warnings as errors (int32_t/uint32_t)
2018-07-25 07:58:39 +08:00
janekptacijarabaci
1613731be0
Fix build bustage when compiler warnings as errors
2018-07-25 07:58:25 +08:00
Pale Moon
19738af3c0
Reinstate some caching for vector images with small enough dimensions.
...
A dimension of 400 largest size x or y should cover all common caching cases for SVG icons and web app elements,
but not caching large vector rasters that would exhaust the cache.
Final solution for #757 .
2018-07-25 07:45:24 +08:00
Pale Moon
5b6de5f6cd
Bypass surface cache for vector images; always draw them as-is.
...
This fully fixes the regression in #757 .
2018-07-25 07:45:17 +08:00
Pale Moon
aef46a4621
Bug 1342567.
2018-07-25 07:44:01 +08:00
Pale Moon
611039d975
Replace correct #define check
2018-07-25 07:41:25 +08:00
Pale Moon
ad26881b3f
Remove incorrect #define check
2018-07-25 07:41:18 +08:00
rhinoduck
361d6b8e76
Simplify libwebp usage in nsWEBPDecoder
2018-07-25 06:58:52 +08:00
rhinoduck
cf532575c1
Clean up in nsWEBPDecoder a bit
...
Remove unneeded headers; make use of the override keyword; rename one
variable to make its meaning clearer; trim a few stray trailing spaces.
2018-07-25 06:58:50 +08:00
rhinoduck
3683f6dc1c
Fix invalidation rect in nsWEBPDecoder
...
The last argument to nsIntRect's constructor should be height, not y2.
2018-07-25 06:58:48 +08:00
rhinoduck
eef7695088
Fix memory leak in nsWEBPDecoder
...
FinishInternal() won't get called if an error has been posted before,
so the libwebp cleanup calls need to be in a different place; like the
destructor.
2018-07-25 06:58:45 +08:00
rhinoduck
0f37da4f2f
Fix posting order in nsWEBPDecoder
...
As per CheckProgressConsistency() in ProgressTracker.cpp, PostSize()
should come before PostHasTransparency().
2018-07-25 06:58:44 +08:00
rhinoduck
e665e73cea
Fix member visibility in nsWEBPDecoder
2018-07-25 06:58:42 +08:00
Pale Moon
10487202da
Correct the pixel size comment. 64Mpix, not 16Mpix.
2018-07-25 06:58:40 +08:00
Pale Moon
b142e09884
Stop trying to apply HQ scaling on ridiculously-sized (>16Mpix) images since it'll cause OOM crashes.
...
Too-large images won't use HQ scaling and also won't display at 1:1 zoom
because we simply don't have the surface cache space available for that kind of out-of-scope image.
It will allow the user to save such images to disk and view in specialized software.
2018-07-25 06:58:34 +08:00
rhinoduck
2c9b1e3a23
Do not pre-multiply JXR planar alpha twice
...
If the image already had pre-multiplied alpha, the decoder would
pre-multiply those already pre-multiplied values again when decoding
the alpha plane separately from the main plane.
2018-07-25 06:58:17 +08:00
rhinoduck
ea05403e84
Prettify rendering of JXR images with transparency
...
Prevent fully transparent areas from being black (or whatever the color
values there are) when rendering JXR images with planar alpha before all
data is available.
2018-07-25 06:57:41 +08:00
Pale Moon
132522bfc9
Change the way maximum image dimensions are handled for PNG.
...
Prev: Hard cap width = 32k OR height = 32k
New: Hard cap width = 64k OR height = 64k, and image area < 256 Mpix
This will allow decoding of larger images with "strip" aspect ratio (horizontally or vertically).
2018-07-25 06:52:47 +08:00
rhinoduck
5059bf8c04
Initialize member variable to stay safe
2018-07-25 06:45:58 +08:00
rhinoduck
cdb87b65f4
Silence compiler warnings in JXR decoder
...
Until the MSOT version is rewritten.
2018-07-25 06:45:29 +08:00
Pale Moon
8e516a1800
Add a basic jxr reftest for decoding
2018-07-25 06:44:49 +08:00
rhinoduck
7b7ccd5dce
Add JXR support to the browser
...
Can be enabled/disabled at runtime by toggling the 'media.jxr.enabled'
pref (disabled by default).
Two additional prefs are provided for testing purposes:
'media.jxr.autoaccept', and 'media.jxr.advertised_mime_type'
See comments in all.js for information on what these do.
This commit includes the MS OpenTech implementation of the decoder on
the browser side with some fixes applied; see the development in Pale
Moon GitGub issue #105 or my comments in the source code for more
information.
2018-07-25 06:44:47 +08:00
janekptacijarabaci
7cf33c4329
CORS: A "data:" URL = the same-origin
2018-07-25 06:43:07 +08:00
Pale Moon
fc98da7b5e
Add a basic WebP reftest for decoding.
2018-07-25 06:42:49 +08:00
Pale Moon
d67cb315e6
Fix build bustage caused by 25ca96965c594585ce11ee4c2f08e3ecb51284f9
2018-07-25 01:04:45 +08:00
Pale Moon
e7a1f19b4c
Be more strict with PNG files with CRC errors and invalid frame sizes if building with APNG support.
...
This follows the strong recommendation in the spec to reject these frames/files outright.
2018-07-25 01:04:37 +08:00
Pale Moon
478bec7a0e
Clear the buffer we allocate for paletted image frames
2018-07-25 01:04:11 +08:00
Gpower2
d8cdbde6ce
Change WIN_VER and _WIN32_WINNT to 0x0600
2018-07-25 01:02:27 +08:00
Moonchild
2ef20e45fe
Revert "Change WINVER and _WIN32_WINNT to 0x0600 where applicable for issue #515 "
2018-07-25 01:02:18 +08:00
Gpower2
a06562e691
Change WIN_VER and _WIN32_WINNT to 0x0600
2018-07-25 00:58:05 +08:00
Pale Moon
5011f756e1
Properly support transparent WebP images with the new decoder implementation.
2018-07-25 00:57:38 +08:00
Pale Moon
1f39ab05ee
Remove unnecessary frame allocations for WebP.
2018-07-25 00:57:35 +08:00
wolfbeast
97ff398f18
Get rid of non functional pointer juggling and replace it with a working data conversion.
...
This resolves #489 .
2018-07-25 00:55:33 +08:00
wolfbeast
915a8f37a7
Use new type frame allocation.
...
Remove decoder-internal mImageData (let Decoder handle that!)
Decoding works now, but data transfer from mData to mImageData is still wrong.
2018-07-25 00:55:31 +08:00
wolfbeast
b8cabbc735
Base import of Tycho-libwebp-work branch
2018-07-25 00:55:28 +08:00
wolfbeast
49eb1155d5
Better handle incorrect ICO images.
2018-07-24 23:31:15 +08:00
trav90
052e58f015
Remove GnomeVFS extension
2018-07-24 23:12:24 +08:00
wolfbeast
53761b6336
Prep tree for forward-porting Goanna: stage 2
2018-07-24 23:11:02 +08:00
wolfbeast
5ee6187aad
Prep tree for forward-porting Goanna, stage 1
2018-07-24 23:10:50 +08:00
Moonchild
baf46a6bf1
Merge pull request #1 from mozilla/esr38: Esr38 upstream pull
2018-07-24 23:04:07 +08:00