author | David Anderson <danderson@mozilla.com> |
Thu, 22 Mar 2012 11:45:01 -0700 | |
changeset 112892 | c3726485025a34d2cd4b01ea04ca3c3e53bda6a6 |
parent 112887 | fcecd15a6f316f8384060ef0a591444a63c55678 (current diff) |
parent 93750 | 4c7b843406a2664335fb6e0323036873e3fd753b (diff) |
child 112893 | ae5784fdad49a6ce1ae425ce0b40f41e25228957 |
push id | 239 |
push user | akeybl@mozilla.com |
push date | Thu, 03 Jan 2013 21:54:43 +0000 |
treeherder | mozilla-release@3a7b66445659 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
milestone | 14.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/accessible/src/base/nsAccCache.h +++ b/accessible/src/base/nsAccCache.h @@ -59,21 +59,21 @@ ClearCacheEntry(const void* aKey, nsRefP aAccessible->Shutdown(); return PL_DHASH_REMOVE; } /** * Clear the cache and shutdown the accessibles. */ -template <class T> + static void -ClearCache(nsRefPtrHashtable<nsVoidPtrHashKey, T> & aCache) +ClearCache(nsAccessibleHashtable & aCache) { - aCache.Enumerate(ClearCacheEntry<T>, nsnull); + aCache.Enumerate(ClearCacheEntry<nsAccessible>, nsnull); } /** * Traverse the accessible cache entry for cycle collector. */ template <class T> static PLDHashOperator CycleCollectorTraverseCacheEntry(const void *aKey, T *aAccessible, @@ -87,17 +87,17 @@ CycleCollectorTraverseCacheEntry(const v nsISupports *supports = static_cast<nsIAccessible*>(aAccessible); cb->NoteXPCOMChild(supports); return PL_DHASH_NEXT; } /** * Traverse the accessible cache for cycle collector. */ -template <class T> + static void -CycleCollectorTraverseCache(nsRefPtrHashtable<nsVoidPtrHashKey, T> & aCache, +CycleCollectorTraverseCache(nsAccessibleHashtable & aCache, nsCycleCollectionTraversalCallback *aCallback) { - aCache.EnumerateRead(CycleCollectorTraverseCacheEntry<T>, aCallback); + aCache.EnumerateRead(CycleCollectorTraverseCacheEntry<nsAccessible>, aCallback); } #endif
--- a/accessible/src/base/nsAccessible.h +++ b/accessible/src/base/nsAccessible.h @@ -69,17 +69,17 @@ class Relation; class nsTextAccessible; struct nsRect; class nsIContent; class nsIFrame; class nsIAtom; class nsIView; -typedef nsRefPtrHashtable<nsVoidPtrHashKey, nsAccessible> +typedef nsRefPtrHashtable<nsPtrHashKey<const void>, nsAccessible> nsAccessibleHashtable; // see nsAccessible::GetAttrValue #define NS_OK_NO_ARIA_VALUE \ NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 0x21) // see nsAccessible::GetNameInternal #define NS_OK_EMPTY_NAME \
--- a/accessible/src/msaa/nsAccessNodeWrap.cpp +++ b/accessible/src/msaa/nsAccessNodeWrap.cpp @@ -631,17 +631,17 @@ GetHRESULT(nsresult aResult) case NS_ERROR_NOT_IMPLEMENTED: return E_NOTIMPL; default: return E_FAIL; } } -nsRefPtrHashtable<nsVoidPtrHashKey, nsDocAccessible> nsAccessNodeWrap::sHWNDCache; +nsRefPtrHashtable<nsPtrHashKey<void>, nsDocAccessible> nsAccessNodeWrap::sHWNDCache; LRESULT CALLBACK nsAccessNodeWrap::WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { // Note, this window's message handling should not invoke any call that // may result in a cross-process ipc call. Doing so may violate RPC // message semantics.
--- a/accessible/src/msaa/nsAccessNodeWrap.h +++ b/accessible/src/msaa/nsAccessNodeWrap.h @@ -147,17 +147,17 @@ public: // construction, destruction static void InitAccessibility(); static void ShutdownAccessibility(); static int FilterA11yExceptions(unsigned int aCode, EXCEPTION_POINTERS *aExceptionInfo); static LRESULT CALLBACK WindowProc(HWND hWnd, UINT Msg, WPARAM WParam, LPARAM lParam); - static nsRefPtrHashtable<nsVoidPtrHashKey, nsDocAccessible> sHWNDCache; + static nsRefPtrHashtable<nsPtrHashKey<void>, nsDocAccessible> sHWNDCache; protected: /** * Return ISimpleDOMNode instance for existing accessible object or * creates new nsAccessNode instance if the accessible doesn't exist. * * @note ISimpleDOMNode is returned addrefed
--- a/b2g/app/b2g.js +++ b/b2g/app/b2g.js @@ -449,8 +449,29 @@ pref("media.volume.steps", 10); // Data connection settings. These will eventually live in the // navigator.settings API, or even in a database where we can look // it up automatically (bug 729440), but for this will have to do. pref("ril.data.enabled", false); pref("ril.data.roaming.enabled", false); pref("ril.data.apn", ""); pref("ril.data.user", ""); pref("ril.data.passwd", ""); + +#ifdef MOZ_UPDATER +pref("app.update.enabled", true); +pref("app.update.auto", true); +pref("app.update.silent", true); +pref("app.update.mode", 0); +pref("app.update.incompatible.mode", 0); +pref("app.update.service.enabled", true); + +// The URL hosting the update manifest. +//pref("app.update.url", "http://localhost/updates.xml"); +// Interval at which update manifest is fetched. In units of seconds. +pref("app.update.interval", 86400); // 24 hours +// First interval to elapse before checking for update. In units of +// milliseconds. Capped at 10 seconds. +pref("app.update.timerFirstInterval", 30000); + +// Enable update logging for now, to diagnose growing pains in the +// field. +pref("app.update.log", true); +#endif
--- a/b2g/chrome/content/shell.js +++ b/b2g/chrome/content/shell.js @@ -105,17 +105,17 @@ var shell = { return url; } return null; }, start: function shell_init() { let homeURL = this.homeURL; if (!homeURL) { - let msg = 'Fatal error during startup: [No homescreen found]'; + let msg = 'Fatal error during startup: No homescreen found: try setting B2G_HOMESCREEN'; return alert(msg); } ['keydown', 'keypress', 'keyup'].forEach((function listenKey(type) { window.addEventListener(type, this, false, true); window.addEventListener(type, this, true, true); }).bind(this));
--- a/b2g/components/B2GComponents.manifest +++ b/b2g/components/B2GComponents.manifest @@ -9,12 +9,18 @@ category JavaScript-navigator-property m # AlertsService.js component {5dce03b2-8faa-4b6e-9242-6ddb0411750c} AlertsService.js contract @mozilla.org/alerts-service;1 {5dce03b2-8faa-4b6e-9242-6ddb0411750c} # ContentPermissionPrompt.js component {8c719f03-afe0-4aac-91ff-6c215895d467} ContentPermissionPrompt.js contract @mozilla.org/content-permission/prompt;1 {8c719f03-afe0-4aac-91ff-6c215895d467} +#ifdef MOZ_UPDATER +# UpdatePrompt.js +component {88b3eb21-d072-4e3b-886d-f89d8c49fe59} UpdatePrompt.js +contract @mozilla.org/updates/update-prompt;1 {88b3eb21-d072-4e3b-886d-f89d8c49fe59} +#endif + # MozKeyboard.js component {397a7fdf-2254-47be-b74e-76625a1a66d5} MozKeyboard.js contract @mozilla.org/b2g-keyboard;1 {397a7fdf-2254-47be-b74e-76625a1a66d5} category JavaScript-navigator-property mozKeyboard @mozilla.org/b2g-keyboard;1
--- a/b2g/components/Makefile.in +++ b/b2g/components/Makefile.in @@ -51,9 +51,13 @@ XPIDLSRCS = \ EXTRA_PP_COMPONENTS = \ B2GComponents.manifest \ CameraContent.js \ AlertsService.js \ ContentPermissionPrompt.js \ MozKeyboard.js \ $(NULL) +ifdef MOZ_UPDATER +EXTRA_PP_COMPONENTS += UpdatePrompt.js +endif + include $(topsrcdir)/config/rules.mk
copy from mobile/android/components/UpdatePrompt.js copy to b2g/components/UpdatePrompt.js --- a/mobile/android/components/UpdatePrompt.js +++ b/b2g/components/UpdatePrompt.js @@ -1,349 +1,65 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is Update Prompt. - * - * The Initial Developer of the Original Code is Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2010 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Mark Finkle <mfinkle@mozilla.com> - * Alex Pakhotin <alexp@mozilla.com> - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ +/* -*- Mode: Java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * vim: sw=2 ts=8 et : + */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ const Cc = Components.classes; const Ci = Components.interfaces; const Cu = Components.utils; -const UPDATE_NOTIFICATION_NAME = "update-app"; -const UPDATE_NOTIFICATION_ICON = "drawable://alert_download_progress"; - Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); - -XPCOMUtils.defineLazyGetter(this, "gUpdateBundle", function aus_gUpdateBundle() { - return Services.strings.createBundle("chrome://mozapps/locale/update/updates.properties"); -}); - -XPCOMUtils.defineLazyGetter(this, "gBrandBundle", function aus_gBrandBundle() { - return Services.strings.createBundle("chrome://branding/locale/brand.properties"); -}); - -XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function aus_gBrowserBundle() { - return Services.strings.createBundle("chrome://browser/locale/browser.properties"); -}); - -XPCOMUtils.defineLazyGetter(this, "AddonManager", function() { - Cu.import("resource://gre/modules/AddonManager.jsm"); - return AddonManager; -}); - -XPCOMUtils.defineLazyGetter(this, "LocaleRepository", function() { - Cu.import("resource://gre/modules/LocaleRepository.jsm"); - return LocaleRepository; -}); - -function getPref(func, preference, defaultValue) { - try { - return Services.prefs[func](preference); - } catch (e) {} - return defaultValue; -} - -function sendMessageToJava(aMsg) { - let data = Cc["@mozilla.org/android/bridge;1"].getService(Ci.nsIAndroidBridge).handleGeckoMessage(JSON.stringify(aMsg)); - return JSON.parse(data); -} - -// ----------------------------------------------------------------------- -// Update Prompt -// ----------------------------------------------------------------------- +const VERBOSE = 1; +let log = + VERBOSE ? + function log_dump(msg) { dump("UpdatePrompt: "+ msg +"\n"); } : + function log_noop(msg) { }; function UpdatePrompt() { } UpdatePrompt.prototype = { classID: Components.ID("{88b3eb21-d072-4e3b-886d-f89d8c49fe59}"), - QueryInterface: XPCOMUtils.generateQI([Ci.nsIUpdatePrompt, Ci.nsIRequestObserver, Ci.nsIProgressEventSink]), + QueryInterface: XPCOMUtils.generateQI([Ci.nsIUpdatePrompt]), + + // nsIUpdatePrompt - get _enabled() { - return !getPref("getBoolPref", "app.update.silent", false); - }, + // FIXME/bug 737601: we should have users opt-in to downloading + // updates when on a billed pipe. Initially, opt-in for 3g, but + // that doesn't cover all cases. + checkForUpdates: function UP_checkForUpdates() { }, + showUpdateAvailable: function UP_showUpdateAvailable(aUpdate) { }, - _showNotification: function UP__showNotif(aUpdate, aTitle, aText, aImageUrl, aMode) { - let observer = { - updatePrompt: this, - observe: function (aSubject, aTopic, aData) { - switch (aTopic) { - case "alertclickcallback": - this.updatePrompt._handleUpdate(aUpdate, aMode); - break; - } - } - }; + showUpdateDownloaded: function UP_showUpdateDownloaded(aUpdate, aBackground) { + // FIXME/bug 737598: we should let the user request that the + // update be applied later, e.g. if they're in the middle of a + // phone call ;). + + log("Update downloaded, restarting to apply it"); - let notifier = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService); - notifier.showAlertNotification(aImageUrl, aTitle, aText, true, "", observer, UPDATE_NOTIFICATION_NAME); + let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup); + // NB: on Gonk, we rely on the system process manager to restart + // us. Trying to restart here would conflict with the process + // manager. We should be using a runtime check to detect Gonk + // instead of this gross ifdef, but the ifdef works for now. + appStartup.quit(appStartup.eForceQuit +#ifndef ANDROID + | appStartup.eRestart +#endif + ); }, - _handleUpdate: function UP__handleUpdate(aUpdate, aMode) { - if (aMode == "available") { - let window = Services.wm.getMostRecentWindow("navigator:browser"); - let title = gUpdateBundle.GetStringFromName("updatesfound_" + aUpdate.type + ".title"); - let brandName = gBrandBundle.GetStringFromName("brandShortName"); - - // Unconditionally use the "major" type here as for now it is always a new version - // without additional description required for a minor update message - let message = gUpdateBundle.formatStringFromName("intro_major", [brandName, aUpdate.displayVersion], 2); - let button0 = gUpdateBundle.GetStringFromName("okButton"); - let button1 = gUpdateBundle.GetStringFromName("askLaterButton"); - let prompt = Services.prompt; - let flags = prompt.BUTTON_POS_0 * prompt.BUTTON_TITLE_IS_STRING + prompt.BUTTON_POS_1 * prompt.BUTTON_TITLE_IS_STRING; + showUpdateInstalled: function UP_showUpdateInstalled() { }, - let download = (prompt.confirmEx(window, title, message, flags, button0, button1, null, null, {value: false}) == 0); - if (download) { - // Start downloading the update in the background - let aus = Cc["@mozilla.org/updates/update-service;1"].getService(Ci.nsIApplicationUpdateService); - if (aus.downloadUpdate(aUpdate, true) != "failed") { - let title = gBrowserBundle.formatStringFromName("alertDownloadsStart", [aUpdate.name], 1); - this._showNotification(aUpdate, title, "", UPDATE_NOTIFICATION_ICON, "download"); - - // Add this UI as a listener for active downloads - aus.addDownloadListener(this); - } - } - } else if(aMode == "downloaded") { - // Notify all windows that an application quit has been requested - let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool); - Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart"); - - // If nothing aborted, restart the app - if (cancelQuit.data == false) { - sendMessageToJava({ - gecko: { - type: "Update:Restart" - } - }); - } + showUpdateError: function UP_showUpdateError(aUpdate) { + if (aUpdate.state == "failed") { + log("Failed to download update"); } }, - _updateDownloadProgress: function UP__updateDownloadProgress(aProgress, aTotal) { - let alertsService = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService); - let progressListener = alertsService.QueryInterface(Ci.nsIAlertsProgressListener); - if (progressListener) - progressListener.onProgress(UPDATE_NOTIFICATION_NAME, aProgress, aTotal); - }, - - // ------------------------- - // nsIUpdatePrompt interface - // ------------------------- - - // Right now this is used only to check for updates in progress - checkForUpdates: function UP_checkForUpdates() { - if (!this._enabled) - return; - - let aus = Cc["@mozilla.org/updates/update-service;1"].getService(Ci.nsIApplicationUpdateService); - if (!aus.isDownloading) - return; - - let updateManager = Cc["@mozilla.org/updates/update-manager;1"].getService(Ci.nsIUpdateManager); - - let updateName = updateManager.activeUpdate ? updateManager.activeUpdate.name : gBrandBundle.GetStringFromName("brandShortName"); - let title = gBrowserBundle.formatStringFromName("alertDownloadsStart", [updateName], 1); - - this._showNotification(updateManager.activeUpdate, title, "", UPDATE_NOTIFICATION_ICON, "downloading"); - - aus.removeDownloadListener(this); // just in case it's already added - aus.addDownloadListener(this); - }, - - showUpdateAvailable: function UP_showUpdateAvailable(aUpdate) { - if (!this._enabled) - return; - - const PREF_APP_UPDATE_SKIPNOTIFICATION = "app.update.skipNotification"; - - if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_SKIPNOTIFICATION) && - Services.prefs.getBoolPref(PREF_APP_UPDATE_SKIPNOTIFICATION)) { - Services.prefs.setBoolPref(PREF_APP_UPDATE_SKIPNOTIFICATION, false); - - // Notification was already displayed and clicked, so jump to the next step: - // ask the user about downloading update - this._handleUpdate(aUpdate, "available"); - return; - } - - let stringsPrefix = "updateAvailable_" + aUpdate.type + "."; - let title = gUpdateBundle.formatStringFromName(stringsPrefix + "title", [aUpdate.name], 1); - let text = gUpdateBundle.GetStringFromName(stringsPrefix + "text"); - let imageUrl = ""; - this._showNotification(aUpdate, title, text, imageUrl, "available"); - }, - - showUpdateDownloaded: function UP_showUpdateDownloaded(aUpdate, aBackground) { - if (!this._enabled) - return; - - // uninstall all installed locales - AddonManager.getAddonsByTypes(["locale"], (function (aAddons) { - if (aAddons.length > 0) { - let listener = this.getAddonListener(aUpdate, this); - AddonManager.addAddonListener(listener); - aAddons.forEach(function(aAddon) { - listener._uninstalling.push(aAddon.id); - aAddon.uninstall(); - }, this); - } else { - this._showDownloadedNotification(aUpdate); - } - }).bind(this)); - }, - - _showDownloadedNotification: function UP_showDlNotification(aUpdate) { - let stringsPrefix = "updateDownloaded_" + aUpdate.type + "."; - let title = gUpdateBundle.formatStringFromName(stringsPrefix + "title", [aUpdate.name], 1); - let text = gUpdateBundle.GetStringFromName(stringsPrefix + "text"); - let imageUrl = ""; - this._showNotification(aUpdate, title, text, imageUrl, "downloaded"); - }, - - _uninstalling: [], - _installing: [], - _currentUpdate: null, - - _reinstallLocales: function UP_reinstallLocales(aUpdate, aListener, aPending) { - LocaleRepository.getLocales((function(aLocales) { - aLocales.forEach(function(aLocale, aIndex, aArray) { - let index = aPending.indexOf(aLocale.addon.id); - if (index > -1) { - aListener._installing.push(aLocale.addon.id); - aLocale.addon.install.install(); - } - }, this); - // store the buildid of these locales so that we can disable locales when the - // user updates through a non-updater channel - Services.prefs.setCharPref("extensions.compatability.locales.buildid", aUpdate.buildID); - }).bind(this), { buildID: aUpdate.buildID }); - }, - - showUpdateInstalled: function UP_showUpdateInstalled() { - if (!this._enabled || !getPref("getBoolPref", "app.update.showInstalledUI", false)) - return; - - let title = gBrandBundle.GetStringFromName("brandShortName"); - let text = gUpdateBundle.GetStringFromName("installSuccess"); - let imageUrl = ""; - this._showNotification(aUpdate, title, text, imageUrl, "installed"); - }, - - showUpdateError: function UP_showUpdateError(aUpdate) { - if (!this._enabled) - return; - - if (aUpdate.state == "failed") { - var title = gBrandBundle.GetStringFromName("brandShortName"); - let text = gUpdateBundle.GetStringFromName("updaterIOErrorTitle"); - let imageUrl = ""; - this._showNotification(aUpdate, title, text, imageUrl, "error"); - } - }, - - showUpdateHistory: function UP_showUpdateHistory(aParent) { - // NOT IMPL - }, - - // ---------------------------- - // nsIRequestObserver interface - // ---------------------------- - - // When the data transfer begins - onStartRequest: function(request, context) { - // NOT IMPL - }, - - // When the data transfer ends - onStopRequest: function(request, context, status) { - let alertsService = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService); - let progressListener = alertsService.QueryInterface(Ci.nsIAlertsProgressListener); - if (progressListener) - progressListener.onCancel(UPDATE_NOTIFICATION_NAME); - - - let aus = Cc["@mozilla.org/updates/update-service;1"].getService(Ci.nsIApplicationUpdateService); - aus.removeDownloadListener(this); - }, - - // ------------------------------ - // nsIProgressEventSink interface - // ------------------------------ - - // When new data has been downloaded - onProgress: function(request, context, progress, maxProgress) { - this._updateDownloadProgress(progress, maxProgress); - }, - - // When we have new status text - onStatus: function(request, context, status, statusText) { - // NOT IMPL - }, - - // ------------------------------- - // AddonListener - // ------------------------------- - getAddonListener: function(aUpdate, aUpdatePrompt) { - return { - _installing: [], - _uninstalling: [], - onInstalling: function(aAddon, aNeedsRestart) { - let index = this._installing.indexOf(aAddon.id); - if (index > -1) - this._installing.splice(index, 1); - - if (this._installing.length == 0) { - aUpdatePrompt._showDownloadedNotification(aUpdate); - AddonManager.removeAddonListener(this); - } - }, - - onUninstalling: function(aAddon, aNeedsRestart) { - let pending = []; - let index = this._uninstalling.indexOf(aAddon.id); - if (index > -1) { - pending.push(aAddon.id); - this._uninstalling.splice(index, 1); - } - if (this._uninstalling.length == 0) - aUpdatePrompt._reinstallLocales(aUpdate, this, pending); - } - } - } - + showUpdateHistory: function UP_showUpdateHistory(aParent) { }, }; const NSGetFactory = XPCOMUtils.generateNSGetFactory([UpdatePrompt]);
--- a/b2g/installer/package-manifest.in +++ b/b2g/installer/package-manifest.in @@ -614,9 +614,12 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DL @BINPATH@/chrome/icons/ @BINPATH@/chrome/chrome@JAREXT@ @BINPATH@/chrome/chrome.manifest @BINPATH@/components/B2GComponents.manifest @BINPATH@/components/B2GComponents.xpt @BINPATH@/components/CameraContent.js @BINPATH@/components/AlertsService.js @BINPATH@/components/ContentPermissionPrompt.js +#ifdef MOZ_UPDATER +@BINPATH@/components/UpdatePrompt.js +#endif @BINPATH@/components/MozKeyboard.js
--- a/browser/app/profile/extensions/Makefile.in +++ b/browser/app/profile/extensions/Makefile.in @@ -30,26 +30,29 @@ # use your version of this file under the terms of the MPL, indicate your # decision by deleting the provisions above and replace them with the notice # and other provisions required by the GPL or the LGPL. If you do not delete # the provisions above, a recipient may use your version of this file under # the terms of any one of the MPL, the GPL or the LGPL. # # ***** END LICENSE BLOCK ***** -DEPTH = ../../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ +DEPTH = ../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ DISTROEXT = $(call core_abspath,$(DIST))/bin/distribution/extensions include $(DEPTH)/config/autoconf.mk -DIRS = {972ce4c6-7e08-4474-a285-3208198ce6fd} +DIRS = \ + {972ce4c6-7e08-4474-a285-3208198ce6fd} \ + uriloader@pdf.js \ + $(NULL) include $(topsrcdir)/config/rules.mk ifneq (,$(filter aurora beta,$(MOZ_UPDATE_CHANNEL))) EXTENSIONS = \ testpilot@labs.mozilla.com \ $(NULL)
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/LICENSE @@ -0,0 +1,33 @@ + + Copyright (c) 2011 Mozilla Foundation + + Contributors: Andreas Gal <gal@mozilla.com> + Chris G Jones <cjones@mozilla.com> + Shaon Barman <shaon.barman@gmail.com> + Vivien Nicolas <21@vingtetun.org> + Justin D'Arcangelo <justindarc@gmail.com> + Yury Delendik + Kalervo Kujala + Adil Allawi <@ironymark> + Jakob Miland <saebekassebil@gmail.com> + Artur Adib <aadib@mozilla.com> + Brendan Dahl <bdahl@mozilla.com> + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/Makefile.in @@ -0,0 +1,30 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this file, +# You can obtain one at http://mozilla.org/MPL/2.0/. + +DEPTH = ../../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +APPEXT = $(call core_abspath,$(DIST))/bin/extensions + +TEST_DIRS += test + +include $(DEPTH)/config/autoconf.mk +include $(topsrcdir)/config/rules.mk + +# Using the extension-files as an extension files whitelist to avoid noise +# in the xpi file such as MOZILLA.readme, install.pdf.in and this make file. +FILES := $(shell cat $(srcdir)/extension-files) + +libs:: + $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf.in > install.rdf + $(ZIP) -9X $(APPEXT)/uriloader@pdf.js.xpi install.rdf + cd $(call core_abspath,$(srcdir)) && \ + $(ZIP) -9X $(APPEXT)/uriloader@pdf.js.xpi $(FILES) + +install:: + $(SYSINSTALL) $(IFLAGS1) $(APPEXT)/uriloader@pdf.js.xpi $(DESTDIR)$(mozappdir)/extensions + +GARBAGE += install.rdf
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/README.mozilla @@ -0,0 +1,4 @@ +This is the pdf.js project output, https://github.com/mozilla/pdf.js + +Current extension version is: 0.2.414 +
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/bootstrap.js @@ -0,0 +1,98 @@ +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ + +'use strict'; + +const RESOURCE_NAME = 'pdf.js'; +const EXT_PREFIX = 'extensions.uriloader@pdf.js'; + +let Cc = Components.classes; +let Ci = Components.interfaces; +let Cm = Components.manager; +let Cu = Components.utils; +let application = Cc['@mozilla.org/fuel/application;1'] + .getService(Ci.fuelIApplication); + +Cu.import('resource://gre/modules/Services.jsm'); + +function log(str) { + if (!application.prefs.getValue(EXT_PREFIX + '.pdfBugEnabled', false)) + return; + dump(str + '\n'); +} + +// Register/unregister a class as a component. +let Factory = { + registrar: null, + aClass: null, + register: function(aClass) { + if (this.aClass) { + log('Cannot register more than one class'); + return; + } + this.registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar); + this.aClass = aClass; + var proto = aClass.prototype; + this.registrar.registerFactory(proto.classID, proto.classDescription, + proto.contractID, this); + }, + unregister: function() { + if (!this.aClass) { + log('Class was never registered.'); + return; + } + var proto = this.aClass.prototype; + this.registrar.unregisterFactory(proto.classID, this); + this.aClass = null; + }, + // nsIFactory::createInstance + createInstance: function(outer, iid) { + if (outer !== null) + throw Cr.NS_ERROR_NO_AGGREGATION; + return (new (this.aClass)).QueryInterface(iid); + } +}; + +let pdfStreamConverterUrl = null; + +// As of Firefox 13 bootstrapped add-ons don't support automatic registering and +// unregistering of resource urls and components/contracts. Until then we do +// it programatically. See ManifestDirective ManifestParser.cpp for support. + +function startup(aData, aReason) { + // Setup the resource url. + var ioService = Services.io; + var resProt = ioService.getProtocolHandler('resource') + .QueryInterface(Ci.nsIResProtocolHandler); + var aliasURI = ioService.newURI('content/', 'UTF-8', aData.resourceURI); + resProt.setSubstitution(RESOURCE_NAME, aliasURI); + + // Load the component and register it. + pdfStreamConverterUrl = aData.resourceURI.spec + + 'components/PdfStreamConverter.js'; + Cu.import(pdfStreamConverterUrl); + Factory.register(PdfStreamConverter); +} + +function shutdown(aData, aReason) { + if (aReason == APP_SHUTDOWN) + return; + var ioService = Services.io; + var resProt = ioService.getProtocolHandler('resource') + .QueryInterface(Ci.nsIResProtocolHandler); + // Remove the resource url. + resProt.setSubstitution(RESOURCE_NAME, null); + // Remove the contract/component. + Factory.unregister(); + // Unload the converter + Cu.unload(pdfStreamConverterUrl); + pdfStreamConverterUrl = null; +} + +function install(aData, aReason) { +} + +function uninstall(aData, aReason) { + application.prefs.setValue(EXT_PREFIX + '.database', '{}'); +} +
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/components/PdfStreamConverter.js @@ -0,0 +1,206 @@ +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ + +'use strict'; + +var EXPORTED_SYMBOLS = ['PdfStreamConverter']; + +const Cc = Components.classes; +const Ci = Components.interfaces; +const Cr = Components.results; +const Cu = Components.utils; +const PDFJS_EVENT_ID = 'pdf.js.message'; +const PDF_CONTENT_TYPE = 'application/pdf'; +const EXT_PREFIX = 'extensions.uriloader@pdf.js'; +const MAX_DATABASE_LENGTH = 4096; + +Cu.import('resource://gre/modules/XPCOMUtils.jsm'); +Cu.import('resource://gre/modules/Services.jsm'); + +let application = Cc['@mozilla.org/fuel/application;1'] + .getService(Ci.fuelIApplication); +let privateBrowsing = Cc['@mozilla.org/privatebrowsing;1'] + .getService(Ci.nsIPrivateBrowsingService); +let inPrivateBrowswing = privateBrowsing.privateBrowsingEnabled; + +function log(aMsg) { + if (!application.prefs.getValue(EXT_PREFIX + '.pdfBugEnabled', false)) + return; + let msg = 'PdfStreamConverter.js: ' + (aMsg.join ? aMsg.join('') : aMsg); + Services.console.logStringMessage(msg); + dump(msg + '\n'); +} +function getWindow(top, id) { + return top.QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIDOMWindowUtils) + .getOuterWindowWithId(id); +} +function windowID(win) { + return win.QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIDOMWindowUtils) + .outerWindowID; +} +function topWindow(win) { + return win.QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIWebNavigation) + .QueryInterface(Ci.nsIDocShellTreeItem) + .rootTreeItem + .QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIDOMWindow); +} + +// All the priviledged actions. +function ChromeActions() { + this.inPrivateBrowswing = privateBrowsing.privateBrowsingEnabled; +} +ChromeActions.prototype = { + download: function(data) { + Services.wm.getMostRecentWindow('navigator:browser').saveURL(data); + }, + setDatabase: function(data) { + if (this.inPrivateBrowswing) + return; + // Protect against something sending tons of data to setDatabase. + if (data.length > MAX_DATABASE_LENGTH) + return; + application.prefs.setValue(EXT_PREFIX + '.database', data); + }, + getDatabase: function() { + if (this.inPrivateBrowswing) + return '{}'; + return application.prefs.getValue(EXT_PREFIX + '.database', '{}'); + }, + pdfBugEnabled: function() { + return application.prefs.getValue(EXT_PREFIX + '.pdfBugEnabled', false); + } +}; + +// Event listener to trigger chrome privedged code. +function RequestListener(actions) { + this.actions = actions; +} +// Receive an event and synchronously responds. +RequestListener.prototype.receive = function(event) { + var message = event.target; + var action = message.getUserData('action'); + var data = message.getUserData('data'); + var actions = this.actions; + if (!(action in actions)) { + log('Unknown action: ' + action); + return; + } + var response = actions[action].call(this.actions, data); + message.setUserData('response', response, null); +}; + + +function PdfStreamConverter() { +} + +PdfStreamConverter.prototype = { + + // properties required for XPCOM registration: + classID: Components.ID('{6457a96b-2d68-439a-bcfa-44465fbcdbb1}'), + classDescription: 'pdf.js Component', + contractID: '@mozilla.org/streamconv;1?from=application/pdf&to=*/*', + + QueryInterface: XPCOMUtils.generateQI([ + Ci.nsISupports, + Ci.nsIStreamConverter, + Ci.nsIStreamListener, + Ci.nsIRequestObserver + ]), + + /* + * This component works as such: + * 1. asyncConvertData stores the listener + * 2. onStartRequest creates a new channel, streams the viewer and cancels + * the request so pdf.js can do the request + * Since the request is cancelled onDataAvailable should not be called. The + * onStopRequest does nothing. The convert function just returns the stream, + * it's just the synchronous version of asyncConvertData. + */ + + // nsIStreamConverter::convert + convert: function(aFromStream, aFromType, aToType, aCtxt) { + throw Cr.NS_ERROR_NOT_IMPLEMENTED; + }, + + // nsIStreamConverter::asyncConvertData + asyncConvertData: function(aFromType, aToType, aListener, aCtxt) { + // Ignoring HTTP POST requests -- pdf.js has to repeat the request. + var skipConversion = false; + try { + var request = aCtxt; + request.QueryInterface(Ci.nsIHttpChannel); + skipConversion = (request.requestMethod !== 'GET'); + } catch (e) { + // Non-HTTP request... continue normally. + } + if (skipConversion) + throw Cr.NS_ERROR_NOT_IMPLEMENTED; + + // Store the listener passed to us + this.listener = aListener; + }, + + // nsIStreamListener::onDataAvailable + onDataAvailable: function(aRequest, aContext, aInputStream, aOffset, aCount) { + // Do nothing since all the data loading is handled by the viewer. + log('SANITY CHECK: onDataAvailable SHOULD NOT BE CALLED!'); + }, + + // nsIRequestObserver::onStartRequest + onStartRequest: function(aRequest, aContext) { + + // Setup the request so we can use it below. + aRequest.QueryInterface(Ci.nsIChannel); + // Cancel the request so the viewer can handle it. + aRequest.cancel(Cr.NS_BINDING_ABORTED); + + // Create a new channel that is viewer loaded as a resource. + var ioService = Services.io; + var channel = ioService.newChannel( + 'resource://pdf.js/web/viewer.html', null, null); + + // Keep the URL the same so the browser sees it as the same. + channel.originalURI = aRequest.URI; + channel.asyncOpen(this.listener, aContext); + + // Setup a global listener waiting for the next DOM to be created and verfiy + // that its the one we want by its URL. When the correct DOM is found create + // an event listener on that window for the pdf.js events that require + // chrome priviledges. Code snippet from John Galt. + let window = aRequest.loadGroup.groupObserver + .QueryInterface(Ci.nsIWebProgress) + .DOMWindow; + let top = topWindow(window); + let id = windowID(window); + window = null; + + top.addEventListener('DOMWindowCreated', function onDOMWinCreated(event) { + let doc = event.originalTarget; + let win = doc.defaultView; + + if (id == windowID(win)) { + top.removeEventListener('DOMWindowCreated', onDOMWinCreated, true); + if (!doc.documentURIObject.equals(aRequest.URI)) + return; + + let requestListener = new RequestListener(new ChromeActions); + win.addEventListener(PDFJS_EVENT_ID, function(event) { + requestListener.receive(event); + }, false, true); + } else if (!getWindow(top, id)) { + top.removeEventListener('DOMWindowCreated', onDOMWinCreated, true); + } + }, true); + }, + + // nsIRequestObserver::onStopRequest + onStopRequest: function(aRequest, aContext, aStatusCode) { + // Do nothing. + } +}; + +var NSGetFactory = XPCOMUtils.generateNSGetFactory([PdfStreamConverter]);
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/content/web/debugger.js @@ -0,0 +1,475 @@ +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ + +'use strict'; + +var FontInspector = (function FontInspectorClosure() { + var fonts; + var panelWidth = 300; + var active = false; + var fontAttribute = 'data-font-name'; + function removeSelection() { + var divs = document.querySelectorAll('div[' + fontAttribute + ']'); + for (var i = 0, ii = divs.length; i < ii; ++i) { + var div = divs[i]; + div.className = ''; + } + } + function resetSelection() { + var divs = document.querySelectorAll('div[' + fontAttribute + ']'); + for (var i = 0, ii = divs.length; i < ii; ++i) { + var div = divs[i]; + div.className = 'debuggerHideText'; + } + } + function selectFont(fontName, show) { + var divs = document.querySelectorAll('div[' + fontAttribute + '=' + + fontName + ']'); + for (var i = 0, ii = divs.length; i < ii; ++i) { + var div = divs[i]; + div.className = show ? 'debuggerShowText' : 'debuggerHideText'; + } + } + function textLayerClick(e) { + if (!e.target.dataset.fontName || e.target.tagName != 'DIV') + return; + var fontName = e.target.dataset.fontName; + var selects = document.getElementsByTagName('input'); + for (var i = 0; i < selects.length; ++i) { + var select = selects[i]; + if (select.dataset.fontName != fontName) continue; + select.checked = !select.checked; + selectFont(fontName, select.checked); + select.scrollIntoView(); + } + } + return { + // Poperties/functions needed by PDFBug. + id: 'FontInspector', + name: 'Font Inspector', + panel: null, + manager: null, + init: function init() { + var panel = this.panel; + panel.setAttribute('style', 'padding: 5px;'); + var tmp = document.createElement('button'); + tmp.addEventListener('click', resetSelection); + tmp.textContent = 'Refresh'; + panel.appendChild(tmp); + + fonts = document.createElement('div'); + panel.appendChild(fonts); + }, + enabled: false, + get active() { + return active; + }, + set active(value) { + active = value; + if (active) { + document.body.addEventListener('click', textLayerClick, true); + resetSelection(); + } else { + document.body.removeEventListener('click', textLayerClick, true); + removeSelection(); + } + }, + // FontInspector specific functions. + fontAdded: function fontAdded(fontObj, url) { + function properties(obj, list) { + var moreInfo = document.createElement('table'); + for (var i = 0; i < list.length; i++) { + var tr = document.createElement('tr'); + var td1 = document.createElement('td'); + td1.textContent = list[i]; + tr.appendChild(td1); + var td2 = document.createElement('td'); + td2.textContent = obj[list[i]].toString(); + tr.appendChild(td2); + moreInfo.appendChild(tr); + } + return moreInfo; + } + var moreInfo = properties(fontObj, ['name', 'type']); + var m = /url\(['"]?([^\)"']+)/.exec(url); + var fontName = fontObj.loadedName; + var font = document.createElement('div'); + var name = document.createElement('span'); + name.textContent = fontName; + var download = document.createElement('a'); + download.href = m[1]; + download.textContent = 'Download'; + var logIt = document.createElement('a'); + logIt.href = ''; + logIt.textContent = 'Log'; + logIt.addEventListener('click', function(event) { + event.preventDefault(); + console.log(fontObj); + }); + var select = document.createElement('input'); + select.setAttribute('type', 'checkbox'); + select.dataset.fontName = fontName; + select.addEventListener('click', (function(select, fontName) { + return (function() { + selectFont(fontName, select.checked); + }); + })(select, fontName)); + font.appendChild(select); + font.appendChild(name); + font.appendChild(document.createTextNode(' ')); + font.appendChild(download); + font.appendChild(document.createTextNode(' ')); + font.appendChild(logIt); + font.appendChild(moreInfo); + fonts.appendChild(font); + // Somewhat of a hack, should probably add a hook for when the text layer + // is done rendering. + setTimeout(function() { + if (this.active) + resetSelection(); + }.bind(this), 2000); + } + }; +})(); + +// Manages all the page steppers. +var StepperManager = (function StepperManagerClosure() { + var steppers = []; + var stepperDiv = null; + var stepperControls = null; + var stepperChooser = null; + var breakPoints = {}; + return { + // Poperties/functions needed by PDFBug. + id: 'Stepper', + name: 'Stepper', + panel: null, + manager: null, + init: function init() { + var self = this; + this.panel.setAttribute('style', 'padding: 5px;'); + stepperControls = document.createElement('div'); + stepperChooser = document.createElement('select'); + stepperChooser.addEventListener('change', function(event) { + self.selectStepper(this.value); + }); + stepperControls.appendChild(stepperChooser); + stepperDiv = document.createElement('div'); + this.panel.appendChild(stepperControls); + this.panel.appendChild(stepperDiv); + if (sessionStorage.getItem('pdfjsBreakPoints')) + breakPoints = JSON.parse(sessionStorage.getItem('pdfjsBreakPoints')); + }, + enabled: false, + active: false, + // Stepper specific functions. + create: function create(pageNumber) { + var debug = document.createElement('div'); + debug.id = 'stepper' + pageNumber; + debug.setAttribute('hidden', true); + debug.className = 'stepper'; + stepperDiv.appendChild(debug); + var b = document.createElement('option'); + b.textContent = 'Page ' + (pageNumber + 1); + b.value = pageNumber; + stepperChooser.appendChild(b); + var initBreakPoints = breakPoints[pageNumber] || []; + var stepper = new Stepper(debug, pageNumber, initBreakPoints); + steppers.push(stepper); + if (steppers.length === 1) + this.selectStepper(pageNumber, false); + return stepper; + }, + selectStepper: function selectStepper(pageNumber, selectPanel) { + if (selectPanel) + this.manager.selectPanel(1); + for (var i = 0; i < steppers.length; ++i) { + var stepper = steppers[i]; + if (stepper.pageNumber == pageNumber) + stepper.panel.removeAttribute('hidden'); + else + stepper.panel.setAttribute('hidden', true); + } + var options = stepperChooser.options; + for (var i = 0; i < options.length; ++i) { + var option = options[i]; + option.selected = option.value == pageNumber; + } + }, + saveBreakPoints: function saveBreakPoints(pageNumber, bps) { + breakPoints[pageNumber] = bps; + sessionStorage.setItem('pdfjsBreakPoints', JSON.stringify(breakPoints)); + } + }; +})(); + +// The stepper for each page's IRQueue. +var Stepper = (function StepperClosure() { + function Stepper(panel, pageNumber, initialBreakPoints) { + this.panel = panel; + this.len; + this.breakPoint = 0; + this.nextBreakPoint = null; + this.pageNumber = pageNumber; + this.breakPoints = initialBreakPoints; + this.currentIdx = -1; + } + Stepper.prototype = { + init: function init(IRQueue) { + // Shorter way to create element and optionally set textContent. + function c(tag, textContent) { + var d = document.createElement(tag); + if (textContent) + d.textContent = textContent; + return d; + } + var panel = this.panel; + this.len = IRQueue.fnArray.length; + var content = c('div', 'c=continue, s=step'); + var table = c('table'); + content.appendChild(table); + table.cellSpacing = 0; + var headerRow = c('tr'); + table.appendChild(headerRow); + headerRow.appendChild(c('th', 'Break')); + headerRow.appendChild(c('th', 'Idx')); + headerRow.appendChild(c('th', 'fn')); + headerRow.appendChild(c('th', 'args')); + + for (var i = 0; i < IRQueue.fnArray.length; i++) { + var line = c('tr'); + line.className = 'line'; + line.dataset.idx = i; + table.appendChild(line); + var checked = this.breakPoints.indexOf(i) != -1; + var args = IRQueue.argsArray[i] ? IRQueue.argsArray[i] : []; + + var breakCell = c('td'); + var cbox = c('input'); + cbox.type = 'checkbox'; + cbox.className = 'points'; + cbox.checked = checked; + var self = this; + cbox.onclick = (function(x) { + return function() { + if (this.checked) + self.breakPoints.push(x); + else + self.breakPoints.splice(self.breakPoints.indexOf(x), 1); + StepperManager.saveBreakPoints(self.pageNumber, self.breakPoints); + } + })(i); + + breakCell.appendChild(cbox); + line.appendChild(breakCell); + line.appendChild(c('td', i.toString())); + line.appendChild(c('td', IRQueue.fnArray[i])); + line.appendChild(c('td', args.join(', '))); + } + panel.appendChild(content); + var self = this; + }, + getNextBreakPoint: function getNextBreakPoint() { + this.breakPoints.sort(function(a, b) { return a - b; }); + for (var i = 0; i < this.breakPoints.length; i++) { + if (this.breakPoints[i] > this.currentIdx) + return this.breakPoints[i]; + } + return null; + }, + breakIt: function breakIt(idx, callback) { + StepperManager.selectStepper(this.pageNumber, true); + var self = this; + var dom = document; + self.currentIdx = idx; + var listener = function(e) { + switch (e.keyCode) { + case 83: // step + dom.removeEventListener('keydown', listener, false); + self.nextBreakPoint = self.currentIdx + 1; + self.goTo(-1); + callback(); + break; + case 67: // continue + dom.removeEventListener('keydown', listener, false); + var breakPoint = self.getNextBreakPoint(); + self.nextBreakPoint = breakPoint; + self.goTo(-1); + callback(); + break; + } + } + dom.addEventListener('keydown', listener, false); + self.goTo(idx); + }, + goTo: function goTo(idx) { + var allRows = this.panel.getElementsByClassName('line'); + for (var x = 0, xx = allRows.length; x < xx; ++x) { + var row = allRows[x]; + if (row.dataset.idx == idx) { + row.style.backgroundColor = 'rgb(251,250,207)'; + row.scrollIntoView(); + } else { + row.style.backgroundColor = null; + } + } + } + }; + return Stepper; +})(); + +var Stats = (function Stats() { + var stats = []; + function clear(node) { + while (node.hasChildNodes()) + node.removeChild(node.lastChild); + } + function getStatIndex(pageNumber) { + for (var i = 0, ii = stats.length; i < ii; ++i) + if (stats[i].pageNumber === pageNumber) + return i; + return false; + } + return { + // Poperties/functions needed by PDFBug. + id: 'Stats', + name: 'Stats', + panel: null, + manager: null, + init: function init() { + this.panel.setAttribute('style', 'padding: 5px;'); + PDFJS.enableStats = true; + }, + enabled: false, + active: false, + // Stats specific functions. + add: function(pageNumber, stat) { + if (!stat) + return; + var statsIndex = getStatIndex(pageNumber); + if (statsIndex !== false) { + var b = stats[statsIndex]; + this.panel.removeChild(b.div); + stats.splice(statsIndex, 1); + } + var wrapper = document.createElement('div'); + wrapper.className = 'stats'; + var title = document.createElement('div'); + title.className = 'title'; + title.textContent = 'Page: ' + pageNumber; + var statsDiv = document.createElement('div'); + statsDiv.textContent = stat.toString(); + wrapper.appendChild(title); + wrapper.appendChild(statsDiv); + stats.push({ pageNumber: pageNumber, div: wrapper }); + stats.sort(function(a, b) { return a.pageNumber - b.pageNumber}); + clear(this.panel); + for (var i = 0, ii = stats.length; i < ii; ++i) + this.panel.appendChild(stats[i].div); + } + }; +})(); + +// Manages all the debugging tools. +var PDFBug = (function PDFBugClosure() { + var panelWidth = 300; + var buttons = []; + var activePanel = null; + + return { + tools: [ + FontInspector, + StepperManager, + Stats + ], + enable: function(ids) { + var all = false, tools = this.tools; + if (ids.length === 1 && ids[0] === 'all') + all = true; + for (var i = 0; i < tools.length; ++i) { + var tool = tools[i]; + if (all || ids.indexOf(tool.id) !== -1) + tool.enabled = true; + } + if (!all) { + // Sort the tools by the order they are enabled. + tools.sort(function(a, b) { + var indexA = ids.indexOf(a.id); + indexA = indexA < 0 ? tools.length : indexA; + var indexB = ids.indexOf(b.id); + indexB = indexB < 0 ? tools.length : indexB; + return indexA - indexB; + }); + } + }, + init: function init() { + /* + * Basic Layout: + * PDFBug + * Controls + * Panels + * Panel + * Panel + * ... + */ + var ui = document.createElement('div'); + ui.id = 'PDFBug'; + + var controls = document.createElement('div'); + controls.setAttribute('class', 'controls'); + ui.appendChild(controls); + + var panels = document.createElement('div'); + panels.setAttribute('class', 'panels'); + ui.appendChild(panels); + + document.body.appendChild(ui); + document.body.style.paddingRight = panelWidth + 'px'; + + // Initialize all the debugging tools. + var tools = this.tools; + for (var i = 0; i < tools.length; ++i) { + var tool = tools[i]; + var panel = document.createElement('div'); + var panelButton = document.createElement('button'); + panelButton.textContent = tool.name; + var self = this; + panelButton.addEventListener('click', (function(selected) { + return function(event) { + event.preventDefault(); + self.selectPanel(selected); + }; + })(i)); + controls.appendChild(panelButton); + panels.appendChild(panel); + tool.panel = panel; + tool.manager = this; + if (tool.enabled) + tool.init(); + else + panel.textContent = tool.name + ' is disabled. To enable add ' + + ' "' + tool.id + '" to the pdfBug parameter ' + + 'and refresh (seperate multiple by commas).'; + buttons.push(panelButton); + } + this.selectPanel(0); + }, + selectPanel: function selectPanel(index) { + if (index === activePanel) + return; + activePanel = index; + var tools = this.tools; + for (var j = 0; j < tools.length; ++j) { + if (j == index) { + buttons[j].setAttribute('class', 'active'); + tools[j].active = true; + tools[j].panel.removeAttribute('hidden'); + } else { + buttons[j].setAttribute('class', ''); + tools[j].active = false; + tools[j].panel.setAttribute('hidden', 'true'); + } + } + } + }; +})();
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/content/web/images/bookmark.svg @@ -0,0 +1,662 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + inkscape:export-ydpi="240.00000" + inkscape:export-xdpi="240.00000" + inkscape:export-filename="/home/jimmac/gfx/novell/pdes/trunk/docs/BIGmime-text.png" + sodipodi:docname="bookmark.svg" + inkscape:version="0.48.1 r9760" + sodipodi:version="0.32" + id="svg249" + height="48.000000px" + width="48.000000px" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + version="1.1" + viewbox="0 0 48 48"> + <defs + id="defs3"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 24 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="48 : 24 : 1" + inkscape:persp3d-origin="24 : 16 : 1" + id="perspective100" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient5060" + id="radialGradient5031" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)" + cx="605.71429" + cy="486.64789" + fx="605.71429" + fy="486.64789" + r="117.14286" /> + <linearGradient + inkscape:collect="always" + id="linearGradient5060"> + <stop + style="stop-color:black;stop-opacity:1;" + offset="0" + id="stop5062" /> + <stop + style="stop-color:black;stop-opacity:0;" + offset="1" + id="stop5064" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient5060" + id="radialGradient5029" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)" + cx="605.71429" + cy="486.64789" + fx="605.71429" + fy="486.64789" + r="117.14286" /> + <linearGradient + id="linearGradient5048"> + <stop + style="stop-color:black;stop-opacity:0;" + offset="0" + id="stop5050" /> + <stop + id="stop5056" + offset="0.5" + style="stop-color:black;stop-opacity:1;" /> + <stop + style="stop-color:black;stop-opacity:0;" + offset="1" + id="stop5052" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient5048" + id="linearGradient5027" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)" + x1="302.85715" + y1="366.64789" + x2="302.85715" + y2="609.50507" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2906"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop2908" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop2910" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient2896"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop2898" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop2900" /> + </linearGradient> + <linearGradient + id="linearGradient2598"> + <stop + style="stop-color:#859dbc;stop-opacity:1;" + offset="0" + id="stop2600" /> + <stop + style="stop-color:#547299;stop-opacity:1;" + offset="1" + id="stop2602" /> + </linearGradient> + <linearGradient + id="linearGradient2590"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop2592" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop2594" /> + </linearGradient> + <linearGradient + id="linearGradient5897"> + <stop + style="stop-color:#000000;stop-opacity:0.0000000;" + offset="0.0000000" + id="stop5899" /> + <stop + id="stop5905" + offset="0.50000000" + style="stop-color:#000000;stop-opacity:0.56701028;" /> + <stop + style="stop-color:#000000;stop-opacity:0.0000000;" + offset="1.0000000" + id="stop5901" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient5866"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop5868" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop5870" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient4404"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop4406" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop4408" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient4542"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop4544" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop4546" /> + </linearGradient> + <linearGradient + id="linearGradient15662"> + <stop + id="stop15664" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop15666" + offset="1.0000000" + style="stop-color:#f8f8f8;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient269"> + <stop + id="stop270" + offset="0.0000000" + style="stop-color:#a3a3a3;stop-opacity:1.0000000;" /> + <stop + id="stop271" + offset="1.0000000" + style="stop-color:#4c4c4c;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient259"> + <stop + id="stop260" + offset="0.0000000" + style="stop-color:#fafafa;stop-opacity:1.0000000;" /> + <stop + id="stop261" + offset="1.0000000" + style="stop-color:#bbbbbb;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient12512"> + <stop + id="stop12513" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop12517" + offset="0.50000000" + style="stop-color:#fff520;stop-opacity:0.89108908;" /> + <stop + id="stop12514" + offset="1.0000000" + style="stop-color:#fff300;stop-opacity:0.0000000;" /> + </linearGradient> + <radialGradient + r="14.375000" + fy="125.00000" + fx="55.000000" + cy="125.00000" + cx="55.000000" + gradientUnits="userSpaceOnUse" + id="radialGradient278" + xlink:href="#linearGradient12512" + inkscape:collect="always" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient269" + id="radialGradient15656" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.968273,0.000000,0.000000,1.036374,3.250000,0.489522)" + cx="8.8244190" + cy="3.7561285" + fx="8.8244190" + fy="3.7561285" + r="37.751713" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient259" + id="radialGradient15658" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.960493,0.000000,0.000000,1.044769,-0.103553,-0.159183)" + cx="33.966679" + cy="35.736916" + fx="33.966679" + fy="35.736916" + r="86.708450" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15662" + id="radialGradient15668" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.973033,0.000000,0.000000,1.034937,3.168754,0.555277)" + cx="8.1435566" + cy="7.2678967" + fx="8.1435566" + fy="7.2678967" + r="38.158695" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4542" + id="radialGradient4548" + cx="24.306795" + cy="42.07798" + fx="24.306795" + fy="42.07798" + r="15.821514" + gradientTransform="matrix(1.000000,0.000000,0.000000,0.284916,0.000000,30.08928)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4404" + id="linearGradient4410" + x1="16.812500" + y1="1.8750000" + x2="16.812500" + y2="4.7187500" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-1.319549,0.000000,0.000000,1.362060,40.38853,-0.362057)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient5866" + id="linearGradient5872" + x1="19.452349" + y1="13.174174" + x2="19.685436" + y2="27.095339" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.224255,0.000000,0.000000,1.282176,0.371569,0.264657)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient5897" + id="linearGradient5903" + x1="19.000000" + y1="9.7738247" + x2="19.000000" + y2="15.635596" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.319549,0.000000,0.000000,2.133926,-4.476133,-14.64845)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2590" + id="linearGradient2596" + x1="19.970377" + y1="6.1167107" + x2="19.970377" + y2="2.53125" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.319549,0.000000,0.000000,1.280356,-5.745298,0.249007)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2598" + id="linearGradient2604" + x1="18.431311" + y1="19.119474" + x2="18.402472" + y2="4.2702327" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.319549,0.000000,0.000000,1.299013,-3.106200,-1.336165)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2896" + id="linearGradient2902" + x1="14.584077" + y1="1.6392649" + x2="14.552828" + y2="2.4912448" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.000000,0.000000,0.000000,1.594214,0.000000,-0.790249)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2906" + id="linearGradient2912" + x1="13.354311" + y1="1.4866425" + x2="14.075844" + y2="2.4017651" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.000000,0.000000,0.000000,1.184816,0.000000,-0.727880)" /> + </defs> + <sodipodi:namedview + inkscape:window-y="158" + inkscape:window-x="433" + inkscape:window-height="690" + inkscape:window-width="872" + inkscape:document-units="px" + inkscape:grid-bbox="true" + showgrid="false" + inkscape:current-layer="layer5" + inkscape:cy="24" + inkscape:cx="24" + inkscape:zoom="9.8333333" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + borderopacity="0.25490196" + bordercolor="#666666" + pagecolor="#ffffff" + id="base" + inkscape:showpageshadow="false" + showguides="true" + inkscape:guide-bbox="true" + inkscape:window-maximized="0" /> + <metadata + id="metadata4"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title>New Bookmark</dc:title> + <dc:subject> + <rdf:Bag> + <rdf:li>bookmark</rdf:li> + <rdf:li>remember</rdf:li> + <rdf:li>favorite</rdf:li> + </rdf:Bag> + </dc:subject> + <cc:license + rdf:resource="http://creativecommons.org/licenses/publicdomain/" /> + <dc:creator> + <cc:Agent> + <dc:title>Andreas Nilsson</dc:title> + </cc:Agent> + </dc:creator> + <dc:source /> + <dc:contributor> + <cc:Agent> + <dc:title>Jakub Steiner</dc:title> + </cc:Agent> + </dc:contributor> + <dc:description>create bookmark action</dc:description> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/publicdomain/"> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Reproduction" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Distribution" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + inkscape:groupmode="layer" + id="layer6" + inkscape:label="Shadow"> + <g + style="display:inline" + id="g5022" + transform="matrix(2.165152e-2,0,0,1.485743e-2,43.0076,42.68539)"> + <rect + y="-150.69685" + x="-1559.2523" + height="478.35718" + width="1339.6335" + id="rect4173" + style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> + <path + sodipodi:nodetypes="cccc" + id="path5058" + d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z " + style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> + <path + style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" + d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z " + id="path5018" + sodipodi:nodetypes="cccc" /> + </g> + </g> + <g + style="display:inline" + inkscape:groupmode="layer" + inkscape:label="Base" + id="layer1"> + <rect + style="color:#000000;fill:url(#radialGradient15658);fill-opacity:1.0000000;fill-rule:nonzero;stroke:url(#radialGradient15656);stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:block;overflow:visible" + id="rect15391" + width="34.875000" + height="41.063431" + x="6.5000000" + y="3.5000000" + ry="1.1490481" + rx="1.1490486" /> + <rect + style="color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:nonzero;stroke:url(#radialGradient15668);stroke-width:0.99999958;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:block;overflow:visible" + id="rect15660" + width="32.937012" + height="39.028210" + x="7.5024552" + y="4.5010486" + ry="0.14904849" + rx="0.14904852" /> + <path + style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.98855311;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:0.017543854" + d="M 11.505723,5.4942766 L 11.505723,43.400869" + id="path15672" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:0.20467831" + d="M 12.500000,5.0205154 L 12.500000,43.038228" + id="path15674" + sodipodi:nodetypes="cc" /> + </g> + <g + inkscape:groupmode="layer" + id="layer5" + inkscape:label="Text" + style="display:inline"> + <g + id="g2188"> + <rect + style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;visibility:visible;display:block;overflow:visible" + id="rect15686" + width="20.000006" + height="1.0000000" + x="15.999994" + y="9.0000000" + rx="0.13778631" + ry="0.065390877" /> + <rect + style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;visibility:visible;display:block;overflow:visible" + id="rect15688" + width="20.000006" + height="1.0000000" + x="15.999994" + y="11.000000" + rx="0.13778631" + ry="0.065390877" /> + <rect + style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;visibility:visible;display:block;overflow:visible" + id="rect15690" + width="20.000006" + height="1.0000000" + x="15.999994" + y="13.000000" + rx="0.13778631" + ry="0.065390877" /> + <rect + style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;visibility:visible;display:block;overflow:visible" + id="rect15692" + width="20.000006" + height="1.0000000" + x="15.999994" + y="15.000000" + rx="0.13778631" + ry="0.065390877" /> + <rect + style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;visibility:visible;display:block;overflow:visible" + id="rect15694" + width="20.000006" + height="1.0000000" + x="15.999994" + y="17.000000" + rx="0.13778631" + ry="0.065390877" /> + <rect + style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;visibility:visible;display:block;overflow:visible" + id="rect15696" + width="20.000006" + height="1.0000000" + x="15.999994" + y="19.000000" + rx="0.13778631" + ry="0.065390877" /> + <rect + style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;visibility:visible;display:block;overflow:visible" + id="rect15698" + width="20.000006" + height="1.0000000" + x="15.999994" + y="21.000000" + rx="0.13778631" + ry="0.065390877" /> + <rect + style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;visibility:visible;display:block;overflow:visible" + id="rect15700" + width="20.000006" + height="1.0000000" + x="15.999994" + y="23.000000" + rx="0.13778631" + ry="0.065390877" /> + <rect + style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;visibility:visible;display:block;overflow:visible" + id="rect15732" + width="9.0000057" + height="1.0000000" + x="15.999986" + y="25.000000" + rx="0.062003858" + ry="0.065390877" /> + <rect + style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;visibility:visible;display:block;overflow:visible" + id="rect15736" + width="20.000006" + height="1.0000000" + x="15.999986" + y="29.000000" + rx="0.13778631" + ry="0.065390877" /> + <rect + style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;visibility:visible;display:block;overflow:visible" + id="rect15738" + width="20.000006" + height="1.0000000" + x="15.999986" + y="31.000000" + rx="0.13778631" + ry="0.065390877" /> + <rect + style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;visibility:visible;display:block;overflow:visible" + id="rect15740" + width="20.000006" + height="1.0000000" + x="15.999986" + y="33.000000" + rx="0.13778631" + ry="0.065390877" /> + <rect + style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;visibility:visible;display:block;overflow:visible" + id="rect15742" + width="20.000006" + height="1.0000000" + x="15.999986" + y="35.000000" + rx="0.13778631" + ry="0.065390877" /> + <rect + style="color:#000000;fill:#9b9b9b;fill-opacity:0.54970759;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:0.081871338;visibility:visible;display:block;overflow:visible" + id="rect15744" + width="14.000014" + height="1.0000000" + x="15.999986" + y="37.000000" + rx="0.096450485" + ry="0.065390877" /> + </g> + <path + style="opacity:0.28021976;fill:url(#linearGradient5872);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.25pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 28.245858,31.324906 L 21.147869,27.133701 L 14.30757,30.8838 L 13.761859,3.9475667 L 28.549598,3.9475667 L 28.245858,31.324906 z " + id="path5138" + sodipodi:nodetypes="cccccc" /> + <path + style="fill:url(#linearGradient2604);fill-opacity:1;fill-rule:evenodd;stroke:#364878;stroke-width:0.99999988;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;display:inline" + d="M 12.427339,3.5180202 C 12.427339,3.5180202 12.240033,0.60520607 15.107867,0.54270607 L 25.119343,0.50728624 C 26.277287,0.50728624 26.581888,1.1910178 26.581888,2.1095589 L 26.581888,29.729916 L 20.545426,24.533862 L 14.674346,29.729916 L 14.591655,3.519629 L 12.427339,3.5180202 z " + id="path2204" + sodipodi:nodetypes="ccccccccc" /> + <path + style="opacity:0.4450549;fill:url(#linearGradient4410);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.25pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 13.030252,3.0117919 C 13.011046,2.225362 13.312918,1.0801307 15.375418,1.0176307 L 25.027906,1 C 25.640922,1 26.090152,1.1674319 26.090152,1.7994802 L 26.060994,10.491851 L 15.317102,10.491851 L 15.192102,2.9993251 C 15.192102,2.9993251 13.030252,3.0117919 13.030252,3.0117919 z " + id="path3668" + sodipodi:nodetypes="cccccccs" /> + <rect + style="opacity:0.28021976;fill:url(#linearGradient5903);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect5895" + width="10.556392" + height="12.803556" + x="15.317101" + y="6.6907959" + rx="0.062003858" + ry="0.065390877" /> + <path + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient2596);stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.19125683;display:inline" + d="M 24.476832,2.2095507 L 25.575535,3.113139 L 25.547445,27.511911 L 20.497463,23.203758 L 15.704084,27.415203 L 15.699081,2.7495618 L 24.476832,2.2095507 z " + id="path5969" + sodipodi:nodetypes="ccccccc" /> + <path + style="opacity:0.48295456;color:#000000;fill:url(#linearGradient2912);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.10533953;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" + d="M 15.158602,3.9384083 L 15.114407,1.0335178 C 12.983906,1.0335178 12.993087,2.9680775 12.993087,3.9384083 L 15.158602,3.9384083 z " + id="path2894" + sodipodi:nodetypes="cccc" /> + <path + sodipodi:nodetypes="cccc" + id="path2904" + d="M 15.158602,3.9384086 L 15.114407,1.8247593 C 12.81631,1.8426926 12.993087,3.9384086 12.993087,3.9384086 L 15.158602,3.9384086 z " + style="opacity:0.35795455;color:#000000;fill:url(#linearGradient2902);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.10533953;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> + </g> +</svg>
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/content/web/images/check.svg @@ -0,0 +1,3 @@ +<svg height="40" width="40" xmlns="http://www.w3.org/2000/svg"> + <path d="M2.379,14.729 5.208,11.899 12.958,19.648 25.877,6.733 28.707,9.561 12.958,25.308z" fill="#333333"></path> +</svg>
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/content/web/images/comment.svg @@ -0,0 +1,3 @@ +<svg height="40" width="40" xmlns="http://www.w3.org/2000/svg"> + <path d="M16,5.333c-7.732,0-14,4.701-14,10.5c0,1.982,0.741,3.833,2.016,5.414L2,25.667l5.613-1.441c2.339,1.317,5.237,2.107,8.387,2.107c7.732,0,14-4.701,14-10.5C30,10.034,23.732,5.333,16,5.333z" fill="#333333"></path> +</svg>
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/content/web/images/document-print.svg @@ -0,0 +1,533 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + sodipodi:docname="document-print.svg" + sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions" + inkscape:version="0.46" + sodipodi:version="0.32" + id="svg2994" + height="48px" + width="48px" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + viewbox="0 0 48 48"> + <defs + id="defs3"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 24 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="48 : 24 : 1" + inkscape:persp3d-origin="24 : 16 : 1" + id="perspective84" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient5060" + id="radialGradient5031" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)" + cx="605.71429" + cy="486.64789" + fx="605.71429" + fy="486.64789" + r="117.14286" /> + <linearGradient + inkscape:collect="always" + id="linearGradient5060"> + <stop + style="stop-color:black;stop-opacity:1;" + offset="0" + id="stop5062" /> + <stop + style="stop-color:black;stop-opacity:0;" + offset="1" + id="stop5064" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient5060" + id="radialGradient5029" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)" + cx="605.71429" + cy="486.64789" + fx="605.71429" + fy="486.64789" + r="117.14286" /> + <linearGradient + id="linearGradient5048"> + <stop + style="stop-color:black;stop-opacity:0;" + offset="0" + id="stop5050" /> + <stop + id="stop5056" + offset="0.5" + style="stop-color:black;stop-opacity:1;" /> + <stop + style="stop-color:black;stop-opacity:0;" + offset="1" + id="stop5052" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient5048" + id="linearGradient5027" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)" + x1="302.85715" + y1="366.64789" + x2="302.85715" + y2="609.50507" /> + <linearGradient + inkscape:collect="always" + id="linearGradient7612"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop7614" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop7616" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient7612" + id="radialGradient7618" + cx="24.000000" + cy="41.875000" + fx="24.000000" + fy="41.875000" + r="19.125000" + gradientTransform="matrix(1.000000,0.000000,0.000000,0.333333,0.000000,27.91667)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + id="linearGradient4762"> + <stop + style="stop-color:#ffffff;stop-opacity:0.12371134;" + offset="0.0000000" + id="stop4764" /> + <stop + id="stop4768" + offset="0.10344828" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop4766" /> + </linearGradient> + <linearGradient + id="linearGradient4741"> + <stop + id="stop4743" + offset="0.0000000" + style="stop-color:#dcdcda;stop-opacity:1.0000000;" /> + <stop + id="stop4745" + offset="1.0000000" + style="stop-color:#bab9b7;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient4733"> + <stop + id="stop4735" + offset="0.0000000" + style="stop-color:#000000;stop-opacity:0.23711340;" /> + <stop + id="stop4737" + offset="1" + style="stop-color:#000000;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient4698"> + <stop + id="stop4700" + offset="0.0000000" + style="stop-color:#fffffd;stop-opacity:1.0000000;" /> + <stop + style="stop-color:#bbbbb9;stop-opacity:1.0000000;" + offset="0.50000000" + id="stop4706" /> + <stop + id="stop4702" + offset="1.0000000" + style="stop-color:#000000;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient4688"> + <stop + id="stop4690" + offset="0.0000000" + style="stop-color:#666666;stop-opacity:1.0000000;" /> + <stop + id="stop4692" + offset="1" + style="stop-color:#000000;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient4680" + inkscape:collect="always"> + <stop + id="stop4682" + offset="0" + style="stop-color:#f7f6f5;stop-opacity:1;" /> + <stop + id="stop4684" + offset="1" + style="stop-color:#f7f6f5;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient4668"> + <stop + id="stop4670" + offset="0" + style="stop-color:#8e8d87;stop-opacity:1;" /> + <stop + style="stop-color:#cbc9c1;stop-opacity:1.0000000;" + offset="0.27586207" + id="stop4676" /> + <stop + id="stop4672" + offset="1.0000000" + style="stop-color:#8e8d87;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient259"> + <stop + id="stop260" + offset="0.0000000" + style="stop-color:#e0e0e0;stop-opacity:1.0000000;" /> + <stop + style="stop-color:#ffffff;stop-opacity:1.0000000;" + offset="0.40546969" + id="stop4886" /> + <stop + style="stop-color:#cdcdcd;stop-opacity:1.0000000;" + offset="0.53448278" + id="stop4884" /> + <stop + id="stop261" + offset="1.0000000" + style="stop-color:#494949;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient15662"> + <stop + id="stop15664" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:0.0000000;" /> + <stop + id="stop15666" + offset="1.0000000" + style="stop-color:#f8f8f8;stop-opacity:1.0000000;" /> + </linearGradient> + <radialGradient + r="2.1227016" + fy="26.925594" + fx="9.1295490" + cy="26.925594" + cx="9.1295490" + gradientUnits="userSpaceOnUse" + id="radialGradient1433" + xlink:href="#linearGradient4698" + inkscape:collect="always" /> + <linearGradient + y2="72.064316" + x2="9.9128132" + y1="57.227650" + x1="9.8698082" + gradientTransform="matrix(2.772086,0.000000,0.000000,0.360739,0.618718,2.883883)" + gradientUnits="userSpaceOnUse" + id="linearGradient1447" + xlink:href="#linearGradient4733" + inkscape:collect="always" /> + <linearGradient + y2="54.136139" + x2="10.338233" + y1="64.652260" + x1="10.338233" + gradientTransform="matrix(2.369844,0.000000,0.000000,0.421969,0.000000,2.000000)" + gradientUnits="userSpaceOnUse" + id="linearGradient1451" + xlink:href="#linearGradient4680" + inkscape:collect="always" /> + <linearGradient + y2="62.282467" + x2="9.7052784" + y1="70.724976" + x1="9.7316532" + gradientTransform="matrix(2.369844,0.000000,0.000000,0.421969,0.000000,2.000000)" + gradientUnits="userSpaceOnUse" + id="linearGradient1453" + xlink:href="#linearGradient4688" + inkscape:collect="always" /> + <linearGradient + y2="19.337463" + x2="20.717800" + y1="25.140253" + x1="20.771229" + gradientTransform="matrix(1.198769,0,0,0.853565,-0.143086,2.034513)" + gradientUnits="userSpaceOnUse" + id="linearGradient1456" + xlink:href="#linearGradient15662" + inkscape:collect="always" /> + <linearGradient + y2="25.247311" + x2="24.789707" + y1="3.6785457" + x1="25.056711" + gradientTransform="matrix(0.944939,0,0,1.076147,6.844577e-2,4.093177)" + gradientUnits="userSpaceOnUse" + id="linearGradient1459" + xlink:href="#linearGradient259" + inkscape:collect="always" /> + <linearGradient + y2="58.831264" + x2="15.487823" + y1="32.539238" + x1="15.387969" + gradientTransform="matrix(1.490161,0,0,0.668741,8.895132e-2,2)" + gradientUnits="userSpaceOnUse" + id="linearGradient1464" + xlink:href="#linearGradient4762" + inkscape:collect="always" /> + <linearGradient + y2="88.294930" + x2="18.972126" + y1="88.294930" + x1="1.8456430" + gradientTransform="matrix(2.291824,0,0,0.434269,8.855179e-2,2)" + gradientUnits="userSpaceOnUse" + id="linearGradient1468" + xlink:href="#linearGradient4741" + inkscape:collect="always" /> + <linearGradient + y2="88.294933" + x2="18.972126" + y1="88.294933" + x1="1.8456431" + gradientTransform="matrix(2.30272,0,0,0.437918,0,0.584034)" + gradientUnits="userSpaceOnUse" + id="linearGradient1471" + xlink:href="#linearGradient4668" + inkscape:collect="always" /> + </defs> + <sodipodi:namedview + inkscape:window-y="160" + inkscape:window-x="331" + inkscape:window-height="688" + inkscape:window-width="872" + inkscape:guide-bbox="true" + showguides="true" + inkscape:document-units="px" + inkscape:grid-bbox="true" + showgrid="false" + inkscape:current-layer="layer1" + inkscape:cy="-18.264187" + inkscape:cx="-72.591911" + inkscape:zoom="1" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + borderopacity="0.090196078" + bordercolor="#666666" + pagecolor="#ffffff" + id="base" + inkscape:showpageshadow="false" + fill="#729fcf" /> + <metadata + id="metadata4"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title>Print Document</dc:title> + <dc:creator> + <cc:Agent> + <dc:title>Jakub Steiner</dc:title> + </cc:Agent> + </dc:creator> + <cc:license + rdf:resource="http://creativecommons.org/licenses/publicdomain/" /> + <dc:source>http://jimmac.musichall.cz</dc:source> + <dc:subject> + <rdf:Bag> + <rdf:li>document</rdf:li> + <rdf:li>lpr</rdf:li> + <rdf:li>print</rdf:li> + <rdf:li>local</rdf:li> + <rdf:li>laser</rdf:li> + <rdf:li>bubblejet</rdf:li> + <rdf:li>inkjet</rdf:li> + <rdf:li>print</rdf:li> + <rdf:li>output</rdf:li> + <rdf:li>cups</rdf:li> + <rdf:li>lpd</rdf:li> + </rdf:Bag> + </dc:subject> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/publicdomain/"> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Reproduction" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Distribution" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + inkscape:groupmode="layer" + inkscape:label="Layer 1" + id="layer1"> + <g + style="display:inline" + id="g5022" + transform="matrix(2.411405e-2,0,0,1.929202e-2,45.48953,39.75228)"> + <rect + y="-150.69685" + x="-1559.2523" + height="478.35718" + width="1339.6335" + id="rect4173" + style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> + <path + sodipodi:nodetypes="cccc" + id="path5058" + d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z " + style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> + <path + style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" + d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z " + id="path5018" + sodipodi:nodetypes="cccc" /> + </g> + <rect + ry="1.7115477" + rx="1.7115483" + y="36.004189" + x="4.75" + height="6.4915943" + width="38.4375" + id="rect4652" + style="fill:url(#linearGradient1471);fill-opacity:1;stroke:#595959;stroke-width:0.99999982;stroke-miterlimit:4;stroke-opacity:1" /> + <path + sodipodi:nodetypes="cssssssssssss" + id="rect4609" + d="M 7.1308961,21.5 L 40.870615,21.5 C 41.255661,21.5 41.747648,21.788155 42.051049,22.223919 C 42.354451,22.659684 43.787518,24.83394 44.109448,25.297964 C 44.431378,25.761987 44.502397,26.201852 44.502397,26.774049 L 44.502397,38.850951 C 44.502397,39.764524 43.770402,40.5 42.861152,40.5 L 5.1403596,40.5 C 4.2311094,40.5 3.4991138,39.764524 3.4991138,38.850951 L 3.4991138,26.774049 C 3.4991138,26.280031 3.6002798,25.571641 3.9455202,25.120718 C 4.3811666,24.551713 5.5498664,22.57277 5.8581276,22.153118 C 6.1663887,21.733467 6.7324461,21.5 7.1308961,21.5 z " + style="color:#000000;fill:url(#linearGradient1468);fill-opacity:1;fill-rule:nonzero;stroke:#676767;stroke-width:1.00000036;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> + <path + sodipodi:nodetypes="cssssssss" + id="path4718" + d="M 7.705278,21.975532 C 7.20729,21.975532 6.5669691,22.107308 6.3043987,22.511224 L 4.4657443,25.339651 C 4.169761,25.794966 4.4993705,26.868141 5.3900051,26.868141 L 42.678553,26.868141 C 43.883282,26.868141 43.8868,25.858073 43.602814,25.428039 L 41.851714,22.776389 C 41.534204,22.295589 41.418956,21.975532 40.625945,21.975532 L 7.705278,21.975532 z " + style="fill:#fbfbfb;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient1464);stroke-width:0.94696701;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" + d="M 7.6002951,22.445756 L 40.374658,22.445756 C 40.739745,22.445756 41.206233,22.718629 41.493909,23.131283 C 41.781585,23.543938 42.788049,25.160945 43.093293,25.60036 C 43.398536,26.039775 43.528159,26.456312 43.528159,26.998164 L 43.528159,38.279261 C 43.528159,39.144385 43.394653,39.528356 42.532529,39.528356 L 5.530506,39.528356 C 4.6683828,39.528356 4.472593,39.144385 4.472593,38.279261 L 4.472593,26.998164 C 4.472593,26.530345 4.6930819,25.859523 5.0204282,25.432514 C 5.4334949,24.893685 6.1012112,23.461633 6.393495,23.064237 C 6.6857789,22.666841 7.222497,22.445756 7.6002951,22.445756 z " + id="path4750" + sodipodi:nodetypes="cssssssssssss" /> + <path + sodipodi:nodetypes="ccccccc" + id="rect15391" + d="M 11.68177,4.4977642 L 36.313839,4.4977642 C 36.964072,4.4977642 37.487546,5.007949 37.487546,5.6416762 L 37.487546,24.348117 L 10.508063,24.348117 L 10.508063,5.6416762 C 10.508063,5.007949 11.031536,4.4977642 11.68177,4.4977642 z " + style="color:#000000;fill:url(#linearGradient1459);fill-opacity:1;fill-rule:nonzero;stroke:#898989;stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" /> + <rect + style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient1456);stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" + id="rect15660" + width="25.000576" + height="18.836374" + x="11.498513" + y="5.4992466" + ry="0.17677675" + rx="0.17677672" /> + <rect + ry="1.7115483" + rx="1.7115483" + y="27.375000" + x="6.8750000" + height="5.1875000" + width="33.750000" + id="rect4678" + style="fill:url(#linearGradient1451);fill-opacity:1.0000000;stroke:url(#linearGradient1453);stroke-width:1.0000000;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" /> + <path + transform="translate(0.000000,2.000000)" + d="M 10.871767 27.626486 A 1.2816310 1.2816310 0 1 1 8.3085046,27.626486 A 1.2816310 1.2816310 0 1 1 10.871767 27.626486 z" + sodipodi:ry="1.2816310" + sodipodi:rx="1.2816310" + sodipodi:cy="27.626486" + sodipodi:cx="9.5901356" + id="path4696" + style="fill:url(#radialGradient1433);fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" + sodipodi:type="arc" /> + <path + sodipodi:nodetypes="csscssssc" + id="path4731" + d="M 11.743718,25.416053 L 37.306218,25.478553 C 37.993716,25.480234 38.294038,25.107558 38.243718,24.478553 L 38.118718,22.916053 L 39.984835,22.916053 C 40.797335,22.916053 40.975035,23.108616 41.172335,23.478553 L 41.672335,24.416053 C 42.199130,25.403793 43.483508,26.390165 42.170495,26.390165 C 37.667784,26.390165 13.993718,26.041053 11.743718,25.416053 z " + style="fill:url(#linearGradient1447);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;opacity:0.36571429" /> + <path + style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" + d="M 42.9375,26.5 L 4.8125,26.5" + id="path4760" + sodipodi:nodetypes="cc" /> + <g + transform="translate(0.000000,2.000000)" + style="opacity:0.43575415" + id="g4849"> + <rect + style="color:#000000;fill:#000000;fill-opacity:0.29239765;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" + id="rect4831" + width="19.000000" + height="1.0000000" + x="14.000000" + y="5.0000000" /> + <rect + y="7.0000000" + x="14.000000" + height="1.0000000" + width="19.000000" + id="rect4833" + style="color:#000000;fill:#000000;fill-opacity:0.29239765;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" /> + <rect + style="color:#000000;fill:#000000;fill-opacity:0.29239765;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" + id="rect4835" + width="19.000000" + height="1.0000000" + x="14.000000" + y="9.0000000" /> + <rect + y="11.000000" + x="14.000000" + height="1.0000000" + width="19.000000" + id="rect4837" + style="color:#000000;fill:#000000;fill-opacity:0.29239765;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" /> + <rect + style="color:#000000;fill:#000000;fill-opacity:0.29239765;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" + id="rect4839" + width="11.000000" + height="1.0000000" + x="14.000000" + y="13.000000" /> + </g> + </g> + <g + inkscape:groupmode="layer" + id="layer2" + inkscape:label="arrow"> + <path + sodipodi:nodetypes="cccccccc" + id="path8643" + d="M 21.02159,20.989431 L 27.989391,20.989431 L 27.989391,16.064984 L 31,16.064984 L 24.553756,8 L 17.435622,15.986875 L 21.023684,15.986875 L 21.02159,20.989431 z " + style="opacity:1;color:#000000;fill:#a7a7a7;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.99999958;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> + </g> +</svg>
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/content/web/images/download.svg @@ -0,0 +1,620 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + sodipodi:docname="document-save.svg" + sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions" + inkscape:version="0.46" + sodipodi:version="0.32" + id="svg2913" + height="48px" + width="48px" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + viewbox="0 0 48 48"> + <defs + id="defs3"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 24 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="48 : 24 : 1" + inkscape:persp3d-origin="24 : 16 : 1" + id="perspective104" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient5060" + id="radialGradient5031" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)" + cx="605.71429" + cy="486.64789" + fx="605.71429" + fy="486.64789" + r="117.14286" /> + <linearGradient + inkscape:collect="always" + id="linearGradient5060"> + <stop + style="stop-color:black;stop-opacity:1;" + offset="0" + id="stop5062" /> + <stop + style="stop-color:black;stop-opacity:0;" + offset="1" + id="stop5064" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient5060" + id="radialGradient5029" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)" + cx="605.71429" + cy="486.64789" + fx="605.71429" + fy="486.64789" + r="117.14286" /> + <linearGradient + id="linearGradient5048"> + <stop + style="stop-color:black;stop-opacity:0;" + offset="0" + id="stop5050" /> + <stop + id="stop5056" + offset="0.5" + style="stop-color:black;stop-opacity:1;" /> + <stop + style="stop-color:black;stop-opacity:0;" + offset="1" + id="stop5052" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient5048" + id="linearGradient5027" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)" + x1="302.85715" + y1="366.64789" + x2="302.85715" + y2="609.50507" /> + <linearGradient + inkscape:collect="always" + id="linearGradient6925"> + <stop + style="stop-color:#204a87;stop-opacity:1;" + offset="0" + id="stop6927" /> + <stop + style="stop-color:#204a87;stop-opacity:0;" + offset="1" + id="stop6929" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient6901"> + <stop + style="stop-color:#3465a4;stop-opacity:1;" + offset="0" + id="stop6903" /> + <stop + style="stop-color:#3465a4;stop-opacity:0;" + offset="1" + id="stop6905" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient4991"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop4993" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop4995" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4991" + id="radialGradient4997" + cx="23.447077" + cy="6.4576745" + fx="23.447077" + fy="6.4576745" + r="19.0625" + gradientTransform="matrix(-1.314471,-1.006312e-2,-1.022964e-2,1.336221,46.22108,-4.909887)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + id="linearGradient2187" + inkscape:collect="always"> + <stop + id="stop2189" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop2191" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2187" + id="linearGradient1764" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.914114,1.412791e-16,-1.412791e-16,0.914114,-3.868698,-2.706902)" + x1="33.059906" + y1="27.394117" + x2="12.624337" + y2="12.583769" /> + <linearGradient + inkscape:collect="always" + id="linearGradient8662"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop8664" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop8666" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient8662" + id="radialGradient8668" + cx="24.837126" + cy="36.421127" + fx="24.837126" + fy="36.421127" + r="15.644737" + gradientTransform="matrix(1.000000,-7.816467e-32,-1.132409e-32,0.536723,-5.897962e-14,16.87306)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + id="linearGradient2555"> + <stop + id="stop2557" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + style="stop-color:#e6e6e6;stop-opacity:1.0000000;" + offset="0.50000000" + id="stop2561" /> + <stop + id="stop2563" + offset="0.75000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + style="stop-color:#e1e1e1;stop-opacity:1.0000000;" + offset="0.84166664" + id="stop2565" /> + <stop + id="stop2559" + offset="1.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient4274"> + <stop + style="stop-color:#ffffff;stop-opacity:0.25490198;" + offset="0.0000000" + id="stop4276" /> + <stop + style="stop-color:#ffffff;stop-opacity:1.0000000;" + offset="1.0000000" + id="stop4278" /> + </linearGradient> + <linearGradient + id="linearGradient4264" + inkscape:collect="always"> + <stop + id="stop4266" + offset="0" + style="stop-color:#000000;stop-opacity:1;" /> + <stop + id="stop4268" + offset="1" + style="stop-color:#000000;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient4254" + inkscape:collect="always"> + <stop + id="stop4256" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop4258" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient4244"> + <stop + id="stop4246" + offset="0.0000000" + style="stop-color:#e4e4e4;stop-opacity:1.0000000;" /> + <stop + id="stop4248" + offset="1.0000000" + style="stop-color:#d3d3d3;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient4236" + inkscape:collect="always"> + <stop + id="stop4238" + offset="0" + style="stop-color:#eeeeee;stop-opacity:1;" /> + <stop + id="stop4240" + offset="1" + style="stop-color:#eeeeee;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient4228"> + <stop + id="stop4230" + offset="0.0000000" + style="stop-color:#bbbbbb;stop-opacity:1.0000000;" /> + <stop + id="stop4232" + offset="1.0000000" + style="stop-color:#9f9f9f;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient4184"> + <stop + id="stop4186" + offset="0.0000000" + style="stop-color:#838383;stop-opacity:1.0000000;" /> + <stop + id="stop4188" + offset="1.0000000" + style="stop-color:#bbbbbb;stop-opacity:0.0000000;" /> + </linearGradient> + <linearGradient + gradientTransform="translate(0.795493,3.799180)" + y2="35.281250" + x2="24.687500" + y1="35.281250" + x1="7.0625000" + gradientUnits="userSpaceOnUse" + id="linearGradient4209" + xlink:href="#linearGradient4184" + inkscape:collect="always" /> + <linearGradient + gradientUnits="userSpaceOnUse" + y2="40.943935" + x2="36.183067" + y1="28.481176" + x1="7.6046205" + id="linearGradient4234" + xlink:href="#linearGradient4228" + inkscape:collect="always" + gradientTransform="translate(0.000000,5.125000)" /> + <linearGradient + gradientUnits="userSpaceOnUse" + y2="33.758667" + x2="12.221823" + y1="37.205811" + x1="12.277412" + id="linearGradient4242" + xlink:href="#linearGradient4236" + inkscape:collect="always" + gradientTransform="translate(0.000000,5.125000)" /> + <radialGradient + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.286242,0.781698,-0.710782,1.169552,-2.354348,0.248140)" + r="20.935817" + fy="2.9585190" + fx="15.571491" + cy="2.9585190" + cx="15.571491" + id="radialGradient4250" + xlink:href="#linearGradient4244" + inkscape:collect="always" /> + <linearGradient + gradientUnits="userSpaceOnUse" + y2="47.620636" + x2="44.096100" + y1="4.4331360" + x1="12.378357" + id="linearGradient4260" + xlink:href="#linearGradient4254" + inkscape:collect="always" + gradientTransform="translate(0.000000,5.125000)" /> + <radialGradient + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.000000,0.000000,0.000000,0.651032,-2.885063e-16,9.455693)" + r="23.555494" + fy="27.096155" + fx="23.201941" + cy="27.096155" + cx="23.201941" + id="radialGradient4270" + xlink:href="#linearGradient4264" + inkscape:collect="always" /> + <linearGradient + gradientUnits="userSpaceOnUse" + y2="26.357183" + x2="23.688078" + y1="11.318835" + x1="23.688078" + id="linearGradient4272" + xlink:href="#linearGradient4274" + inkscape:collect="always" + gradientTransform="translate(0.000000,5.125000)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2555" + id="linearGradient2553" + x1="33.431175" + y1="31.964777" + x2="21.747974" + y2="11.780679" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6901" + id="linearGradient6907" + x1="14.751649" + y1="15.868432" + x2="8.8953285" + y2="16.743431" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6925" + id="linearGradient6931" + x1="12.25" + y1="18.25" + x2="7" + y2="21.118431" + gradientUnits="userSpaceOnUse" /> + </defs> + <sodipodi:namedview + inkscape:window-y="30" + inkscape:window-x="0" + inkscape:window-height="818" + inkscape:window-width="999" + inkscape:document-units="px" + inkscape:grid-bbox="true" + showgrid="false" + inkscape:current-layer="layer2" + inkscape:cy="11.891468" + inkscape:cx="-133.68151" + inkscape:zoom="1" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + borderopacity="0.22745098" + bordercolor="#666666" + pagecolor="#ffffff" + id="base" + inkscape:showpageshadow="false" + fill="#3465a4" + stroke="#204a87" /> + <metadata + id="metadata4"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title>Save</dc:title> + <dc:creator> + <cc:Agent> + <dc:title>Jakub Steiner</dc:title> + </cc:Agent> + </dc:creator> + <dc:subject> + <rdf:Bag> + <rdf:li>hdd</rdf:li> + <rdf:li>hard drive</rdf:li> + <rdf:li>save</rdf:li> + <rdf:li>io</rdf:li> + <rdf:li>store</rdf:li> + </rdf:Bag> + </dc:subject> + <cc:license + rdf:resource="http://creativecommons.org/licenses/publicdomain/" /> + <dc:identifier /> + <dc:source>http://jimmac.musichall.cz</dc:source> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/publicdomain/"> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Reproduction" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Distribution" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + inkscape:label="pix" + id="layer2" + inkscape:groupmode="layer"> + <g + style="display:inline" + id="g5022" + transform="matrix(2.411405e-2,0,0,1.929202e-2,45.48953,41.75228)"> + <rect + y="-150.69685" + x="-1559.2523" + height="478.35718" + width="1339.6335" + id="rect4173" + style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> + <path + sodipodi:nodetypes="cccc" + id="path5058" + d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z " + style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> + <path + style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" + d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z " + id="path5018" + sodipodi:nodetypes="cccc" /> + </g> + <path + sodipodi:nodetypes="cccsccccccccc" + id="path4196" + d="M 11.28569,13.087628 C 10.66069,13.087628 10.254441,13.377808 10.004442,13.931381 C 10.004441,13.931381 3.5356915,31.034938 3.5356915,31.034938 C 3.5356915,31.034938 3.2856915,31.706497 3.2856915,32.816188 C 3.2856915,32.816188 3.2856915,42.466156 3.2856915,42.466156 C 3.2856915,43.548769 3.943477,44.091158 4.9419415,44.091156 L 43.50444,44.091156 C 44.489293,44.091156 45.09819,43.372976 45.09819,42.247406 L 45.09819,32.597438 C 45.09819,32.597438 45.204153,31.827015 45.00444,31.284938 L 38.28569,14.087631 C 38.101165,13.575725 37.648785,13.099533 37.16069,13.087628 L 11.28569,13.087628 z " + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#535353;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <path + sodipodi:nodetypes="ccccccccc" + id="path4170" + d="M 3.2735915,32.121812 L 4.0381936,31.429597 L 41.647883,31.492097 L 45.11029,31.809395 L 45.11029,42.247927 C 45.11029,43.373496 44.503272,44.091258 43.518419,44.091258 L 4.9354314,44.091258 C 3.9369667,44.091258 3.2735915,43.549207 3.2735915,42.466594 L 3.2735915,32.121812 z " + style="fill:url(#linearGradient4234);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.02044296px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + sodipodi:nodetypes="csccccccs" + id="path3093" + d="M 3.5490842,31.039404 C 2.8347985,32.50369 3.5484686,33.432261 4.5847985,33.432261 C 4.5847985,33.432261 43.584797,33.432261 43.584797,33.432261 C 44.703844,33.408451 45.430035,32.420356 45.013368,31.289403 L 38.299082,14.078704 C 38.114558,13.566798 37.64432,13.090606 37.156225,13.078701 L 11.299083,13.078701 C 10.674083,13.078701 10.263369,13.382274 10.01337,13.935847 C 10.01337,13.935847 3.5490842,31.039404 3.5490842,31.039404 z " + style="fill:url(#radialGradient4250);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <rect + y="36.299183" + x="7.857996" + height="5.5625" + width="17.625" + id="rect4174" + style="opacity:1;color:#000000;fill:url(#linearGradient4209);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.40899992;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> + <path + sodipodi:nodetypes="cscc" + id="path4194" + d="M 7.8579947,41.86168 C 7.8579947,41.86168 7.8579947,37.850195 7.8579947,37.850195 C 9.6935221,41.029421 16.154485,41.86168 20.795492,41.86168 C 20.795492,41.86168 7.8579947,41.86168 7.8579947,41.86168 z " + style="opacity:0.81142853;fill:url(#linearGradient4242);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + sodipodi:nodetypes="cccccccc" + id="path4201" + d="M 44.796162,30.753688 C 44.859684,32.003662 44.382159,33.069528 43.474046,33.097438 C 43.474046,33.097438 5.3553296,33.097437 5.3553297,33.097438 C 4.0660978,33.097438 3.4875937,32.772491 3.271279,32.229382 C 3.3630404,33.173714 4.0970964,33.878688 5.3553297,33.878688 C 5.3553296,33.878687 43.474046,33.878688 43.474046,33.878688 C 44.550053,33.845617 45.226851,32.454664 44.82621,30.883897 L 44.796162,30.753688 z " + style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + id="path4211" + d="M 10.96875,15.28125 C 10.922675,15.481571 10.78125,15.668047 10.78125,15.875 C 10.78125,16.823605 11.37223,17.664474 12.125,18.46875 C 12.365268,18.314675 12.490117,18.114342 12.75,17.96875 C 11.809691,17.152746 11.196604,16.252168 10.96875,15.28125 z M 37.625,15.28125 C 37.396273,16.250866 36.782988,17.153676 35.84375,17.96875 C 36.117894,18.122332 36.247738,18.33699 36.5,18.5 C 37.257262,17.693344 37.8125,16.826956 37.8125,15.875 C 37.8125,15.668047 37.670906,15.481571 37.625,15.28125 z M 39.8125,23.71875 C 39.198709,27.758861 32.513887,30.96875 24.28125,30.96875 C 16.068996,30.968751 9.4211001,27.775964 8.78125,23.75 C 8.7488928,23.947132 8.65625,24.141882 8.65625,24.34375 C 8.6562503,28.661697 15.645354,32.187501 24.28125,32.1875 C 32.917146,32.1875 39.937499,28.661698 39.9375,24.34375 C 39.9375,24.130826 39.848449,23.926394 39.8125,23.71875 z " + style="opacity:0.69142857;color:#000000;fill:url(#linearGradient4272);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> + <path + transform="translate(8.838843e-2,5.301780)" + d="M 8.5736699 25.593554 A 1.3700194 1.016466 0 1 1 5.833631,25.593554 A 1.3700194 1.016466 0 1 1 8.5736699 25.593554 z" + sodipodi:ry="1.016466" + sodipodi:rx="1.3700194" + sodipodi:cy="25.593554" + sodipodi:cx="7.2036505" + id="path4224" + style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:0.45762706;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" + sodipodi:type="arc" /> + <path + sodipodi:type="arc" + style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:0.45762706;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" + id="path4226" + sodipodi:cx="7.2036505" + sodipodi:cy="25.593554" + sodipodi:rx="1.3700194" + sodipodi:ry="1.016466" + d="M 8.5736699 25.593554 A 1.3700194 1.016466 0 1 1 5.833631,25.593554 A 1.3700194 1.016466 0 1 1 8.5736699 25.593554 z" + transform="translate(33.96705,5.213390)" /> + <path + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4260);stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 11.642515,13.540723 C 11.040823,13.540723 10.649724,13.820081 10.409049,14.35301 C 10.409048,14.35301 3.9940341,30.943732 3.9940341,30.943732 C 3.9940341,30.943732 3.7533573,31.590247 3.7533573,32.658555 C 3.7533573,32.658555 3.7533573,41.948651 3.7533573,41.948651 C 3.7533573,43.303391 4.1974134,43.57555 5.3478414,43.57555 L 43.034746,43.57555 C 44.357872,43.57555 44.569062,43.259153 44.569062,41.738058 L 44.569062,32.447962 C 44.569062,32.447962 44.671072,31.706271 44.478807,31.184409 L 37.885616,14.378434 C 37.707973,13.885617 37.334964,13.552184 36.865071,13.540723 L 11.642515,13.540723 z " + id="path4252" + sodipodi:nodetypes="cccsccccccccc" /> + <path + style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885" + d="M 40.5,36.554166 L 40.5,41.575101" + id="path4282" /> + <path + id="path4284" + d="M 38.5,36.613943 L 38.5,41.634878" + style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885" /> + <path + style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885" + d="M 36.5,36.613943 L 36.5,41.634878" + id="path4286" /> + <path + id="path4288" + d="M 34.5,36.613943 L 34.5,41.634878" + style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885" /> + <path + style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885" + d="M 32.5,36.613943 L 32.5,41.634878" + id="path4290" /> + <path + id="path4292" + d="M 30.5,36.613943 L 30.5,41.634878" + style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:0.42372885" /> + <path + id="path4294" + d="M 39.5,36.604065 L 39.5,41.625" + style="opacity:0.09714284;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1" /> + <path + style="opacity:0.09714284;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1" + d="M 37.5,36.663842 L 37.5,41.684777" + id="path4296" /> + <path + id="path4298" + d="M 35.5,36.663842 L 35.5,41.684777" + style="opacity:0.09714284;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1" /> + <path + style="opacity:0.09714284;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1" + d="M 33.5,36.663842 L 33.5,41.684777" + id="path4300" /> + <path + id="path4302" + d="M 31.5,36.663842 L 31.5,41.684777" + style="opacity:0.09714284;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000048px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1" /> + <path + id="path4572" + d="M 7.875,36.3125 L 7.875,41.84375 L 20.4375,41.84375 L 8.21875,41.5 L 7.875,36.3125 z " + style="opacity:0.43999999;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + sodipodi:type="arc" + style="opacity:0.20571427;color:#000000;fill:url(#linearGradient2553);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.93365198;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.42372879;visibility:visible;display:inline;overflow:visible" + id="path2545" + sodipodi:cx="25" + sodipodi:cy="19.5625" + sodipodi:rx="14.875" + sodipodi:ry="6.6875" + d="M 39.875 19.5625 A 14.875 6.6875 0 1 1 10.125,19.5625 A 14.875 6.6875 0 1 1 39.875 19.5625 z" + transform="matrix(1.037815,0.000000,0.000000,1.060747,-1.632878,3.030370)" /> + </g> + <g + inkscape:groupmode="layer" + id="layer1" + inkscape:label="down"> + <path + transform="matrix(1.130190,1.178179e-16,7.918544e-17,-0.759601,-3.909725,53.66554)" + d="M 40.481863 36.421127 A 15.644737 8.3968935 0 1 1 9.1923885,36.421127 A 15.644737 8.3968935 0 1 1 40.481863 36.421127 z" + sodipodi:ry="8.3968935" + sodipodi:rx="15.644737" + sodipodi:cy="36.421127" + sodipodi:cx="24.837126" + id="path8660" + style="opacity:0.14117647;color:#000000;fill:url(#radialGradient8668);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" + sodipodi:type="arc" /> + <path + style="opacity:1;color:#000000;fill:url(#linearGradient6907);fill-opacity:1.0;fill-rule:nonzero;stroke:url(#linearGradient6931);stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" + d="M 3.2034501,25.835194 C 2.1729477,-5.3853369 28.741616,-0.4511153 28.582416,15.788689 L 35.89533,15.788689 L 24.517652,28.774671 L 12.585426,15.788689 C 12.585426,15.788689 20.126859,15.788689 20.126859,15.788689 C 20.583921,4.8193225 3.4092324,1.6100346 3.2034501,25.835194 z " + id="path1432" + sodipodi:nodetypes="ccccccc" /> + <path + sodipodi:nodetypes="ccccccc" + id="path2177" + d="M 7.6642103,9.1041047 C 12.40638,-0.0400306 28.122336,2.7175443 27.761604,16.579393 L 34.078976,16.579393 C 34.078976,16.579393 24.513151,27.536769 24.513151,27.536769 L 14.41668,16.579393 C 14.41668,16.579393 20.87332,16.579393 20.87332,16.579393 C 21.144975,5.0041615 10.922265,5.5345215 7.6642103,9.1041047 z " + style="opacity:0.47159091;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient1764);stroke-width:0.99999934;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" /> + <path + style="opacity:0.49431817;color:#000000;fill:url(#radialGradient4997);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" + d="M 34.767155,16.211613 L 32.782979,18.757322 C 27.372947,17.241029 24.896829,21.486664 17.109284,20.489112 L 13.247998,16.080077 L 20.434468,16.162862 C 20.483219,4.3164571 8.3443098,4.998966 5.0292663,13.627829 C 8.8372201,-1.2611216 27.893316,0.8064118 28.28332,16.114112 L 34.767155,16.211613 z " + id="path4989" + sodipodi:nodetypes="cccccccc" /> + </g> +</svg>
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/content/web/images/go-down.svg @@ -0,0 +1,201 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + sodipodi:docname="go-down.svg" + sodipodi:docbase="/home/tigert/cvs/freedesktop.org/tango-icon-theme/scalable/actions" + inkscape:version="0.46" + sodipodi:version="0.32" + id="svg11300" + height="48px" + width="48px" + inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png" + inkscape:export-xdpi="90.000000" + inkscape:export-ydpi="90.000000" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + viewbox="0 0 48 48"> + <defs + id="defs3"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 24 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="48 : 24 : 1" + inkscape:persp3d-origin="24 : 16 : 1" + id="perspective24" /> + <linearGradient + id="linearGradient1442"> + <stop + id="stop1444" + offset="0" + style="stop-color:#73d216" /> + <stop + id="stop1446" + offset="1.0000000" + style="stop-color:#4e9a06" /> + </linearGradient> + <linearGradient + id="linearGradient8662" + inkscape:collect="always"> + <stop + id="stop8664" + offset="0" + style="stop-color:#000000;stop-opacity:1;" /> + <stop + id="stop8666" + offset="1" + style="stop-color:#000000;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient8650" + inkscape:collect="always"> + <stop + id="stop8652" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop8654" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient8662" + id="radialGradient1444" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.000000,0.000000,0.000000,0.536723,1.614716e-15,16.87306)" + cx="24.837126" + cy="36.421127" + fx="24.837126" + fy="36.421127" + r="15.644737" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient1442" + id="radialGradient1469" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.871885e-16,-0.843022,1.020168,2.265228e-16,0.606436,42.58614)" + cx="35.292667" + cy="20.494493" + fx="35.292667" + fy="20.494493" + r="16.956199" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient8650" + id="radialGradient1471" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(3.749427e-16,-2.046729,-1.557610,-2.853404e-16,44.11559,66.93275)" + cx="15.987216" + cy="1.5350308" + fx="15.987216" + fy="1.5350308" + r="17.171415" /> + </defs> + <sodipodi:namedview + inkscape:window-y="30" + inkscape:window-x="0" + inkscape:window-height="818" + inkscape:window-width="1280" + inkscape:showpageshadow="false" + inkscape:document-units="px" + inkscape:grid-bbox="true" + showgrid="false" + inkscape:current-layer="layer1" + inkscape:cy="23.239067" + inkscape:cx="15.972815" + inkscape:zoom="11.313708" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + borderopacity="0.25490196" + bordercolor="#666666" + pagecolor="#ffffff" + id="base" + fill="#4e9a06" + stroke="#4e9a06" /> + <metadata + id="metadata4"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:creator> + <cc:Agent> + <dc:title>Jakub Steiner</dc:title> + </cc:Agent> + </dc:creator> + <dc:source>http://jimmac.musichall.cz</dc:source> + <cc:license + rdf:resource="http://creativecommons.org/licenses/publicdomain/" /> + <dc:title>Go Down</dc:title> + <dc:subject> + <rdf:Bag> + <rdf:li>go</rdf:li> + <rdf:li>lower</rdf:li> + <rdf:li>down</rdf:li> + <rdf:li>arrow</rdf:li> + <rdf:li>pointer</rdf:li> + <rdf:li>></rdf:li> + </rdf:Bag> + </dc:subject> + <dc:contributor> + <cc:Agent> + <dc:title>Andreas Nilsson</dc:title> + </cc:Agent> + </dc:contributor> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/publicdomain/"> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Reproduction" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Distribution" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + inkscape:groupmode="layer" + inkscape:label="Layer 1" + id="layer1"> + <path + transform="matrix(1.214466,0.000000,0.000000,0.595458,-6.163846,16.31275)" + d="M 40.481863 36.421127 A 15.644737 8.3968935 0 1 1 9.1923885,36.421127 A 15.644737 8.3968935 0 1 1 40.481863 36.421127 z" + sodipodi:ry="8.3968935" + sodipodi:rx="15.644737" + sodipodi:cy="36.421127" + sodipodi:cx="24.837126" + id="path8660" + style="opacity:0.20454545;color:#000000;fill:url(#radialGradient1444);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" + sodipodi:type="arc" /> + <g + id="g1464" + transform="matrix(-1.000000,0.000000,0.000000,-1.000000,47.02856,43.99921)"> + <path + style="opacity:1.0000000;color:#000000;fill:url(#radialGradient1469);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#3a7304;stroke-width:1.0000004;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" + d="M 14.519136,38.500000 L 32.524165,38.496094 L 32.524165,25.504468 L 40.519531,25.496656 L 23.374809,5.4992135 L 6.5285585,25.497284 L 14.524440,25.501074 L 14.519136,38.500000 z " + id="path8643" + sodipodi:nodetypes="cccccccc" /> + <path + style="opacity:0.50802141;color:#000000;fill:url(#radialGradient1471);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" + d="M 39.429889,24.993467 L 32.023498,25.005186 L 32.026179,37.998023 L 16.647623,37.98887 C 17.417545,19.64788 27.370272,26.995797 32.029282,16.341991 L 39.429889,24.993467 z " + id="path8645" + sodipodi:nodetypes="cccccc" /> + <path + sodipodi:nodetypes="cccccccc" + id="path8658" + d="M 15.520704,37.496094 L 31.522109,37.500000 L 31.522109,24.507050 L 38.338920,24.491425 L 23.384644,7.0388396 L 8.6781173,24.495782 L 15.518018,24.501029 L 15.520704,37.496094 z " + style="opacity:0.48128340;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000004;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" /> + </g> + </g> +</svg>
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/content/web/images/go-up.svg @@ -0,0 +1,197 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + sodipodi:docname="go-up.svg" + sodipodi:docbase="/home/tigert/cvs/freedesktop.org/tango-icon-theme/scalable/actions" + inkscape:version="0.46" + sodipodi:version="0.32" + id="svg11300" + height="48px" + width="48px" + inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png" + inkscape:export-xdpi="90.000000" + inkscape:export-ydpi="90.000000" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + viewbox="0 0 48 48"> + <defs + id="defs3"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 24 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="48 : 24 : 1" + inkscape:persp3d-origin="24 : 16 : 1" + id="perspective23" /> + <linearGradient + id="linearGradient2304"> + <stop + id="stop2306" + offset="0" + style="stop-color:#73d216" /> + <stop + id="stop2308" + offset="1.0000000" + style="stop-color:#4e9a06" /> + </linearGradient> + <linearGradient + id="linearGradient8662" + inkscape:collect="always"> + <stop + id="stop8664" + offset="0" + style="stop-color:#000000;stop-opacity:1;" /> + <stop + id="stop8666" + offset="1" + style="stop-color:#000000;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient8650" + inkscape:collect="always"> + <stop + id="stop8652" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop8654" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient8650" + id="radialGradient1438" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-3.749427e-16,-2.046729,1.557610,-2.853404e-16,2.767009,66.93275)" + cx="24.53788" + cy="0.40010813" + fx="24.53788" + fy="0.40010813" + r="17.171415" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient2304" + id="radialGradient1441" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.871885e-16,-0.843022,1.020168,2.265228e-16,0.606436,42.58614)" + cx="11.319205" + cy="22.454971" + fx="11.319205" + fy="22.454971" + r="16.956199" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient8662" + id="radialGradient1444" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.000000,0.000000,0.000000,0.536723,1.614716e-15,16.87306)" + cx="24.837126" + cy="36.421127" + fx="24.837126" + fy="36.421127" + r="15.644737" /> + </defs> + <sodipodi:namedview + inkscape:window-y="30" + inkscape:window-x="0" + inkscape:window-height="818" + inkscape:window-width="1280" + inkscape:showpageshadow="false" + inkscape:document-units="px" + inkscape:grid-bbox="true" + showgrid="false" + inkscape:current-layer="layer1" + inkscape:cy="25.620377" + inkscape:cx="9.6380363" + inkscape:zoom="13.059378" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + borderopacity="0.25490196" + bordercolor="#666666" + pagecolor="#ffffff" + id="base" + fill="#73d216" + stroke="#73d216" /> + <metadata + id="metadata4"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:creator> + <cc:Agent> + <dc:title>Jakub Steiner</dc:title> + </cc:Agent> + </dc:creator> + <dc:source>http://jimmac.musichall.cz</dc:source> + <cc:license + rdf:resource="http://creativecommons.org/licenses/publicdomain/" /> + <dc:title>Go Up</dc:title> + <dc:subject> + <rdf:Bag> + <rdf:li>go</rdf:li> + <rdf:li>higher</rdf:li> + <rdf:li>up</rdf:li> + <rdf:li>arrow</rdf:li> + <rdf:li>pointer</rdf:li> + <rdf:li>></rdf:li> + </rdf:Bag> + </dc:subject> + <dc:contributor> + <cc:Agent> + <dc:title>Andreas Nilsson</dc:title> + </cc:Agent> + </dc:contributor> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/publicdomain/"> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Reproduction" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Distribution" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + inkscape:groupmode="layer" + inkscape:label="Layer 1" + id="layer1"> + <path + transform="matrix(1.214466,0.000000,0.000000,0.595458,-6.163846,16.31275)" + d="M 40.481863 36.421127 A 15.644737 8.3968935 0 1 1 9.1923885,36.421127 A 15.644737 8.3968935 0 1 1 40.481863 36.421127 z" + sodipodi:ry="8.3968935" + sodipodi:rx="15.644737" + sodipodi:cy="36.421127" + sodipodi:cx="24.837126" + id="path8660" + style="opacity:0.29946521;color:#000000;fill:url(#radialGradient1444);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" + sodipodi:type="arc" /> + <path + sodipodi:nodetypes="cccccccc" + id="path8643" + d="M 14.491792,38.500000 L 32.469477,38.500000 L 32.469477,25.547437 L 40.500000,25.547437 L 23.374809,5.4992135 L 6.5285585,25.489471 L 14.497096,25.555762 L 14.491792,38.500000 z " + style="opacity:1.0000000;color:#000000;fill:url(#radialGradient1441);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#3a7304;stroke-width:1.0000004;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> + <path + sodipodi:nodetypes="cccscc" + id="path8645" + d="M 7.5855237,25.03253 L 14.995821,25.03253 L 15.062422,31.594339 C 20.718034,20.593878 31.055517,22.749928 31.656768,15.966674 C 31.656768,15.966674 23.366938,6.4219692 23.366938,6.4219692 L 7.5855237,25.03253 z " + style="opacity:0.50802141;color:#000000;fill:url(#radialGradient1438);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" /> + <path + style="opacity:0.48128340;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000004;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" + d="M 15.602735,37.500000 L 31.502578,37.500000 L 31.502578,24.507050 L 38.311576,24.507050 L 23.361206,7.0700896 L 8.6546798,24.550470 L 15.475049,24.528373 L 15.602735,37.500000 z " + id="path8658" + sodipodi:nodetypes="cccccccc" /> + </g> +</svg>
new file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..1c72ebb554be018511ae972c3f2361dff02dce02 GIT binary patch literal 2545 zc$|&aX;2es8VB%~zPr=ibVMCw-JQ^BhLDAsK)^**h(ZDp9YGuz6%`cZP&pJigw;So z2;|_9Ll86^YOqiQ6j;w7=-@aa<BY3T?bhh%2X*!+-T5$Dwd*G9?tWsbrayLdSG~XY zeg4n;#A-F+OVho9H~0~NckkW-0A^-p-oAbN`0?X&=gvKU{@iA>O;1mEc6L5|_|V~S zIGxVduU{7z7aNVn@$vEO>}>FhAK!PPPt_ZeqE{xULq1l(9`0BF@`>J?nO>BcAt}iz z%9f<(rkC!{PtW)`CvRsy@O^`jxa+Gx_uuYC0`#mzViUm1%uOuyX8ALFlVQ@57`nu; z-0X?3Z1!S^$>XLcaUdPQ-Q5vQEc;R$qnOedCOy(qOJns)-Gg8GPLbcOiwIh@u%>E# zZbO^ThSgPiIfRlV3h9|5j4_((EVfER8+@>h$7nQT-<A#vMd^-!qE_rg5D&G2oMmy5 zBYCG1v$kxLBeWS%XV(uYX}S`ch}A|h^vvz^j$&c*%26y=={pzUoSWcOxCltu;y#6= zw@}ji)RNFQ+nXY?dj;^z>_p+`rmc60m@q}dyc#2U-?ThVDfS)WOc=T=NSwzJ={iZH zY%0e%)|#Oc5>#baNt$7GjY&$;uBArRFl7kFn634uru>%LV_C*y3`Fm&Y&IbN;WdZL z0p=eK3es{x-UWUTP$A>x&1t1j1D0EMITV5>q60@ld&lyndELV0FD8#WYvx3ZyAe8x z8__QGg*bW}iKm4Y%QyFW)Ym2VY6%-&AjGL+K5^)~eYn`_m`Ou!c(Js7Izc9jfp3nE z9`TUah)?@u%0Hc-kj^V>qG?p7BE@*tXQgsxSG+9%A!wS2if1syWobOzQh%hQv;Kqt z*PY}U3Tl<NWBnKenc~|KD{~<Q44=B%g_K&aMOk96f_`aN3O0MOz9X+A`$2r5^%3a0 z^V>tWAGh6<&xsjuV<dzNgKeBI1Uq^YWjmTI(_i1~d9co(U(7lidz{2|V1}#yC<&%U zyzGS!tr<M5U&%4teV^p1((r;CuR@oGhc8~cKH91B_<$ud<*-u4<Y?;xFv_2b(sG_+ zu_tG(Z&V#_X*1iq&4I{K%L${DK~9*lfm--nSU(6nJ<xw)kT<E1UN~?DU{Qm$sz0dp z!+O<l?ZEg%z$ItTmFc+w7u*25EVIK$m~5D`+n8vJI+!Atna>(!{vpD`YvM{@a1}Jf zB>64&^&a-JH_irRZmx9V+y-@+;`@T}1vebeBomruAF8rEIXrOM4^C4uS=yQs_x2l= zG|sX(&A5^wZ)j>Z9Xp=g&ck)O0M~&PhMG?Xz%Csph0R%*9`s2$R-AN6sO#n}0(Eg9 z68j42@iV8Hd%xX#cXc@vTyyb`@TIAG?z%efmZ-SQjwM1>!%e%*nr5Mu@*6A6kcX(j zYY|ob-LxdZl*(%+`kVfW411*|%m$s&e>0o0AdE|%;44FpS48FUzA}bJ#_Jk&&szfE zOr0ULv}{KdLE<<`Ff~}M(v^+s_I9ROT2i)J#P0TE@^!F_xOMaPZ3;4(_GC9~R_y5n zjM!5^^r3cuMdD)4;Get+P-51B?3e+Zcuc9kDSX~>xyx@($Qd^z%{#M$?dxf9M6fYR z>Ux}FG;kiW5cuaRysswexqY<=UA0CQ61Udj0eg7e%ay_lW~XcCSFf_rsp}TK_#h{3 z|0xbNuGr{fd81P&uUVme->DcqRvlSWYp!f*VH)=B*P^&6W%Zs4*d<Kmw^eUfh*l9N z?K_frj>};2E%NwaPfwm?<0@3E#NsH{sST~3meQ;}Nw^ktsA9BYPQjpCFdOO?r2j`i zb5q&GsAXiVQ!8nhAU@H>_i;i>&=XR@$<maacfkCwH3;_fk#mKW7%JGQ^6`MMzyI?$ zMK69z?6v;o)_iw!qRMw3l<TStWmapF9Nv=^K$Bc^X5M}mOTBf|Rx%4iRgj3>RpKd@ zZT|=-gG!{F80YbeK!g*etT+X*ERS6-qFnX%g_OXX{XP?Jr;Qd3<^Oy+{m(EE!6Nc` zQxCZz`f+flsr4VV#V$jJ<JN&MzkkuXe5PQDUr|CBfjs(k_sgV;Ti|aG<2c!{=05Nl z{P5_Gaf>cZ!G)D#2jmq8b;Y%@21SvS!o{S9K<RAG6>pouC8VT~nB}5H84Mjv*|l(w z6lY}wkwc<ET{L?bkWP+-_It8w9A86<3K5nb`HF|gY`-Dly0E+sj1~TTIsG!o;`fk0 zzbYC(J@~>9cB5bU?R4HHkA_&`weCDaRjSfWcYi1;E6>i?Bt^ozqzK81G!PAK<Y`yT z>-=1uR}CoEla5BWGsMa+ZKy!vvI77{`yxUJydI!v3rg+5aV<%%xw0F>3F%EKby9Oi zdP|CRL=J1_6b%0oK|fZP{HiFPjjb}lAt65k_y^nXs$%&1!P75<0JhOE^r9uv`qSmQ z!h&#?E@O6MjO#3_3`-7JOG4mWDI&sA4FXXXo^WNo$&Z4dWaKyzO?NWTmJ>_T1+*Jb zi7<USA_O8+0bL0oTCEY0TD0w>$x@6Q<nJ6F(1Z%JTddOY(m5F;|7C1qp&W150J0jf zBEjwf#AaIM8bIoz#KK<gN++`6W!!<71b=?_Gg!9R(-=Gy)>?K&JozNND9hM6zpWs! zsc`aW^V+xX<nQ~^A*RrE(N!7T^M|gP|9y)T<H+q%W#y17@Z|w@`w&tT1Yly{nTXb< zk#HuU`+zzyI#o%bT|~`RXiSNso9QkF8aRet9q$4dbS`OZs^Z9{;V56Q?Ef>^zXA6Q B8LI#Q
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/content/web/images/nav-outline.svg @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="48px" + height="48px" + id="svg3007" + version="1.1" + inkscape:version="0.48.1 r9760" + sodipodi:docname="nav-outline.svg"> + <defs + id="defs3009"> + <filter + inkscape:collect="always" + id="filter5333" + x="-0.16623206" + width="1.3324641" + y="-0.030014125" + height="1.0600282"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="0.47888561" + id="feGaussianBlur5335" /> + </filter> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="11.945051" + inkscape:cx="20.614872" + inkscape:cy="23.423899" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:grid-bbox="true" + inkscape:document-units="px" + inkscape:window-width="1440" + inkscape:window-height="773" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" /> + <metadata + id="metadata3012"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <rect + style="fill:#f0f0f0;fill-rule:evenodd;stroke:#808080;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;fill-opacity:1" + id="rect3783" + width="46.16272" + height="45.59861" + x="1.0341953" + y="0.99112236" /> + <rect + style="fill:#404040;fill-opacity:1;stroke:none" + id="rect3787" + width="2.8205326" + height="2.7823999" + x="4.2307992" + y="4.093708" /> + <rect + style="fill:#404040;fill-opacity:1;stroke:none" + id="rect5257" + width="24.68285" + height="1.4102663" + x="8.0855274" + y="4.657815" /> + <rect + y="8.4185247" + x="8.4615984" + height="2.7823999" + width="2.8205326" + id="rect5259" + style="fill:#404040;fill-opacity:1;stroke:none" /> + <rect + y="9.0766497" + x="12.410344" + height="1.4102663" + width="30.498053" + id="rect5261" + style="fill:#404040;fill-opacity:1;stroke:none" /> + <rect + style="fill:#404040;fill-opacity:1;stroke:none" + id="rect5263" + width="2.8205326" + height="2.7823999" + x="8.4615984" + y="13.307448" /> + <rect + style="fill:#404040;fill-opacity:1;stroke:none" + id="rect5265" + width="24.972752" + height="1.4102663" + x="12.410344" + y="13.965573" /> + <rect + y="17.444229" + x="4.3248172" + height="2.7823999" + width="2.8205326" + id="rect5267" + style="fill:#404040;fill-opacity:1;stroke:none" /> + <rect + y="18.008337" + x="8.1795454" + height="1.4102663" + width="25.101433" + id="rect5269" + style="fill:#404040;fill-opacity:1;stroke:none" /> + <rect + style="fill:#404040;fill-opacity:1;stroke:none" + id="rect5271" + width="2.8205326" + height="2.7823999" + x="8.5556164" + y="21.769047" /> + <rect + style="fill:#404040;fill-opacity:1;stroke:none" + id="rect5273" + width="28.782515" + height="1.4102663" + x="12.880433" + y="22.427172" /> + <rect + y="26.65797" + x="13.475181" + height="2.7823999" + width="2.8205326" + id="rect5275" + style="fill:#404040;fill-opacity:1;stroke:none" /> + <rect + y="27.316095" + x="17.479" + height="1.4102663" + width="23.681646" + id="rect5277" + style="fill:#404040;fill-opacity:1;stroke:none" /> + <rect + style="fill:#404040;fill-opacity:1;stroke:none" + id="rect5279" + width="2.8205326" + height="2.7823999" + x="8.5130949" + y="31.006269" /> + <rect + style="fill:#404040;fill-opacity:1;stroke:none" + id="rect5281" + width="24.557148" + height="1.4102663" + x="12.592034" + y="31.636858" /> + <rect + y="35.464046" + x="13.475181" + height="2.7823999" + width="2.8205326" + id="rect5283" + style="fill:#404040;fill-opacity:1;stroke:none" /> + <rect + y="36.055695" + x="17.744923" + height="1.4102663" + width="18.577394" + id="rect5285" + style="fill:#404040;fill-opacity:1;stroke:none" /> + <rect + style="fill:#404040;fill-opacity:1;stroke:none" + id="rect5287" + width="2.8205326" + height="2.7823999" + x="13.54166" + y="40.35297" /> + <rect + style="fill:#404040;fill-opacity:1;stroke:none" + id="rect5289" + width="23.080858" + height="1.4102663" + x="17.678442" + y="40.944618" /> + </g> +</svg>
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/content/web/images/nav-thumbs.svg @@ -0,0 +1,283 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="48px" + height="48px" + id="svg3007" + version="1.1" + inkscape:version="0.48.1 r9760" + sodipodi:docname="nav-thumbs.svg"> + <defs + id="defs3009"> + <filter + inkscape:collect="always" + id="filter5333" + x="-0.16623206" + width="1.3324641" + y="-0.030014125" + height="1.0600282"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="0.47888561" + id="feGaussianBlur5335" /> + </filter> + <filter + inkscape:collect="always" + id="filter5966"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="0.3570515" + id="feGaussianBlur5968" /> + </filter> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="11.945051" + inkscape:cx="9.375932" + inkscape:cy="24.942259" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:grid-bbox="true" + inkscape:document-units="px" + inkscape:window-width="1440" + inkscape:window-height="773" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" /> + <metadata + id="metadata3012"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <rect + style="fill:#484848;fill-rule:evenodd;stroke:#808080;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;fill-opacity:1" + id="rect3783" + width="46.16272" + height="45.59861" + x="1.0341953" + y="0.99112236" /> + <rect + y="4.7876148" + x="14.359808" + height="12.764274" + width="9.7061672" + id="rect5960" + style="fill:#000000;fill-opacity:1;stroke:none;filter:url(#filter5966)" + transform="matrix(1.0465713,0,0,1.0642851,3.6426579,-2.1141417)" /> + <rect + style="fill:#ffffff;fill-opacity:1;stroke:none" + id="rect5958" + width="9.7061672" + height="12.764274" + x="18.897236" + y="3.1920807" /> + <rect + transform="matrix(1.0465713,0,0,1.0642851,3.6426579,13.043433)" + style="fill:#000000;fill-opacity:1;stroke:none;filter:url(#filter5966)" + id="rect5970" + width="9.7061672" + height="12.764274" + x="14.359808" + y="4.7876148" /> + <rect + y="18.349655" + x="18.897236" + height="12.764274" + width="9.7061672" + id="rect5972" + style="fill:#ffffff;fill-opacity:1;stroke:none" /> + <rect + y="4.7876148" + x="14.359808" + height="12.764274" + width="9.7061672" + id="rect5974" + style="fill:#000000;fill-opacity:1;stroke:none;filter:url(#filter5966)" + transform="matrix(1.0465713,0,0,0.9368834,3.6426579,29.209842)" /> + <rect + style="fill:#ffffff;fill-opacity:1;stroke:none" + id="rect5976" + width="9.7061672" + height="11.833546" + x="18.897236" + y="33.906113" /> + <rect + y="4.905829" + x="19.960924" + height="0.66480595" + width="7.7117486" + id="rect5995" + style="fill:#808080;fill-opacity:1;stroke:none" /> + <rect + style="fill:#808080;fill-opacity:1;stroke:none" + id="rect6177" + width="3.6219761" + height="0.66480595" + x="19.960924" + y="6.0340419" /> + <rect + style="fill:#808080;fill-opacity:1;stroke:none" + id="rect6179" + width="7.7117486" + height="0.66480595" + x="19.960924" + y="7.2562728" /> + <rect + y="8.3844862" + x="19.960924" + height="0.66480595" + width="5.6903667" + id="rect6181" + style="fill:#808080;fill-opacity:1;stroke:none" /> + <rect + y="9.7007341" + x="19.960924" + height="0.66480595" + width="7.7117486" + id="rect6183" + style="fill:#808080;fill-opacity:1;stroke:none" /> + <rect + style="fill:#808080;fill-opacity:1;stroke:none" + id="rect6185" + width="7.7117486" + height="0.66480595" + x="19.960924" + y="10.828948" /> + <rect + y="12.051179" + x="19.960924" + height="0.66480595" + width="7.7117486" + id="rect6187" + style="fill:#808080;fill-opacity:1;stroke:none" /> + <rect + y="14.213587" + x="23.204536" + height="0.66480595" + width="1.2245234" + id="rect6189" + style="fill:#808080;fill-opacity:1;stroke:none" /> + <rect + style="fill:#808080;fill-opacity:1;stroke:none" + id="rect6209" + width="7.7117486" + height="0.66480595" + x="19.772888" + y="19.854652" /> + <rect + y="39.08128" + x="19.913914" + height="0.66480595" + width="3.6219761" + id="rect6211" + style="fill:#808080;fill-opacity:1;stroke:none" /> + <rect + y="22.205095" + x="19.772888" + height="0.66480595" + width="6.6305442" + id="rect6213" + style="fill:#808080;fill-opacity:1;stroke:none" /> + <rect + style="fill:#808080;fill-opacity:1;stroke:none" + id="rect6215" + width="7.7587576" + height="0.66480595" + x="19.866905" + y="37.859051" /> + <rect + style="fill:#808080;fill-opacity:1;stroke:none" + id="rect6217" + width="7.7117486" + height="0.66480595" + x="19.772888" + y="21.029873" /> + <rect + y="25.777771" + x="19.772888" + height="0.66480595" + width="7.7117486" + id="rect6219" + style="fill:#808080;fill-opacity:1;stroke:none" /> + <rect + style="fill:#808080;fill-opacity:1;stroke:none" + id="rect6221" + width="7.7117486" + height="0.66480595" + x="19.772888" + y="27.000002" /> + <rect + style="fill:#808080;fill-opacity:1;stroke:none" + id="rect6223" + width="1.2245234" + height="0.66480595" + x="23.204536" + y="28.974375" /> + <rect + style="fill:#808080;fill-opacity:1;stroke:none" + id="rect6225" + width="3.6219761" + height="0.66480595" + x="19.960922" + y="42.983021" /> + <rect + style="fill:#808080;fill-opacity:1;stroke:none" + id="rect6227" + width="7.7117486" + height="0.66480595" + x="19.913914" + y="36.777847" /> + <rect + y="35.602627" + x="19.913914" + height="0.66480595" + width="7.7117486" + id="rect6231" + style="fill:#808080;fill-opacity:1;stroke:none" /> + <rect + style="fill:#808080;fill-opacity:1;stroke:none" + id="rect6233" + width="7.7117486" + height="0.66480595" + x="19.913914" + y="40.350525" /> + <rect + y="41.572754" + x="19.913914" + height="0.66480595" + width="7.7117486" + id="rect6235" + style="fill:#808080;fill-opacity:1;stroke:none" /> + <rect + style="fill:#0000e6;fill-opacity:0.44444448;stroke:none" + id="rect6237" + width="3.5256658" + height="1.927364" + x="22.077036" + y="23.367346" /> + </g> +</svg>
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/content/web/images/pin-down.svg @@ -0,0 +1,297 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="48" + height="48" + id="svg3075" + version="1.1" + inkscape:version="0.48.1 r9760" + sodipodi:docname="pin-down.svg" + viewPort="0 0 48 48"> + <defs + id="defs3077"> + <linearGradient + inkscape:collect="always" + id="linearGradient3804"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop3806" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop3808" /> + </linearGradient> + <linearGradient + id="linearGradient3965"> + <stop + id="stop3967" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + style="stop-color:#ffffff;stop-opacity:0" + offset="1" + id="stop3969" /> + </linearGradient> + <linearGradient + id="linearGradient3885"> + <stop + style="stop-color:#a8b5e9;stop-opacity:1;" + offset="0" + id="stop3889" /> + <stop + id="stop3891" + offset="1" + style="stop-color:#1d4488;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient3865"> + <stop + style="stop-color:#0e0ec3;stop-opacity:0" + offset="0" + id="stop3867" /> + <stop + id="stop3883" + offset="0.5" + style="stop-color:#95b1e4;stop-opacity:1;" /> + <stop + style="stop-color:#0d29c0;stop-opacity:1;" + offset="1" + id="stop3869" /> + </linearGradient> + <linearGradient + id="linearGradient3853"> + <stop + style="stop-color:#717171;stop-opacity:1;" + offset="0" + id="stop3855" /> + <stop + id="stop3861" + offset="0.5" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + style="stop-color:#818181;stop-opacity:1;" + offset="1" + id="stop3857" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3885" + id="radialGradient3792" + cx="13.508819" + cy="30.521608" + fx="13.508819" + fy="30.521608" + r="13.254341" + gradientTransform="matrix(1,0,0,1.045977,0,-1.4434017)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3885" + id="linearGradient3802" + x1="15.306904" + y1="13.407407" + x2="29.35461" + y2="30.15519" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2304178,0,0,1.1235308,-2.1158755,998.83747)" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3804" + id="radialGradient3812" + cx="20.111172" + cy="28.238274" + fx="20.111172" + fy="28.238274" + r="7.6291947" + gradientTransform="matrix(1.2304178,0,0,1.1452771,-2.1158755,998.22337)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3885" + id="radialGradient3822" + cx="23.985939" + cy="24.847366" + fx="23.985939" + fy="24.847366" + r="10.593476" + gradientTransform="matrix(0.63682384,0.44303926,-1.1714282,1.6838088,35.523491,-26.055439)" + gradientUnits="userSpaceOnUse" /> + <filter + inkscape:collect="always" + id="filter3856" + x="-0.30370581" + width="1.6074116" + y="-0.32771564" + height="1.6554313"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="4.7808869" + id="feGaussianBlur3858" /> + </filter> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3885" + id="radialGradient3865" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.045977,0,-1.4434017)" + cx="13.508819" + cy="30.521608" + fx="13.508819" + fy="30.521608" + r="13.254341" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3885" + id="linearGradient3867" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2304178,0,0,1.1235308,-2.1158755,998.83747)" + x1="15.306904" + y1="13.407407" + x2="29.35461" + y2="30.15519" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3804" + id="radialGradient3869" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2304178,0,0,1.1452771,-2.1158755,998.22337)" + cx="20.111172" + cy="28.238274" + fx="20.111172" + fy="28.238274" + r="7.6291947" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3885" + id="radialGradient3871" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.63682384,0.44303926,-1.1714282,1.6838088,35.523491,-26.055439)" + cx="23.985939" + cy="24.847366" + fx="23.985939" + fy="24.847366" + r="10.593476" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3885" + id="linearGradient3875" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.98683814,0,0,0.9524914,3.4991888,1004.1467)" + x1="15.306904" + y1="13.407407" + x2="29.35461" + y2="30.15519" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3804" + id="radialGradient3877" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.195641,0.23932984,-0.18533175,0.95255553,4.5333676,999.33159)" + cx="20.111172" + cy="28.238274" + fx="20.111172" + fy="28.238274" + r="7.6291947" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3885" + id="radialGradient3880" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.5847553,0.52693722,-0.99805104,2.7064773,14.11088,-45.304477)" + cx="18.133854" + cy="19.778509" + fx="18.133854" + fy="19.778509" + r="10.593476" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3885" + id="radialGradient3882" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.045977,0,-1.4434017)" + cx="13.508819" + cy="30.521608" + fx="13.508819" + fy="30.521608" + r="13.254341" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="4.9558805" + inkscape:cx="3.0237013" + inkscape:cy="17.287267" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1291" + inkscape:window-height="776" + inkscape:window-x="16" + inkscape:window-y="0" + inkscape:window-maximized="0" /> + <metadata + id="metadata3080"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-1004.3622)"> + <path + style="fill:#ffffff;fill-opacity:1;stroke:none;filter:url(#filter3856)" + d="m 14.326415,1019.2702 c -8.3327876,4.0675 -9.8235436,10.8833 -8.8783416,15.1336 4.6840646,7.9754 8.3608166,13.8165 24.0118786,12.9139 9.657617,-3.7312 12.9762,-9.3269 13.519293,-15.7389 -0.547269,-4.3839 -1.957958,-9.3396 -5.649854,-14.9317 -3.965534,-2.471 -6.300859,-4.4246 -10.290805,-4.2374 -8.25193,0.5026 -8.752485,4.4502 -12.712171,6.8605 z" + id="path3826" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccccc" + transform="matrix(0.69099294,0,0,0.75978808,7.3427938,249.11025)" /> + <path + sodipodi:type="arc" + style="fill:url(#radialGradient3882);fill-opacity:1;stroke:none" + id="path3011" + sodipodi:cx="21.176477" + sodipodi:cy="31.393986" + sodipodi:rx="13.254341" + sodipodi:ry="13.863736" + d="m 34.430819,31.393986 a 13.254341,13.863736 0 1 1 -26.5086827,0 13.254341,13.863736 0 1 1 26.5086827,0 z" + transform="matrix(0.98683814,0,0,0.83062636,2.696034,1005.3655)" /> + <path + style="fill:url(#linearGradient3875);fill-opacity:1;stroke:url(#radialGradient3877);stroke-width:0.9695127;stroke-opacity:1" + d="m 17.246758,1026.7905 c -1.7156,4.5052 -2.482464,10.6205 8.726963,10.7476 4.849099,-1.8941 3.522783,-5.3561 6.021544,-11.8282 l -10.973104,-1.5977 z" + id="path3794" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + <path + sodipodi:type="arc" + style="fill:url(#radialGradient3880);fill-opacity:1;stroke:none" + id="path3814" + sodipodi:cx="24.718111" + sodipodi:cy="23.38278" + sodipodi:rx="10.593476" + sodipodi:ry="9.6854639" + d="m 35.311587,23.38278 a 10.593476,9.6854639 0 1 1 -21.186952,0 10.593476,9.6854639 0 1 1 21.186952,0 z" + transform="matrix(0.85425691,0,0,0.84187503,3.9779774,1006.7561)" /> + </g> +</svg>
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/content/web/images/pin-up.svg @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="48" + height="48" + id="svg3075" + version="1.1" + inkscape:version="0.48.1 r9760" + sodipodi:docname="pin-up.svg" + viewPort="0 0 48 48"> + <defs + id="defs3077"> + <linearGradient + id="linearGradient3965"> + <stop + id="stop3967" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + style="stop-color:#ffffff;stop-opacity:0" + offset="1" + id="stop3969" /> + </linearGradient> + <linearGradient + id="linearGradient3885"> + <stop + style="stop-color:#a8b5e9;stop-opacity:1;" + offset="0" + id="stop3889" /> + <stop + id="stop3891" + offset="1" + style="stop-color:#1d4488;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient3865"> + <stop + style="stop-color:#0e0ec3;stop-opacity:1;" + offset="0" + id="stop3867" /> + <stop + id="stop3883" + offset="0.5" + style="stop-color:#95b1e4;stop-opacity:1;" /> + <stop + style="stop-color:#0d29c0;stop-opacity:1;" + offset="1" + id="stop3869" /> + </linearGradient> + <linearGradient + id="linearGradient3853"> + <stop + style="stop-color:#717171;stop-opacity:1;" + offset="0" + id="stop3855" /> + <stop + id="stop3861" + offset="0.5" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + style="stop-color:#818181;stop-opacity:1;" + offset="1" + id="stop3857" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3853" + id="linearGradient3859" + x1="7.7696066" + y1="34.979828" + x2="11.854106" + y2="39.107044" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(4.8388015,1001.6582)" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3885" + id="radialGradient3871" + cx="14.801222" + cy="1030.6609" + fx="14.801222" + fy="1030.6609" + r="10.177785" + gradientTransform="matrix(1,0,0,1.0108042,4.8388015,-13.880529)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3865" + id="linearGradient3881" + x1="15.012629" + y1="11.922465" + x2="31.098303" + y2="28.858271" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,0.97315436,4.8388015,1002.4769)" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3885" + id="radialGradient3909" + cx="16.437693" + cy="22.596292" + fx="16.437693" + fy="22.596292" + r="1.7789712" + gradientTransform="matrix(1,0,0,8.3599999,0,-166.30871)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3865" + id="linearGradient3927" + x1="26.47109" + y1="1010.7343" + x2="35.294788" + y2="1019.8425" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(4.5541661,-2.1347654)" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3965" + id="radialGradient3995" + cx="23.189369" + cy="25.704245" + fx="23.189369" + fy="25.704245" + r="37.336674" + gradientTransform="matrix(1,0,0,1.0332422,0,-0.85446479)" + gradientUnits="userSpaceOnUse" /> + <filter + inkscape:collect="always" + id="filter4009" + x="-0.19299152" + width="1.385983" + y="-0.18351803" + height="1.3670361"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="3.8667902" + id="feGaussianBlur4011" /> + </filter> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="3.2819435" + inkscape:cx="18.697469" + inkscape:cy="17.287267" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="970" + inkscape:window-height="778" + inkscape:window-x="284" + inkscape:window-y="0" + inkscape:window-maximized="0" /> + <metadata + id="metadata3080"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-1004.3622)"> + <path + style="fill:url(#radialGradient3995);stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1.0;filter:url(#filter4009)" + d="M -0.85390618,50.988672 14.231769,27.790888 C 12.21393,25.133052 9.5514307,24.605255 9.9622384,18.824874 13.947134,14.236899 17.362759,16.258973 21.347654,16.54779 l 8.966014,-8.6813789 c 1.467204,-2.4778468 -1.023584,-4.6422045 0.569271,-7.25820222 4.802307,-0.84764718 6.662499,1.15219542 11.527733,6.26197842 4.061691,4.1873637 5.648882,7.0611607 4.411848,9.5352857 -1.075122,2.776443 -4.518349,-0.692782 -5.835025,0.56927 l -9.108332,10.104556 c -0.418785,3.74872 2.078647,7.861968 -1.280859,11.243098 -4.132171,0.818036 -6.734336,-1.933944 -9.819921,-3.557942 z" + id="path3955" + inkscape:connector-curvature="0" + transform="translate(0,1004.3622)" + sodipodi:nodetypes="ccccccccccccc" /> + <g + id="g3929"> + <path + sodipodi:nodetypes="cccc" + inkscape:connector-curvature="0" + id="path3083" + d="m 3.2884874,1051.0662 c 3.1862139,-6.2911 11.3693156,-15.19 15.4471616,-20.0327 l 2.86533,3.0086 c -3.476851,3.6575 -10.192375,10.8664 -18.3124916,17.0241 z" + style="fill:url(#linearGradient3859);fill-opacity:1;stroke:#a5a5a5;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + sodipodi:nodetypes="ccccc" + inkscape:connector-curvature="0" + id="path3863" + d="m 11.10078,1023.3294 c 5.038264,10.1095 11.83652,14.8875 18.358981,18.2167 1.196291,-2.5422 1.454996,-5.6203 0,-9.6776 l -8.539061,-8.6814 c -3.704654,-1.8936 -6.871076,-1.3652 -9.81992,0.1423 z" + style="fill:url(#radialGradient3871);fill-opacity:1;stroke:none" /> + <path + sodipodi:nodetypes="ccccc" + inkscape:connector-curvature="0" + id="path3873" + d="m 33.729292,1011.5171 -13.235545,11.4952 c 2.869602,4.2703 6.221839,7.4544 9.108332,9.1408 l 11.385416,-13.0187 z" + style="fill:url(#linearGradient3881);fill-opacity:1;stroke:none" /> + <path + sodipodi:nodetypes="ccccc" + inkscape:connector-curvature="0" + id="path3893" + d="m 33.228885,1011.6148 c 1.843189,2.7806 3.431654,5.6597 7.19852,7.6953 l 5.398891,1.7423 c -7.6738,-4.7914 -10.989683,-9.5828 -13.947133,-14.3741 z" + style="fill:url(#linearGradient3927);fill-opacity:1;stroke:none" /> + <path + transform="matrix(0.68275275,-0.5590416,0.45791123,0.47036287,17.42507,1012.2127)" + d="m 18.216664,22.596292 a 1.7789712,14.872199 0 1 1 -3.557943,0 1.7789712,14.872199 0 1 1 3.557943,0 z" + sodipodi:ry="14.872199" + sodipodi:rx="1.7789712" + sodipodi:cy="22.596292" + sodipodi:cx="16.437693" + id="path3901" + style="fill:url(#radialGradient3909);fill-opacity:1;stroke:none" + sodipodi:type="arc" /> + </g> + </g> +</svg>
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/content/web/images/zoom-in.svg @@ -0,0 +1,437 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="48px" + height="48px" + id="svg6431" + sodipodi:version="0.32" + inkscape:version="0.46" + sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions" + sodipodi:docname="list-add.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + viewbox="0 0 48 48"> + <defs + id="defs6433"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 24 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="48 : 24 : 1" + inkscape:persp3d-origin="24 : 16 : 1" + id="perspective70" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2091"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop2093" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop2095" /> + </linearGradient> + <linearGradient + id="linearGradient7916"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop7918" /> + <stop + style="stop-color:#ffffff;stop-opacity:0.34020618;" + offset="1.0000000" + id="stop7920" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient8662"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop8664" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop8666" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient8662" + id="radialGradient1503" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.000000,0.000000,0.000000,0.536723,-1.018989e-13,16.87306)" + cx="24.837126" + cy="36.421127" + fx="24.837126" + fy="36.421127" + r="15.644737" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2847"> + <stop + style="stop-color:#3465a4;stop-opacity:1;" + offset="0" + id="stop2849" /> + <stop + style="stop-color:#3465a4;stop-opacity:0;" + offset="1" + id="stop2851" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2847" + id="linearGradient1488" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-1.000000,0.000000,0.000000,-1.000000,-1.242480,40.08170)" + x1="37.128052" + y1="29.729605" + x2="37.065414" + y2="26.194071" /> + <linearGradient + id="linearGradient2831"> + <stop + style="stop-color:#3465a4;stop-opacity:1;" + offset="0" + id="stop2833" /> + <stop + id="stop2855" + offset="0.33333334" + style="stop-color:#5b86be;stop-opacity:1;" /> + <stop + style="stop-color:#83a8d8;stop-opacity:0;" + offset="1" + id="stop2835" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2831" + id="linearGradient1486" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-48.30498,-6.043298)" + x1="13.478554" + y1="10.612206" + x2="15.419417" + y2="19.115122" /> + <linearGradient + id="linearGradient2380"> + <stop + style="stop-color:#b9cfe7;stop-opacity:1" + offset="0" + id="stop2382" /> + <stop + style="stop-color:#729fcf;stop-opacity:1" + offset="1" + id="stop2384" /> + </linearGradient> + <linearGradient + id="linearGradient2682"> + <stop + style="stop-color:#3977c3;stop-opacity:1;" + offset="0" + id="stop2684" /> + <stop + style="stop-color:#89aedc;stop-opacity:0;" + offset="1" + id="stop2686" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2682" + id="linearGradient2688" + x1="36.713837" + y1="31.455952" + x2="37.124462" + y2="24.842253" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-48.77039,-5.765705)" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2690"> + <stop + style="stop-color:#c4d7eb;stop-opacity:1;" + offset="0" + id="stop2692" /> + <stop + style="stop-color:#c4d7eb;stop-opacity:0;" + offset="1" + id="stop2694" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2690" + id="linearGradient2696" + x1="32.647972" + y1="30.748846" + x2="37.124462" + y2="24.842253" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-48.77039,-5.765705)" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2871"> + <stop + style="stop-color:#3465a4;stop-opacity:1;" + offset="0" + id="stop2873" /> + <stop + style="stop-color:#3465a4;stop-opacity:1" + offset="1" + id="stop2875" /> + </linearGradient> + <linearGradient + id="linearGradient2402"> + <stop + style="stop-color:#729fcf;stop-opacity:1;" + offset="0" + id="stop2404" /> + <stop + style="stop-color:#528ac5;stop-opacity:1;" + offset="1" + id="stop2406" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2797" + id="linearGradient1493" + gradientUnits="userSpaceOnUse" + x1="5.9649176" + y1="26.048164" + x2="52.854097" + y2="26.048164" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2797"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop2799" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop2801" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2797" + id="linearGradient1491" + gradientUnits="userSpaceOnUse" + x1="5.9649176" + y1="26.048164" + x2="52.854097" + y2="26.048164" /> + <linearGradient + inkscape:collect="always" + id="linearGradient7179"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop7181" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop7183" /> + </linearGradient> + <linearGradient + id="linearGradient2316"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop2318" /> + <stop + style="stop-color:#ffffff;stop-opacity:0.65979379;" + offset="1" + id="stop2320" /> + </linearGradient> + <linearGradient + id="linearGradient1322"> + <stop + id="stop1324" + offset="0.0000000" + style="stop-color:#729fcf" /> + <stop + id="stop1326" + offset="1.0000000" + style="stop-color:#5187d6;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient1322" + id="linearGradient4975" + x1="34.892849" + y1="36.422989" + x2="45.918697" + y2="48.547989" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-18.01785,-13.57119)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7179" + id="linearGradient7185" + x1="13.435029" + y1="13.604306" + x2="22.374878" + y2="23.554308" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7179" + id="linearGradient7189" + gradientUnits="userSpaceOnUse" + x1="13.435029" + y1="13.604306" + x2="22.374878" + y2="23.554308" + gradientTransform="matrix(-1.000000,0.000000,0.000000,-1.000000,47.93934,50.02474)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2380" + id="linearGradient7180" + gradientUnits="userSpaceOnUse" + x1="62.513836" + y1="36.061237" + x2="15.984863" + y2="20.60858" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2871" + id="linearGradient7182" + gradientUnits="userSpaceOnUse" + x1="46.834816" + y1="45.264122" + x2="45.380436" + y2="50.939667" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2402" + id="linearGradient7184" + gradientUnits="userSpaceOnUse" + x1="18.935766" + y1="23.667896" + x2="53.588622" + y2="26.649362" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2871" + id="linearGradient7186" + gradientUnits="userSpaceOnUse" + x1="46.834816" + y1="45.264122" + x2="45.380436" + y2="50.939667" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7916" + id="linearGradient7922" + x1="16.874998" + y1="22.851799" + x2="27.900846" + y2="34.976799" + gradientUnits="userSpaceOnUse" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient2091" + id="radialGradient2097" + cx="23.070683" + cy="35.127438" + fx="23.070683" + fy="35.127438" + r="10.319340" + gradientTransform="matrix(0.914812,1.265023e-2,-8.21502e-3,0.213562,2.253914,27.18889)" + gradientUnits="userSpaceOnUse" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="0.15686275" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1" + inkscape:cx="-123.56934" + inkscape:cy="0.031886897" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:grid-bbox="true" + inkscape:document-units="px" + inkscape:window-width="1280" + inkscape:window-height="818" + inkscape:window-x="0" + inkscape:window-y="30" + showguides="true" + inkscape:guide-bbox="true" + inkscape:showpageshadow="false" /> + <metadata + id="metadata6436"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title>Add</dc:title> + <dc:date>2006-01-04</dc:date> + <dc:creator> + <cc:Agent> + <dc:title>Andreas Nilsson</dc:title> + </cc:Agent> + </dc:creator> + <dc:source>http://tango-project.org</dc:source> + <dc:subject> + <rdf:Bag> + <rdf:li>add</rdf:li> + <rdf:li>plus</rdf:li> + </rdf:Bag> + </dc:subject> + <cc:license + rdf:resource="http://creativecommons.org/licenses/publicdomain/" /> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/publicdomain/"> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Reproduction" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Distribution" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <path + sodipodi:type="arc" + style="opacity:0.10824742;fill:url(#radialGradient2097);fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path1361" + sodipodi:cx="22.958872" + sodipodi:cy="34.94062" + sodipodi:rx="10.31934" + sodipodi:ry="2.320194" + d="M 33.278212 34.94062 A 10.31934 2.320194 0 1 1 12.639532,34.94062 A 10.31934 2.320194 0 1 1 33.278212 34.94062 z" + transform="matrix(1.550487,0,0,1.978714,-12.4813,-32.49103)" /> + <path + style="fill:#75a1d0;fill-opacity:1.0000000;stroke:#3465a4;stroke-width:1.0000004px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000" + d="M 27.514356,37.542682 L 27.514356,28.515722 L 37.492820,28.475543 L 37.492820,21.480219 L 27.523285,21.480219 L 27.514356,11.520049 L 20.498082,11.531210 L 20.502546,21.462362 L 10.512920,21.536022 L 10.477206,28.504561 L 20.511475,28.475543 L 20.518171,37.515896 L 27.514356,37.542682 z " + id="text1314" + sodipodi:nodetypes="ccccccccccccc" /> + <path + style="opacity:0.40860215;fill:url(#linearGradient4975);fill-opacity:1.0000000;stroke:url(#linearGradient7922);stroke-width:1.0000006px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000" + d="M 26.498702,36.533920 L 26.498702,27.499738 L 36.501304,27.499738 L 36.494607,22.475309 L 26.507630,22.475309 L 26.507630,12.480335 L 21.512796,12.498193 L 21.521725,22.475309 L 11.495536,22.493166 L 11.468750,27.466256 L 21.533143,27.475185 L 21.519750,36.502670 L 26.498702,36.533920 z " + id="path7076" + sodipodi:nodetypes="ccccccccccccc" /> + <path + style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;opacity:0.31182796" + d="M 11.000000,25.000000 C 11.000000,26.937500 36.984375,24.031250 36.984375,24.968750 L 36.984375,21.968750 L 27.000000,22.000000 L 27.000000,12.034772 L 21.000000,12.034772 L 21.000000,22.000000 L 11.000000,22.000000 L 11.000000,25.000000 z " + id="path7914" + sodipodi:nodetypes="ccccccccc" /> + </g> +</svg>
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/content/web/images/zoom-out.svg @@ -0,0 +1,425 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="48px" + height="48px" + id="svg6431" + sodipodi:version="0.32" + inkscape:version="0.46" + sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions" + sodipodi:docname="list-remove.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + viewbox="0 0 48 48"> + <defs + id="defs6433"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 24 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="48 : 24 : 1" + inkscape:persp3d-origin="24 : 16 : 1" + id="perspective69" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2091"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop2093" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop2095" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient2091" + id="radialGradient2097" + cx="23.070683" + cy="35.127438" + fx="23.070683" + fy="35.127438" + r="10.319340" + gradientTransform="matrix(0.914812,1.265023e-2,-8.21502e-3,0.213562,2.253914,27.18889)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + id="linearGradient7916"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop7918" /> + <stop + style="stop-color:#ffffff;stop-opacity:0.34020618;" + offset="1.0000000" + id="stop7920" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient8662"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop8664" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop8666" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient8662" + id="radialGradient1503" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.000000,0.000000,0.000000,0.536723,-1.018989e-13,16.87306)" + cx="24.837126" + cy="36.421127" + fx="24.837126" + fy="36.421127" + r="15.644737" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2847"> + <stop + style="stop-color:#3465a4;stop-opacity:1;" + offset="0" + id="stop2849" /> + <stop + style="stop-color:#3465a4;stop-opacity:0;" + offset="1" + id="stop2851" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2847" + id="linearGradient1488" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-1.000000,0.000000,0.000000,-1.000000,-1.242480,40.08170)" + x1="37.128052" + y1="29.729605" + x2="37.065414" + y2="26.194071" /> + <linearGradient + id="linearGradient2831"> + <stop + style="stop-color:#3465a4;stop-opacity:1;" + offset="0" + id="stop2833" /> + <stop + id="stop2855" + offset="0.33333334" + style="stop-color:#5b86be;stop-opacity:1;" /> + <stop + style="stop-color:#83a8d8;stop-opacity:0;" + offset="1" + id="stop2835" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2831" + id="linearGradient1486" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-48.30498,-6.043298)" + x1="13.478554" + y1="10.612206" + x2="15.419417" + y2="19.115122" /> + <linearGradient + id="linearGradient2380"> + <stop + style="stop-color:#b9cfe7;stop-opacity:1" + offset="0" + id="stop2382" /> + <stop + style="stop-color:#729fcf;stop-opacity:1" + offset="1" + id="stop2384" /> + </linearGradient> + <linearGradient + id="linearGradient2682"> + <stop + style="stop-color:#3977c3;stop-opacity:1;" + offset="0" + id="stop2684" /> + <stop + style="stop-color:#89aedc;stop-opacity:0;" + offset="1" + id="stop2686" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2682" + id="linearGradient2688" + x1="36.713837" + y1="31.455952" + x2="37.124462" + y2="24.842253" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-48.77039,-5.765705)" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2690"> + <stop + style="stop-color:#c4d7eb;stop-opacity:1;" + offset="0" + id="stop2692" /> + <stop + style="stop-color:#c4d7eb;stop-opacity:0;" + offset="1" + id="stop2694" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2690" + id="linearGradient2696" + x1="32.647972" + y1="30.748846" + x2="37.124462" + y2="24.842253" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-48.77039,-5.765705)" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2871"> + <stop + style="stop-color:#3465a4;stop-opacity:1;" + offset="0" + id="stop2873" /> + <stop + style="stop-color:#3465a4;stop-opacity:1" + offset="1" + id="stop2875" /> + </linearGradient> + <linearGradient + id="linearGradient2402"> + <stop + style="stop-color:#729fcf;stop-opacity:1;" + offset="0" + id="stop2404" /> + <stop + style="stop-color:#528ac5;stop-opacity:1;" + offset="1" + id="stop2406" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2797" + id="linearGradient1493" + gradientUnits="userSpaceOnUse" + x1="5.9649176" + y1="26.048164" + x2="52.854097" + y2="26.048164" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2797"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop2799" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop2801" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2797" + id="linearGradient1491" + gradientUnits="userSpaceOnUse" + x1="5.9649176" + y1="26.048164" + x2="52.854097" + y2="26.048164" /> + <linearGradient + inkscape:collect="always" + id="linearGradient7179"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop7181" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop7183" /> + </linearGradient> + <linearGradient + id="linearGradient2316"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop2318" /> + <stop + style="stop-color:#ffffff;stop-opacity:0.65979379;" + offset="1" + id="stop2320" /> + </linearGradient> + <linearGradient + id="linearGradient1322"> + <stop + id="stop1324" + offset="0.0000000" + style="stop-color:#729fcf" /> + <stop + id="stop1326" + offset="1.0000000" + style="stop-color:#5187d6;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient1322" + id="linearGradient4975" + x1="34.892849" + y1="36.422989" + x2="45.918697" + y2="48.547989" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-18.01785,-13.57119)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7179" + id="linearGradient7185" + x1="13.435029" + y1="13.604306" + x2="22.374878" + y2="23.554308" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7179" + id="linearGradient7189" + gradientUnits="userSpaceOnUse" + x1="13.435029" + y1="13.604306" + x2="22.374878" + y2="23.554308" + gradientTransform="matrix(-1.000000,0.000000,0.000000,-1.000000,47.93934,50.02474)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2380" + id="linearGradient7180" + gradientUnits="userSpaceOnUse" + x1="62.513836" + y1="36.061237" + x2="15.984863" + y2="20.60858" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2871" + id="linearGradient7182" + gradientUnits="userSpaceOnUse" + x1="46.834816" + y1="45.264122" + x2="45.380436" + y2="50.939667" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2402" + id="linearGradient7184" + gradientUnits="userSpaceOnUse" + x1="18.935766" + y1="23.667896" + x2="53.588622" + y2="26.649362" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2871" + id="linearGradient7186" + gradientUnits="userSpaceOnUse" + x1="46.834816" + y1="45.264122" + x2="45.380436" + y2="50.939667" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7916" + id="linearGradient7922" + x1="16.874998" + y1="22.851799" + x2="27.900846" + y2="34.976799" + gradientUnits="userSpaceOnUse" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="0.10980392" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1" + inkscape:cx="-123.27226" + inkscape:cy="26.474252" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:grid-bbox="true" + inkscape:document-units="px" + inkscape:window-width="1280" + inkscape:window-height="818" + inkscape:window-x="0" + inkscape:window-y="30" + inkscape:showpageshadow="false" /> + <metadata + id="metadata6436"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title>Remove</dc:title> + <dc:date>2006-01-04</dc:date> + <dc:creator> + <cc:Agent> + <dc:title>Andreas Nilsson</dc:title> + </cc:Agent> + </dc:creator> + <dc:source>http://tango-project.org</dc:source> + <dc:subject> + <rdf:Bag> + <rdf:li>remove</rdf:li> + <rdf:li>delete</rdf:li> + </rdf:Bag> + </dc:subject> + <cc:license + rdf:resource="http://creativecommons.org/licenses/publicdomain/" /> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/publicdomain/"> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Reproduction" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Distribution" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <path + style="fill:#75a1d0;fill-opacity:1.0000000;stroke:#3465a4;stroke-width:1.0000004px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000" + d="M 27.514356,28.359472 L 39.633445,28.475543 L 39.633445,21.480219 L 27.523285,21.480219 L 20.502546,21.462362 L 8.5441705,21.489147 L 8.5084565,28.457686 L 20.511475,28.475543 L 27.514356,28.359472 z " + id="text1314" + sodipodi:nodetypes="ccccccccc" /> + <path + style="opacity:0.40860215;fill:url(#linearGradient4975);fill-opacity:1.0000000;stroke:url(#linearGradient7922);stroke-width:1.0000006px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000" + d="M 38.579429,27.484113 L 38.588357,22.475309 L 9.5267863,22.493166 L 9.5000003,27.466256 L 38.579429,27.484113 z " + id="path7076" + sodipodi:nodetypes="ccccc" /> + <path + style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;opacity:0.31182796" + d="M 9.0000000,25.000000 C 9.0000000,26.937500 39.125000,24.062500 39.125000,25.000000 L 39.125000,22.000000 L 9.0000000,22.000000 L 9.0000000,25.000000 z " + id="path7914" + sodipodi:nodetypes="ccccc" /> + </g> +</svg>
new file mode 100644 --- /dev/null +++ b/browser/app/profile/extensions/uriloader@pdf.js/content/web/viewer-snippet-firefox-extension.html @@ -0,0 +1,31487 @@ +<!-- This snippet is used in firefox extension, see Makefile --> +<base href="resource://pdf.js/web/" /> +<script type="text/javascript" id="PDFJS_SCRIPT_TAG"> +<!-- +// pdf.js is inlined here because resource:// urls won't work +// for loading workers. +/* PDFJSSCRIPT_INCLUDE_BUNDLE */ +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ + +var PDFJS = {}; + +(function pdfjsWrapper() { + // Use strict in our context only - users might not want it + 'use strict'; + + PDFJS.build = '75dcd2b'; + + // Files are inserted below - see Makefile + /* PDFJSSCRIPT_INCLUDE_ALL */ +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ + +'use strict'; + +var globalScope = (typeof window === 'undefined') ? this : window; + +var isWorker = (typeof window == 'undefined'); + +var ERRORS = 0, WARNINGS = 1, TODOS = 5; +var verbosity = WARNINGS; + +// The global PDFJS object exposes the API +// In production, it will be declared outside a global wrapper +// In development, it will be declared here +if (!globalScope.PDFJS) { + globalScope.PDFJS = {}; +} + +// getPdf() +// Convenience function to perform binary Ajax GET +// Usage: getPdf('http://...', callback) +// getPdf({ +// url:String , +// [,progress:Function, error:Function] +// }, +// callback) +function getPdf(arg, callback) { + var params = arg; + if (typeof arg === 'string') + params = { url: arg }; + + var xhr = new XMLHttpRequest(); + xhr.open('GET', params.url); + xhr.mozResponseType = xhr.responseType = 'arraybuffer'; + var protocol = params.url.indexOf(':') < 0 ? window.location.protocol : + params.url.substring(0, params.url.indexOf(':') + 1); + xhr.expected = (protocol === 'http:' || protocol === 'https:') ? 200 : 0; + + if ('progress' in params) + xhr.onprogress = params.progress || undefined; + + if ('error' in params) + xhr.onerror = params.error || undefined; + + xhr.onreadystatechange = function getPdfOnreadystatechange(e) { + if (xhr.readyState === 4) { + if (xhr.status === xhr.expected) { + var data = (xhr.mozResponseArrayBuffer || xhr.mozResponse || + xhr.responseArrayBuffer || xhr.response); + callback(data); + } else if (params.error) { + params.error(e); + } + } + }; + xhr.send(null); +} +globalScope.PDFJS.getPdf = getPdf; +globalScope.PDFJS.pdfBug = false; + +var Page = (function PageClosure() { + function Page(xref, pageNumber, pageDict, ref) { + this.pageNumber = pageNumber; + this.pageDict = pageDict; + this.stats = new StatTimer(); + this.stats.enabled = !!globalScope.PDFJS.enableStats; + this.xref = xref; + this.ref = ref; + + this.displayReadyPromise = null; + } + + Page.prototype = { + getPageProp: function pageGetPageProp(key) { + return this.xref.fetchIfRef(this.pageDict.get(key)); + }, + inheritPageProp: function pageInheritPageProp(key) { + var dict = this.pageDict; + var obj = dict.get(key); + while (obj === undefined) { + dict = this.xref.fetchIfRef(dict.get('Parent')); + if (!dict) + break; + obj = dict.get(key); + } + return obj; + }, + get content() { + return shadow(this, 'content', this.getPageProp('Contents')); + }, + get resources() { + return shadow(this, 'resources', this.inheritPageProp('Resources')); + }, + get mediaBox() { + var obj = this.inheritPageProp('MediaBox'); + // Reset invalid media box to letter size. + if (!isArray(obj) || obj.length !== 4) + obj = [0, 0, 612, 792]; + return shadow(this, 'mediaBox', obj); + }, + get view() { + var cropBox = this.inheritPageProp('CropBox'); + var view = { + x: 0, + y: 0, + width: this.width, + height: this.height + }; + if (!isArray(cropBox) || cropBox.length !== 4) + return shadow(this, 'view', view); + + var mediaBox = this.mediaBox; + var offsetX = mediaBox[0], offsetY = mediaBox[1]; + + // From the spec, 6th ed., p.963: + // "The crop, bleed, trim, and art boxes should not ordinarily + // extend beyond the boundaries of the media box. If they do, they are + // effectively reduced to their intersection with the media box." + cropBox = Util.intersect(cropBox, mediaBox); + if (!cropBox) + return shadow(this, 'view', view); + + var tl = this.rotatePoint(cropBox[0] - offsetX, cropBox[1] - offsetY); + var br = this.rotatePoint(cropBox[2] - offsetX, cropBox[3] - offsetY); + view.x = Math.min(tl.x, br.x); + view.y = Math.min(tl.y, br.y); + view.width = Math.abs(tl.x - br.x); + view.height = Math.abs(tl.y - br.y); + + return shadow(this, 'view', view); + }, + get annotations() { + return shadow(this, 'annotations', this.inheritPageProp('Annots')); + }, + get width() { + var mediaBox = this.mediaBox; + var rotate = this.rotate; + var width; + if (rotate == 0 || rotate == 180) { + width = (mediaBox[2] - mediaBox[0]); + } else { + width = (mediaBox[3] - mediaBox[1]); + } + return shadow(this, 'width', width); + }, + get height() { + var mediaBox = this.mediaBox; + var rotate = this.rotate; + var height; + if (rotate == 0 || rotate == 180) { + height = (mediaBox[3] - mediaBox[1]); + } else { + height = (mediaBox[2] - mediaBox[0]); + } + return shadow(this, 'height', height); + }, + get rotate() { + var rotate = this.inheritPageProp('Rotate') || 0; + // Normalize rotation so it's a multiple of 90 and between 0 and 270 + if (rotate % 90 != 0) { + rotate = 0; + } else if (rotate >= 360) { + rotate = rotate % 360; + } else if (rotate < 0) { + // The spec doesn't cover negatives, assume its counterclockwise + // rotation. The following is the other implementation of modulo. + rotate = ((rotate % 360) + 360) % 360; + } + return shadow(this, 'rotate', rotate); + }, + + startRenderingFromOperatorList: function pageStartRenderingFromOperatorList( + operatorList, fonts) { + var self = this; + this.operatorList = operatorList; + + var displayContinuation = function pageDisplayContinuation() { + // Always defer call to display() to work around bug in + // Firefox error reporting from XHR callbacks. + setTimeout(function pageSetTimeout() { + self.displayReadyPromise.resolve(); + }); + }; + + this.ensureFonts(fonts, + function pageStartRenderingFromOperatorListEnsureFonts() { + displayContinuation(); + } + ); + }, + + getOperatorList: function pageGetOperatorList(handler, dependency) { + if (this.operatorList) { + // content was compiled + return this.operatorList; + } + + this.stats.time('Build IR Queue'); + + var xref = this.xref; + var content = xref.fetchIfRef(this.content); + var resources = xref.fetchIfRef(this.resources); + if (isArray(content)) { + // fetching items + var i, n = content.length; + for (i = 0; i < n; ++i) + content[i] = xref.fetchIfRef(content[i]); + content = new StreamsSequenceStream(content); + } else if (!content) { + // replacing non-existent page content with empty one + content = new Stream(new Uint8Array(0)); + } + + var pe = this.pe = new PartialEvaluator( + xref, handler, 'p' + this.pageNumber + '_'); + + this.operatorList = pe.getOperatorList(content, resources, dependency); + this.stats.timeEnd('Build IR Queue'); + return this.operatorList; + }, + + ensureFonts: function pageEnsureFonts(fonts, callback) { + this.stats.time('Font Loading'); + // Convert the font names to the corresponding font obj. + for (var i = 0, ii = fonts.length; i < ii; i++) { + fonts[i] = this.objs.objs[fonts[i]].data; + } + + // Load all the fonts + FontLoader.bind( + fonts, + function pageEnsureFontsFontObjs(fontObjs) { + this.stats.timeEnd('Font Loading'); + + callback.call(this); + }.bind(this) + ); + }, + + display: function pageDisplay(gfx, callback) { + var stats = this.stats; + stats.time('Rendering'); + var xref = this.xref; + var resources = xref.fetchIfRef(this.resources); + var mediaBox = xref.fetchIfRef(this.mediaBox); + assertWellFormed(isDict(resources), 'invalid page resources'); + + gfx.xref = xref; + gfx.res = resources; + gfx.beginDrawing({ x: mediaBox[0], y: mediaBox[1], + width: this.width, + height: this.height, + rotate: this.rotate }); + + var startIdx = 0; + var length = this.operatorList.fnArray.length; + var operatorList = this.operatorList; + var stepper = null; + if (PDFJS.pdfBug && StepperManager.enabled) { + stepper = StepperManager.create(this.pageNumber); + stepper.init(operatorList); + stepper.nextBreakPoint = stepper.getNextBreakPoint(); + } + + var self = this; + function next() { + startIdx = + gfx.executeOperatorList(operatorList, startIdx, next, stepper); + if (startIdx == length) { + gfx.endDrawing(); + stats.timeEnd('Rendering'); + stats.timeEnd('Overall'); + if (callback) callback(); + } + } + next(); + }, + rotatePoint: function pageRotatePoint(x, y, reverse) { + var rotate = reverse ? (360 - this.rotate) : this.rotate; + switch (rotate) { + case 180: + return {x: this.width - x, y: y}; + case 90: + return {x: this.width - y, y: this.height - x}; + case 270: + return {x: y, y: x}; + case 360: + case 0: + default: + return {x: x, y: this.height - y}; + } + }, + getLinks: function pageGetLinks() { + var links = []; + var annotations = pageGetAnnotations(); + var i, n = annotations.length; + for (i = 0; i < n; ++i) { + if (annotations[i].type != 'Link') + continue; + links.push(annotations[i]); + } + return links; + }, + getAnnotations: function pageGetAnnotations() { + var xref = this.xref; + function getInheritableProperty(annotation, name) { + var item = annotation; + while (item && !item.has(name)) { + item = xref.fetchIfRef(item.get('Parent')); + } + if (!item) + return null; + return item.get(name); + } + function isValidUrl(url) { + if (!url) + return false; + var colon = url.indexOf(':'); + if (colon < 0) + return false; + var protocol = url.substr(0, colon); + switch (protocol) { + case 'http': + case 'https': + case 'ftp': + return true; + default: + return false; + } + } + + var annotations = xref.fetchIfRef(this.annotations) || []; + var i, n = annotations.length; + var items = []; + for (i = 0; i < n; ++i) { + var annotationRef = annotations[i]; + var annotation = xref.fetch(annotationRef); + if (!isDict(annotation)) + continue; + var subtype = annotation.get('Subtype'); + if (!isName(subtype)) + continue; + var rect = annotation.get('Rect'); + var topLeftCorner = this.rotatePoint(rect[0], rect[1]); + var bottomRightCorner = this.rotatePoint(rect[2], rect[3]); + + var item = {}; + item.type = subtype.name; + item.x = Math.min(topLeftCorner.x, bottomRightCorner.x); + item.y = Math.min(topLeftCorner.y, bottomRightCorner.y); + item.width = Math.abs(topLeftCorner.x - bottomRightCorner.x); + item.height = Math.abs(topLeftCorner.y - bottomRightCorner.y); + switch (subtype.name) { + case 'Link': + var a = this.xref.fetchIfRef(annotation.get('A')); + if (a) { + switch (a.get('S').name) { + case 'URI': + var url = a.get('URI'); + // TODO: pdf spec mentions urls can be relative to a Base + // entry in the dictionary. + if (!isValidUrl(url)) + url = ''; + item.url = url; + break; + case 'GoTo': + item.dest = a.get('D'); + break; + default: + TODO('other link types'); + } + } else if (annotation.has('Dest')) { + // simple destination link + var dest = annotation.get('Dest'); + item.dest = isName(dest) ? dest.name : dest; + } + break; + case 'Widget': + var fieldType = getInheritableProperty(annotation, 'FT'); + if (!isName(fieldType)) + break; + item.fieldType = fieldType.name; + // Building the full field name by collecting the field and + // its ancestors 'T' properties and joining them using '.'. + var fieldName = []; + var namedItem = annotation, ref = annotationRef; + while (namedItem) { + var parentRef = namedItem.get('Parent'); + var parent = xref.fetchIfRef(parentRef); + var name = namedItem.get('T'); + if (name) + fieldName.unshift(stringToPDFString(name)); + else { + // The field name is absent, that means more than one field + // with the same name may exist. Replacing the empty name + // with the '`' plus index in the parent's 'Kids' array. + // This is not in the PDF spec but necessary to id the + // the input controls. + var kids = xref.fetchIfRef(parent.get('Kids')); + var j, jj; + for (j = 0, jj = kids.length; j < jj; j++) { + if (kids[j].num == ref.num && kids[j].gen == ref.gen) + break; + } + fieldName.unshift('`' + j); + } + namedItem = parent; + ref = parentRef; + } + item.fullName = fieldName.join('.'); + var alternativeText = stringToPDFString(annotation.get('TU') || ''); + item.alternativeText = alternativeText; + var da = getInheritableProperty(annotation, 'DA') || ''; + var m = /([\d\.]+)\sTf/.exec(da); + if (m) + item.fontSize = parseFloat(m[1]); + item.textAlignment = getInheritableProperty(annotation, 'Q'); + item.flags = getInheritableProperty(annotation, 'Ff') || 0; + break; + case 'Text': + var content = annotation.get('Contents'); + var title = annotation.get('T'); + item.content = stringToPDFString(content || ''); + item.title = stringToPDFString(title || ''); + item.name = annotation.get('Name').name; + break; + default: + TODO('unimplemented annotation type: ' + subtype.name); + break; + } + items.push(item); + } + return items; + }, + startRendering: function pageStartRendering(ctx, callback, textLayer) { + var stats = this.stats; + stats.time('Overall'); + // If there is no displayReadyPromise yet, then the operatorList was never + // requested before. Make the request and create the promise. + if (!this.displayReadyPromise) { + this.pdf.startRendering(this); + this.displayReadyPromise = new Promise(); + } + + // Once the operatorList and fonts are loaded, do the actual rendering. + this.displayReadyPromise.then( + function pageDisplayReadyPromise() { + var gfx = new CanvasGraphics(ctx, this.objs, textLayer); + try { + this.display(gfx, callback); + } catch (e) { + if (callback) + callback(e); + else + error(e); + } + }.bind(this), + function pageDisplayReadPromiseError(reason) { + if (callback) + callback(reason); + else + error(reason); + } + ); + } + }; + + return Page; +})(); + +/** + * The `PDFDocModel` holds all the data of the PDF file. Compared to the + * `PDFDoc`, this one doesn't have any job management code. + * Right now there exists one PDFDocModel on the main thread + one object + * for each worker. If there is no worker support enabled, there are two + * `PDFDocModel` objects on the main thread created. + */ +var PDFDocModel = (function PDFDocModelClosure() { + function PDFDocModel(arg, callback) { + if (isStream(arg)) + init.call(this, arg); + else if (isArrayBuffer(arg)) + init.call(this, new Stream(arg)); + else + error('PDFDocModel: Unknown argument type'); + } + + function init(stream) { + assertWellFormed(stream.length > 0, 'stream must have data'); + this.stream = stream; + this.setup(); + this.acroForm = this.xref.fetchIfRef(this.catalog.catDict.get('AcroForm')); + } + + function find(stream, needle, limit, backwards) { + var pos = stream.pos; + var end = stream.end; + var str = ''; + if (pos + limit > end) + limit = end - pos; + for (var n = 0; n < limit; ++n) + str += stream.getChar(); + stream.pos = pos; + var index = backwards ? str.lastIndexOf(needle) : str.indexOf(needle); + if (index == -1) + return false; /* not found */ + stream.pos += index; + return true; /* found */ + } + + PDFDocModel.prototype = { + get linearization() { + var length = this.stream.length; + var linearization = false; + if (length) { + linearization = new Linearization(this.stream); + if (linearization.length != length) + linearization = false; + } + // shadow the prototype getter with a data property + return shadow(this, 'linearization', linearization); + }, + get startXRef() { + var stream = this.stream; + var startXRef = 0; + var linearization = this.linearization; + if (linearization) { + // Find end of first obj. + stream.reset(); + if (find(stream, 'endobj', 1024)) + startXRef = stream.pos + 6; + } else { + // Find startxref by jumping backward from the end of the file. + var step = 1024; + var found = false, pos = stream.end; + while (!found && pos > 0) { + pos -= step - 'startxref'.length; + if (pos < 0) + pos = 0; + stream.pos = pos; + found = find(stream, 'startxref', step, true); + } + if (found) { + stream.skip(9); + var ch; + do { + ch = stream.getChar(); + } while (Lexer.isSpace(ch)); + var str = ''; + while ((ch - '0') <= 9) { + str += ch; + ch = stream.getChar(); + } + startXRef = parseInt(str, 10); + if (isNaN(startXRef)) + startXRef = 0; + } + } + // shadow the prototype getter with a data property + return shadow(this, 'startXRef', startXRef); + }, + get mainXRefEntriesOffset() { + var mainXRefEntriesOffset = 0; + var linearization = this.linearization; + if (linearization) + mainXRefEntriesOffset = linearization.mainXRefEntriesOffset; + // shadow the prototype getter with a data property + return shadow(this, 'mainXRefEntriesOffset', mainXRefEntriesOffset); + }, + // Find the header, remove leading garbage and setup the stream + // starting from the header. + checkHeader: function pdfDocCheckHeader() { + var stream = this.stream; + stream.reset(); + if (find(stream, '%PDF-', 1024)) { + // Found the header, trim off any garbage before it. + stream.moveStart(); + return; + } + // May not be a PDF file, continue anyway. + }, + setup: function pdfDocSetup(ownerPassword, userPassword) { + this.checkHeader(); + var xref = new XRef(this.stream, + this.startXRef, + this.mainXRefEntriesOffset); + this.xref = xref; + this.catalog = new Catalog(xref); + if (xref.trailer && xref.trailer.has('ID')) { + var fileID = ''; + var id = xref.fetchIfRef(xref.trailer.get('ID'))[0]; + id.split('').forEach(function(el) { + fileID += Number(el.charCodeAt(0)).toString(16); + }); + this.fileID = fileID; + } + }, + get numPages() { + var linearization = this.linearization; + var num = linearization ? linearization.numPages : this.catalog.numPages; + // shadow the prototype getter + return shadow(this, 'numPages', num); + }, + getFingerprint: function pdfDocGetFingerprint() { + if (this.fileID) { + return this.fileID; + } else { + // If we got no fileID, then we generate one, + // from the first 100 bytes of PDF + var data = this.stream.bytes.subarray(0, 100); + var hash = calculateMD5(data, 0, data.length); + var strHash = ''; + for (var i = 0, length = hash.length; i < length; i++) { + strHash += Number(hash[i]).toString(16); + } + + return strHash; + } + }, + getPage: function pdfDocGetPage(n) { + return this.catalog.getPage(n); + } + }; + + return PDFDocModel; +})(); + +var PDFDoc = (function PDFDocClosure() { + function PDFDoc(arg, callback) { + var stream = null; + var data = null; + + if (isStream(arg)) { + stream = arg; + data = arg.bytes; + } else if (isArrayBuffer(arg)) { + stream = new Stream(arg); + data = arg; + } else { + error('PDFDoc: Unknown argument type'); + } + + this.data = data; + this.stream = stream; + this.pdfModel = new PDFDocModel(stream); + this.fingerprint = this.pdfModel.getFingerprint(); + this.catalog = this.pdfModel.catalog; + this.objs = new PDFObjects(); + + this.pageCache = []; + this.fontsLoading = {}; + this.workerReadyPromise = new Promise('workerReady'); + + // If worker support isn't disabled explicit and the browser has worker + // support, create a new web worker and test if it/the browser fullfills + // all requirements to run parts of pdf.js in a web worker. + // Right now, the requirement is, that an Uint8Array is still an Uint8Array + // as it arrives on the worker. Chrome added this with version 15. + if (!globalScope.PDFJS.disableWorker && typeof Worker !== 'undefined') { + var workerSrc = PDFJS.workerSrc; + if (typeof workerSrc === 'undefined') { + error('No PDFJS.workerSrc specified'); + } + + try { + var worker; + if (PDFJS.isFirefoxExtension) { + // The firefox extension can't load the worker from the resource:// + // url so we have to inline the script and then use the blob loader. + var bb = new MozBlobBuilder(); + bb.append(document.querySelector('#PDFJS_SCRIPT_TAG').textContent); + var blobUrl = window.URL.createObjectURL(bb.getBlob()); + worker = new Worker(blobUrl); + } else { + // Some versions of FF can't create a worker on localhost, see: + // https://bugzilla.mozilla.org/show_bug.cgi?id=683280 + worker = new Worker(workerSrc); + } + + var messageHandler = new MessageHandler('main', worker); + + messageHandler.on('test', function pdfDocTest(supportTypedArray) { + if (supportTypedArray) { + this.worker = worker; + this.setupMessageHandler(messageHandler); + } else { + globalScope.PDFJS.disableWorker = true; + this.setupFakeWorker(); + } + }.bind(this)); + + var testObj = new Uint8Array(1); + // Some versions of Opera throw a DATA_CLONE_ERR on + // serializing the typed array. + messageHandler.send('test', testObj); + return; + } catch (e) { + warn('The worker has been disabled.'); + } + } + // Either workers are disabled, not supported or have thrown an exception. + // Thus, we fallback to a faked worker. + globalScope.PDFJS.disableWorker = true; + this.setupFakeWorker(); + } + + PDFDoc.prototype = { + setupFakeWorker: function() { + // If we don't use a worker, just post/sendMessage to the main thread. + var fakeWorker = { + postMessage: function pdfDocPostMessage(obj) { + fakeWorker.onmessage({data: obj}); + }, + terminate: function pdfDocTerminate() {} + }; + + var messageHandler = new MessageHandler('main', fakeWorker); + this.setupMessageHandler(messageHandler); + + // If the main thread is our worker, setup the handling for the messages + // the main thread sends to it self. + WorkerMessageHandler.setup(messageHandler); + }, + + + setupMessageHandler: function(messageHandler) { + this.messageHandler = messageHandler; + + messageHandler.on('page', function pdfDocPage(data) { + var pageNum = data.pageNum; + var page = this.pageCache[pageNum]; + var depFonts = data.depFonts; + + page.stats.timeEnd('Page Request'); + page.startRenderingFromOperatorList(data.operatorList, depFonts); + }, this); + + messageHandler.on('obj', function pdfDocObj(data) { + var id = data[0]; + var type = data[1]; + + switch (type) { + case 'JpegStream': + var imageData = data[2]; + loadJpegStream(id, imageData, this.objs); + break; + case 'Image': + var imageData = data[2]; + this.objs.resolve(id, imageData); + break; + case 'Font': + var name = data[2]; + var file = data[3]; + var properties = data[4]; + + if (file) { + // Rewrap the ArrayBuffer in a stream. + var fontFileDict = new Dict(); + file = new Stream(file, 0, file.length, fontFileDict); + } + + // At this point, only the font object is created but the font is + // not yet attached to the DOM. This is done in `FontLoader.bind`. + var font = new Font(name, file, properties); + this.objs.resolve(id, font); + break; + default: + error('Got unkown object type ' + type); + } + }, this); + + messageHandler.on('page_error', function pdfDocError(data) { + var page = this.pageCache[data.pageNum]; + if (page.displayReadyPromise) + page.displayReadyPromise.reject(data.error); + else + error(data.error); + }, this); + + messageHandler.on('jpeg_decode', function(data, promise) { + var imageData = data[0]; + var components = data[1]; + if (components != 3 && components != 1) + error('Only 3 component or 1 component can be returned'); + + var img = new Image(); + img.onload = (function jpegImageLoaderOnload() { + var width = img.width; + var height = img.height; + var size = width * height; + var rgbaLength = size * 4; + var buf = new Uint8Array(size * components); + var tmpCanvas = createScratchCanvas(width, height); + var tmpCtx = tmpCanvas.getContext('2d'); + tmpCtx.drawImage(img, 0, 0); + var data = tmpCtx.getImageData(0, 0, width, height).data; + + if (components == 3) { + for (var i = 0, j = 0; i < rgbaLength; i += 4, j += 3) { + buf[j] = data[i]; + buf[j + 1] = data[i + 1]; + buf[j + 2] = data[i + 2]; + } + } else if (components == 1) { + for (var i = 0, j = 0; i < rgbaLength; i += 4, j++) { + buf[j] = data[i]; + } + } + promise.resolve({ data: buf, width: width, height: height}); + }).bind(this); + var src = 'data:image/jpeg;base64,' + window.btoa(imageData); + img.src = src; + }); + + setTimeout(function pdfDocFontReadySetTimeout() { + messageHandler.send('doc', this.data); + this.workerReadyPromise.resolve(true); + }.bind(this)); + }, + + get numPages() { + return this.pdfModel.numPages; + }, + + startRendering: function pdfDocStartRendering(page) { + // The worker might not be ready to receive the page request yet. + this.workerReadyPromise.then(function pdfDocStartRenderingThen() { + page.stats.time('Page Request'); + this.messageHandler.send('page_request', page.pageNumber + 1); + }.bind(this)); + }, + + getPage: function pdfDocGetPage(n) { + if (this.pageCache[n]) + return this.pageCache[n]; + + var page = this.pdfModel.getPage(n); + // Add a reference to the objects such that Page can forward the reference + // to the CanvasGraphics and so on. + page.objs = this.objs; + page.pdf = this; + return (this.pageCache[n] = page); + }, + + destroy: function pdfDocDestroy() { + if (this.worker) + this.worker.terminate(); + + if (this.fontWorker) + this.fontWorker.terminate(); + + for (var n in this.pageCache) + delete this.pageCache[n]; + + delete this.data; + delete this.stream; + delete this.pdf; + delete this.catalog; + } + }; + + return PDFDoc; +})(); + +globalScope.PDFJS.PDFDoc = PDFDoc; + +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ + +'use strict'; + +function log(msg) { + if (console && console.log) + console.log(msg); + else if (print) + print(msg); +} + +function warn(msg) { + if (verbosity >= WARNINGS) + log('Warning: ' + msg); +} + +function backtrace() { + try { + throw new Error(); + } catch (e) { + return e.stack ? e.stack.split('\n').slice(2).join('\n') : ''; + } +} + +function error(msg) { + log('Error: ' + msg); + log(backtrace()); + throw new Error(msg); +} + +function TODO(what) { + if (verbosity >= TODOS) + log('TODO: ' + what); +} + +function malformed(msg) { + error('Malformed PDF: ' + msg); +} + +function assert(cond, msg) { + if (!cond) + error(msg); +} + +// In a well-formed PDF, |cond| holds. If it doesn't, subsequent +// behavior is undefined. +function assertWellFormed(cond, msg) { + if (!cond) + malformed(msg); +} + +function shadow(obj, prop, value) { + Object.defineProperty(obj, prop, { value: value, + enumerable: true, + configurable: true, + writable: false }); + return value; +} + +function bytesToString(bytes) { + var str = ''; + var length = bytes.length; + for (var n = 0; n < length; ++n) + str += String.fromCharCode(bytes[n]); + return str; +} + +function stringToBytes(str) { + var length = str.length; + var bytes = new Uint8Array(length); + for (var n = 0; n < length; ++n) + bytes[n] = str.charCodeAt(n) & 0xFF; + return bytes; +} + +var IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0]; + +var Util = (function UtilClosure() { + function Util() {} + + Util.makeCssRgb = function makergb(r, g, b) { + var ri = (255 * r) | 0, gi = (255 * g) | 0, bi = (255 * b) | 0; + return 'rgb(' + ri + ',' + gi + ',' + bi + ')'; + }; + + Util.makeCssCmyk = function makecmyk(c, m, y, k) { + c = (new DeviceCmykCS()).getRgb([c, m, y, k]); + var ri = (255 * c[0]) | 0, gi = (255 * c[1]) | 0, bi = (255 * c[2]) | 0; + return 'rgb(' + ri + ',' + gi + ',' + bi + ')'; + }; + + // For 2d affine transforms + Util.applyTransform = function apply(p, m) { + var xt = p[0] * m[0] + p[1] * m[2] + m[4]; + var yt = p[0] * m[1] + p[1] * m[3] + m[5]; + return [xt, yt]; + }; + + // Apply a generic 3d matrix M on a 3-vector v: + // | a b c | | X | + // | d e f | x | Y | + // | g h i | | Z | + // M is assumed to be serialized as [a,b,c,d,e,f,g,h,i], + // with v as [X,Y,Z] + Util.apply3dTransform = function apply3d(m, v) { + return [ + m[0] * v[0] + m[1] * v[1] + m[2] * v[2], + m[3] * v[0] + m[4] * v[1] + m[5] * v[2], + m[6] * v[0] + m[7] * v[1] + m[8] * v[2] + ]; + } + + // Normalize rectangle rect=[x1, y1, x2, y2] so that (x1,y1) < (x2,y2) + // For coordinate systems whose origin lies in the bottom-left, this + // means normalization to (BL,TR) ordering. For systems with origin in the + // top-left, this means (TL,BR) ordering. + Util.normalizeRect = function normalizeRect(rect) { + var r = rect.slice(0); // clone rect + if (rect[0] > rect[2]) { + r[0] = rect[2]; + r[2] = rect[0]; + } + if (rect[1] > rect[3]) { + r[1] = rect[3]; + r[3] = rect[1]; + } + return r; + } + + // Returns a rectangle [x1, y1, x2, y2] corresponding to the + // intersection of rect1 and rect2. If no intersection, returns 'false' + // The rectangle coordinates of rect1, rect2 should be [x1, y1, x2, y2] + Util.intersect = function intersect(rect1, rect2) { + function compare(a, b) { + return a - b; + }; + + // Order points along the axes + var orderedX = [rect1[0], rect1[2], rect2[0], rect2[2]].sort(compare), + orderedY = [rect1[1], rect1[3], rect2[1], rect2[3]].sort(compare), + result = []; + + rect1 = Util.normalizeRect(rect1); + rect2 = Util.normalizeRect(rect2); + + // X: first and second points belong to different rectangles? + if ((orderedX[0] === rect1[0] && orderedX[1] === rect2[0]) || + (orderedX[0] === rect2[0] && orderedX[1] === rect1[0])) { + // Intersection must be between second and third points + result[0] = orderedX[1]; + result[2] = orderedX[2]; + } else { + return false; + } + + // Y: first and second points belong to different rectangles? + if ((orderedY[0] === rect1[1] && orderedY[1] === rect2[1]) || + (orderedY[0] === rect2[1] && orderedY[1] === rect1[1])) { + // Intersection must be between second and third points + result[1] = orderedY[1]; + result[3] = orderedY[2]; + } else { + return false; + } + + return result; + } + + Util.sign = function sign(num) { + return num < 0 ? -1 : 1; + }; + + return Util; +})(); + +var PDFStringTranslateTable = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0x2D8, 0x2C7, 0x2C6, 0x2D9, 0x2DD, 0x2DB, 0x2DA, 0x2DC, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, + 0x2013, 0x192, 0x2044, 0x2039, 0x203A, 0x2212, 0x2030, 0x201E, 0x201C, + 0x201D, 0x2018, 0x2019, 0x201A, 0x2122, 0xFB01, 0xFB02, 0x141, 0x152, 0x160, + 0x178, 0x17D, 0x131, 0x142, 0x153, 0x161, 0x17E, 0, 0x20AC +]; + +function stringToPDFString(str) { + var i, n = str.length, str2 = ''; + if (str[0] === '\xFE' && str[1] === '\xFF') { + // UTF16BE BOM + for (i = 2; i < n; i += 2) + str2 += String.fromCharCode( + (str.charCodeAt(i) << 8) | str.charCodeAt(i + 1)); + } else { + for (i = 0; i < n; ++i) { + var code = PDFStringTranslateTable[str.charCodeAt(i)]; + str2 += code ? String.fromCharCode(code) : str.charAt(i); + } + } + return str2; +} + +function isBool(v) { + return typeof v == 'boolean'; +} + +function isInt(v) { + return typeof v == 'number' && ((v | 0) == v); +} + +function isNum(v) { + return typeof v == 'number'; +} + +function isString(v) { + return typeof v == 'string'; +} + +function isNull(v) { + return v === null; +} + +function isName(v) { + return v instanceof Name; +} + +function isCmd(v, cmd) { + return v instanceof Cmd && (!cmd || v.cmd == cmd); +} + +function isDict(v, type) { + return v instanceof Dict && (!type || v.get('Type').name == type); +} + +function isArray(v) { + return v instanceof Array; +} + +function isStream(v) { + return typeof v == 'object' && v != null && ('getChar' in v); +} + +function isArrayBuffer(v) { + return typeof v == 'object' && v != null && ('byteLength' in v); +} + +function isRef(v) { + return v instanceof Ref; +} + +function isPDFFunction(v) { + var fnDict; + if (typeof v != 'object') + return false; + else if (isDict(v)) + fnDict = v; + else if (isStream(v)) + fnDict = v.dict; + else + return false; + return fnDict.has('FunctionType'); +} + +/** + * 'Promise' object. + * Each object that is stored in PDFObjects is based on a Promise object that + * contains the status of the object and the data. There migth be situations, + * where a function want to use the value of an object, but it isn't ready at + * that time. To get a notification, once the object is ready to be used, s.o. + * can add a callback using the `then` method on the promise that then calls + * the callback once the object gets resolved. + * A promise can get resolved only once and only once the data of the promise + * can be set. If any of these happens twice or the data is required before + * it was set, an exception is throw. + */ +var Promise = (function PromiseClosure() { + var EMPTY_PROMISE = {}; + + /** + * If `data` is passed in this constructor, the promise is created resolved. + * If there isn't data, it isn't resolved at the beginning. + */ + function Promise(name, data) { + this.name = name; + this.isRejected = false; + this.error = null; + // If you build a promise and pass in some data it's already resolved. + if (data != null) { + this.isResolved = true; + this._data = data; + this.hasData = true; + } else { + this.isResolved = false; + this._data = EMPTY_PROMISE; + } + this.callbacks = []; + this.errbacks = []; + }; + /** + * Builds a promise that is resolved when all the passed in promises are + * resolved. + * @param {Promise[]} promises Array of promises to wait for. + * @return {Promise} New dependant promise. + */ + Promise.all = function(promises) { + var deferred = new Promise(); + var unresolved = promises.length; + var results = []; + if (unresolved === 0) { + deferred.resolve(results); + return deferred; + } + for (var i = 0; i < unresolved; ++i) { + var promise = promises[i]; + promise.then((function(i) { + return function(value) { + results[i] = value; + unresolved--; + if (unresolved === 0) + deferred.resolve(results); + }; + })(i)); + } + return deferred; + }; + Promise.prototype = { + hasData: false, + + set data(value) { + if (value === undefined) { + return; + } + if (this._data !== EMPTY_PROMISE) { + error('Promise ' + this.name + + ': Cannot set the data of a promise twice'); + } + this._data = value; + this.hasData = true; + + if (this.onDataCallback) { + this.onDataCallback(value); + } + }, + + get data() { + if (this._data === EMPTY_PROMISE) { + error('Promise ' + this.name + ': Cannot get data that isn\'t set'); + } + return this._data; + }, + + onData: function promiseOnData(callback) { + if (this._data !== EMPTY_PROMISE) { + callback(this._data); + } else { + this.onDataCallback = callback; + } + }, + + resolve: function promiseResolve(data) { + if (this.isResolved) { + error('A Promise can be resolved only once ' + this.name); + } + if (this.isRejected) { + error('The Promise was already rejected ' + this.name); + } + + this.isResolved = true; + this.data = data || null; + var callbacks = this.callbacks; + + for (var i = 0, ii = callbacks.length; i < ii; i++) { + callbacks[i].call(null, data); + } + }, + + reject: function proimseReject(reason) { + if (this.isRejected) { + error('A Promise can be rejected only once ' + this.name); + } + if (this.isResolved) { + error('The Promise was already resolved ' + this.name); + } + + this.isRejected = true; + this.error = reason || null; + var errbacks = this.errbacks; + + for (var i = 0, ii = errbacks.length; i < ii; i++) { + errbacks[i].call(null, reason); + } + }, + + then: function promiseThen(callback, errback) { + if (!callback) { + error('Requiring callback' + this.name); + } + + // If the promise is already resolved, call the callback directly. + if (this.isResolved) { + var data = this.data; + callback.call(null, data); + } else if (this.isRejected && errback) { + var error = this.error; + errback.call(null, error); + } else { + this.callbacks.push(callback); + if (errback) + this.errbacks.push(errback); + } + } + }; + + return Promise; +})(); + +var StatTimer = (function StatTimerClosure() { + function rpad(str, pad, length) { + while (str.length < length) + str += pad; + return str; + } + function StatTimer() { + this.started = {}; + this.times = []; + this.enabled = true; + } + StatTimer.prototype = { + time: function statTimerTime(name) { + if (!this.enabled) + return; + if (name in this.started) + throw 'Timer is already running for ' + name; + this.started[name] = Date.now(); + }, + timeEnd: function statTimerTimeEnd(name) { + if (!this.enabled) + return; + if (!(name in this.started)) + throw 'Timer has not been started for ' + name; + this.times.push({ + 'name': name, + 'start': this.started[name], + 'end': Date.now() + }); + // Remove timer from started so it can be called again. + delete this.started[name]; + }, + toString: function statTimerToString() { + var times = this.times; + var out = ''; + // Find the longest name for padding purposes. + var longest = 0; + for (var i = 0, ii = times.length; i < ii; ++i) { + var name = times[i]['name']; + if (name.length > longest) + longest = name.length; + } + for (var i = 0, ii = times.length; i < ii; ++i) { + var span = times[i]; + var duration = span.end - span.start; + out += rpad(span['name'], ' ', longest) + ' ' + duration + 'ms\n'; + } + return out; + } + }; + return StatTimer; +})(); +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ + +'use strict'; + +// <canvas> contexts store most of the state we need natively. +// However, PDF needs a bit more state, which we store here. + +var TextRenderingMode = { + FILL: 0, + STROKE: 1, + FILL_STROKE: 2, + INVISIBLE: 3, + FILL_ADD_TO_PATH: 4, + STROKE_ADD_TO_PATH: 5, + FILL_STROKE_ADD_TO_PATH: 6, + ADD_TO_PATH: 7 +}; + +// Minimal font size that would be used during canvas fillText operations. +var MIN_FONT_SIZE = 1; + +var CanvasExtraState = (function CanvasExtraStateClosure() { + function CanvasExtraState(old) { + // Are soft masks and alpha values shapes or opacities? + this.alphaIsShape = false; + this.fontSize = 0; + this.fontSizeScale = 1; + this.textMatrix = IDENTITY_MATRIX; + this.fontMatrix = IDENTITY_MATRIX; + this.leading = 0; + // Current point (in user coordinates) + this.x = 0; + this.y = 0; + // Start of text line (in text coordinates) + this.lineX = 0; + this.lineY = 0; + // Character and word spacing + this.charSpacing = 0; + this.wordSpacing = 0; + this.textHScale = 1; + this.textRenderingMode = TextRenderingMode.FILL; + // Color spaces + this.fillColorSpace = new DeviceGrayCS(); + this.fillColorSpaceObj = null; + this.strokeColorSpace = new DeviceGrayCS(); + this.strokeColorSpaceObj = null; + this.fillColorObj = null; + this.strokeColorObj = null; + // Default fore and background colors + this.fillColor = '#000000'; + this.strokeColor = '#000000'; + // Note: fill alpha applies to all non-stroking operations + this.fillAlpha = 1; + this.strokeAlpha = 1; + this.lineWidth = 1; + + this.old = old; + } + + CanvasExtraState.prototype = { + clone: function canvasextra_clone() { + return Object.create(this); + }, + setCurrentPoint: function canvasextra_setCurrentPoint(x, y) { + this.x = x; + this.y = y; + } + }; + return CanvasExtraState; +})(); + +function createScratchCanvas(width, height) { + var canvas = document.createElement('canvas'); + canvas.width = width; + canvas.height = height; + return canvas; +} + +function addContextCurrentTransform(ctx) { + // If the context doesn't expose a `mozCurrentTransform`, add a JS based on. + if (!ctx.mozCurrentTransform) { + // Store the original context + ctx._originalSave = ctx.save; + ctx._originalRestore = ctx.restore; + ctx._originalRotate = ctx.rotate; + ctx._originalScale = ctx.scale; + ctx._originalTranslate = ctx.translate; + ctx._originalTransform = ctx.transform; + + ctx._transformMatrix = [1, 0, 0, 1, 0, 0]; + ctx._transformStack = []; + + Object.defineProperty(ctx, 'mozCurrentTransform', { + get: function getCurrentTransform() { + return this._transformMatrix; + } + }); + + Object.defineProperty(ctx, 'mozCurrentTransformInverse', { + get: function getCurrentTransformInverse() { + // Calculation done using WolframAlpha: + // http://www.wolframalpha.com/input/? + // i=Inverse+{{a%2C+c%2C+e}%2C+{b%2C+d%2C+f}%2C+{0%2C+0%2C+1}} + + var m = this._transformMatrix; + var a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5]; + + var ad_bc = a * d - b * c; + var bc_ad = b * c - a * d; + + return [ + d / ad_bc, + b / bc_ad, + c / bc_ad, + a / ad_bc, + (d * e - c * f) / bc_ad, + (b * e - a * f) / ad_bc + ]; + } + }); + + ctx.save = function ctxSave() { + var old = this._transformMatrix; + this._transformStack.push(old); + this._transformMatrix = old.slice(0, 6); + + this._originalSave(); + }; + + ctx.restore = function ctxRestore() { + var prev = this._transformStack.pop(); + if (prev) { + this._transformMatrix = prev; + this._originalRestore(); + } + }; + + ctx.translate = function ctxTranslate(x, y) { + var m = this._transformMatrix; + m[4] = m[0] * x + m[2] * y + m[4]; + m[5] = m[1] * x + m[3] * y + m[5]; + + this._originalTranslate(x, y); + }; + + ctx.scale = function ctxScale(x, y) { + var m = this._transformMatrix; + m[0] = m[0] * x; + m[1] = m[1] * x; + m[2] = m[2] * y; + m[3] = m[3] * y; + + this._originalScale(x, y); + }; + + ctx.transform = function ctxTransform(a, b, c, d, e, f) { + var m = this._transformMatrix; + this._transformMatrix = [ + m[0] * a + m[2] * b, + m[1] * a + m[3] * b, + m[0] * c + m[2] * d, + m[1] * c + m[3] * d, + m[0] * e + m[2] * f + m[4], + m[1] * e + m[3] * f + m[5] + ]; + + ctx._originalTransform(a, b, c, d, e, f); + }; + + ctx.rotate = function ctxRotate(angle) { + var cosValue = Math.cos(angle); + var sinValue = Math.sin(angle); + + var m = this._transformMatrix; + this._transformMatrix = [ + m[0] * cosValue + m[2] * sinValue, + m[1] * cosValue + m[3] * sinValue, + m[0] * (-sinValue) + m[2] * cosValue, + m[1] * (-sinValue) + m[3] * cosValue, + m[4], + m[5] + ]; + + this._originalRotate(angle); + }; + } +} + +var CanvasGraphics = (function CanvasGraphicsClosure() { + // Defines the time the executeOperatorList is going to be executing + // before it stops and shedules a continue of execution. + var kExecutionTime = 15; + + function CanvasGraphics(canvasCtx, objs, textLayer) { + this.ctx = canvasCtx; + this.current = new CanvasExtraState(); + this.stateStack = []; + this.pendingClip = null; + this.res = null; + this.xobjs = null; + this.objs = objs; + this.textLayer = textLayer; + if (canvasCtx) { + addContextCurrentTransform(canvasCtx); + } + } + + var LINE_CAP_STYLES = ['butt', 'round', 'square']; + var LINE_JOIN_STYLES = ['miter', 'round', 'bevel']; + var NORMAL_CLIP = {}; + var EO_CLIP = {}; + + CanvasGraphics.prototype = { + slowCommands: { + 'stroke': true, + 'closeStroke': true, + 'fill': true, + 'eoFill': true, + 'fillStroke': true, + 'eoFillStroke': true, + 'closeFillStroke': true, + 'closeEOFillStroke': true, + 'showText': true, + 'showSpacedText': true, + 'setStrokeColorSpace': true, + 'setFillColorSpace': true, + 'setStrokeColor': true, + 'setStrokeColorN': true, + 'setFillColor': true, + 'setFillColorN': true, + 'setStrokeGray': true, + 'setFillGray': true, + 'setStrokeRGBColor': true, + 'setFillRGBColor': true, + 'setStrokeCMYKColor': true, + 'setFillCMYKColor': true, + 'paintJpegXObject': true, + 'paintImageXObject': true, + 'paintImageMaskXObject': true, + 'shadingFill': true + }, + + beginDrawing: function canvasGraphicsBeginDrawing(mediaBox) { + var cw = this.ctx.canvas.width, ch = this.ctx.canvas.height; + this.ctx.save(); + switch (mediaBox.rotate) { + case 0: + this.ctx.transform(1, 0, 0, -1, 0, ch); + break; + case 90: + this.ctx.transform(0, 1, 1, 0, 0, 0); + break; + case 180: + this.ctx.transform(-1, 0, 0, 1, cw, 0); + break; + case 270: + this.ctx.transform(0, -1, -1, 0, cw, ch); + break; + } + // Scale so that canvas units are the same as PDF user space units + this.ctx.scale(cw / mediaBox.width, ch / mediaBox.height); + // Move the media left-top corner to the (0,0) canvas position + this.ctx.translate(-mediaBox.x, -mediaBox.y); + + if (this.textLayer) + this.textLayer.beginLayout(); + }, + + executeOperatorList: function canvasGraphicsExecuteOperatorList( + operatorList, + executionStartIdx, continueCallback, + stepper) { + var argsArray = operatorList.argsArray; + var fnArray = operatorList.fnArray; + var i = executionStartIdx || 0; + var argsArrayLen = argsArray.length; + + // Sometimes the OperatorList to execute is empty. + if (argsArrayLen == i) { + return i; + } + + var executionEndIdx; + var endTime = Date.now() + kExecutionTime; + + var objs = this.objs; + var fnName; + var slowCommands = this.slowCommands; + + while (true) { + if (stepper && i === stepper.nextBreakPoint) { + stepper.breakIt(i, continueCallback); + return i; + } + + fnName = fnArray[i]; + + if (fnName !== 'dependency') { + this[fnName].apply(this, argsArray[i]); + } else { + var deps = argsArray[i]; + for (var n = 0, nn = deps.length; n < nn; n++) { + var depObjId = deps[n]; + + // If the promise isn't resolved yet, add the continueCallback + // to the promise and bail out. + if (!objs.isResolved(depObjId)) { + objs.get(depObjId, continueCallback); + return i; + } + } + } + + i++; + + // If the entire operatorList was executed, stop as were done. + if (i == argsArrayLen) { + return i; + } + + // If the execution took longer then a certain amount of time, shedule + // to continue exeution after a short delay. + // However, this is only possible if a 'continueCallback' is passed in. + if (continueCallback && slowCommands[fnName] && Date.now() > endTime) { + setTimeout(continueCallback, 0); + return i; + } + + // If the operatorList isn't executed completely yet OR the execution + // time was short enough, do another execution round. + } + }, + + endDrawing: function canvasGraphicsEndDrawing() { + this.ctx.restore(); + + if (this.textLayer) + this.textLayer.endLayout(); + }, + + // Graphics state + setLineWidth: function canvasGraphicsSetLineWidth(width) { + this.current.lineWidth = width; + this.ctx.lineWidth = width; + }, + setLineCap: function canvasGraphicsSetLineCap(style) { + this.ctx.lineCap = LINE_CAP_STYLES[style]; + }, + setLineJoin: function canvasGraphicsSetLineJoin(style) { + this.ctx.lineJoin = LINE_JOIN_STYLES[style]; + }, + setMiterLimit: function canvasGraphicsSetMiterLimit(limit) { + this.ctx.miterLimit = limit; + }, + setDash: function canvasGraphicsSetDash(dashArray, dashPhase) { + this.ctx.mozDash = dashArray; + this.ctx.mozDashOffset = dashPhase; + this.ctx.webkitLineDash = dashArray; + this.ctx.webkitLineDashOffset = dashPhase; + }, + setRenderingIntent: function canvasGraphicsSetRenderingIntent(intent) { + TODO('set rendering intent: ' + intent); + }, + setFlatness: function canvasGraphicsSetFlatness(flatness) { + TODO('set flatness: ' + flatness); + }, + setGState: function canvasGraphicsSetGState(states) { + for (var i = 0, ii = states.length; i < ii; i++) { + var state = states[i]; + var key = state[0]; + var value = state[1]; + + switch (key) { + case 'LW': + this.setLineWidth(value); + break; + case 'LC': + this.setLineCap(value); + break; + case 'LJ': + this.setLineJoin(value); + break; + case 'ML': + this.setMiterLimit(value); + break; + case 'D': + this.setDash(value[0], value[1]); + break; + case 'RI': + this.setRenderingIntent(value); + break; + case 'FL': + this.setFlatness(value); + break; + case 'Font': + this.setFont(state[1], state[2]); + break; + case 'CA': + this.current.strokeAlpha = state[1]; + break; + case 'ca': + this.current.fillAlpha = state[1]; + this.ctx.globalAlpha = state[1]; + break; + } + } + }, + save: function canvasGraphicsSave() { + this.ctx.save(); + var old = this.current; + this.stateStack.push(old); + this.current = old.clone(); + }, + restore: function canvasGraphicsRestore() { + var prev = this.stateStack.pop(); + if (prev) { + this.current = prev; + this.ctx.restore(); + } + }, + transform: function canvasGraphicsTransform(a, b, c, d, e, f) { + this.ctx.transform(a, b, c, d, e, f); + }, + + // Path + moveTo: function canvasGraphicsMoveTo(x, y) { + this.ctx.moveTo(x, y); + this.current.setCurrentPoint(x, y); + }, + lineTo: function canvasGraphicsLineTo(x, y) { + this.ctx.lineTo(x, y); + this.current.setCurrentPoint(x, y); + }, + curveTo: function canvasGraphicsCurveTo(x1, y1, x2, y2, x3, y3) { + this.ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3); + this.current.setCurrentPoint(x3, y3); + }, + curveTo2: function canvasGraphicsCurveTo2(x2, y2, x3, y3) { + var current = this.current; + this.ctx.bezierCurveTo(current.x, current.y, x2, y2, x3, y3); + current.setCurrentPoint(x3, y3); + }, + curveTo3: function canvasGraphicsCurveTo3(x1, y1, x3, y3) { + this.curveTo(x1, y1, x3, y3, x3, y3); + this.current.setCurrentPoint(x3, y3); + }, + closePath: function canvasGraphicsClosePath() { + this.ctx.closePath(); + }, + rectangle: function canvasGraphicsRectangle(x, y, width, height) { + this.ctx.rect(x, y, width, height); + }, + stroke: function canvasGraphicsStroke(consumePath) { + consumePath = typeof consumePath !== 'undefined' ? consumePath : true; + var ctx = this.ctx; + var strokeColor = this.current.strokeColor; + if (this.current.lineWidth === 0) + ctx.lineWidth = this.getSinglePixelWidth(); + // For stroke we want to temporarily change the global alpha to the + // stroking alpha. + ctx.globalAlpha = this.current.strokeAlpha; + if (strokeColor && strokeColor.hasOwnProperty('type') && + strokeColor.type === 'Pattern') { + // for patterns, we transform to pattern space, calculate + // the pattern, call stroke, and restore to user space + ctx.save(); + ctx.strokeStyle = strokeColor.getPattern(ctx); + ctx.stroke(); + ctx.restore(); + } else { + ctx.stroke(); + } + if (consumePath) + this.consumePath(); + // Restore the global alpha to the fill alpha + ctx.globalAlpha = this.current.fillAlpha; + }, + closeStroke: function canvasGraphicsCloseStroke() { + this.closePath(); + this.stroke(); + }, + fill: function canvasGraphicsFill(consumePath) { + consumePath = typeof consumePath !== 'undefined' ? consumePath : true; + var ctx = this.ctx; + var fillColor = this.current.fillColor; + + if (fillColor && fillColor.hasOwnProperty('type') && + fillColor.type === 'Pattern') { + ctx.save(); + ctx.fillStyle = fillColor.getPattern(ctx); + ctx.fill(); + ctx.restore(); + } else { + ctx.fill(); + } + if (consumePath) + this.consumePath(); + }, + eoFill: function canvasGraphicsEoFill() { + var savedFillRule = this.setEOFillRule(); + this.fill(); + this.restoreFillRule(savedFillRule); + }, + fillStroke: function canvasGraphicsFillStroke() { + this.fill(false); + this.stroke(false); + + this.consumePath(); + }, + eoFillStroke: function canvasGraphicsEoFillStroke() { + var savedFillRule = this.setEOFillRule(); + this.fillStroke(); + this.restoreFillRule(savedFillRule); + }, + closeFillStroke: function canvasGraphicsCloseFillStroke() { + this.closePath(); + this.fillStroke(); + }, + closeEOFillStroke: function canvasGraphicsCloseEOFillStroke() { + var savedFillRule = this.setEOFillRule(); + this.closePath(); + this.fillStroke(); + this.restoreFillRule(savedFillRule); + }, + endPath: function canvasGraphicsEndPath() { + this.consumePath(); + }, + + // Clipping + clip: function canvasGraphicsClip() { + this.pendingClip = NORMAL_CLIP; + }, + eoClip: function canvasGraphicsEoClip() { + this.pendingClip = EO_CLIP; + }, + + // Text + beginText: function canvasGraphicsBeginText() { + this.current.textMatrix = IDENTITY_MATRIX; + this.current.x = this.current.lineX = 0; + this.current.y = this.current.lineY = 0; + }, + endText: function canvasGraphicsEndText() { + }, + setCharSpacing: function canvasGraphicsSetCharSpacing(spacing) { + this.current.charSpacing = spacing; + }, + setWordSpacing: function canvasGraphicsSetWordSpacing(spacing) { + this.current.wordSpacing = spacing; + }, + setHScale: function canvasGraphicsSetHScale(scale) { + this.current.textHScale = scale / 100; + }, + setLeading: function canvasGraphicsSetLeading(leading) { + this.current.leading = -leading; + }, + setFont: function canvasGraphicsSetFont(fontRefName, size) { + var fontObj = this.objs.get(fontRefName); + var current = this.current; + + if (!fontObj) + error('Can\'t find font for ' + fontRefName); + + // Slice-clone matrix so we can manipulate it without affecting original + if (fontObj.fontMatrix) + current.fontMatrix = fontObj.fontMatrix.slice(0); + else + current.fontMatrix = IDENTITY_MATRIX.slice(0); + + // A valid matrix needs all main diagonal elements to be non-zero + // This also ensures we bypass FF bugzilla bug #719844. + if (current.fontMatrix[0] === 0 || + current.fontMatrix[3] === 0) { + warn('Invalid font matrix for font ' + fontRefName); + } + + // The spec for Tf (setFont) says that 'size' specifies the font 'scale', + // and in some docs this can be negative (inverted x-y axes). + // We implement this condition with fontMatrix. + if (size < 0) { + size = -size; + current.fontMatrix[0] *= -1; + current.fontMatrix[3] *= -1; + } + + this.current.font = fontObj; + this.current.fontSize = size; + + if (fontObj.coded) + return; // we don't need ctx.font for Type3 fonts + + var name = fontObj.loadedName || 'sans-serif'; + var bold = fontObj.black ? (fontObj.bold ? 'bolder' : 'bold') : + (fontObj.bold ? 'bold' : 'normal'); + + var italic = fontObj.italic ? 'italic' : 'normal'; + var serif = fontObj.isSerifFont ? 'serif' : 'sans-serif'; + var typeface = '"' + name + '", ' + serif; + + // Some font backends cannot handle fonts below certain size. + // Keeping the font at minimal size and using the fontSizeScale to change + // the current transformation matrix before the fillText/strokeText. + // See https://bugzilla.mozilla.org/show_bug.cgi?id=726227 + var browserFontSize = size >= MIN_FONT_SIZE ? size : MIN_FONT_SIZE; + this.current.fontSizeScale = browserFontSize != MIN_FONT_SIZE ? 1.0 : + size / MIN_FONT_SIZE; + + var rule = italic + ' ' + bold + ' ' + browserFontSize + 'px ' + typeface; + this.ctx.font = rule; + }, + setTextRenderingMode: function canvasGraphicsSetTextRenderingMode(mode) { + if (mode >= TextRenderingMode.FILL_ADD_TO_PATH) + TODO('unsupported text rendering mode: ' + mode); + this.current.textRenderingMode = mode; + }, + setTextRise: function canvasGraphicsSetTextRise(rise) { + TODO('text rise: ' + rise); + }, + moveText: function canvasGraphicsMoveText(x, y) { + this.current.x = this.current.lineX += x; + this.current.y = this.current.lineY += y; + }, + setLeadingMoveText: function canvasGraphicsSetLeadingMoveText(x, y) { + this.setLeading(-y); + this.moveText(x, y); + }, + setTextMatrix: function canvasGraphicsSetTextMatrix(a, b, c, d, e, f) { + this.current.textMatrix = [a, b, c, d, e, f]; + + this.current.x = this.current.lineX = 0; + this.current.y = this.current.lineY = 0; + }, + nextLine: function canvasGraphicsNextLine() { + this.moveText(0, this.current.leading); + }, + applyTextTransforms: function canvasApplyTransforms() { + var ctx = this.ctx; + var current = this.current; + var textHScale = current.textHScale; + var fontMatrix = current.fontMatrix || IDENTITY_MATRIX; + + ctx.transform.apply(ctx, current.textMatrix); + ctx.scale(1, -1); + ctx.translate(current.x, -1 * current.y); + ctx.transform.apply(ctx, fontMatrix); + ctx.scale(textHScale, 1); + }, + getTextGeometry: function canvasGetTextGeometry() { + var geometry = {}; + var ctx = this.ctx; + var font = this.current.font; + var ctxMatrix = ctx.mozCurrentTransform; + if (ctxMatrix) { + var bl = Util.applyTransform([0, 0], ctxMatrix); + var tr = Util.applyTransform([1, 1], ctxMatrix); + geometry.x = bl[0]; + geometry.y = bl[1]; + geometry.hScale = tr[0] - bl[0]; + geometry.vScale = tr[1] - bl[1]; + } + geometry.spaceWidth = font.spaceWidth; + return geometry; + }, + + showText: function canvasGraphicsShowText(str, skipTextSelection) { + var ctx = this.ctx; + var current = this.current; + var font = current.font; + var glyphs = font.charsToGlyphs(str); + var fontSize = current.fontSize; + var fontSizeScale = current.fontSizeScale; + var charSpacing = current.charSpacing; + var wordSpacing = current.wordSpacing; + var textHScale = current.textHScale; + var fontMatrix = current.fontMatrix || IDENTITY_MATRIX; + var textHScale2 = textHScale * fontMatrix[0]; + var glyphsLength = glyphs.length; + var textLayer = this.textLayer; + var text = {str: '', length: 0, canvasWidth: 0, geom: {}}; + var textSelection = textLayer && !skipTextSelection ? true : false; + var textRenderingMode = current.textRenderingMode; + + // Type3 fonts - each glyph is a "mini-PDF" + if (font.coded) { + ctx.save(); + ctx.transform.apply(ctx, current.textMatrix); + ctx.translate(current.x, current.y); + + ctx.scale(textHScale, 1); + + if (textSelection) { + this.save(); + ctx.scale(1, -1); + text.geom = this.getTextGeometry(); + this.restore(); + } + for (var i = 0; i < glyphsLength; ++i) { + + var glyph = glyphs[i]; + if (glyph === null) { + // word break + this.ctx.translate(wordSpacing, 0); + continue; + } + + this.save(); + ctx.scale(fontSize, fontSize); + ctx.transform.apply(ctx, fontMatrix); + this.executeOperatorList(glyph.operatorList); + this.restore(); + + var transformed = Util.applyTransform([glyph.width, 0], fontMatrix); + var width = transformed[0] * fontSize + + Util.sign(current.fontMatrix[0]) * charSpacing; + + ctx.translate(width, 0); + current.x += width * textHScale; + + text.str += glyph.unicode; + text.length++; + text.canvasWidth += width; + } + ctx.restore(); + } else { + ctx.save(); + this.applyTextTransforms(); + + var lineWidth = current.lineWidth; + var scale = Math.abs(current.textMatrix[0] * fontMatrix[0]); + if (scale == 0 || lineWidth == 0) + lineWidth = this.getSinglePixelWidth(); + else + lineWidth /= scale; + + if (textSelection) + text.geom = this.getTextGeometry(); + + if (fontSizeScale != 1.0) { + ctx.scale(fontSizeScale, fontSizeScale); + lineWidth /= fontSizeScale; + } + + ctx.lineWidth = lineWidth; + + var x = 0; + for (var i = 0; i < glyphsLength; ++i) { + var glyph = glyphs[i]; + if (glyph === null) { + // word break + x += Util.sign(current.fontMatrix[0]) * wordSpacing; + continue; + } + + var char = glyph.fontChar; + var charWidth = glyph.width * fontSize * 0.001 + + Util.sign(current.fontMatrix[0]) * charSpacing; + + var scaledX = x / fontSizeScale; + switch (textRenderingMode) { + default: // other unsupported rendering modes + case TextRenderingMode.FILL: + case TextRenderingMode.FILL_ADD_TO_PATH: + ctx.fillText(char, scaledX, 0); + break; + case TextRenderingMode.STROKE: + case TextRenderingMode.STROKE_ADD_TO_PATH: + ctx.strokeText(char, scaledX, 0); + break; + case TextRenderingMode.FILL_STROKE: + case TextRenderingMode.FILL_STROKE_ADD_TO_PATH: + ctx.fillText(char, scaledX, 0); + ctx.strokeText(char, scaledX, 0); + break; + case TextRenderingMode.INVISIBLE: + break; + } + + x += charWidth; + + var glyphUnicode = glyph.unicode === ' ' ? '\u00A0' : glyph.unicode; + var glyphUnicodeLength = glyphUnicode.length; + //reverse an arabic ligature + if (glyphUnicodeLength > 1 && + isRTLRangeFor(glyphUnicode.charCodeAt(0))) { + for (var ii = glyphUnicodeLength - 1; ii >= 0; ii--) + text.str += glyphUnicode[ii]; + } else + text.str += glyphUnicode; + text.length += glyphUnicodeLength; + text.canvasWidth += charWidth; + } + current.x += x * textHScale2; + ctx.restore(); + } + + if (textSelection) + this.textLayer.appendText(text, font.loadedName, fontSize); + + return text; + }, + showSpacedText: function canvasGraphicsShowSpacedText(arr) { + var ctx = this.ctx; + var current = this.current; + var font = current.font; + var fontSize = current.fontSize; + var textHScale = current.textHScale; + if (!font.coded) + textHScale *= (current.fontMatrix || IDENTITY_MATRIX)[0]; + var arrLength = arr.length; + var textLayer = this.textLayer; + var text = {str: '', length: 0, canvasWidth: 0, geom: {}}; + var textSelection = textLayer ? true : false; + + if (textSelection) { + ctx.save(); + // Type3 fonts - each glyph is a "mini-PDF" (see also showText) + if (font.coded) { + ctx.transform.apply(ctx, current.textMatrix); + ctx.scale(1, -1); + ctx.translate(current.x, -1 * current.y); + ctx.scale(textHScale, 1); + } else + this.applyTextTransforms(); + text.geom = this.getTextGeometry(); + ctx.restore(); + } + + for (var i = 0; i < arrLength; ++i) { + var e = arr[i]; + if (isNum(e)) { + var spacingLength = -e * 0.001 * fontSize * textHScale; + current.x += spacingLength; + + if (textSelection) { + // Emulate precise spacing via HTML spaces + text.canvasWidth += spacingLength; + if (e < 0 && text.geom.spaceWidth > 0) { // avoid div by zero + var numFakeSpaces = Math.round(-e / text.geom.spaceWidth); + if (numFakeSpaces > 0) { + text.str += '\u00A0'; + text.length++; + } + } + } + } else if (isString(e)) { + var shownText = this.showText(e, true); + + if (textSelection) { + if (shownText.str === ' ') { + text.str += '\u00A0'; + } else { + text.str += shownText.str; + } + text.canvasWidth += shownText.canvasWidth; + text.length += shownText.length; + } + } else { + malformed('TJ array element ' + e + ' is not string or num'); + } + } + + if (textSelection) + this.textLayer.appendText(text, font.loadedName, fontSize); + }, + nextLineShowText: function canvasGraphicsNextLineShowText(text) { + this.nextLine(); + this.showText(text); + }, + nextLineSetSpacingShowText: + function canvasGraphicsNextLineSetSpacingShowText(wordSpacing, + charSpacing, + text) { + this.setWordSpacing(wordSpacing); + this.setCharSpacing(charSpacing); + this.nextLineShowText(text); + }, + + // Type3 fonts + setCharWidth: function canvasGraphicsSetCharWidth(xWidth, yWidth) { + // We can safely ignore this since the width should be the same + // as the width in the Widths array. + }, + setCharWidthAndBounds: function canvasGraphicsSetCharWidthAndBounds(xWidth, + yWidth, + llx, + lly, + urx, + ury) { + // TODO According to the spec we're also suppose to ignore any operators + // that set color or include images while processing this type3 font. + this.rectangle(llx, lly, urx - llx, ury - lly); + this.clip(); + this.endPath(); + }, + + // Color + setStrokeColorSpace: function canvasGraphicsSetStrokeColorSpace(raw) { + this.current.strokeColorSpace = ColorSpace.fromIR(raw); + }, + setFillColorSpace: function canvasGraphicsSetFillColorSpace(raw) { + this.current.fillColorSpace = ColorSpace.fromIR(raw); + }, + setStrokeColor: function canvasGraphicsSetStrokeColor(/*...*/) { + var cs = this.current.strokeColorSpace; + var rgbColor = cs.getRgb(arguments); + var color = Util.makeCssRgb(rgbColor[0], rgbColor[1], rgbColor[2]); + this.ctx.strokeStyle = color; + this.current.strokeColor = color; + }, + getColorN_Pattern: function canvasGraphicsGetColorN_Pattern(IR, cs) { + if (IR[0] == 'TilingPattern') { + var args = IR[1]; + var base = cs.base; + var color; + if (base) { + var baseComps = base.numComps; + + color = []; + for (var i = 0; i < baseComps; ++i) + color.push(args[i]); + + color = base.getRgb(color); + } + var pattern = new TilingPattern(IR, color, this.ctx, this.objs); + } else if (IR[0] == 'RadialAxial' || IR[0] == 'Dummy') { + var pattern = Pattern.shadingFromIR(this.ctx, IR); + } else { + error('Unkown IR type ' + IR[0]); + } + return pattern; + }, + setStrokeColorN: function canvasGraphicsSetStrokeColorN(/*...*/) { + var cs = this.current.strokeColorSpace; + + if (cs.name == 'Pattern') { + this.current.strokeColor = this.getColorN_Pattern(arguments, cs); + } else { + this.setStrokeColor.apply(this, arguments); + } + }, + setFillColor: function canvasGraphicsSetFillColor(/*...*/) { + var cs = this.current.fillColorSpace; + var rgbColor = cs.getRgb(arguments); + var color = Util.makeCssRgb(rgbColor[0], rgbColor[1], rgbColor[2]); + this.ctx.fillStyle = color; + this.current.fillColor = color; + }, + setFillColorN: function canvasGraphicsSetFillColorN(/*...*/) { + var cs = this.current.fillColorSpace; + + if (cs.name == 'Pattern') { + this.current.fillColor = this.getColorN_Pattern(arguments, cs); + } else { + this.setFillColor.apply(this, arguments); + } + }, + setStrokeGray: function canvasGraphicsSetStrokeGray(gray) { + if (!(this.current.strokeColorSpace instanceof DeviceGrayCS)) + this.current.strokeColorSpace = new DeviceGrayCS(); + + var color = Util.makeCssRgb(gray, gray, gray); + this.ctx.strokeStyle = color; + this.current.strokeColor = color; + }, + setFillGray: function canvasGraphicsSetFillGray(gray) { + if (!(this.current.fillColorSpace instanceof DeviceGrayCS)) + this.current.fillColorSpace = new DeviceGrayCS(); + + var color = Util.makeCssRgb(gray, gray, gray); + this.ctx.fillStyle = color; + this.current.fillColor = color; + }, + setStrokeRGBColor: function canvasGraphicsSetStrokeRGBColor(r, g, b) { + if (!(this.current.strokeColorSpace instanceof DeviceRgbCS)) + this.current.strokeColorSpace = new DeviceRgbCS(); + + var color = Util.makeCssRgb(r, g, b); + this.ctx.strokeStyle = color; + this.current.strokeColor = color; + }, + setFillRGBColor: function canvasGraphicsSetFillRGBColor(r, g, b) { + if (!(this.current.fillColorSpace instanceof DeviceRgbCS)) + this.current.fillColorSpace = new DeviceRgbCS(); + + var color = Util.makeCssRgb(r, g, b); + this.ctx.fillStyle = color; + this.current.fillColor = color; + }, + setStrokeCMYKColor: function canvasGraphicsSetStrokeCMYKColor(c, m, y, k) { + if (!(this.current.strokeColorSpace instanceof DeviceCmykCS)) + this.current.strokeColorSpace = new DeviceCmykCS(); + + var color = Util.makeCssCmyk(c, m, y, k); + this.ctx.strokeStyle = color; + this.current.strokeColor = color; + }, + setFillCMYKColor: function canvasGraphicsSetFillCMYKColor(c, m, y, k) { + if (!(this.current.fillColorSpace instanceof DeviceCmykCS)) + this.current.fillColorSpace = new DeviceCmykCS(); + + var color = Util.makeCssCmyk(c, m, y, k); + this.ctx.fillStyle = color; + this.current.fillColor = color; + }, + + shadingFill: function canvasGraphicsShadingFill(patternIR) { + var ctx = this.ctx; + + this.save(); + ctx.fillStyle = Pattern.shadingFromIR(ctx, patternIR); + + var inv = ctx.mozCurrentTransformInverse; + if (inv) { + var canvas = ctx.canvas; + var width = canvas.width; + var height = canvas.height; + + var bl = Util.applyTransform([0, 0], inv); + var br = Util.applyTransform([0, height], inv); + var ul = Util.applyTransform([width, 0], inv); + var ur = Util.applyTransform([width, height], inv); + + var x0 = Math.min(bl[0], br[0], ul[0], ur[0]); + var y0 = Math.min(bl[1], br[1], ul[1], ur[1]); + var x1 = Math.max(bl[0], br[0], ul[0], ur[0]); + var y1 = Math.max(bl[1], br[1], ul[1], ur[1]); + + this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0); + } else { + // HACK to draw the gradient onto an infinite rectangle. + // PDF gradients are drawn across the entire image while + // Canvas only allows gradients to be drawn in a rectangle + // The following bug should allow us to remove this. + // https://bugzilla.mozilla.org/show_bug.cgi?id=664884 + + this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10); + } + + this.restore(); + }, + + // Images + beginInlineImage: function canvasGraphicsBeginInlineImage() { + error('Should not call beginInlineImage'); + }, + beginImageData: function canvasGraphicsBeginImageData() { + error('Should not call beginImageData'); + }, + + paintFormXObjectBegin: function canvasGraphicsPaintFormXObjectBegin(matrix, + bbox) { + this.save(); + + if (matrix && isArray(matrix) && 6 == matrix.length) + this.transform.apply(this, matrix); + + if (bbox && isArray(bbox) && 4 == bbox.length) { + var width = bbox[2] - bbox[0]; + var height = bbox[3] - bbox[1]; + this.rectangle(bbox[0], bbox[1], width, height); + this.clip(); + this.endPath(); + } + }, + + paintFormXObjectEnd: function canvasGraphicsPaintFormXObjectEnd() { + this.restore(); + }, + + paintJpegXObject: function canvasGraphicsPaintJpegXObject(objId, w, h) { + var domImage = this.objs.get(objId); + if (!domImage) { + error('Dependent image isn\'t ready yet'); + } + + this.save(); + + var ctx = this.ctx; + // scale the image to the unit square + ctx.scale(1 / w, -1 / h); + + ctx.drawImage(domImage, 0, 0, domImage.width, domImage.height, + 0, -h, w, h); + + this.restore(); + }, + + paintImageMaskXObject: function canvasGraphicsPaintImageMaskXObject( + imgArray, inverseDecode, width, height) { + function applyStencilMask(buffer, inverseDecode) { + var imgArrayPos = 0; + var i, j, mask, buf; + // removing making non-masked pixels transparent + var bufferPos = 3; // alpha component offset + for (i = 0; i < height; i++) { + mask = 0; + for (j = 0; j < width; j++) { + if (!mask) { + buf = imgArray[imgArrayPos++]; + mask = 128; + } + if (!(buf & mask) == inverseDecode) { + buffer[bufferPos] = 0; + } + bufferPos += 4; + mask >>= 1; + } + } + } + + this.save(); + + var ctx = this.ctx; + var w = width, h = height; + // scale the image to the unit square + ctx.scale(1 / w, -1 / h); + + var tmpCanvas = createScratchCanvas(w, h); + var tmpCtx = tmpCanvas.getContext('2d'); + + var fillColor = this.current.fillColor; + tmpCtx.fillStyle = (fillColor && fillColor.hasOwnProperty('type') && + fillColor.type === 'Pattern') ? + fillColor.getPattern(tmpCtx) : fillColor; + tmpCtx.fillRect(0, 0, w, h); + + var imgData = tmpCtx.getImageData(0, 0, w, h); + var pixels = imgData.data; + + applyStencilMask(pixels, inverseDecode); + + tmpCtx.putImageData(imgData, 0, 0); + ctx.drawImage(tmpCanvas, 0, -h); + this.restore(); + }, + + paintImageXObject: function canvasGraphicsPaintImageXObject(objId) { + var imgData = this.objs.get(objId); + if (!imgData) + error('Dependent image isn\'t ready yet'); + + this.save(); + var ctx = this.ctx; + var w = imgData.width; + var h = imgData.height; + // scale the image to the unit square + ctx.scale(1 / w, -1 / h); + + var tmpCanvas = createScratchCanvas(w, h); + var tmpCtx = tmpCanvas.getContext('2d'); + this.putBinaryImageData(tmpCtx, imgData, w, h); + + ctx.drawImage(tmpCanvas, 0, -h); + this.restore(); + }, + + putBinaryImageData: function canvasPutBinaryImageData() { + // + }, + + // Marked content + + markPoint: function canvasGraphicsMarkPoint(tag) { + TODO('Marked content'); + }, + markPointProps: function canvasGraphicsMarkPointProps(tag, properties) { + TODO('Marked content'); + }, + beginMarkedContent: function canvasGraphicsBeginMarkedContent(tag) { + TODO('Marked content'); + }, + beginMarkedContentProps: + function canvasGraphicsBeginMarkedContentProps(tag, properties) { + TODO('Marked content'); + }, + endMarkedContent: function canvasGraphicsEndMarkedContent() { + TODO('Marked content'); + }, + + // Compatibility + + beginCompat: function canvasGraphicsBeginCompat() { + TODO('ignore undefined operators (should we do that anyway?)'); + },