Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Xavier Fung 2012-08-21 01:33:32 +08:00
commit 7c1852fb85
4 changed files with 33 additions and 2 deletions

View File

@ -0,0 +1,7 @@
// Don't remove this file. FF15+ expects PdfJs module to be present at resource://pdf.js/PdfJs.jsm
// See https://mxr.mozilla.org/mozilla-central/source/browser/components/nsBrowserGlue.js
var EXPORTED_SYMBOLS = ["PdfJs"];
let PdfJs = {
init: function PdfJs_init() {}
};

View File

@ -339,6 +339,8 @@ target.firefox = function() {
mkdir('-p', FIREFOX_BUILD_CONTENT_DIR + BUILD_DIR);
mkdir('-p', FIREFOX_BUILD_CONTENT_DIR + '/web');
cp(FIREFOX_CONTENT_DIR + 'PdfJs-stub.jsm', FIREFOX_BUILD_CONTENT_DIR + 'PdfJs.jsm');
// Copy extension files
cd('extensions/firefox');
cp('-R', FIREFOX_EXTENSION_FILES_TO_COPY, ROOT_DIR + FIREFOX_BUILD_DIR);

View File

@ -1162,6 +1162,17 @@ canvas {
font-size: 10px;
}
#viewer.textLayer-visible .textLayer > div,
#viewer.textLayer-hover .textLayer > div:hover {
background-color: white;
color: black;
}
#viewer.textLayer-shadow .textLayer > div {
background-color: rgba(255,255,255, .6);
color: black;
}
@page {
margin: 0;
}

View File

@ -1802,8 +1802,19 @@ window.addEventListener('load', function webViewerLoad(evt) {
mozL10n.language.code = locale;
//#endif
if ('disableTextLayer' in hashParams)
PDFJS.disableTextLayer = (hashParams['disableTextLayer'] === 'true');
if ('textLayer' in hashParams) {
switch (hashParams['textLayer']) {
case 'off':
PDFJS.disableTextLayer = true;
break;
case 'visible':
case 'shadow':
case 'hover':
var viewer = document.getElementById('viewer');
viewer.classList.add('textLayer-' + hashParams['textLayer']);
break;
}
}
//#if !(FIREFOX || MOZCENTRAL)
if ('pdfBug' in hashParams) {