Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
528382f8ea
@ -219,9 +219,26 @@ ChromeActions.prototype = {
|
||||
var strings = getLocalizedStrings('chrome.properties');
|
||||
var message = getLocalizedString(strings, 'unsupported_feature');
|
||||
|
||||
var win = Services.wm.getMostRecentWindow('navigator:browser');
|
||||
var browser = win.gBrowser.getBrowserForDocument(domWindow.top.document);
|
||||
var notificationBox = win.gBrowser.getNotificationBox(browser);
|
||||
var notificationBox = null;
|
||||
// Multiple browser windows can be opened, finding one for notification box
|
||||
var windowsEnum = Services.wm
|
||||
.getZOrderDOMWindowEnumerator('navigator:browser', true);
|
||||
while (windowsEnum.hasMoreElements()) {
|
||||
var win = windowsEnum.getNext();
|
||||
if (win.closed)
|
||||
continue;
|
||||
var browser = win.gBrowser.getBrowserForDocument(domWindow.top.document);
|
||||
if (browser) {
|
||||
// right window/browser is found, getting the notification box
|
||||
notificationBox = win.gBrowser.getNotificationBox(browser);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!notificationBox) {
|
||||
log('Unable to get a notification box for the fallback message');
|
||||
return;
|
||||
}
|
||||
|
||||
// Flag so we don't call the response callback twice, since if the user
|
||||
// clicks open with different viewer both the button callback and
|
||||
// eventCallback will be called.
|
||||
|
@ -1279,14 +1279,17 @@ function checkPutBinaryImageDataCompatibility() {
|
||||
} catch (e) {
|
||||
CanvasGraphics.prototype.putBinaryImageData =
|
||||
function CanvasGraphicsPutBinaryImageDataShim(ctx, imgData, w, h) {
|
||||
var tmpImgData = ctx.getImageData(0, 0, w, h);
|
||||
var tmpImgData = 'createImageData' in ctx ? ctx.createImageData(w, h) :
|
||||
ctx.getImageData(0, 0, w, h);
|
||||
|
||||
// Copy over the imageData pixel by pixel.
|
||||
var tmpImgDataPixels = tmpImgData.data;
|
||||
var len = tmpImgDataPixels.length;
|
||||
|
||||
while (len--) {
|
||||
tmpImgDataPixels[len] = imgData.data[len];
|
||||
var data = imgData.data;
|
||||
if ('set' in tmpImgDataPixels)
|
||||
tmpImgDataPixels.set(data);
|
||||
else {
|
||||
// Copy over the imageData pixel by pixel.
|
||||
for (var i = 0, ii = tmpImgDataPixels.length; i < ii; i++)
|
||||
tmpImgDataPixels[i] = data[i];
|
||||
}
|
||||
|
||||
ctx.putImageData(tmpImgData, 0, 0);
|
||||
|
@ -103,11 +103,12 @@ var PDFFunction = (function PDFFunctionClosure() {
|
||||
|
||||
var size = dict.get('Size');
|
||||
var bps = dict.get('BitsPerSample');
|
||||
var order = dict.get('Order');
|
||||
if (!order)
|
||||
order = 1;
|
||||
if (order !== 1)
|
||||
error('No support for cubic spline interpolation: ' + order);
|
||||
var order = dict.get('Order') || 1;
|
||||
if (order !== 1) {
|
||||
// No description how cubic spline interpolation works in PDF32000:2008
|
||||
// As in poppler, ignoring order, linear interpolation may work as good
|
||||
TODO('No support for cubic spline interpolation: ' + order);
|
||||
}
|
||||
|
||||
var encode = dict.get('Encode');
|
||||
if (!encode) {
|
||||
|
Loading…
Reference in New Issue
Block a user