зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
68a43655ce
Коммит
df001c1af2
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче