зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1520372 - Add an ownerElement property to nsITabParent, r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D16713 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
8e2cad84f0
Коммит
083cc0a7c3
|
@ -6,6 +6,7 @@
|
|||
#include "domstubs.idl"
|
||||
|
||||
interface nsIPrincipal;
|
||||
webidl Element;
|
||||
|
||||
[builtinclass, scriptable, uuid(8e49f7b0-1f98-4939-bf91-e9c39cd56434)]
|
||||
interface nsITabParent : nsISupports
|
||||
|
@ -81,6 +82,11 @@ interface nsITabParent : nsISupports
|
|||
*/
|
||||
readonly attribute boolean hasBeforeUnload;
|
||||
|
||||
/**
|
||||
* The frame element which currently embeds this nsITabParent object.
|
||||
*/
|
||||
readonly attribute Element ownerElement;
|
||||
|
||||
/**
|
||||
* Notify APZ to start autoscrolling.
|
||||
* (aAnchorX, aAnchorY) are the coordinates of the autoscroll anchor,
|
||||
|
|
|
@ -305,6 +305,11 @@ void TabParent::SetOwnerElement(Element* aElement) {
|
|||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP TabParent::GetOwnerElement(Element** aElement) {
|
||||
*aElement = do_AddRef(GetOwnerElement()).take();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void TabParent::AddWindowListeners() {
|
||||
if (mFrameElement) {
|
||||
if (nsCOMPtr<nsPIDOMWindowOuter> window =
|
||||
|
|
Загрузка…
Ссылка в новой задаче