Gecko engine for Wine
Go to file
Nicholas Nethercote 7a382ecf62 Bug 1204394 (part 1) - Using StreamingLexer in the BMP decoder. r=seth.
This patch is a major overhaul of nsBMPDecoder.

The patch improves the code in the following ways.

- It converts nsBMPDecoder to use StreamingLexer, which makes it much easier to
  read.

- It adds a detailed comment about the BMP format at the top of
  nsBMPDecoder.cpp.

- It fixes lots of inconsistent indenting.

- It moves |bihsize| from |mBFH| to |mBIH| to match the file format and common
  sense. The avoids the need for the confusing LENGTH/INTERNAL_LENGTH
  distinction.

- It renames most of the types in BMPFileHeader.h, so they have better names,
  in StudlyCaps form, and within the new |bmp| namespace.

- It removes the BMP_HEADER_LENGTH struct and inlines its values directly into
  the two places they were used.

- It removes the MOZ_LOG logging done on some of the failure cases. (Most
  failure cases lacked logging so why bother with some?)

- It removes over 200 lines of code, despite the addition of the big format
  comment.

The patch changes the way BMPs are decoded as follows.

- It adds stricter testing of the InfoHeader length, rejecting files with bad
  values.

- It moves all header sanity checking that can lead to file rejection into the
  metadata decode phase. (Previously, bpp/compression consistency checking did
  not occur during a metadata decode.)

- It removes BMPINFOHEADER::ALPHABITFIELDS, which was (a) a weird WinCE-only
  thing, and (b) we didn't actually allow it, and (c) we used the value 4
  instead of 6(!).

- It rejects the previously-accepted compression==RLE4 && bpp=1 combination
  because it doesn't make sense.

- It removes a fudge in RLE absolute mode handling that permitted one pixel too
  many in a row but only if the row's width was odd(!)

- It now rejects a file with a negative gap between the color table and the
  pixel data.

The patch leaves the following problems unaddressed.

- If bpp==32 we totally ignore compression==BITFIELDS and treat it like
  compression=RGB.

- Transparency as specified in WinBMPv{4,5} isn't handled at all.

These will be fixed in follow-ups.

All these changes affect (for the better) the results of the following tests
that will be added in part 2:

