mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
d6b1a32f01
commit
f2be6bf4aa
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user