Merge mozilla-central to autoland. a=merge CLOSED TREE

This commit is contained in:
shindli 2019-06-14 00:51:32 +03:00
Родитель 67b4023a9b 0534ae5951
Коммит 95037e5b4e
17 изменённых файлов: 252 добавлений и 28 удалений

Просмотреть файл

@ -1,5 +1,5 @@
This is the PDF.js project output, https://github.com/mozilla/pdf.js
Current extension version is: 2.2.199
Current extension version is: 2.2.207
Taken from upstream commit: 63014eb8
Taken from upstream commit: 73482750

Просмотреть файл

@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
"use strict";
var pdfjsVersion = '2.2.199';
var pdfjsBuild = '63014eb8';
var pdfjsVersion = '2.2.207';
var pdfjsBuild = '73482750';
var pdfjsSharedUtil = __w_pdfjs_require__(1);
@ -1304,7 +1304,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
return worker.messageHandler.sendWithPromise('GetDocRequest', {
docId,
apiVersion: '2.2.199',
apiVersion: '2.2.207',
source: {
data: source.data,
url: source.url,
@ -1656,7 +1656,7 @@ class PDFPageProxy {
intentState.renderTasks.splice(i, 1);
}
if (this.cleanupAfterRender) {
if (this.cleanupAfterRender || renderingIntent === 'print') {
this.pendingCleanup = true;
}
@ -3100,9 +3100,9 @@ const InternalRenderTask = function InternalRenderTaskClosure() {
return InternalRenderTask;
}();
const version = '2.2.199';
const version = '2.2.207';
exports.version = version;
const build = '63014eb8';
const build = '73482750';
exports.build = build;
/***/ }),

Просмотреть файл

@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
"use strict";
const pdfjsVersion = '2.2.199';
const pdfjsBuild = '63014eb8';
const pdfjsVersion = '2.2.207';
const pdfjsBuild = '73482750';
const pdfjsCoreWorker = __w_pdfjs_require__(1);
@ -378,7 +378,7 @@ var WorkerMessageHandler = {
var WorkerTasks = [];
const verbosity = (0, _util.getVerbosityLevel)();
let apiVersion = docParams.apiVersion;
let workerVersion = '2.2.199';
let workerVersion = '2.2.207';
if (apiVersion !== workerVersion) {
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
@ -3830,6 +3830,7 @@ class Catalog {
const title = outlineDict.get('Title');
const flags = outlineDict.get('F') || 0;
const color = outlineDict.getArray('C');
const count = outlineDict.get('Count');
let rgbColor = blackColor;
if (Array.isArray(color) && color.length === 3 && (color[0] !== 0 || color[1] !== 0 || color[2] !== 0)) {
@ -3843,7 +3844,7 @@ class Catalog {
newWindow: data.newWindow,
title: (0, _util.stringToPDFString)(title),
color: rgbColor,
count: outlineDict.get('Count'),
count: Number.isInteger(count) ? count : undefined,
bold: !!(flags & 2),
italic: !!(flags & 1),
items: []

Просмотреть файл

@ -5278,8 +5278,8 @@ class PDFFindController {
const pageNumber = this._selected.pageIdx + 1;
const linkService = this._linkService;
if (pageNumber >= 1 && pageNumber <= linkService.pagesCount && linkService.page !== pageNumber && linkService.isPageVisible && !linkService.isPageVisible(pageNumber)) {
break;
if (pageNumber >= 1 && pageNumber <= linkService.pagesCount && pageNumber !== linkService.page && !linkService.isPageVisible(pageNumber)) {
return true;
}
return false;
@ -6893,10 +6893,17 @@ class PDFOutlineViewer {
}
}
_addToggleButton(div) {
_addToggleButton(div, {
count,
items
}) {
let toggler = document.createElement('div');
toggler.className = 'outlineItemToggler';
if (count < 0 && Math.abs(count) === items.length) {
toggler.classList.add('outlineItemsHidden');
}
toggler.onclick = evt => {
evt.stopPropagation();
toggler.classList.toggle('outlineItemsHidden');
@ -6952,10 +6959,9 @@ class PDFOutlineViewer {
let hasAnyNesting = false;
while (queue.length > 0) {
let levelData = queue.shift();
const levelData = queue.shift();
for (let i = 0, len = levelData.items.length; i < len; i++) {
let item = levelData.items[i];
for (const item of levelData.items) {
let div = document.createElement('div');
div.className = 'outlineItem';
let element = document.createElement('a');
@ -6970,7 +6976,7 @@ class PDFOutlineViewer {
if (item.items.length > 0) {
hasAnyNesting = true;
this._addToggleButton(div);
this._addToggleButton(div, item);
let itemsDiv = document.createElement('div');
itemsDiv.className = 'outlineItems';
@ -6988,6 +6994,7 @@ class PDFOutlineViewer {
if (hasAnyNesting) {
this.container.classList.add('outlineWithDeepNesting');
this.lastToggleIsShow = fragment.querySelectorAll('.outlineItemsHidden').length === 0;
}
this.container.appendChild(fragment);
@ -11768,6 +11775,8 @@ Object.defineProperty(exports, "__esModule", {
});
exports.FirefoxPrintService = FirefoxPrintService;
var _app_options = __webpack_require__(3);
var _ui_utils = __webpack_require__(2);
var _app = __webpack_require__(1);
@ -11776,7 +11785,7 @@ var _pdfjsLib = __webpack_require__(4);
function composePage(pdfDocument, pageNumber, size, printContainer) {
let canvas = document.createElement('canvas');
const PRINT_RESOLUTION = 150;
const PRINT_RESOLUTION = _app_options.AppOptions.get('printResolution') || 150;
const PRINT_UNITS = PRINT_RESOLUTION / 72.0;
canvas.width = Math.floor(size.width * PRINT_UNITS);
canvas.height = Math.floor(size.height * PRINT_UNITS);

Просмотреть файл

@ -20,7 +20,7 @@ origin:
# Human-readable identifier for this version/release
# Generally "version NNN", "tag SSS", "bookmark SSS"
release: version 2.2.199
release: version 2.2.207
# The package's license, where possible using the mnemonic from
# https://spdx.org/licenses/

Просмотреть файл

@ -24,6 +24,7 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
use_sse1 = False
use_sse2 = False
use_neon = False
use_altivec = False
if CONFIG['INTEL_ARCHITECTURE']:
use_sse2 = True
@ -32,6 +33,8 @@ if CONFIG['INTEL_ARCHITECTURE']:
use_sse1 = True
else:
use_sse1 = True
elif CONFIG['CPU_ARCH'] == 'aarch64' or CONFIG['BUILD_ARM_NEON']:
use_neon = True
elif CONFIG['HAVE_ALTIVEC']:
use_altivec = True
@ -43,6 +46,10 @@ if use_sse2:
SOURCES += ['transform-sse2.cpp']
SOURCES['transform-sse2.cpp'].flags += CONFIG['SSE2_FLAGS']
if use_neon:
SOURCES += ['transform-neon.cpp']
SOURCES['transform-neon.cpp'].flags += CONFIG['NEON_FLAGS']
if use_altivec:
SOURCES += ['transform-altivec.cpp']
SOURCES['transform-altivec.cpp'].flags += ['-maltivec']

Просмотреть файл

@ -171,6 +171,7 @@ void qcms_transform_release(qcms_transform *);
void qcms_transform_data(qcms_transform *transform, const void *src, void *dest, size_t length);
void qcms_enable_iccv4();
void qcms_enable_neon();
#ifdef __cplusplus
}

Просмотреть файл

@ -302,7 +302,21 @@ void qcms_transform_data_bgra_out_lut_altivec(const qcms_transform *transform,
unsigned char *dest,
size_t length);
void qcms_transform_data_rgb_out_lut_neon(const qcms_transform *transform,
const unsigned char *src,
unsigned char *dest,
size_t length);
void qcms_transform_data_rgba_out_lut_neon(const qcms_transform *transform,
const unsigned char *src,
unsigned char *dest,
size_t length);
void qcms_transform_data_bgra_out_lut_neon(const qcms_transform *transform,
const unsigned char *src,
unsigned char *dest,
size_t length);
extern bool qcms_supports_iccv4;
extern bool qcms_supports_neon;
#ifdef _MSC_VER

138
gfx/qcms/transform-neon.cpp Normal file
Просмотреть файл

@ -0,0 +1,138 @@
#include <arm_neon.h>
#include "qcmsint.h"
#define FLOATSCALE (float)(PRECACHE_OUTPUT_SIZE)
#define CLAMPMAXVAL ( ((float) (PRECACHE_OUTPUT_SIZE - 1)) / PRECACHE_OUTPUT_SIZE )
static const ALIGN float floatScale = FLOATSCALE;
static const ALIGN float clampMaxValue = CLAMPMAXVAL;
template <size_t kRIndex, size_t kGIndex, size_t kBIndex, size_t kAIndex = NO_A_INDEX>
static void qcms_transform_data_template_lut_neon(const qcms_transform *transform,
const unsigned char *src,
unsigned char *dest,
size_t length)
{
unsigned int i;
const float (*mat)[4] = transform->matrix;
/* deref *transform now to avoid it in loop */
const float *igtbl_r = transform->input_gamma_table_r;
const float *igtbl_g = transform->input_gamma_table_g;
const float *igtbl_b = transform->input_gamma_table_b;
/* deref *transform now to avoid it in loop */
const uint8_t *otdata_r = &transform->output_table_r->data[0];
const uint8_t *otdata_g = &transform->output_table_g->data[0];
const uint8_t *otdata_b = &transform->output_table_b->data[0];
/* input matrix values never change */
const float32x4_t mat0 = vld1q_f32(mat[0]);
const float32x4_t mat1 = vld1q_f32(mat[1]);
const float32x4_t mat2 = vld1q_f32(mat[2]);
/* these values don't change, either */
const float32x4_t max = vld1q_dup_f32(&clampMaxValue);
const float32x4_t min = { 0.0f, 0.0f, 0.0f, 0.0f };
const float32x4_t scale = vld1q_dup_f32(&floatScale);
const unsigned int components = A_INDEX_COMPONENTS(kAIndex);
/* working variables */
float32x4_t vec_r, vec_g, vec_b;
int32x4_t result;
unsigned char alpha;
/* CYA */
if (!length)
return;
/* one pixel is handled outside of the loop */
length--;
/* setup for transforming 1st pixel */
vec_r = vld1q_dup_f32(&igtbl_r[src[kRIndex]]);
vec_g = vld1q_dup_f32(&igtbl_g[src[kGIndex]]);
vec_b = vld1q_dup_f32(&igtbl_b[src[kBIndex]]);
if (kAIndex != NO_A_INDEX) {
alpha = src[kAIndex];
}
src += components;
/* transform all but final pixel */
for (i=0; i<length; i++)
{
/* gamma * matrix */
vec_r = vmulq_f32(vec_r, mat0);
vec_g = vmulq_f32(vec_g, mat1);
vec_b = vmulq_f32(vec_b, mat2);
/* store alpha for this pixel; load alpha for next */
if (kAIndex != NO_A_INDEX) {
dest[kAIndex] = alpha;
alpha = src[kAIndex];
}
/* crunch, crunch, crunch */
vec_r = vaddq_f32(vec_r, vaddq_f32(vec_g, vec_b));
vec_r = vmaxq_f32(min, vec_r);
vec_r = vminq_f32(max, vec_r);
result = vcvtq_s32_f32(vmulq_f32(vec_r, scale));
/* use calc'd indices to output RGB values */
dest[kRIndex] = otdata_r[vgetq_lane_s32(result, 0)];
dest[kGIndex] = otdata_g[vgetq_lane_s32(result, 1)];
dest[kBIndex] = otdata_b[vgetq_lane_s32(result, 2)];
/* load for next loop while store completes */
vec_r = vld1q_dup_f32(&igtbl_r[src[kRIndex]]);
vec_g = vld1q_dup_f32(&igtbl_g[src[kGIndex]]);
vec_b = vld1q_dup_f32(&igtbl_b[src[kBIndex]]);
dest += components;
src += components;
}
/* handle final (maybe only) pixel */
vec_r = vmulq_f32(vec_r, mat0);
vec_g = vmulq_f32(vec_g, mat1);
vec_b = vmulq_f32(vec_b, mat2);
if (kAIndex != NO_A_INDEX) {
dest[kAIndex] = alpha;
}
vec_r = vaddq_f32(vec_r, vaddq_f32(vec_g, vec_b));
vec_r = vmaxq_f32(min, vec_r);
vec_r = vminq_f32(max, vec_r);
result = vcvtq_s32_f32(vmulq_f32(vec_r, scale));
dest[kRIndex] = otdata_r[vgetq_lane_s32(result, 0)];
dest[kGIndex] = otdata_g[vgetq_lane_s32(result, 1)];
dest[kBIndex] = otdata_b[vgetq_lane_s32(result, 2)];
}
void qcms_transform_data_rgb_out_lut_neon(const qcms_transform *transform,
const unsigned char *src,
unsigned char *dest,
size_t length)
{
qcms_transform_data_template_lut_neon<RGBA_R_INDEX, RGBA_G_INDEX, RGBA_B_INDEX>(transform, src, dest, length);
}
void qcms_transform_data_rgba_out_lut_neon(const qcms_transform *transform,
const unsigned char *src,
unsigned char *dest,
size_t length)
{
qcms_transform_data_template_lut_neon<RGBA_R_INDEX, RGBA_G_INDEX, RGBA_B_INDEX, RGBA_A_INDEX>(transform, src, dest, length);
}
void qcms_transform_data_bgra_out_lut_neon(const qcms_transform *transform,
const unsigned char *src,
unsigned char *dest,
size_t length)
{
qcms_transform_data_template_lut_neon<BGRA_R_INDEX, BGRA_G_INDEX, BGRA_B_INDEX, BGRA_A_INDEX>(transform, src, dest, length);
}

Просмотреть файл

@ -1232,6 +1232,17 @@ qcms_transform* qcms_transform_create(
#endif
} else
#endif
#if defined(__arm__) || defined(__aarch64__)
if (qcms_supports_neon) {
if (in_type == QCMS_DATA_RGB_8) {
transform->transform_fn = qcms_transform_data_rgb_out_lut_neon;
} else if (in_type == QCMS_DATA_RGBA_8) {
transform->transform_fn = qcms_transform_data_rgba_out_lut_neon;
} else if (in_type == QCMS_DATA_BGRA_8) {
transform->transform_fn = qcms_transform_data_bgra_out_lut_neon;
}
} else
#endif
#if (defined(__POWERPC__) || defined(__powerpc__) && !defined(__NO_FPRS__))
if (have_altivec()) {
if (in_type == QCMS_DATA_RGB_8) {
@ -1367,3 +1378,13 @@ void qcms_enable_iccv4()
{
qcms_supports_iccv4 = true;
}
#if defined(__arm__) || defined(__aarch64__)
bool qcms_supports_neon;
#endif
void qcms_enable_neon()
{
#if defined(__arm__) || defined(__aarch64__)
qcms_supports_neon = true;
#endif
}

Просмотреть файл

@ -41,6 +41,8 @@
#include "VRProcessManager.h"
#include "VRThread.h"
#include "mozilla/arm.h"
#ifdef XP_WIN
# include <process.h>
# define getpid _getpid
@ -1987,6 +1989,11 @@ eCMSMode gfxPlatform::GetCMSMode() {
if (enableV4) {
qcms_enable_iccv4();
}
#ifdef MOZILLA_MAY_SUPPORT_NEON
if (mozilla::supports_neon()) {
qcms_enable_neon();
}
#endif
gCMSInitialized = true;
}
return gCMSMode;

Просмотреть файл

@ -1 +1 @@
d17569aa9d56
313dfef345bd

Просмотреть файл

@ -14,6 +14,7 @@ let filters = [];
let tasks = new Map();
let tags = new Map();
let image_tasks = new Map();
let parameters = {};
let queue = new taskcluster.Queue({
baseUrl: "http://taskcluster/queue/v1"
@ -141,6 +142,10 @@ function convertTask(def) {
scopes.push.apply(scopes, def.scopes)
}
let extra = Object.assign({
treeherder: parseTreeherder(def)
}, parameters);
return {
provisionerId: def.provisioner || "aws-provisioner-v1",
workerType: def.workerType || "hg-worker",
@ -163,10 +168,7 @@ function convertTask(def) {
},
payload,
extra: {
treeherder: parseTreeherder(def)
}
extra,
};
}
@ -178,6 +180,10 @@ export function filter(fun) {
filters.push(fun);
}
export function addParameters(params) {
parameters = Object.assign(parameters, params);
}
export function clearFilters(fun) {
filters = [];
}

Просмотреть файл

@ -3,6 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import * as queue from "./queue";
import path from 'path'
import fs from 'fs'
import intersect from "intersect";
import parse_args from "minimist";
import util from "util";
@ -166,6 +168,16 @@ async function getCommitComment() {
export async function initFilter() {
let comment = await getCommitComment();
// Load try_task_config.json
// Add parameters to queue for created tasks
let config_path = path.normalize(path.join(__dirname, '../../../../try_task_config.json'))
if (fs.existsSync(config_path)) {
var payload = JSON.parse(fs.readFileSync(config_path));
if (payload['version'] == 2) {
queue.addParameters(payload['parameters']);
}
}
// Check for try syntax in changeset comment.
let match = comment.match(/\btry:\s*(.*)\s*$/m);

Просмотреть файл

@ -10,3 +10,4 @@
*/
#error "Do not include this header file."

Просмотреть файл

@ -493,6 +493,9 @@ endif # Solaris for non-sparc family CPUs
endif # target == SunO
ifdef USE_64
# no __int128 at least up to lcc 1.23 (pretending to be gcc5)
# NB: CC_NAME is not defined here
ifneq ($(shell $(CC) -? 2>&1 >/dev/null | sed -e 's/:.*//;1q'),lcc)
ifdef CC_IS_CLANG
HAVE_INT128_SUPPORT = 1
DEFINES += -DHAVE_INT128_SUPPORT
@ -506,7 +509,8 @@ ifdef USE_64
DEFINES += -DHAVE_INT128_SUPPORT
endif
endif
endif
endif # lcc
endif # USE_64
ifndef HAVE_INT128_SUPPORT
DEFINES += -DKRML_NOUINT128

Просмотреть файл

@ -1,7 +1,10 @@
[window-open.tentative.https.sub.html]
disabled:
if os == "android" and not e10s: https://bugzilla.mozilla.org/show_bug.cgi?id=1499003
if debug and (os == "linux") and (bits == 32): https://bugzilla.mozilla.org/show_bug.cgi?id=1539615
if os == "linux": https://bugzilla.mozilla.org/show_bug.cgi?id=1539615
if os == "win": https://bugzilla.mozilla.org/show_bug.cgi?id=1539615
if os == "mac": https://bugzilla.mozilla.org/show_bug.cgi?id=1539615
[Same-origin window, forced]
expected: FAIL