Compare commits
70
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
915ae7981a | ||
|
|
33420c43a2 | ||
|
|
ce9d45fc59 | ||
|
|
f29d7ff617 | ||
|
|
cdc5daf5da | ||
|
|
b1de755d0f | ||
|
|
da9d7b4362 | ||
|
|
6efbf737e5 | ||
|
|
f97c06d435 | ||
|
|
1f058d19ef | ||
|
|
260b06c1c9 | ||
|
|
c4ed602e3f | ||
|
|
ed290ba09d | ||
|
|
e746ec8441 | ||
|
|
48d8e28fe6 | ||
|
|
cdfe2e11c8 | ||
|
|
ed9341c4a4 | ||
|
|
263d8500ce | ||
|
|
b06821da15 | ||
|
|
b578943a42 | ||
|
|
b4edb88144 | ||
|
|
f84f1961bc | ||
|
|
3aac951411 | ||
|
|
1a6159363f | ||
|
|
814e0bca31 | ||
|
|
29b9d4496a | ||
|
|
cc6a935ce5 | ||
|
|
d129c900c9 | ||
|
|
de2c8419c6 | ||
|
|
f6137449b6 | ||
|
|
020248c6e3 | ||
|
|
e0a09e1aaf | ||
|
|
4af3ad5dfe | ||
|
|
ff66da9af4 | ||
|
|
c2e358c520 | ||
|
|
d185071acf | ||
|
|
e517e70eb1 | ||
|
|
0a6db54d86 | ||
|
|
c5d5a28f76 | ||
|
|
a0e20005ef | ||
|
|
a3c1f180ce | ||
|
|
cd4f7a1798 | ||
|
|
914294e570 | ||
|
|
831b9d8d9e | ||
|
|
6864a02d7b | ||
|
|
bffec09e66 | ||
|
|
51e5770962 | ||
|
|
e1bfe33031 | ||
|
|
8240fb9c73 | ||
|
|
f9e04b54c2 | ||
|
|
775e800ca0 | ||
|
|
882aaf5b1f | ||
|
|
8ee235ca5d | ||
|
|
cc54bbe952 | ||
|
|
73b202b1e5 | ||
|
|
21042963de | ||
|
|
d443656df5 | ||
|
|
29a8db7280 | ||
|
|
daa52eef9a | ||
|
|
95ce1f0d63 | ||
|
|
4dadef2740 | ||
|
|
b5d8e6d28f | ||
|
|
fc0477a98e | ||
|
|
36d06b9e75 | ||
|
|
51bdd3efbc | ||
|
|
bc2584493a | ||
|
|
0f38772573 | ||
|
|
ef81277925 | ||
|
|
8b20931e12 | ||
|
|
b247982d37 |
No files matched your search
@@ -145,9 +145,6 @@
|
||||
</radiogroup>
|
||||
</box>
|
||||
</row>
|
||||
<label value="&noproxy.label;" accesskey="&noproxy.accesskey;" control="networkProxyNone"/>
|
||||
<textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/>
|
||||
<label value="&noproxyExplain.label;" control="networkProxyNone"/>
|
||||
</rows>
|
||||
</grid>
|
||||
<radio value="2" label="&autoTypeRadio.label;" accesskey="&autoTypeRadio.accesskey;"/>
|
||||
@@ -162,6 +159,9 @@
|
||||
</radiogroup>
|
||||
</groupbox>
|
||||
<separator class="thin"/>
|
||||
<label value="&noproxy.label;" accesskey="&noproxy.accesskey;" control="networkProxyNone"/>
|
||||
<textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/>
|
||||
<label value="&noproxyExplain.label;" control="networkProxyNone"/>
|
||||
<checkbox id="autologinProxy"
|
||||
label="&autologinproxy.label;"
|
||||
accesskey="&autologinproxy.accesskey;"
|
||||
|
||||
@@ -37,20 +37,20 @@ pref("extensions.strictCompatibility", false);
|
||||
// for it to be compatible by default.
|
||||
pref("extensions.minCompatibleAppVersion", "1.5");
|
||||
|
||||
// Preferences for APO integration
|
||||
#define APO_AM_URL addons.palemoon.org/integration/addon-manager
|
||||
#define APO_AUS_ARGS reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%
|
||||
#define AM_DOMAIN addons.palemoon.org
|
||||
#define AM_AUS_ARGS reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%
|
||||
|
||||
// Preferences for AMO integration
|
||||
pref("extensions.getAddons.cache.enabled", false);
|
||||
pref("extensions.getAddons.maxResults", 10);
|
||||
pref("extensions.getAddons.get.url", "https://@APO_AM_URL@/internal/get?addonguid=%IDS%&os=%OS%&version=%VERSION%");
|
||||
pref("extensions.getAddons.getWithPerformance.url", "https://@APO_AM_URL@/internal/get?addonguid=%IDS%&os=%OS%&version=%VERSION%");
|
||||
pref("extensions.getAddons.search.browseURL", "https://@APO_AM_URL@/external/recommended");
|
||||
pref("extensions.getAddons.search.url", "https://@APO_AM_URL@/internal/search?q=%TERMS%&locale=%LOCALE%&os=%OS%&version=%VERSION%");
|
||||
pref("extensions.webservice.discoverURL", "http://@APO_AM_URL@/internal/discover/");
|
||||
pref("extensions.getAddons.recommended.url", "https://@APO_AM_URL@/internal/recommended?locale=%LOCALE%&os=%OS%");
|
||||
pref("extensions.getAddons.browseAddons", "https://addons.palemoon.org");
|
||||
pref("extensions.getAddons.recommended.browseURL", "https://@APO_AM_URL@/external/recommended");
|
||||
pref("extensions.getAddons.get.url", "https://@AM_DOMAIN@/?component=integration&type=internal&request=get&addonguid=%IDS%&os=%OS%&version=%VERSION%");
|
||||
pref("extensions.getAddons.getWithPerformance.url", "https://@AM_DOMAIN@/?component=integration&type=internal&request=get&addonguid=%IDS%&os=%OS%&version=%VERSION%");
|
||||
pref("extensions.getAddons.search.browseURL", "https://@AM_DOMAIN@/search/?terms=%TERMS%");
|
||||
pref("extensions.getAddons.search.url", "https://@AM_DOMAIN@/?component=integration&type=internal&request=search&q=%TERMS%&locale=%LOCALE%&os=%OS%&version=%VERSION%");
|
||||
pref("extensions.webservice.discoverURL", "http://@AM_DOMAIN@/?component=discover");
|
||||
pref("extensions.getAddons.recommended.url", "https://@AM_DOMAIN@/?component=integration&type=internal&request=recommended&locale=%LOCALE%&os=%OS%");
|
||||
pref("extensions.getAddons.browseAddons", "http://@AM_DOMAIN@/");
|
||||
pref("extensions.getAddons.recommended.browseURL", "https://@AM_DOMAIN@/?component=integration&type=external&request=recommended");
|
||||
|
||||
// Blocklist preferences
|
||||
pref("extensions.blocklist.enabled", true);
|
||||
@@ -70,10 +70,10 @@ pref("extensions.update.autoUpdateDefault", true);
|
||||
pref("extensions.autoDisableScopes", 15);
|
||||
|
||||
// Dictionary download preference
|
||||
pref("browser.dictionaries.download.url", "https://addons.mozilla.org/%LOCALE%/firefox/dictionaries/");
|
||||
pref("browser.dictionaries.download.url", "https://@AM_DOMAIN@/dictionaries/");
|
||||
|
||||
// Get More Tools link URL
|
||||
pref("browser.getdevtools.url","https://@APO_AM_URL@/external/devtools");
|
||||
pref("browser.getdevtools.url","https://@AM_DOMAIN@/?component=integration&type=external&request=devtools");
|
||||
|
||||
// Feedback URL
|
||||
pref("browser.feedback.url", "https://forum.palemoon.org");
|
||||
@@ -194,8 +194,8 @@ pref("app.update.incompatible.mode", 0);
|
||||
// .. etc ..
|
||||
//
|
||||
pref("extensions.update.enabled", true);
|
||||
pref("extensions.update.url", "https://@APO_AM_URL@/internal/update?@APO_AUS_ARGS@");
|
||||
pref("extensions.update.background.url", "https://@APO_AM_URL@/internal/update?@APO_AUS_ARGS@");
|
||||
pref("extensions.update.url", "https://@AM_DOMAIN@/?component=aus&@AM_AUS_ARGS@");
|
||||
pref("extensions.update.background.url", "https://@AM_DOMAIN@/?component=aus&@AM_AUS_ARGS@");
|
||||
pref("extensions.update.interval", 86400); // Check for updates to Extensions and
|
||||
// Themes every day
|
||||
// Non-symmetric (not shared by extensions) extension-specific [update] preferences
|
||||
@@ -362,7 +362,7 @@ pref("browser.download.panel.shown", false);
|
||||
pref("browser.download.panel.firstSessionCompleted", false);
|
||||
|
||||
// search engines URL
|
||||
pref("browser.search.searchEnginesURL", "https://@APO_AM_URL@/external/searchplugins");
|
||||
pref("browser.search.searchEnginesURL", "https://@AM_DOMAIN@/?component=integration&type=external&request=searchplugins");
|
||||
|
||||
// pointer to the default engine name
|
||||
pref("browser.search.defaultenginename", "chrome://browser-region/locale/region.properties");
|
||||
|
||||
@@ -4408,7 +4408,13 @@ nsBrowserAccess.prototype = {
|
||||
|
||||
openURI: function (aURI, aOpener, aWhere, aContext) {
|
||||
var newWindow = null;
|
||||
var isExternal = (aContext == Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
|
||||
var isExternal = !!(aContext & Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
|
||||
|
||||
if (aOpener && isExternal) {
|
||||
Cu.reportError("nsBrowserAccess.openURI did not expect an opener to be " +
|
||||
"passed if the context is OPEN_EXTERNAL.");
|
||||
throw Cr.NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
if (isExternal && aURI && aURI.schemeIs("chrome")) {
|
||||
dump("use -chrome command-line option to load external chrome urls\n");
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
#define APO_AM_URL addons.palemoon.org/integration/addon-manager
|
||||
#define APO_AUS_ARGS reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%
|
||||
|
||||
// ===| General |==============================================================
|
||||
|
||||
pref("startup.homepage_welcome_url","http://www.palemoon.org/firstrun.shtml");
|
||||
@@ -29,15 +26,12 @@ pref("app.update.promptWaitTime", 172800);
|
||||
// ===| Add-ons Manager |======================================================
|
||||
|
||||
// Add-on window fixes
|
||||
pref("extensions.getMoreThemesURL", "https://@APO_AM_URL@/external/themes");
|
||||
pref("extensions.getMoreThemesURL", "https://addons.palemoon.org/themes/");
|
||||
|
||||
// Extensions Blocklist
|
||||
pref("extensions.blocklist.url","http://blocklist.palemoon.org/%VERSION%/blocklist.xml");
|
||||
pref("extensions.blocklist.itemURL", "http://blocklist.palemoon.org/info/?id=%blockID%");
|
||||
|
||||
// Dictionary URL
|
||||
pref("browser.dictionaries.download.url", "https://addons.mozilla.org/%LOCALE%/firefox/dictionaries/");
|
||||
|
||||
pref("extensions.update.autoUpdateDefault", true); // Automatically update extensions by default
|
||||
pref("extensions.getAddons.maxResults", 10);
|
||||
pref("extensions.getAddons.cache.enabled", false);
|
||||
|
||||
@@ -138,9 +138,6 @@
|
||||
<radio id="networkProxySOCKSVersion5" value="5" label="&socks5.label;" accesskey="&socks5.accesskey;"/>
|
||||
</radiogroup>
|
||||
</row>
|
||||
<label value="&noproxy.label;" accesskey="&noproxy.accesskey;" control="networkProxyNone"/>
|
||||
<textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/>
|
||||
<label value="&noproxyExplain.label;" control="networkProxyNone"/>
|
||||
</rows>
|
||||
</grid>
|
||||
<radio value="2" label="&autoTypeRadio.label;" accesskey="&autoTypeRadio.accesskey;"/>
|
||||
@@ -154,6 +151,9 @@
|
||||
</hbox>
|
||||
</radiogroup>
|
||||
<separator class="thin"/>
|
||||
<label value="&noproxy.label;" accesskey="&noproxy.accesskey;" control="networkProxyNone"/>
|
||||
<textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/>
|
||||
<label value="&noproxyExplain.label;" control="networkProxyNone"/>
|
||||
<checkbox id="autologinProxy" preference="signon.autologin.proxy"
|
||||
label="&autologinproxy.label;" accesskey="&autologinproxy.accesskey;"
|
||||
tooltiptext="&autologinproxy.tooltip;"/>
|
||||
|
||||
@@ -1 +1 @@
|
||||
28.4.0a1
|
||||
28.4.0
|
||||
@@ -189,7 +189,8 @@ exports.menuitems = [
|
||||
l10nKey: "getMoreDevtoolsCmd",
|
||||
oncommand(event) {
|
||||
let window = event.target.ownerDocument.defaultView;
|
||||
window.openUILinkIn("https://addons.mozilla.org/firefox/collections/mozilla/webdeveloper/", "tab");
|
||||
let getMoreURL = Services.prefs.getCharPref("browser.getdevtools.url");
|
||||
window.openUILinkIn(getMoreURL, "tab");
|
||||
}
|
||||
},
|
||||
];
|
||||
@@ -789,10 +789,6 @@ Location::GetSearch(nsAString& aSearch)
|
||||
NS_IMETHODIMP
|
||||
Location::SetSearch(const nsAString& aSearch)
|
||||
{
|
||||
if (aSearch.IsEmpty()) {
|
||||
return NS_OK; // Ignore empty string
|
||||
}
|
||||
|
||||
nsresult rv = SetSearchInternal(aSearch);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
|
||||
@@ -373,7 +373,7 @@ public:
|
||||
@param extraPtCount The number of extra points the path should
|
||||
preallocate for.
|
||||
*/
|
||||
void incReserve(unsigned extraPtCount);
|
||||
void incReserve(int extraPtCount);
|
||||
|
||||
/** Set the beginning of the next contour to the point (x,y).
|
||||
|
||||
|
||||
@@ -716,9 +716,11 @@ void SkPath::setConvexity(Convexity c) {
|
||||
fFirstDirection = SkPathPriv::kUnknown_FirstDirection; \
|
||||
} while (0)
|
||||
|
||||
void SkPath::incReserve(U16CPU inc) {
|
||||
void SkPath::incReserve(int inc) {
|
||||
SkDEBUGCODE(this->validate();)
|
||||
SkPathRef::Editor(&fPathRef, inc, inc);
|
||||
if (inc > 0) {
|
||||
SkPathRef::Editor(&fPathRef, inc, inc);
|
||||
}
|
||||
SkDEBUGCODE(this->validate();)
|
||||
}
|
||||
|
||||
@@ -1742,7 +1744,7 @@ void SkPath::transform(const SkMatrix& matrix, SkPath* dst) const {
|
||||
|
||||
if (this != dst) {
|
||||
dst->fFillType = fFillType;
|
||||
dst->fConvexity = fConvexity;
|
||||
dst->fConvexity = kUnknown_Convexity;
|
||||
dst->fIsVolatile = fIsVolatile;
|
||||
}
|
||||
|
||||
|
||||
@@ -152,13 +152,18 @@ void* GrBufferAllocPool::makeSpace(size_t size,
|
||||
BufferBlock& back = fBlocks.back();
|
||||
size_t usedBytes = back.fBuffer->gpuMemorySize() - back.fBytesFree;
|
||||
size_t pad = GrSizeAlignUpPad(usedBytes, alignment);
|
||||
if ((size + pad) <= back.fBytesFree) {
|
||||
SkSafeMath safeMath;
|
||||
size_t alignedSize = safeMath.add(pad, size);
|
||||
if (!safeMath.ok()) {
|
||||
return nullptr;
|
||||
}
|
||||
if (alignedSize <= back.fBytesFree) {
|
||||
memset((void*)(reinterpret_cast<intptr_t>(fBufferPtr) + usedBytes), 0, pad);
|
||||
usedBytes += pad;
|
||||
*offset = usedBytes;
|
||||
*buffer = back.fBuffer;
|
||||
back.fBytesFree -= size + pad;
|
||||
fBytesInUse += size + pad;
|
||||
back.fBytesFree -= alignedSize;
|
||||
fBytesInUse += alignedSize;
|
||||
VALIDATE();
|
||||
return (void*)(reinterpret_cast<intptr_t>(fBufferPtr) + usedBytes);
|
||||
}
|
||||
|
||||
@@ -66,6 +66,17 @@
|
||||
// compression, then instead of treating the pixel data as 0RGB it is treated
|
||||
// as ARGB, but only if one or more of the A values are non-zero.
|
||||
//
|
||||
// Clipboard variants.
|
||||
// - It's the BMP format used for BMP images captured from the clipboard.
|
||||
// - It is missing the file header, containing the BM signature and the data
|
||||
// offset. Instead the data begins after the header.
|
||||
// - If it uses BITFIELDS compression, then there is always an additional 12
|
||||
// bytes of data after the header that must be read. In WinBMPv4+, the masks
|
||||
// are supposed to be included in the header size, which are the values we use
|
||||
// for decoding purposes, but there is additional three masks following the
|
||||
// header which must be skipped to get to the pixel data.
|
||||
//
|
||||
//
|
||||
// OS/2 VERSIONS OF THE BMP FORMAT
|
||||
// -------------------------------
|
||||
// OS2-BMPv1.
|
||||
@@ -168,10 +179,12 @@ static mozilla::LazyLogModule sBMPLog("BMPDecoder");
|
||||
// The length of the mBIHSize field in the info header.
|
||||
static const uint32_t BIHSIZE_FIELD_LENGTH = 4;
|
||||
|
||||
nsBMPDecoder::nsBMPDecoder(RasterImage* aImage, State aState, size_t aLength)
|
||||
nsBMPDecoder::nsBMPDecoder(RasterImage* aImage, State aState, size_t aLength,
|
||||
bool aForClipboard)
|
||||
: Decoder(aImage)
|
||||
, mLexer(Transition::To(aState, aLength), Transition::TerminateSuccess())
|
||||
, mIsWithinICO(false)
|
||||
, mIsForClipboard(aForClipboard)
|
||||
, mMayHaveTransparency(false)
|
||||
, mDoesHaveTransparency(false)
|
||||
, mNumColors(0)
|
||||
@@ -188,14 +201,16 @@ nsBMPDecoder::nsBMPDecoder(RasterImage* aImage, State aState, size_t aLength)
|
||||
// Constructor for normal BMP files or from the clipboard.
|
||||
nsBMPDecoder::nsBMPDecoder(RasterImage* aImage, bool aForClipboard)
|
||||
: nsBMPDecoder(aImage,
|
||||
aForClipboard ? State::CLIPBOARD_HEADER : State::FILE_HEADER,
|
||||
aForClipboard ? BIHSIZE_FIELD_LENGTH : FILE_HEADER_LENGTH)
|
||||
aForClipboard ? State::INFO_HEADER_SIZE : State::FILE_HEADER,
|
||||
aForClipboard ? BIHSIZE_FIELD_LENGTH : FILE_HEADER_LENGTH,
|
||||
aForClipboard)
|
||||
{
|
||||
}
|
||||
|
||||
// Constructor used for WinBMPv3-ICO files, which lack a file header.
|
||||
nsBMPDecoder::nsBMPDecoder(RasterImage* aImage, uint32_t aDataOffset)
|
||||
: nsBMPDecoder(aImage, State::INFO_HEADER_SIZE, BIHSIZE_FIELD_LENGTH)
|
||||
: nsBMPDecoder(aImage, State::INFO_HEADER_SIZE, BIHSIZE_FIELD_LENGTH,
|
||||
/* aForClipboard */ false)
|
||||
{
|
||||
SetIsWithinICO();
|
||||
|
||||
@@ -457,7 +472,6 @@ nsBMPDecoder::DoDecode(SourceBufferIterator& aIterator, IResumable* aOnResume)
|
||||
[=](State aState, const char* aData, size_t aLength) {
|
||||
switch (aState) {
|
||||
case State::FILE_HEADER: return ReadFileHeader(aData, aLength);
|
||||
case State::CLIPBOARD_HEADER: return ReadClipboardHeader(aData, aLength);
|
||||
case State::INFO_HEADER_SIZE: return ReadInfoHeaderSize(aData, aLength);
|
||||
case State::INFO_HEADER_REST: return ReadInfoHeaderRest(aData, aLength);
|
||||
case State::BITFIELDS: return ReadBitfields(aData, aLength);
|
||||
@@ -491,14 +505,6 @@ nsBMPDecoder::ReadFileHeader(const char* aData, size_t aLength)
|
||||
return Transition::To(State::INFO_HEADER_SIZE, BIHSIZE_FIELD_LENGTH);
|
||||
}
|
||||
|
||||
LexerTransition<nsBMPDecoder::State>
|
||||
nsBMPDecoder::ReadClipboardHeader(const char* aData, size_t aLength)
|
||||
{
|
||||
// With the clipboard, the data offset is the header length.
|
||||
mH.mDataOffset = LittleEndian::readUint32(aData);
|
||||
return ReadInfoHeaderSize(aData, aLength);
|
||||
}
|
||||
|
||||
// We read the info header in two steps: (a) read the mBIHSize field to
|
||||
// determine how long the header is; (b) read the rest of the header.
|
||||
LexerTransition<nsBMPDecoder::State>
|
||||
@@ -609,6 +615,13 @@ nsBMPDecoder::ReadInfoHeaderRest(const char* aData, size_t aLength)
|
||||
// Bitfields are present in the info header, so we can read them
|
||||
// immediately.
|
||||
mBitFields.ReadFromHeader(aData + 36, /* aReadAlpha = */ true);
|
||||
|
||||
// If this came from the clipboard, then we know that even if the header
|
||||
// explicitly includes the bitfield masks, we need to add an additional
|
||||
// offset for the start of the RGB data.
|
||||
if (mIsForClipboard) {
|
||||
mH.mDataOffset += BitFields::LENGTH;
|
||||
}
|
||||
} else {
|
||||
// Bitfields are present after the info header, so we will read them in
|
||||
// ReadBitfields().
|
||||
@@ -723,6 +736,12 @@ nsBMPDecoder::ReadColorTable(const char* aData, size_t aLength)
|
||||
aData += mBytesPerColor;
|
||||
}
|
||||
|
||||
// If we are decoding a BMP from the clipboard, we did not know the data
|
||||
// offset in advance. It is defined as just after the header and color table.
|
||||
if (mIsForClipboard) {
|
||||
mH.mDataOffset += mPreGapLength;
|
||||
}
|
||||
|
||||
// We know how many bytes we've read so far (mPreGapLength) and we know the
|
||||
// offset of the pixel data (mH.mDataOffset), so we can determine the length
|
||||
// of the gap (possibly zero) between the color table and the pixel data.
|
||||
|
||||
@@ -152,7 +152,6 @@ private:
|
||||
|
||||
enum class State {
|
||||
FILE_HEADER,
|
||||
CLIPBOARD_HEADER,
|
||||
INFO_HEADER_SIZE,
|
||||
INFO_HEADER_REST,
|
||||
BITFIELDS,
|
||||
@@ -172,7 +171,7 @@ private:
|
||||
nsBMPDecoder(RasterImage* aImage, uint32_t aDataOffset);
|
||||
|
||||
// Helper constructor called by the other two.
|
||||
nsBMPDecoder(RasterImage* aImage, State aState, size_t aLength);
|
||||
nsBMPDecoder(RasterImage* aImage, State aState, size_t aLength, bool aForClipboard);
|
||||
|
||||
int32_t AbsoluteHeight() const { return abs(mH.mHeight); }
|
||||
|
||||
@@ -181,7 +180,6 @@ private:
|
||||
void FinishRow();
|
||||
|
||||
LexerTransition<State> ReadFileHeader(const char* aData, size_t aLength);
|
||||
LexerTransition<State> ReadClipboardHeader(const char* aData, size_t aLength);
|
||||
LexerTransition<State> ReadInfoHeaderSize(const char* aData, size_t aLength);
|
||||
LexerTransition<State> ReadInfoHeaderRest(const char* aData, size_t aLength);
|
||||
LexerTransition<State> ReadBitfields(const char* aData, size_t aLength);
|
||||
@@ -200,6 +198,9 @@ private:
|
||||
// If the BMP is within an ICO file our treatment of it differs slightly.
|
||||
bool mIsWithinICO;
|
||||
|
||||
// If the BMP is decoded from the clipboard, we start with a data offset.
|
||||
bool mIsForClipboard;
|
||||
|
||||
bmp::BitFields mBitFields;
|
||||
|
||||
// Might the image have transparency? Determined from the headers during
|
||||
|
||||
@@ -206,10 +206,6 @@ case "$target" in
|
||||
|
||||
# -Zc:sizedDealloc- disables C++14 global sized deallocation (see bug 1160146)
|
||||
CXXFLAGS="$CXXFLAGS -Zc:sizedDealloc-"
|
||||
|
||||
# Disable C++11 thread-safe statics due to crashes on XP (bug 1204752)
|
||||
# See https://connect.microsoft.com/VisualStudio/feedback/details/1789709/visual-c-2015-runtime-broken-on-windows-server-2003-c-11-magic-statics
|
||||
CXXFLAGS="$CXXFLAGS -Zc:threadSafeInit-"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(MSVS_VERSION)
|
||||
|
||||
@@ -215,11 +215,6 @@ case "$target" in
|
||||
|
||||
# -Zc:sizedDealloc- disables C++14 global sized deallocation (see bug 1160146)
|
||||
CXXFLAGS="$CXXFLAGS -Zc:sizedDealloc-"
|
||||
|
||||
# Disable C++11 thread-safe statics due to crashes on XP (bug 1204752)
|
||||
# See https://connect.microsoft.com/VisualStudio/feedback/details/1789709/visual-c-2015-runtime-broken-on-windows-server-2003-c-11-magic-statics
|
||||
CXXFLAGS="$CXXFLAGS -Zc:threadSafeInit-"
|
||||
|
||||
# https://connect.microsoft.com/VisualStudio/feedback/details/888527/warnings-on-dbghelp-h
|
||||
# for dbghelp.h, imagehlp.h, and shobj.h
|
||||
# C4091: 'typedef ': ignored on left of '' when no variable is declared
|
||||
|
||||
@@ -921,7 +921,7 @@ nsDataObj::GetDib(const nsACString& inFlavor,
|
||||
if ( image ) {
|
||||
nsCOMPtr<imgITools> imgTools = do_CreateInstance("@mozilla.org/image/tools;1");
|
||||
|
||||
nsAutoString options;
|
||||
nsAutoString options(NS_LITERAL_STRING("bpp=32;"));
|
||||
if (aFormat.cfFormat == CF_DIBV5) {
|
||||
options.AppendLiteral("version=5");
|
||||
} else {
|
||||
@@ -1580,7 +1580,7 @@ HRESULT nsDataObj::DropImage(FORMATETC& aFE, STGMEDIUM& aSTG)
|
||||
nsCOMPtr<imgITools> imgTools = do_CreateInstance("@mozilla.org/image/tools;1");
|
||||
nsCOMPtr<nsIInputStream> inputStream;
|
||||
rv = imgTools->EncodeImage(image, NS_LITERAL_CSTRING(IMAGE_BMP),
|
||||
NS_LITERAL_STRING("version=3"),
|
||||
NS_LITERAL_STRING("bpp=32;version=3"),
|
||||
getter_AddRefs(inputStream));
|
||||
if (NS_FAILED(rv) || !inputStream) {
|
||||
return E_FAIL;
|
||||
|
||||
Reference in new issue
Block a user