Commit 4fa57a60 authored by Wes Kocher's avatar Wes Kocher
Browse files

Merge inbound to central, a=merge

--HG--
extra : commitid : DZp5o9P5r4R
parents fd13c2e2 3fd0527a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -917,7 +917,7 @@ Swipe.prototype.compile = function Swipe_compile() {
  let edge = EDGE * Utils.dpi;
  if (Math.abs(deltaX) > Math.abs(deltaY)) {
    // Horizontal swipe.
    let startPoints = [touch.x1 for (touch of detail.touches)];
    let startPoints = detail.touches.map(touch => touch.x1);
    if (deltaX > 0) {
      detail.type = type + 'right';
      detail.edge = Math.min.apply(null, startPoints) <= edge;
@@ -928,7 +928,7 @@ Swipe.prototype.compile = function Swipe_compile() {
    }
  } else {
    // Vertical swipe.
    let startPoints = [touch.y1 for (touch of detail.touches)];
    let startPoints = detail.touches.map(touch => touch.y1);
    if (deltaY > 0) {
      detail.type = type + 'down';
      detail.edge = Math.min.apply(null, startPoints) <= edge;
+6 −4
Original line number Diff line number Diff line
@@ -67,11 +67,13 @@ var OutputGenerator = {
    if (this.outputOrder === OUTPUT_DESC_FIRST) {
      contextStart.forEach(addOutput);
      addOutput(aContext.accessible);
      [addOutput(node) for // jshint ignore:line
        (node of aContext.subtreeGenerator(true, ignoreSubtree))]; // jshint ignore:line
      for (let node of aContext.subtreeGenerator(true, ignoreSubtree)) {
        addOutput(node);
      }
    } else {
      [addOutput(node) for // jshint ignore:line
        (node of aContext.subtreeGenerator(false, ignoreSubtree))]; // jshint ignore:line
      for (let node of aContext.subtreeGenerator(false, ignoreSubtree)) {
        addOutput(node);
      }
      addOutput(aContext.accessible);

      // If there are any documents in new ancestry, find a first one and place
+18 −21
Original line number Diff line number Diff line
@@ -684,7 +684,7 @@ this.Presentation = { // jshint ignore:line
      'b2g': [VisualPresenter, B2GPresenter],
      'browser': [VisualPresenter, B2GPresenter, AndroidPresenter]
    };
    this.presenters = [new P() for (P of presenterMap[Utils.MozBuildApp])]; // jshint ignore:line
    this.presenters = presenterMap[Utils.MozBuildApp].map(P => new P());
    return this.presenters;
  },

@@ -700,61 +700,58 @@ this.Presentation = { // jshint ignore:line
      aPosition, aOldPosition, aStartOffset, aEndOffset);
    this.displayedAccessibles.set(context.accessible.document.window, context);

    return [p.pivotChanged(context, aReason, aIsUserInput)
      for each (p in this.presenters)]; // jshint ignore:line
    return this.presenters.map(p => p.pivotChanged(context, aReason, aIsUserInput));
  },

  actionInvoked: function Presentation_actionInvoked(aObject, aActionName) {
    return [p.actionInvoked(aObject, aActionName) // jshint ignore:line
      for each (p in this.presenters)]; // jshint ignore:line
    return this.presenters.map(p => p.actionInvoked(aObject, aActionName));
  },

  textChanged: function Presentation_textChanged(aAccessible, aIsInserted,
                                    aStartOffset, aLength, aText,
                                    aModifiedText) {
    return [p.textChanged(aAccessible, aIsInserted, aStartOffset, aLength, // jshint ignore:line
      aText, aModifiedText) for each (p in this.presenters)]; // jshint ignore:line
    return this.presenters.map(p => p.textChanged(aAccessible, aIsInserted,
                                                  aStartOffset, aLength,
                                                  aText, aModifiedText));
  },

  textSelectionChanged: function textSelectionChanged(aText, aStart, aEnd,
                                                      aOldStart, aOldEnd,
                                                      aIsFromUserInput) {
    return [p.textSelectionChanged(aText, aStart, aEnd, aOldStart, aOldEnd, // jshint ignore:line
      aIsFromUserInput) for each (p in this.presenters)]; // jshint ignore:line
    return this.presenters.map(p => p.textSelectionChanged(aText, aStart, aEnd,
                                                           aOldStart, aOldEnd,
                                                           aIsFromUserInput));
  },

  nameChanged: function nameChanged(aAccessible) {
    return [ p.nameChanged(aAccessible) for (p of this.presenters) ]; // jshint ignore:line
    return this.presenters.map(p => p.nameChanged(aAccessible));
  },

  valueChanged: function valueChanged(aAccessible) {
    return [ p.valueChanged(aAccessible) for (p of this.presenters) ]; // jshint ignore:line
    return this.presenters.map(p => p.valueChanged(aAccessible));
  },

  tabStateChanged: function Presentation_tabStateChanged(aDocObj, aPageState) {
    return [p.tabStateChanged(aDocObj, aPageState) // jshint ignore:line
      for each (p in this.presenters)]; // jshint ignore:line
    return this.presenters.map(p => p.tabStateChanged(aDocObj, aPageState));
  },

  viewportChanged: function Presentation_viewportChanged(aWindow) {
    let context = this.displayedAccessibles.get(aWindow);
    return [p.viewportChanged(aWindow, context) // jshint ignore:line
      for each (p in this.presenters)]; // jshint ignore:line
    return this.presenters.map(p => p.viewportChanged(aWindow, context));
  },

  editingModeChanged: function Presentation_editingModeChanged(aIsEditing) {
    return [p.editingModeChanged(aIsEditing) for each (p in this.presenters)]; // jshint ignore:line
    return this.presenters.map(p => p.editingModeChanged(aIsEditing));
  },

  announce: function Presentation_announce(aAnnouncement) {
    // XXX: Typically each presenter uses the UtteranceGenerator,
    // but there really isn't a point here.
    return [p.announce(UtteranceGenerator.genForAnnouncement(aAnnouncement)) // jshint ignore:line
      for each (p in this.presenters)]; // jshint ignore:line
    return this.presenters.map(p => p.announce(UtteranceGenerator.genForAnnouncement(aAnnouncement)));
  },

  noMove: function Presentation_noMove(aMoveMethod) {
    return [p.noMove(aMoveMethod) for each (p in this.presenters)]; // jshint ignore:line
    return this.presenters.map(p => p.noMove(aMoveMethod));
  },

  liveRegion: function Presentation_liveRegion(aAccessible, aIsPolite, aIsHide,
@@ -764,7 +761,7 @@ this.Presentation = { // jshint ignore:line
      context = new PivotContext(aAccessible, null, -1, -1, true,
        aIsHide ? true : false);
    }
    return [p.liveRegion(context, aIsPolite, aIsHide, aModifiedText) // jshint ignore:line
      for (p of this.presenters)]; // jshint ignore:line
    return this.presenters.map(p => p.liveRegion(context, aIsPolite, aIsHide,
                                                 aModifiedText));
  }
};
+14 −13
Original line number Diff line number Diff line
@@ -211,11 +211,10 @@ this.Utils = { // jshint ignore:line
  localize: function localize(aOutput) {
    let outputArray = Array.isArray(aOutput) ? aOutput : [aOutput];
    let localized =
      [this.stringBundle.get(details) for (details of outputArray)]; // jshint ignore:line
      outputArray.map(details => this.stringBundle.get(details));
    // Clean up the white space.
    let trimmed;
    return [trimmed for (word of localized) if (word && // jshint ignore:line
      (trimmed = word.trim()))]; // jshint ignore:line
    return localized.filter(word => word).map(word => word.trim()).
      filter(trimmed => trimmed);
  },

  get stringBundle() {
@@ -834,9 +833,9 @@ PivotContext.prototype = {
   */
  get newAncestry() {
    if (!this._newAncestry) {
      this._newAncestry = this._ignoreAncestry ? [] : [currentAncestor for ( // jshint ignore:line
        [index, currentAncestor] of Iterator(this.currentAncestry)) if ( // jshint ignore:line
          currentAncestor !== this.oldAncestry[index])]; // jshint ignore:line
      this._newAncestry = this._ignoreAncestry ? [] :
        this.currentAncestry.filter(
          (currentAncestor, i) => currentAncestor !== this.oldAncestry[i]);
    }
    return this._newAncestry;
  },
@@ -862,9 +861,13 @@ PivotContext.prototype = {
      if (include) {
        if (aPreorder) {
          yield child;
          [yield node for (node of this._traverse(child, aPreorder, aStop))]; // jshint ignore:line
          for (let node of this._traverse(child, aPreorder, aStop)) {
            yield node;
          }
        } else {
          [yield node for (node of this._traverse(child, aPreorder, aStop))]; // jshint ignore:line
          for (let node of this._traverse(child, aPreorder, aStop)) {
            yield node;
          }
          yield child;
        }
      }
@@ -986,15 +989,13 @@ PivotContext.prototype = {
    cellInfo.columnHeaders = [];
    if (cellInfo.columnChanged && cellInfo.current.role !==
      Roles.COLUMNHEADER) {
      cellInfo.columnHeaders = [headers for (headers of getHeaders( // jshint ignore:line
        cellInfo.current.columnHeaderCells))];
      cellInfo.columnHeaders = [...getHeaders(cellInfo.current.columnHeaderCells)];
    }
    cellInfo.rowHeaders = [];
    if (cellInfo.rowChanged &&
        (cellInfo.current.role === Roles.CELL ||
         cellInfo.current.role === Roles.MATHML_CELL)) {
      cellInfo.rowHeaders = [headers for (headers of getHeaders( // jshint ignore:line
        cellInfo.current.rowHeaderCells))];
      cellInfo.rowHeaders = [...getHeaders(cellInfo.current.rowHeaderCells)];
    }

    this._cells.set(domNode, cellInfo);
+1 −1
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@ var AccessFuTest = {
        AccessFuTest.nextTest();
      } else {
        // Run all test functions synchronously.
        [testFunc() for (testFunc of gTestFuncs)]; // jshint ignore:line
        gTestFuncs.forEach(testFunc => testFunc());
        AccessFuTest.finish();
      }
    });
Loading