Compare commits

...
Author SHA1 Message Date
wolfbeast 915ae7981a Don't trust convexity when applying transforms.
In theory, a convex shape transformed by an affine matrix should still
be convex. However, due to numerical imprecision of floats, when we try
to determine if something is convex, we can get different answers pre
and post a transformation (think of two line segments nearly co-linear).

Convex paths take a faster scan converter, but it is only well behaved
if the path is, in fact, convex. Thus we have to be conservative about
which paths we mark as convex, and cant's trust transformed paths to
retain their convexity. We re-calculate when a transform is applied.
2019-02-18 11:50:13 +01:00
wolfbeast 33420c43a2 Skia: Validate allocation size in GrBufferAllocPool using SkSafeMath.
Upstream port of commit 7469a9341afab19271b8ef07af5c16a0f2c4ccc1
2019-02-17 22:16:02 +01:00
wolfbeast ce9d45fc59 Skia: Be consistent about int for incReserve.
Upstream port.
2019-02-17 22:15:47 +01:00
wolfbeast f29d7ff617 Revert "Port several Skia upstream fixes."
This reverts commit 260b06c1c9.

This fixes #976
2019-02-17 14:55:26 +01:00
Andrew Osmond cdc5daf5da 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:35:50 +01:00
wolfbeast b1de755d0f Stop using hard-coded URL for "get more devtools" 2019-02-16 12:55:56 +01:00
Matt A. Tobin da9d7b4362 Conform Pale Moon AM preferences to actual locations
Uplift is NOT required
2019-02-16 10:30:50 +01:00
wolfbeast 6efbf737e5 Treat aContext as a bitfield in openURI.
Potential fix for #971
2019-02-15 14:07:47 +01:00
JustOff f97c06d435 [PALEMOON] Link dictionaries to addons.palemoon.org 2019-02-15 14:00:10 +01:00
wolfbeast 1f058d19ef Preserve transparency when copying a DIB to/from the clipboard.
In order to get the alpha channel when encoding BMP images from a
surface, we need to supply bmp=32 in the encoder options.
2019-02-14 22:43:32 +01:00
wolfbeast 260b06c1c9 Port several Skia upstream fixes. 2019-02-14 17:00:46 +01:00
wolfbeast c4ed602e3f Update browse URL for AM search to Phoebus 2.0 2019-02-14 12:18:22 +01:00
wolfbeast ed290ba09d Use C++11 thread-safe statics with MSVC. (js) 2019-02-14 12:01:20 +01:00
wolfbeast e746ec8441 Use C++11 thread-safe statics with MSVC. 2019-02-14 11:53:59 +01:00
wolfbeast 48d8e28fe6 Move "No proxy for" control down to clarify it is a global effect.
Follow-up to the behavior change in commit
6567bb631a
2019-02-14 01:56:02 +01:00
wolfbeast cdfe2e11c8 Allow empty string on location.search setter.
Fixes #970.
2019-02-12 11:07:12 +01:00
wolfbeast ed9341c4a4 Version bump for release 2019-02-12 01:27:29 +01:00
wolfbeast 263d8500ce Merge branch 'master' into Pale_Moon-release
# Conflicts:
#	application/palemoon/components/preferences/advanced.xul
#	application/palemoon/config/version.txt
#	modules/libpref/init/all.js
2019-02-12 01:25:43 +01:00
wolfbeast b06821da15 Version bump for release. 2019-01-23 11:47:08 +01:00
wolfbeast b578943a42 Disable IntersectionObserver API on release.
See #935
2019-01-19 08:02:11 +01:00
wolfbeast b4edb88144 Add isIntersecting property to IntersectionObserverEntry. (uplift)
Per updated spec.

This resolves the issue raised in #249.
2019-01-17 19:08:48 +01:00
wolfbeast f84f1961bc Improve toolbar icons for all DPIs (uplift)
Tag #576.

- Redraw toolbar SVG images, pixel-aligning them as best as possible
  with manual node placement on the pixel grid.
- Reintroduce PNG versions for < 1.33 dppx (with added glow arrow)
- Make the css adaptive around the 1.33 dppx border, using PNG below
  that threshold and SVG above it.
