Backed out changeset ad1af0ef7f50 (bug 960051) for potentially breaking xperf on an already CLOSED TREE

This commit is contained in:
Wes Kocher 2014-01-23 18:54:09 -08:00
parent 1a8719cdac
commit bf9a0ed35b
47 changed files with 2364 additions and 3228 deletions

View File

@ -1,4 +1,4 @@
This is the pdf.js project output, https://github.com/mozilla/pdf.js
Current extension version is: 0.8.934
Current extension version is: 0.8.759

View File

@ -377,19 +377,11 @@ ChromeActions.prototype = {
break;
}
},
fallback: function(args, sendResponse) {
var featureId = args.featureId;
var url = args.url;
fallback: function(url, sendResponse) {
var self = this;
var domWindow = this.domWindow;
var strings = getLocalizedStrings('chrome.properties');
var message;
if (featureId === 'forms') {
message = getLocalizedString(strings, 'unsupported_feature_forms');
} else {
message = getLocalizedString(strings, 'unsupported_feature');
}
var message = getLocalizedString(strings, 'unsupported_feature');
PdfJsTelemetry.onFallback();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -26,13 +26,11 @@
var EXPORTED_SYMBOLS = ['NetworkManager'];
var console = {
log: function console_log(aMsg) {
var msg = 'network.js: ' + (aMsg.join ? aMsg.join('') : aMsg);
Services.console.logStringMessage(msg);
// TODO(mack): dump() doesn't seem to work here...
dump(msg + '\n');
}
function log(aMsg) {
var msg = 'network.js: ' + (aMsg.join ? aMsg.join('') : aMsg);
Services.console.logStringMessage(msg);
// TODO(mack): dump() doesn't seem to work here...
dump(msg + '\n');
}
var NetworkManager = (function NetworkManagerClosure() {
@ -44,7 +42,6 @@ var NetworkManager = (function NetworkManagerClosure() {
this.url = url;
args = args || {};
this.httpHeaders = args.httpHeaders || {};
this.withCredentials = args.withCredentials || false;
this.getXhr = args.getXhr ||
function NetworkManager_getXhr() {
return new XMLHttpRequest();
@ -93,7 +90,6 @@ var NetworkManager = (function NetworkManagerClosure() {
};
xhr.open('GET', this.url);
xhr.withCredentials = this.withCredentials;
for (var property in this.httpHeaders) {
var value = this.httpHeaders[property];
if (typeof value === 'undefined') {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 B

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 B

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 B

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 B

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 437 B

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 583 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 548 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 405 B

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 B

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 143 B

View File

@ -20,7 +20,7 @@
html {
height: 100%;
/* Font size is needed to make the activity bar the correct size. */
/* Font size is needed to make the activity bar the corect size. */
font-size: 10px;
}
@ -47,7 +47,8 @@ select {
#viewerContainer:-moz-full-screen {
top: 0px;
border-top: 2px solid transparent;
background-color: #000;
background-color: #404040;
background-image: url(images/texture.png);
width: 100%;
height: 100%;
overflow: hidden;
@ -57,7 +58,8 @@ select {
#viewerContainer:fullscreen {
top: 0px;
border-top: 2px solid transparent;
background-color: #000;
background-color: #404040;
background-image: url(images/texture.png);
width: 100%;
height: 100%;
overflow: hidden;
@ -180,19 +182,20 @@ html[dir='rtl'] #outerContainer.sidebarOpen > #mainContainer {
overflow: auto;
position: absolute;
width: 200px;
background-color: hsla(0,0%,0%,.1);
box-shadow: inset -1px 0 0 hsla(0,0%,0%,.25);
}
html[dir='ltr'] #sidebarContent {
left: 0;
box-shadow: inset -1px 0 0 hsla(0,0%,0%,.25);
}
html[dir='rtl'] #sidebarContent {
right: 0;
box-shadow: inset 1px 0 0 hsla(0,0%,0%,.25);
}
#viewerContainer {
overflow: auto;
box-shadow: inset 1px 0 0 hsla(0,0%,100%,.05);
position: absolute;
top: 32px;
right: 0;
@ -200,12 +203,6 @@ html[dir='rtl'] #sidebarContent {
left: 0;
outline: none;
}
html[dir='ltr'] #viewerContainer {
box-shadow: inset 1px 0 0 hsla(0,0%,100%,.05);
}
html[dir='rtl'] #viewerContainer {
box-shadow: inset -1px 0 0 hsla(0,0%,100%,.05);
}
.toolbar {
position: relative;
@ -225,19 +222,12 @@ html[dir='rtl'] #viewerContainer {
background-color: #424242; /* fallback */
background-image: url(images/texture.png),
linear-gradient(hsla(0,0%,30%,.99), hsla(0,0%,25%,.95));
}
html[dir='ltr'] #toolbarSidebar {
box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.25),
inset 0 -1px 0 hsla(0,0%,100%,.05),
0 1px 0 hsla(0,0%,0%,.15),
0 0 1px hsla(0,0%,0%,.1);
}
html[dir='rtl'] #toolbarSidebar {
box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.25),
inset 0 1px 0 hsla(0,0%,100%,.05),
0 1px 0 hsla(0,0%,0%,.15),
0 0 1px hsla(0,0%,0%,.1);
}
#toolbarContainer, .findbar, .secondaryToolbar {
position: relative;
@ -245,21 +235,12 @@ html[dir='rtl'] #toolbarSidebar {
background-color: #474747; /* fallback */
background-image: url(images/texture.png),
linear-gradient(hsla(0,0%,32%,.99), hsla(0,0%,27%,.95));
}
html[dir='ltr'] #toolbarContainer, .findbar, .secondaryToolbar {
box-shadow: inset 1px 0 0 hsla(0,0%,100%,.08),
inset 0 1px 1px hsla(0,0%,0%,.15),
inset 0 -1px 0 hsla(0,0%,100%,.05),
0 1px 0 hsla(0,0%,0%,.15),
0 1px 1px hsla(0,0%,0%,.1);
}
html[dir='rtl'] #toolbarContainer, .findbar, .secondaryToolbar {
box-shadow: inset -1px 0 0 hsla(0,0%,100%,.08),
inset 0 1px 1px hsla(0,0%,0%,.15),
inset 0 -1px 0 hsla(0,0%,100%,.05),
0 1px 0 hsla(0,0%,0%,.15),
0 1px 1px hsla(0,0%,0%,.1);
}
#toolbarViewer {
height: 32px;
@ -521,7 +502,7 @@ html[dir='rtl'] .splitToolbarButton > .toolbarButton {
.splitToolbarButton > .toolbarButton:hover,
.splitToolbarButton > .toolbarButton:focus,
.dropdownToolbarButton:hover,
.overlayButton:hover,
.promptButton:hover,
.toolbarButton.textButton:hover,
.toolbarButton.textButton:focus {
background-color: hsla(0,0%,0%,.2);
@ -575,7 +556,7 @@ html[dir='rtl'] .splitToolbarButtonSeparator {
.toolbarButton,
.dropdownToolbarButton,
.overlayButton,
.promptButton,
.secondaryToolbarButton {
min-width: 16px;
padding: 2px 6px 0;
@ -593,12 +574,12 @@ html[dir='rtl'] .splitToolbarButtonSeparator {
}
html[dir='ltr'] .toolbarButton,
html[dir='ltr'] .overlayButton,
html[dir='ltr'] .promptButton,
html[dir='ltr'] .dropdownToolbarButton {
margin: 3px 2px 4px 0;
}
html[dir='rtl'] .toolbarButton,
html[dir='rtl'] .overlayButton,
html[dir='rtl'] .promptButton,
html[dir='rtl'] .dropdownToolbarButton {
margin: 3px 0 4px 2px;
}
@ -606,7 +587,7 @@ html[dir='rtl'] .dropdownToolbarButton {
.toolbarButton:hover,
.toolbarButton:focus,
.dropdownToolbarButton,
.overlayButton,
.promptButton,
.secondaryToolbarButton:hover,
.secondaryToolbarButton:focus {
background-color: hsla(0,0%,0%,.12);
@ -620,7 +601,7 @@ html[dir='rtl'] .dropdownToolbarButton {
}
.toolbarButton:hover:active,
.overlayButton:hover:active,
.promptButton:hover:active,
.dropdownToolbarButton:hover:active,
.secondaryToolbarButton:hover:active {
background-color: hsla(0,0%,0%,.2);
@ -687,7 +668,7 @@ html[dir='rtl'] .dropdownToolbarButton {
background: hsl(0,0%,24%);
}
.overlayButton {
.promptButton {
margin: 3px 2px 4px 5px !important;
line-height: 16px;
padding: 2px 6px 3px 6px;
@ -919,14 +900,6 @@ html[dir="rtl"] .secondaryToolbarButton > span {
content: url(images/secondaryToolbarButton-rotateCw.png);
}
.secondaryToolbarButton.handTool::before {
content: url(images/secondaryToolbarButton-handTool.png);
}
.secondaryToolbarButton.documentProperties::before {
content: url(images/secondaryToolbarButton-documentProperties.png);
}
.verticalToolbarSeparator {
display: block;
padding: 8px 0;
@ -1143,6 +1116,22 @@ html[dir='rtl'] .outlineItem > a {
cursor: default;
}
#findScrollView {
position: absolute;
top: 10px;
bottom: 10px;
left: 10px;
width: 280px;
}
#sidebarControls {
position:absolute;
width: 180px;
height: 32px;
left: 15px;
bottom: 35px;
}
.canvasWrapper {
overflow: hidden;
}
@ -1346,73 +1335,6 @@ canvas {
border-color: hsla(0,0%,0%,.32) hsla(0,0%,0%,.38) hsla(0,0%,0%,.42);
}
#documentPropertiesContainer {
display: table-cell;
vertical-align: middle;
text-align: center;
}
#documentPropertiesContainer > * {
display: inline-block;
padding: 15px;
border-spacing: 4px;
max-width: 350px;
max-height: 350px;
color: hsl(0,0%,85%);
font-size: 12px;
line-height: 14px;
text-align: left;
cursor: default;
background-color: #474747; /* fallback */
background-image: url(images/texture.png),
linear-gradient(hsla(0,0%,32%,.99), hsla(0,0%,27%,.95));
box-shadow: inset 1px 0 0 hsla(0,0%,100%,.08),
inset 0 1px 1px hsla(0,0%,0%,.15),
inset 0 -1px 0 hsla(0,0%,100%,.05),
0 1px 0 hsla(0,0%,0%,.15),
0 1px 1px hsla(0,0%,0%,.1);
}
#documentPropertiesContainer .separator {
display: block;
margin: 4px 0 4px 0;
height: 1px;
width: 100%;
background-color: hsla(0,0%,0%,.5);
box-shadow: 0 0 0 1px hsla(0,0%,100%,.08);
}
#documentPropertiesContainer .row {
display: table-row;
}
html[dir='ltr'] #documentPropertiesContainer .row > * {
display: table-cell;
min-width: 100px;
}
html[dir='rtl'] #documentPropertiesContainer .row > * {
display: table-cell;
min-width: 100px;
text-align: right;
}
#documentPropertiesContainer .row span {
width: 125px;
word-wrap: break-word;
}
#documentPropertiesContainer .row p {
max-width: 225px;
word-wrap: break-word;
}
#documentPropertiesContainer .buttonRow {
margin-top: 10px;
text-align: center;
vertical-align: middle;
}
.clearBoth {
clear: both;
}
@ -1421,10 +1343,6 @@ html[dir='rtl'] #documentPropertiesContainer .row > * {
background: white;
color: black;
margin-top: 5px;
visibility: hidden;
position: fixed;
right: 0;
top: 0;
}
#PDFBug {
@ -1486,30 +1404,6 @@ html[dir='rtl'] #documentPropertiesContainer .row > * {
color: black;
}
.grab-to-pan-grab * {
cursor: url("images/grab.cur"), move !important;
cursor: -moz-grab !important;
cursor: grab !important;
}
.grab-to-pan-grabbing,
.grab-to-pan-grabbing * {
cursor: url("images/grabbing.cur"), move !important;
cursor: -moz-grabbing !important;
cursor: grabbing !important;
}
.grab-to-pan-grab input,
.grab-to-pan-grab textarea,
.grab-to-pan-grab button,
.grab-to-pan-grab button *,
.grab-to-pan-grab select,
.grab-to-pan-grab option {
cursor: auto !important;
}
.grab-to-pan-grab a[href],
.grab-to-pan-grab a[href] * {
cursor: pointer !important;
}
@page {
margin: 0;
}

