Merge pull request #3428 from yurydelendik/enforce-trailing
Enforces trailing spaces
This commit is contained in:
commit
81fa4a0d93
@ -8,6 +8,7 @@
|
|||||||
// Enforcing
|
// Enforcing
|
||||||
"maxlen": 80,
|
"maxlen": 80,
|
||||||
"quotmark": "single",
|
"quotmark": "single",
|
||||||
|
"trailing": true,
|
||||||
|
|
||||||
// Relaxing
|
// Relaxing
|
||||||
"boss": true,
|
"boss": true,
|
||||||
|
@ -30,7 +30,7 @@ function showViewer(url) {
|
|||||||
// Cancel page load and empty document.
|
// Cancel page load and empty document.
|
||||||
window.stop();
|
window.stop();
|
||||||
document.body.textContent = '';
|
document.body.textContent = '';
|
||||||
|
|
||||||
replaceDocumentWithViewer(url);
|
replaceDocumentWithViewer(url);
|
||||||
}
|
}
|
||||||
function makeLinksAbsolute(doc) {
|
function makeLinksAbsolute(doc) {
|
||||||
|
@ -50,7 +50,7 @@ chrome.webRequest.onBeforeRequest.addListener(
|
|||||||
function(details) {
|
function(details) {
|
||||||
if (isPdfDownloadable(details)) // Defined in pdfHandler.js
|
if (isPdfDownloadable(details)) // Defined in pdfHandler.js
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (incognitoTabIds.indexOf(details.tabId) !== -1)
|
if (incognitoTabIds.indexOf(details.tabId) !== -1)
|
||||||
return; // Doesn't work in incognito mode, so don't redirect.
|
return; // Doesn't work in incognito mode, so don't redirect.
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ function compileType3Glyph(imgData) {
|
|||||||
var width = imgData.width, height = imgData.height;
|
var width = imgData.width, height = imgData.height;
|
||||||
var i, j, j0, width1 = width + 1;
|
var i, j, j0, width1 = width + 1;
|
||||||
var points = new Uint8Array(width1 * (height + 1));
|
var points = new Uint8Array(width1 * (height + 1));
|
||||||
var POINT_TYPES =
|
var POINT_TYPES =
|
||||||
new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]);
|
new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]);
|
||||||
// finding iteresting points: every point is located between mask pixels,
|
// finding iteresting points: every point is located between mask pixels,
|
||||||
// so there will be points of the (width + 1)x(height + 1) grid. Every point
|
// so there will be points of the (width + 1)x(height + 1) grid. Every point
|
||||||
@ -237,7 +237,7 @@ function compileType3Glyph(imgData) {
|
|||||||
for (j = 1; j < width; j++) {
|
for (j = 1; j < width; j++) {
|
||||||
sum = (sum >> 2) + (data[pos + 4] ? 4 : 0) +
|
sum = (sum >> 2) + (data[pos + 4] ? 4 : 0) +
|
||||||
(data[pos - lineSize + 4] ? 8 : 0);
|
(data[pos - lineSize + 4] ? 8 : 0);
|
||||||
if (POINT_TYPES[sum]) {
|
if (POINT_TYPES[sum]) {
|
||||||
points[j0 + j] = POINT_TYPES[sum];
|
points[j0 + j] = POINT_TYPES[sum];
|
||||||
++count;
|
++count;
|
||||||
}
|
}
|
||||||
@ -293,16 +293,16 @@ function compileType3Glyph(imgData) {
|
|||||||
do {
|
do {
|
||||||
var step = steps[type];
|
var step = steps[type];
|
||||||
do { p += step; } while (!points[p]);
|
do { p += step; } while (!points[p]);
|
||||||
|
|
||||||
pp = points[p];
|
pp = points[p];
|
||||||
if (pp !== 5 && pp !== 10) {
|
if (pp !== 5 && pp !== 10) {
|
||||||
// set new direction
|
// set new direction
|
||||||
type = pp;
|
type = pp;
|
||||||
// delete mark
|
// delete mark
|
||||||
points[p] = 0;
|
points[p] = 0;
|
||||||
} else { // type is 5 or 10, ie, a crossing
|
} else { // type is 5 or 10, ie, a crossing
|
||||||
// set new direction
|
// set new direction
|
||||||
type = pp & ((0x33 * type) >> 4);
|
type = pp & ((0x33 * type) >> 4);
|
||||||
// set new type for "future hit"
|
// set new type for "future hit"
|
||||||
points[p] &= (type >> 2 | type << 2);
|
points[p] &= (type >> 2 | type << 2);
|
||||||
}
|
}
|
||||||
@ -332,7 +332,7 @@ function compileType3Glyph(imgData) {
|
|||||||
c.beginPath();
|
c.beginPath();
|
||||||
c.restore();
|
c.restore();
|
||||||
};
|
};
|
||||||
|
|
||||||
return drawOutline;
|
return drawOutline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -562,7 +562,7 @@ var DeviceCmykCS = (function DeviceCmykCSClosure() {
|
|||||||
131.35250912493976 * k - 190.9453302588951) +
|
131.35250912493976 * k - 190.9453302588951) +
|
||||||
y * (4.444339102852739 * y + 9.8632861493405 * k - 24.86741582555878) +
|
y * (4.444339102852739 * y + 9.8632861493405 * k - 24.86741582555878) +
|
||||||
k * (-20.737325471181034 * k - 187.80453709719578) + 255;
|
k * (-20.737325471181034 * k - 187.80453709719578) + 255;
|
||||||
var b =
|
var b =
|
||||||
c * (0.8842522430003296 * c + 8.078677503112928 * m +
|
c * (0.8842522430003296 * c + 8.078677503112928 * m +
|
||||||
30.89978309703729 * y - 0.23883238689178934 * k +
|
30.89978309703729 * y - 0.23883238689178934 * k +
|
||||||
-14.183576799673286) +
|
-14.183576799673286) +
|
||||||
|
@ -2676,7 +2676,7 @@ var Font = (function FontClosure() {
|
|||||||
if (ranges[i][0] < 0xFFFF && ranges[i][1] === 0xFFFF) {
|
if (ranges[i][0] < 0xFFFF && ranges[i][1] === 0xFFFF) {
|
||||||
ranges[i][1] = 0xFFFE;
|
ranges[i][1] = 0xFFFE;
|
||||||
}
|
}
|
||||||
var trailingRangesCount = ranges[i][1] < 0xFFFF ? 1 : 0;
|
var trailingRangesCount = ranges[i][1] < 0xFFFF ? 1 : 0;
|
||||||
var segCount = bmpLength + trailingRangesCount;
|
var segCount = bmpLength + trailingRangesCount;
|
||||||
var segCount2 = segCount * 2;
|
var segCount2 = segCount * 2;
|
||||||
var searchRange = getMaxPower2(segCount) * 2;
|
var searchRange = getMaxPower2(segCount) * 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user