Commit Graph

34 Commits

Author SHA1 Message Date
win7-7 deae241f5e Convert dom/base/nsImageLoadingContent.cpp to use AsyncOpen2 and followups along with it (1445670 and 1373780 part 2 and 3)
Convert dom/base/nsImageLoadingContent.cpp to use AsyncOpen2 and followups along with it (1445670 and 1373780 part 2 and 3)
2019-08-08 16:44:51 +03:00
adeshkp 52be954e59 Fix order of member variables in a couple of initializer lists 2019-03-14 09:52:03 -04:00
Andrew Osmond c66d87e6c0 BMPs from the clipboard may include extra padding.
In the original Windows clipboard BMP decoder implementation in
nsImageFromClipboard::ConvertColorBitMap, if the bitmap used bitfields
compression, it always adjusted the offset to the RGB data by 12 bytes.
It did this even for newer BMP header formats which explicitly include
space for the bitfields in their header sizes. This patch updates our
BMP decoder to do the same for clipboard BMPs, since we have observed
pasted BMPs using bitfield compression appearing incorrectly. To the
user this appears as if we read a color mask; completely red, blue,
green pixels at the start of the last row, causing all of the other rows
to start with the last three pixels of the previous row.
2019-02-16 20:21:13 +01:00
wolfbeast 6992106dc7 Use existing image decoders to handle clipboard BMP data.
This gets rid of the old nsImageClipboard widget code in favor of using
the nsBMPDecoder in imglib.
2019-02-07 22:06:24 +01:00
wolfbeast 8dd8df90b9 Check for contiguous buffer state.
When we are reading large image data (i.e.: people using webp to stream
video instead of the native webm format; I'm looking at you, Giphy!)
we can run into the situation where the available data is not in a
contiguous buffer, and we need to either buffer additional data or
re-buffer from the start. If we don't do this, we can run into issues
because of buffer over-reading (causing corrupted data if allocated or
more likely crashes if not allocated).
Re-buffering is expensive, but this should be rare and limited to
dealing with unintended use for animated image formats.

This resolves #940.
2019-01-21 15:56:16 +01:00
wolfbeast 87bef3e99e Make Sourcebuffer::AppendFromInputStream handle canceled image loads. 2019-01-21 14:02:56 +01:00
wolfbeast 64d65e096b Make resuming of decoding work for anonymous decoders. 2019-01-21 13:58:20 +01:00
adeshkp 5335681cd2 Telemetry: Remove stubs and related code 2019-01-12 06:20:31 -05:00
wolfbeast e80c736023 Avoid overflow in nsPNGEncoder::WriteCallback. 2018-12-13 19:48:31 +01:00
wolfbeast b37e8f87c4 Fix debug assertion.
See: https://github.com/MoonchildProductions/UXP/commit/622098073e132995994fac4d61e3629d08ee1801#commitcomment-31390051
2018-11-22 12:12:58 +01:00
wolfbeast 25f4c75d68 Fix blank pixel color for truncated GIFs 2018-11-21 14:22:29 +01:00
wolfbeast a51993521f Split out FrameTimeout into its own header file for re-use. 2018-11-21 14:08:47 +01:00
wolfbeast 5b821064f2 Unrefactor mRawVeggies back to mVBuffMeat ;P
(mRawSurface -> mVBuf)
2018-11-21 14:08:00 +01:00
wolfbeast b9003c9c5d Fix pasta error 2018-11-21 14:03:16 +01:00
wolfbeast 3417e581ce Bug 1462355 - Part 1c. Make individual image decoders to use updated Decoder/SurfacePipe methods.
Extend this change to nsWebPDecoder.cpp
2018-11-21 13:34:01 +01:00
wolfbeast 622098073e Bug 1462355 - Part 1b. Update Decoder and SurfacePipe plumbing to use updated imgFrame methods. 2018-11-21 12:57:17 +01:00
wolfbeast 807acf738f Bug 1462355 - Part 1a. Make imgFrame animation parameters threadsafe.
We currently choose to set the animation parameters (blend method, blend
rect, disposal method, timeout) in imgFrame::Finish instead of
imgFrame::InitForDecoder. The decoders themselves already have access to
the necessary information at the time InitForDecoder is called, so there
is no reason to do this. Moving the configuration to initialization will
allow us to relax the mutex protection on these parameters.

This part simply reorganizes imgFrame, and subsequent parts will
introduce the necessary changes to SurfacePipe and decoders.
2018-11-20 20:38:49 +01:00
wolfbeast 238b430ec0 Port WebP decoder changes.
This breaks animated WebP for the moment, but adds QCMS color management and lexer changes.
Tag #831
2018-11-20 19:59:25 +01:00
wolfbeast ab961aeb54 Remove all C++ Telemetry Accumulation calls.
This creates a number of stubs and leaves some surrounding code that may be irrelevant (eg. recorded time stamps, status variables).
Stub resolution/removal should be a follow-up to this.
2018-09-03 10:11:38 +02:00
wolfbeast 05e8038c08 Free the decoded image buffer before deleting the WebP decoder.
This should solve #483.
2018-06-13 13:45:56 +02:00
Pale Moon 835749ed6d Perform some sanity checks on nsMozIconURI. 2018-06-07 06:24:53 +02:00
Moonchild 9f6194d000 Merge pull request #412 from g4jc/hsts_priming_removal_backport
Remove support and tests for HSTS priming from the tree. Fixes #384
2018-05-30 12:47:56 +02:00
wolfbeast ab57858195 Limit PNG image dimensions. 2018-05-29 13:11:09 +02:00
Gaming4JC bd85173562 Remove support and tests for HSTS priming from the tree. Fixes #384 2018-05-26 15:42:45 -04:00
janekptacijarabaci dbfad99a51 Bug 1323683 - Fold nsIURIWithQuery into nsIURI
native in moebius
2018-04-22 21:20:53 +02:00
Andrew Osmond 49969faa91 Bug 1409440. r=tnikkel, a=RyanVM 2018-04-19 11:37:13 +02:00
wolfbeast 7838398b62 Make vector image surface caching smarter.
This resolves #91.
2018-04-05 09:58:06 +02:00
janekptacijarabaci 092c61f6e6 CSS: inline-block with a display:block <input> child element has a wrong baseline (HTML forms) 2018-03-12 09:50:12 +01:00
wolfbeast c766897196 Remove the use of GetProcAddress() for shell32
This avoids manually hooking into shell32.dll and using the native shell API instead.
Tag #22.
2018-02-19 10:00:25 +01:00
wolfbeast a47a037ec9 Use int instead of uint for vector dimension cap. 2018-02-04 12:35:44 +01:00
wolfbeast feeb432730 Don't cache vector images in the surface cache if they are too large.
A dimension of 3000 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.
This limit is a royal 36MB/element (3000x3000x4) as cap (if the SVG is square). This avoids performance regressions when repeatedly scaling large vector images, but also allows for large SVG backgrounds to be cached.
It allows for the bad practice of slapping a large SVG on a site as html background, considering they are likely, even when using large sizes for "responsive" layout, not going to exceed 3000 px in the largest dimension (and if they do, the web designer needs to be slapped with a big trout).
2018-02-04 00:07:05 +01:00
wolfbeast 9371852bb9 Add WebP content sniffing code. 2018-02-03 10:05:56 +01:00
wolfbeast 3e0351aa49 Implement WebP image decoder. 2018-02-03 10:03:50 +01:00
Matt A. Tobin 5f8de423f1 Add m-esr52 at 52.6.0 2018-02-02 04:16:08 -05:00