Commit 75a46988 authored by Oana Pop Rus's avatar Oana Pop Rus
Browse files

Merge inbound to mozilla-central. a=merge

parents 213cb734 591b81a9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
This is the PDF.js project output, https://github.com/mozilla/pdf.js

Current extension version is: 2.1.196
Current extension version is: 2.1.215

Taken from upstream commit: cdbc33ba
Taken from upstream commit: 9128335c
+49 −3806

File changed.

Preview size limit exceeded, changes collapsed.

+156 −3917

File changed.

Preview size limit exceeded, changes collapsed.

+7 −11
Original line number Diff line number Diff line
@@ -21,30 +21,26 @@ var FontInspector = (function FontInspectorClosure() {
  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];
    let divs = document.querySelectorAll(`span[${fontAttribute}]`);
    for (let div of divs) {
      div.className = '';
    }
  }
  function resetSelection() {
    var divs = document.querySelectorAll('div[' + fontAttribute + ']');
    for (var i = 0, ii = divs.length; i < ii; ++i) {
      var div = divs[i];
    let divs = document.querySelectorAll(`span[${fontAttribute}]`);
    for (let div of divs) {
      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];
    let divs = document.querySelectorAll(`span[${fontAttribute}=${fontName}]`);
    for (let div of divs) {
      div.className = show ? 'debuggerShowText' : 'debuggerHideText';
    }
  }
  function textLayerClick(e) {
    if (!e.target.dataset.fontName ||
        e.target.tagName.toUpperCase() !== 'DIV') {
        e.target.tagName.toUpperCase() !== 'SPAN') {
      return;
    }
    var fontName = e.target.dataset.fontName;
+30 −45
Original line number Diff line number Diff line
@@ -8168,25 +8168,15 @@ class PDFViewer extends _base_viewer.BaseViewer {
    return this._getCurrentVisiblePage();
  }

  update() {
    let visible = this._getVisiblePages();

    let visiblePages = visible.views,
        numVisiblePages = visiblePages.length;

    if (numVisiblePages === 0) {
  _updateHelper(visiblePages) {
    if (this.isInPresentationMode) {
      return;
    }

    this._resizeBuffer(numVisiblePages, visiblePages);

    this.renderingQueue.renderHighestPriority(visible);
    let currentId = this._currentPageNumber;
    let stillFullyVisible = false;

    for (let i = 0; i < numVisiblePages; ++i) {
      let page = visiblePages[i];

    for (const page of visiblePages) {
      if (page.percent < 100) {
        break;
      }
@@ -8201,18 +8191,9 @@ class PDFViewer extends _base_viewer.BaseViewer {
      currentId = visiblePages[0].id;
    }

    if (!this.isInPresentationMode) {
    this._setCurrentPageNumber(currentId);
  }

    this._updateLocation(visible.first);

    this.eventBus.dispatch('updateviewarea', {
      source: this,
      location: this._location
    });
  }

  get _isScrollModeHorizontal() {
    return this.isInPresentationMode ? false : this._scrollMode === _base_viewer.ScrollMode.HORIZONTAL;
  }
@@ -8962,8 +8943,32 @@ class BaseViewer {
    };
  }

  _updateHelper(visiblePages) {
    throw new Error('Not implemented: _updateHelper');
  }

  update() {
    throw new Error('Not implemented: update');
    const visible = this._getVisiblePages();

    const visiblePages = visible.views,
          numVisiblePages = visiblePages.length;

    if (numVisiblePages === 0) {
      return;
    }

    this._resizeBuffer(numVisiblePages, visiblePages);

    this.renderingQueue.renderHighestPriority(visible);

    this._updateHelper(visiblePages);

    this._updateLocation(visible.first);

    this.eventBus.dispatch('updateviewarea', {
      source: this,
      location: this._location
    });
  }

  containsElement(element) {
@@ -10799,27 +10804,7 @@ class PDFSinglePageViewer extends _base_viewer.BaseViewer {
    return this._getCurrentVisiblePage();
  }

  update() {
    let visible = this._getVisiblePages();

    let visiblePages = visible.views,
        numVisiblePages = visiblePages.length;

    if (numVisiblePages === 0) {
      return;
    }

    this._resizeBuffer(numVisiblePages);

    this.renderingQueue.renderHighestPriority(visible);

    this._updateLocation(visible.first);

    this.eventBus.dispatch('updateviewarea', {
      source: this,
      location: this._location
    });
  }
  _updateHelper(visiblePages) {}

  get _isScrollModeHorizontal() {
    return (0, _pdfjsLib.shadow)(this, '_isScrollModeHorizontal', false);
Loading