View File

@ -119,18 +119,6 @@ limitations under the License.
<button id="pageRotateCcw" class="secondaryToolbarButton rotateCcw" title="Rotate Counterclockwise" tabindex="26" data-l10n-id="page_rotate_ccw">
<span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span>
</button>
<div class="horizontalToolbarSeparator"></div>
<button id="toggleHandTool" class="secondaryToolbarButton handTool" title="Enable hand tool" tabindex="27" data-l10n-id="hand_tool_enable">
<span data-l10n-id="hand_tool_enable_label">Enable hand tool</span>
</button>
<div class="horizontalToolbarSeparator"></div>
<button id="documentProperties" class="secondaryToolbarButton documentProperties" title="Document Properties…" tabindex="28" data-l10n-id="document_properties">
<span data-l10n-id="document_properties_label">Document Properties…</span>
</button>
</div>
</div> <!-- secondaryToolbar -->
@ -259,7 +247,7 @@ limitations under the License.
</div> <!-- mainContainer -->
<div id="overlayContainer" class="hidden">
<div id="promptContainer" class="hidden">
<div id="promptContainer">
<div id="passwordContainer" class="prompt doorHanger">
<div class="row">
<p id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</p>
@ -267,58 +255,13 @@ limitations under the License.
<div class="row">
<input type="password" id="password" class="toolbarField" />
</div>
<div class="buttonRow">
<button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button>
<button id="passwordSubmit" class="overlayButton"><span data-l10n-id="password_ok">OK</span></button>
<div class="row">
<button id="passwordCancel" class="promptButton"><span data-l10n-id="password_cancel">Cancel</span></button>
<button id="passwordSubmit" class="promptButton"><span data-l10n-id="password_ok">OK</span></button>
</div>
</div>
</div>
<div id="documentPropertiesContainer" class="hidden">
<div class="doorHanger">
<div class="row">
<span data-l10n-id="document_properties_file_name">File name:</span> <p id="fileNameField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_file_size">File size:</span> <p id="fileSizeField">-</p>
</div>
<div class="separator"></div>
<div class="row">
<span data-l10n-id="document_properties_title">Title:</span> <p id="titleField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_author">Author:</span> <p id="authorField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_subject">Subject:</span> <p id="subjectField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_keywords">Keywords:</span> <p id="keywordsField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_creation_date">Creation Date:</span> <p id="creationDateField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_modification_date">Modification Date:</span> <p id="modificationDateField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_creator">Creator:</span> <p id="creatorField">-</p>
</div>
<div class="separator"></div>
<div class="row">
<span data-l10n-id="document_properties_producer">PDF Producer:</span> <p id="producerField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_version">PDF Version:</span> <p id="versionField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_page_count">Page Count:</span> <p id="pageCountField">-</p>
</div>
<div class="buttonRow">
<button id="documentPropertiesClose" class="overlayButton"><span data-l10n-id="document_properties_close">Close</span></button>
</div>
</div>
</div>
</div> <!-- overlayContainer -->
</div>
</div> <!-- outerContainer -->
<div id="printContainer"></div>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,55 @@
chrome.manifest
components/PdfRedirector.js
components/PdfStreamConverter.js
content/PdfJs.jsm
content/PdfJsTelemetry.jsm
content/build/pdf.js
content/build/pdf.worker.js
content/default_preferences.js
content/network.js
content/web/debugger.js
content/web/images/annotation-check.svg
content/web/images/annotation-comment.svg
content/web/images/annotation-help.svg
content/web/images/annotation-insert.svg
content/web/images/annotation-key.svg
content/web/images/annotation-newparagraph.svg
content/web/images/annotation-note.svg
content/web/images/annotation-paragraph.svg
content/web/images/findbarButton-next-rtl.png
content/web/images/findbarButton-next.png
content/web/images/findbarButton-previous-rtl.png
content/web/images/findbarButton-previous.png
content/web/images/loading-icon.gif
content/web/images/loading-small.png
content/web/images/secondaryToolbarButton-firstPage.png
content/web/images/secondaryToolbarButton-lastPage.png
content/web/images/secondaryToolbarButton-rotateCcw.png
content/web/images/secondaryToolbarButton-rotateCw.png
content/web/images/shadow.png
content/web/images/texture.png
content/web/images/toolbarButton-bookmark.png
content/web/images/toolbarButton-download.png
content/web/images/toolbarButton-menuArrows.png
content/web/images/toolbarButton-openFile.png
content/web/images/toolbarButton-pageDown-rtl.png
content/web/images/toolbarButton-pageDown.png
content/web/images/toolbarButton-pageUp-rtl.png
content/web/images/toolbarButton-pageUp.png
content/web/images/toolbarButton-presentationMode.png
content/web/images/toolbarButton-print.png
content/web/images/toolbarButton-search.png
content/web/images/toolbarButton-secondaryToolbarToggle-rtl.png
content/web/images/toolbarButton-secondaryToolbarToggle.png
content/web/images/toolbarButton-sidebarToggle-rtl.png
content/web/images/toolbarButton-sidebarToggle.png
content/web/images/toolbarButton-viewOutline-rtl.png
content/web/images/toolbarButton-viewOutline.png
content/web/images/toolbarButton-viewThumbnail.png
content/web/images/toolbarButton-zoomIn.png
content/web/images/toolbarButton-zoomOut.png
content/web/l10n.js
content/web/viewer.css
content/web/viewer.html
content/web/viewer.js
LICENSE

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -14,6 +14,5 @@
# Chrome notification bar messages and buttons
unsupported_feature=This PDF document might not be displayed correctly.
unsupported_feature_forms=This PDF document contains forms. The filling of form fields is not supported.
open_with_different_viewer=Open With Different Viewer
open_with_different_viewer.accessKey=o

View File

@ -57,31 +57,6 @@ page_rotate_ccw.title=Rotate Counterclockwise
page_rotate_ccw.label=Rotate Counterclockwise
page_rotate_ccw_label=Rotate Counterclockwise
hand_tool_enable.title=Enable hand tool
hand_tool_enable_label=Enable hand tool
hand_tool_disable.title=Disable hand tool
hand_tool_disable_label=Disable hand tool
# Document properties dialog box
document_properties.title=Document Properties…
document_properties_label=Document Properties…
document_properties_file_name=File name:
document_properties_file_size=File size:
document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
document_properties_title=Title:
document_properties_author=Author:
document_properties_subject=Subject:
document_properties_keywords=Keywords:
document_properties_creation_date=Creation Date:
document_properties_modification_date=Modification Date:
document_properties_date_string={{date}}, {{time}}
document_properties_creator=Creator:
document_properties_producer=PDF Producer:
document_properties_version=PDF Version:
document_properties_page_count=Page Count:
document_properties_close=Close
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)