Bug 998188 part.7 Firefox for Android should use XP line break at calling sendQueryContentEvent() in its chrome r=margaret.leibovic, feedback=markcapella

This commit is contained in:
Masayuki Nakano 2014-04-26 08:52:14 +09:00
Родитель 68a43655ce
Коммит df001c1af2
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -783,7 +783,8 @@ var SelectionHandler = {
let textBounds = range.getBoundingClientRect();
// Get rect of editor
let editorBounds = this._domWinUtils.sendQueryContentEvent(this._domWinUtils.QUERY_EDITOR_RECT, 0, 0, 0, 0);
let editorBounds = this._domWinUtils.sendQueryContentEvent(this._domWinUtils.QUERY_EDITOR_RECT, 0, 0, 0, 0,
this._domWinUtils.QUERY_CONTENT_FLAG_USE_XP_LINE_BREAK);
// the return value from sendQueryContentEvent is in LayoutDevice pixels and we want CSS pixels, so
// divide by the pixel ratio
let editorRect = new Rect(editorBounds.left / window.devicePixelRatio,
@ -996,7 +997,8 @@ var SelectionHandler = {
if (this._activeType == this.TYPE_CURSOR) {
// The left and top properties returned are relative to the client area
// of the window, so we don't need to account for a sub-frame offset.
let cursor = this._domWinUtils.sendQueryContentEvent(this._domWinUtils.QUERY_CARET_RECT, this._targetElement.selectionEnd, 0, 0, 0);
let cursor = this._domWinUtils.sendQueryContentEvent(this._domWinUtils.QUERY_CARET_RECT, this._targetElement.selectionEnd, 0, 0, 0,
this._domWinUtils.QUERY_CONTENT_FLAG_USE_XP_LINE_BREAK);
// the return value from sendQueryContentEvent is in LayoutDevice pixels and we want CSS pixels, so
// divide by the pixel ratio
let x = cursor.left / window.devicePixelRatio;