Bug 1419285 - Part 1. Calculate composition rect for remote XUL frame. r=masayuki

Out of process support for Web extension creates another XUL widget for it.
We should calculate correct offset for Web Extension's remote widget.

MozReview-Commit-ID: AaALzLeKLsM

--HG--
extra : rebase_source : da3562d6ec6b93b99d12b0cac4d80d8b91e286fd
This commit is contained in:
Makoto Kato 2017-11-29 15:55:58 +09:00
Родитель 855a4bc6c4
Коммит 74fb3d9e5f
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -2286,8 +2286,16 @@ TabParent::HandleQueryContentEvent(WidgetQueryContentEvent& aEvent)
case eQueryTextRect:
case eQueryCaretRect:
case eQueryEditorRect:
{
nsCOMPtr<nsIWidget> widget = GetWidget();
nsCOMPtr<nsIWidget> docWidget = GetDocWidget();
if (widget != docWidget) {
aEvent.mReply.mRect +=
nsLayoutUtils::WidgetToWidgetOffset(widget, docWidget);
}
aEvent.mReply.mRect -= GetChildProcessOffset();
break;
}
default:
break;
}