- g/pal8v4.bmp
- g/pal8v5.bmp
- q/pal8os2sp.bmp
- q/pal8os2v2.bmp
- q/pal8os2v2-16.bmp
- b/badheadersize.bmp
- b/badpalettesize.bmp
- b/badrle.bmp
2015-10-08 22:47:56 -07:00
accessible bug 1213606 - work around proxy's that don't have a wrapper for their document r=davidb 2015-10-14 14:09:49 -04:00
addon-sdk Bug 1210956 - Clean up missed theme references after migration. r=bgrins 2015-10-08 13:43:05 -05:00
b2g Bug 1214932 - Remove fragmented-mp4 from media prefs. r=jya 2015-10-15 14:51:28 +13:00
browser Bug 1214932 - Remove fragmented-mp4 from media prefs. r=jya 2015-10-15 14:51:28 +13:00
build Bug 1214037 - Don't consider the result of an assignment expression MOZ_MUST_USE, r=ehsan 2015-10-14 16:06:36 -04:00
caps Merge b2ginbound to central, a=merge 2015-10-07 11:04:26 -07:00
chrome Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE 2015-10-07 14:03:21 +02:00
config Bug 1211765 - Remove remnants from --with-libxul-sdk. r=bsmedberg 2015-10-14 08:02:34 +09:00
db/sqlite3 Bug 1209875 - Get rid of XULPPFLAGS. r=gps 2015-10-01 07:30:48 +09:00
devtools Bug 1213138 - Add react-redux library to developer tools. r=gerv 2015-10-14 10:07:59 -07:00
docshell Bug 1207161 - fix run-by-dir leak in test_bug846906.xul; r=mccr8 2015-10-12 21:41:35 -04:00
dom Bug 1190592 - Part 2: Add test for mediasource memory reporter. r=jya 2015-10-14 20:48:58 -07:00
editor Bug 1035091 part 1: change CSS parser and loader APIs to distinguish UA, user, and author sheets instead of just UA vs everyone else. r=heycam 2015-10-13 17:43:16 -04:00
embedding Bug 1095236 - Disable dialog=1 support for windows opened from content. r=mrbkap 2015-10-02 19:00:54 -04:00
extensions Merge m-c to mozilla-inbound 2015-10-14 12:47:31 +02:00
gfx Bug 1214662 - Fix compile error for enabling APZES_LOG. r=botond 2015-10-15 10:49:26 +08:00
hal Backed out changeset 1f51d1614b9a (bug 1207245) 2015-10-07 10:19:31 -07:00
image Bug 1204394 (part 1) - Using StreamingLexer in the BMP decoder. r=seth. 2015-10-08 22:47:56 -07:00
intl Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE 2015-10-07 14:03:21 +02:00
ipc Bug 1213320 - Detect IPC::Channel leaks with the XPCOM leak checker. r=jld 2015-10-14 11:03:47 -07:00
js Bug 1198934 - Support special-case WebExtension behavior for TypedArrays. r=billm 2015-10-14 16:57:51 -07:00
layout Bug 1209649. Part 2: Reftest to test box shadows and border radii. r=mstange 2015-10-14 20:22:04 -07:00
media Bug 1113443 - reject each media type with approriate default. r=bwc 2015-10-11 18:13:09 +02:00
memory Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE 2015-10-07 14:03:21 +02:00
mfbt Backed out 5 changesets (bug 1212624) for breaking stuff. 2015-10-14 16:49:12 -07:00
mobile Bug 1214932 - Remove fragmented-mp4 from media prefs. r=jya 2015-10-15 14:51:28 +13:00
modules Bug 1214932 - Remove fragmented-mp4 from media prefs. r=jya 2015-10-15 14:51:28 +13:00
mozglue merge mozilla-inbound to mozilla-central a=merge 2015-10-14 12:46:09 +02:00
netwerk Backed out changeset 32357df66881 (bug 1168635) for Android s4 test failures 2015-10-14 16:28:59 +02:00
nsprpub
other-licenses
parser Bug 1209658 part 2. Add text/json and text/vtt as text MIME types. r=bkelly 2015-10-05 12:23:26 -04:00
probes
python Bug 1211765 - Remove remnants from --with-libxul-sdk. r=bsmedberg 2015-10-14 08:02:34 +09:00
rdf Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE 2015-10-07 14:03:21 +02:00
security Backed out changeset 66e3972e9150 (bug 1168635) 2015-10-14 16:28:41 +02:00
services Bug 1212633 - include mobile and unfiled folders in Sync's concept of 'all IDs'. r=rnewman 2015-10-13 10:32:18 +11:00
startupcache Backed out changeset 91d4539e00ce (bug 1207245) 2015-10-07 10:19:19 -07:00
storage Backed out changeset 91d4539e00ce (bug 1207245) 2015-10-07 10:19:19 -07:00
testing Bug 1214932 - Remove fragmented-mp4 from media prefs. r=jya 2015-10-15 14:51:28 +13:00
toolkit Bug 1175857 - Build dump_syms with compiler optimizations; r=glandium 2015-09-24 17:05:40 -04:00
tools Bug 1212427 - Reference extra Python paths in Sphinx config; r=mshal 2015-10-09 13:03:52 -07:00
uriloader Back out 5 changesets (bug 1159385, bug 1165558) for making browser_pdfjs_zoom.js frequently leak on Windows 2015-10-13 21:36:10 -07:00
view Bug 1207161 - fix run-by-dir leak in test_bug846906.xul; r=mccr8 2015-10-12 21:41:35 -04:00
webapprt Bug 1212299 part 1 - Forbid documents inside elements other than iframe from requesting fullscreen. r=smaug 2015-10-12 11:24:23 +11:00
widget Bug 943296 - widget/gtk/nsDragService.cpp should assume Gtk uses UTF-8. r=karlt. 2015-10-14 15:28:50 +03:00
xpcom Bug 1194555 - Part 6: Run reporters asynchronously. r=njn,jld,ted 2015-10-14 16:52:59 -07:00
xpfe Backed out 2 changesets (bug 1137009) 2015-10-13 18:33:51 -07:00
xulrunner
.clang-format
.clang-format-ignore
.eslintrc Bug 1203520 - We need a DevTools ESLint plugin containing our ruleset r=gps 2015-09-30 14:44:48 +01:00
.gdbinit
.gitignore Bug 1213161 - Really ignore build directories for js shell. r=sfink 2015-10-09 10:25:59 +08:00
.hgignore Bug 1203520 - We need a DevTools ESLint plugin containing our ruleset r=gps 2015-09-30 14:44:48 +01:00
.hgtags
.lldbinit
.ycm_extra_conf.py
aclocal.m4 Bug 1205012 - Allow rust source code in SpiderMonkey; r=mshal 2015-09-18 13:55:29 -07:00
Android.mk
AUTHORS
client.mk
client.py
CLOBBER Bug 1182727 - Touch CLOBBER 2015-10-09 21:16:48 -04:00
configure.in Bug 1211765 - Remove remnants from --with-libxul-sdk. r=bsmedberg 2015-10-14 08:02:34 +09:00
GNUmakefile
LEGAL
LICENSE
mach
Makefile.in Bug 1211765 - Remove remnants from --with-libxul-sdk. r=bsmedberg 2015-10-14 08:02:34 +09:00
moz.build Bug 1211765 - Remove remnants from --with-libxul-sdk. r=bsmedberg 2015-10-14 08:02:34 +09:00
mozilla-config.h.in
README.txt

An explanation of the Mozilla Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure

For information on how to build Mozilla from the source code, see:

    http://developer.mozilla.org/en/docs/Build_Documentation

To have your bug fix / feature added to Mozilla, you should create a patch and
submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at:

    http://developer.mozilla.org/en/docs/Creating_a_patch
    http://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree

If you have a question about developing Mozilla, and can't find the solution
on http://developer.mozilla.org, you can try asking your question in a
mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups
are accessible on Google Groups, or news.mozilla.org with a NNTP reader.]

You can download nightly development builds from the Mozilla FTP server.
Keep in mind that nightly builds, which are used by Mozilla developers for
testing, may be buggy. Firefox nightlies, for example, can be found at:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    http://nightly.mozilla.org/