Commit 16eec7c4 authored by Timothy Nikkel's avatar Timothy Nikkel
Browse files

Bug 445749. In Ctrl+Tab implementation, the coordinates passed to...

Bug 445749. In Ctrl+Tab implementation, the coordinates passed to openPopupAtScreen should be given relative to the current screen. r=dao
parent ddc68de5
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -390,8 +390,9 @@ var ctrlTab = {
    this.panel.width = Math.min(screen.availWidth * .99,
                                this.canvasWidth * 1.25 * this.tabPreviewCount);
    var estimateHeight = this.canvasHeight * 1.25 + 75;
    this.panel.openPopupAtScreen(screen.availLeft + (screen.availWidth - this.panel.width) / 2,
                                 screen.availTop + (screen.availHeight - estimateHeight) / 2,
    this.panel.openPopupAtScreen(
      (screen.availLeft - screen.left) + (screen.availWidth - this.panel.width) / 2,
      (screen.availTop - screen.top) + (screen.availHeight - estimateHeight) / 2,
      false);
  },

@@ -686,8 +687,9 @@ var allTabs = {

    this.panel.popupBoxObject.setConsumeRollupEvent(Ci.nsIPopupBoxObject.ROLLUP_CONSUME);
    var estimateHeight = (this._maxHeight + parseInt(this.container.maxHeight) + 50) / 2;
    this.panel.openPopupAtScreen(screen.availLeft + (screen.availWidth - this._maxWidth) / 2,
                                 screen.availTop + (screen.availHeight - estimateHeight) / 2,
    this.panel.openPopupAtScreen(
      (screen.availLeft - screen.left) + (screen.availWidth - this._maxWidth) / 2,
      (screen.availTop - screen.top) + (screen.availHeight - estimateHeight) / 2,
      false);
  },