2019-01-17 17:26:23 +01:00
wolfbeast 3aac951411 [PALEMOON] Add captive portal preference to the UI. (uplift)
Tag #860
2019-01-16 02:08:16 +01:00
wolfbeast 1a6159363f [PALEMOON] Move Advanced prefs l10n strings to their proper place 2019-01-16 02:07:36 +01:00
wolfbeast 814e0bca31 Align Element.ScrollIntoView() with the spec. (uplift)
This also removes the (unused) shadow alias from nsIDOMHTMLElement
which used the different calling convention.

This resolves #927
2019-01-08 17:42:01 +01:00
wolfbeast 29b9d4496a Fix library window reference to SVG toolbar image.
Tag #576.
This needs uplift to the relbranch.
2019-01-07 14:19:54 +01:00
wolfbeast cc6a935ce5 Merge branch 'master' into Pale_Moon-release
# Conflicts:
#	application/palemoon/components/feeds/FeedWriter.js
#	application/palemoon/config/version.txt
#	security/manager/ssl/nsSTSPreloadList.errors
#	security/manager/ssl/nsSTSPreloadList.inc
2019-01-06 15:14:54 +01:00
wolfbeast d129c900c9 Version bump for point release 2018-12-04 20:09:52 +01:00
wolfbeast de2c8419c6 Fix typo for Firefox compatmode prefs.
Fixes regression from ec2e3bc027
2018-12-04 20:05:14 +01:00
JustOff f6137449b6 Revert "[PALEMOON] Sanitize - "Form and search history" sanitize also the Findbar text and history (Ctrl-Z)"
This reverts commit a97887a677.
2018-12-04 20:04:58 +01:00
Matt A. Tobin 020248c6e3 [TychoAM] Give the second <hbox> an ID so it can be targeted in extensions.xul 2018-12-04 20:04:32 +01:00
trav90 e0a09e1aaf Update HSTS preload list
Tag #447
2018-12-04 20:04:16 +01:00
wolfbeast 4af3ad5dfe Fix debug assertion.
See: https://github.com/MoonchildProductions/UXP/commit/622098073e132995994fac4d61e3629d08ee1801#commitcomment-31390051
2018-12-04 20:03:58 +01:00
wolfbeast ff66da9af4 Fix blank pixel color for truncated GIFs 2018-12-04 20:03:25 +01:00
wolfbeast c2e358c520 Split out FrameTimeout into its own header file for re-use. 2018-12-04 20:03:12 +01:00
wolfbeast d185071acf Unrefactor mRawVeggies back to mVBuffMeat ;P
(mRawSurface -> mVBuf)
2018-12-04 20:02:59 +01:00
wolfbeast e517e70eb1 Fix pasta error 2018-12-04 20:02:46 +01:00
wolfbeast 0a6db54d86 Bug 1462355 - Part 1c. Make individual image decoders to use updated Decoder/SurfacePipe methods.
Extend this change to nsWebPDecoder.cpp
2018-12-04 20:02:29 +01:00
wolfbeast c5d5a28f76 Bug 1462355 - Part 1b. Update Decoder and SurfacePipe plumbing to use updated imgFrame methods. 2018-12-04 20:02:14 +01:00
wolfbeast a0e20005ef 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-12-04 20:01:58 +01:00
wolfbeast a3c1f180ce Port WebP decoder changes.
This breaks animated WebP for the moment, but adds QCMS color management and lexer changes.
Tag #831
2018-12-04 20:01:37 +01:00
wolfbeast cd4f7a1798 Add a nullcheck on pipelined HTTP connections' pushback. 2018-12-04 20:01:01 +01:00
JustOff 914294e570 [PALEMOON] Align the places component with the updated PlacesUtils API 2018-12-04 20:00:31 +01:00
Matt A. Tobin 831b9d8d9e [PALEMOON] Use generic application icon for external applications in about:feeds 2018-12-04 19:59:14 +01:00
Matt A. Tobin 6864a02d7b Issue #861 - The bookmark properties window should focus on the Name Picker text box on init 2018-11-14 13:42:16 +01:00
wolfbeast bffec09e66 Version bump for point release. 2018-11-14 10:42:57 +01:00
wolfbeast 51e5770962 Revert "[PALEMOON] Focus and select the first non-collapsed text element in the bookmark properties dialog"
This reverts commit e9a58eae57.

