image/src/ICOFileHeaders.h

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5
michael@0 6 #ifndef MOZILLA_IMAGELIB_ICOHEADERS_H_
michael@0 7 #define MOZILLA_IMAGELIB_ICOHEADERS_H_
michael@0 8
michael@0 9 namespace mozilla {
michael@0 10 namespace image {
michael@0 11
michael@0 12 #define ICONFILEHEADERSIZE 6
michael@0 13 #define ICODIRENTRYSIZE 16
michael@0 14 #define PNGSIGNATURESIZE 8
michael@0 15 #define BMPFILEHEADERSIZE 14
michael@0 16
michael@0 17 struct IconFileHeader
michael@0 18 {
michael@0 19 uint16_t mReserved;
michael@0 20 uint16_t mType;
michael@0 21 uint16_t mCount;
michael@0 22 };
michael@0 23
michael@0 24 struct IconDirEntry
michael@0 25 {
michael@0 26 uint8_t mWidth;
michael@0 27 uint8_t mHeight;
michael@0 28 uint8_t mColorCount;
michael@0 29 uint8_t mReserved;
michael@0 30 union {
michael@0 31 uint16_t mPlanes; // ICO
michael@0 32 uint16_t mXHotspot; // CUR
michael@0 33 };
michael@0 34 union {
michael@0 35 uint16_t mBitCount; // ICO
michael@0 36 uint16_t mYHotspot; // CUR
michael@0 37 };
michael@0 38 uint32_t mBytesInRes;
michael@0 39 uint32_t mImageOffset;
michael@0 40 };
michael@0 41
michael@0 42
michael@0 43 } // namespace image
michael@0 44 } // namespace mozilla
michael@0 45
michael@0 46 #endif

mercurial