From bf2dd862235ab740a29a9da0c79e6a8bb3e5e91d Mon Sep 17 00:00:00 2001 From: Jim Mathies Date: Sun, 7 Apr 2013 07:42:22 -0500 Subject: [PATCH] Bug 858700 - Swap in better browser bindings single coordinate conversion method names. r=mbrubeck --- .../metro/base/content/bindings/browser.xml | 12 ++++---- .../content/helperui/SelectionHelperUI.js | 28 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/browser/metro/base/content/bindings/browser.xml b/browser/metro/base/content/bindings/browser.xml index cb963192b80d..e65478575ec5 100644 --- a/browser/metro/base/content/bindings/browser.xml +++ b/browser/metro/base/content/bindings/browser.xml @@ -103,7 +103,7 @@ * @param aIgnoreScale ignore current scale factor. * @return { x: converted x coordinate, y: converted y coordinate } * - * xctob, yctob + * ctobx, ctoby * Convert individual x and y coordinates. * * @param aX or aY - browser coordinate @@ -139,7 +139,7 @@ * @param aIgnoreScale ignore current scale factor. * @return { left:, top:, right:, bottom: } * - * xbtoc, ybtoc + * btocx, btocy * Convert individual x and y coordinates. * * @param aX or aY - client coordinate @@ -180,7 +180,7 @@ - + @@ -193,7 +193,7 @@ - + @@ -274,7 +274,7 @@ - + @@ -287,7 +287,7 @@ - + diff --git a/browser/metro/base/content/helperui/SelectionHelperUI.js b/browser/metro/base/content/helperui/SelectionHelperUI.js index fa5fa5ed4c42..e2804f38f9c0 100644 --- a/browser/metro/base/content/helperui/SelectionHelperUI.js +++ b/browser/metro/base/content/helperui/SelectionHelperUI.js @@ -516,8 +516,8 @@ var SelectionHelperUI = { this._sendAsyncMessage("Browser:SelectionSwitchMode", { newMode: "selection", change: targetMark.tag, - xPos: this._msgTarget.xctob(targetMark.xPos, true), - yPos: this._msgTarget.yctob(targetMark.yPos, true), + xPos: this._msgTarget.ctobx(targetMark.xPos, true), + yPos: this._msgTarget.ctoby(targetMark.yPos, true), }); }, @@ -800,13 +800,13 @@ var SelectionHelperUI = { // start and end contain client coordinates. if (json.updateStart) { - this.startMark.position(this._msgTarget.xbtoc(json.start.xPos, true), - this._msgTarget.ybtoc(json.start.yPos, true)); + this.startMark.position(this._msgTarget.btocx(json.start.xPos, true), + this._msgTarget.btocy(json.start.yPos, true)); this.startMark.show(); } if (json.updateEnd) { - this.endMark.position(this._msgTarget.xbtoc(json.end.xPos, true), - this._msgTarget.ybtoc(json.end.yPos, true)); + this.endMark.position(this._msgTarget.btocx(json.end.xPos, true), + this._msgTarget.btocy(json.end.yPos, true)); this.endMark.show(); } if (json.updateCaret) { @@ -815,8 +815,8 @@ var SelectionHelperUI = { // position information we can use. haveSelectionRect = json.selectionRangeFound; if (json.selectionRangeFound) { - this.caretMark.position(this._msgTarget.xbtoc(json.caret.xPos, true), - this._msgTarget.ybtoc(json.caret.yPos, true)); + this.caretMark.position(this._msgTarget.btocx(json.caret.xPos, true), + this._msgTarget.btocy(json.caret.yPos, true)); this.caretMark.show(); } } @@ -935,16 +935,16 @@ var SelectionHelperUI = { _getMarkerBaseMessage: function _getMarkerBaseMessage() { return { start: { - xPos: this._msgTarget.xctob(this.startMark.xPos, true), - yPos: this._msgTarget.yctob(this.startMark.yPos, true) + xPos: this._msgTarget.ctobx(this.startMark.xPos, true), + yPos: this._msgTarget.ctoby(this.startMark.yPos, true) }, end: { - xPos: this._msgTarget.xctob(this.endMark.xPos, true), - yPos: this._msgTarget.yctob(this.endMark.yPos, true) + xPos: this._msgTarget.ctobx(this.endMark.xPos, true), + yPos: this._msgTarget.ctoby(this.endMark.yPos, true) }, caret: { - xPos: this._msgTarget.xctob(this.caretMark.xPos, true), - yPos: this._msgTarget.yctob(this.caretMark.yPos, true) + xPos: this._msgTarget.ctobx(this.caretMark.xPos, true), + yPos: this._msgTarget.ctoby(this.caretMark.yPos, true) }, }; },