Tag #867
2018-11-14 09:59:06 +01:00
wolfbeast e1bfe33031 Version bump for release 28.2.0 2018-11-07 12:54:01 +01:00
wolfbeast 8240fb9c73 Merge branch 'master' into Pale_Moon-release
# Conflicts:
#	application/palemoon/config/version.txt
2018-11-07 12:47:12 +01:00
JustOff f9e04b54c2 [PALEMOON] Restore strings mistakenly removed by [8be0c16be6] 2018-09-21 10:26:41 +02:00
JustOff 775e800ca0 Use SessionStore.promiseInitialized() to avoid race condition in "about:home" (#774)
* Use SessionStore.promiseInitialized() to avoid race condition in "about:home"

* Improve code style of [d6c3adb91c9f29786f8ed8d93baa14c076494017]
2018-09-18 08:25:39 +02:00
wolfbeast 882aaf5b1f Merge branch 'master' into Pale_Moon-release
# Conflicts:
#	application/palemoon/config/version.txt
#	js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h
#	toolkit/components/search/orginal/nsSearchService.js
2018-09-17 08:51:49 +02:00
wolfbeast 8ee235ca5d Version bump for minor bugfix release. 2018-08-30 16:59:46 +02:00
wolfbeast cc54bbe952 Revert "Bug 1388020. r=nical, a=RyanVM"
This reverts commit e7189e33f5.
2018-08-30 12:36:03 +02:00
wolfbeast 73b202b1e5 Revert "Bug 1444668 - Avoid allocating large AssemblerBuffers. r=luke, r=bbouvier, a=RyanVM"
This reverts commit 9472136272.
2018-08-30 12:33:56 +02:00
wolfbeast 21042963de Version bump for win rebuild with less aggressive build config. 2018-08-26 17:44:06 +02:00
wolfbeast d443656df5 Version bump for release builds. 2018-08-07 14:20:47 +02:00
Matt A. Tobin 29a8db7280 Fix include path 2018-08-06 18:02:27 +02:00
Matt A. Tobin daa52eef9a Add a slightly modified version of the gecko/44 search service and use it when building Pale Moon 2018-08-06 18:02:10 +02:00
Matt A. Tobin 95ce1f0d63 Move the "native" search service to a subdirectory 2018-08-06 18:01:49 +02:00
SpockMan02 4dadef2740 Restore some osx icons 2018-08-06 11:12:29 +02:00
SpockMan02 b5d8e6d28f Revert osx editBookmarkOverlay.css to osx version 2018-08-06 11:12:16 +02:00
adeshkp fc0477a98e Fix constructor in nsHtml5AtomTable.cpp
Follow up to 2bc00ef to fix build bustage
2018-08-06 11:10:24 +02:00
adeshkp 36d06b9e75 Improve nsHtml5AtomTable performance (#693)
* cpp change
* h change
2018-08-06 11:10:10 +02:00
wolfbeast 51bdd3efbc Make AC option for devtools (client) an enable_bool to align with the default. 2018-08-04 08:21:29 +02:00
janekptacijarabaci bc2584493a [PALEMOON] Bug 863773 - Changes the way plugin handlers are loaded at the preferences applications pane. Uses enabledPlugin attribute from each navigator.mimeTypes to find the actual plugin used to handle the mime type 2018-08-04 08:07:02 +02:00
janekptacijarabaci 0f38772573 [PALEMOON] Bug 1034043 - Fix remaining use of "awlaysAsk" attribute in applications pref pane 2018-08-04 08:06:49 +02:00
janekptacijarabaci ef81277925 [PALEMOON] Bug 480242 - "Always ask" doesn't work for Plugins 2018-08-04 08:06:36 +02:00
janekptacijarabaci 8b20931e12 [PALEMOON] Bug 757726 - Populate Preferences' Applications list using PluginHost 2018-08-04 08:06:24 +02:00
SpockMan02 b247982d37 Restore Mac bookmark doorhanger styling 2018-08-04 08:05:34 +02:00
16 changed files with 85 additions and 70 deletions

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;"
+16 -16
View File
@@ -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%&currentAppVersion=%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%&currentAppVersion=%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");
+7 -1
View File
@@ -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%&currentAppVersion=%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
View File
@@ -1 +1 @@
28.4.0a1
28.4.0
+2 -1
View File
@@ -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");
}
},
];
-4
View File
@@ -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;
+1 -1
View File
@@ -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).
+5 -3
View File
@@ -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;
}
+8 -3
View File
@@ -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);
}
+32 -13
View File
@@ -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.
+4 -3
View File
@@ -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
-4
View File
@@ -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)
-5
View File
@@ -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
+2 -2
View File
@@ -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;