mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Gecko engine for Wine
7a382ecf62
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 |
||
---|---|---|
accessible | ||
addon-sdk | ||
b2g | ||
browser | ||
build | ||
caps | ||
chrome | ||
config | ||
db/sqlite3 | ||
devtools | ||
docshell | ||
dom | ||
editor | ||
embedding | ||
extensions | ||
gfx | ||
hal | ||
image | ||
intl | ||
ipc | ||
js | ||
layout | ||
media | ||
memory | ||
mfbt | ||
mobile | ||
modules | ||
mozglue | ||
netwerk | ||
nsprpub | ||
other-licenses | ||
parser | ||
probes | ||
python | ||
rdf | ||
security | ||
services | ||
startupcache | ||
storage | ||
testing | ||
toolkit | ||
tools | ||
uriloader | ||
view | ||
webapprt | ||
widget | ||
xpcom | ||
xpfe | ||
xulrunner | ||
.clang-format | ||
.clang-format-ignore | ||
.eslintrc | ||
.gdbinit | ||
.gitignore | ||
.hgignore | ||
.hgtags | ||
.lldbinit | ||
.ycm_extra_conf.py | ||
aclocal.m4 | ||
Android.mk | ||
AUTHORS | ||
client.mk | ||
client.py | ||
CLOBBER | ||
configure.in | ||
GNUmakefile | ||
LEGAL | ||
LICENSE | ||
mach | ||
Makefile.in | ||
moz.build | ||
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/