mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 938640 - Move GetTopImpl. r=bz.
This commit is contained in:
parent
d067308638
commit
528dba0d42
@ -3624,29 +3624,6 @@ nsGlobalWindow::GetRealParent(nsIDOMWindow** aParent)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* GetScriptableTop is called when script reads window.top.
|
||||
*
|
||||
* In contrast to GetRealTop, GetScriptableTop respects <iframe mozbrowser>
|
||||
* boundaries. If we encounter a window owned by an <iframe mozbrowser> while
|
||||
* walking up the window hierarchy, we'll stop and return that window.
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
nsGlobalWindow::GetScriptableTop(nsIDOMWindow **aTop)
|
||||
{
|
||||
return GetTopImpl(aTop, /* aScriptable = */ true);
|
||||
}
|
||||
|
||||
/**
|
||||
* nsIDOMWindow::GetTop (when called from C++) is just a wrapper around
|
||||
* GetRealTop.
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
nsGlobalWindow::GetRealTop(nsIDOMWindow** aTop)
|
||||
{
|
||||
return GetTopImpl(aTop, /* aScriptable = */ false);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGlobalWindow::GetTopImpl(nsIDOMWindow** aTop, bool aScriptable)
|
||||
{
|
||||
@ -3685,6 +3662,29 @@ nsGlobalWindow::GetTopImpl(nsIDOMWindow** aTop, bool aScriptable)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* GetScriptableTop is called when script reads window.top.
|
||||
*
|
||||
* In contrast to GetRealTop, GetScriptableTop respects <iframe mozbrowser>
|
||||
* boundaries. If we encounter a window owned by an <iframe mozbrowser> while
|
||||
* walking up the window hierarchy, we'll stop and return that window.
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
nsGlobalWindow::GetScriptableTop(nsIDOMWindow **aTop)
|
||||
{
|
||||
return GetTopImpl(aTop, /* aScriptable = */ true);
|
||||
}
|
||||
|
||||
/**
|
||||
* nsIDOMWindow::GetTop (when called from C++) is just a wrapper around
|
||||
* GetRealTop.
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
nsGlobalWindow::GetRealTop(nsIDOMWindow** aTop)
|
||||
{
|
||||
return GetTopImpl(aTop, /* aScriptable = */ false);
|
||||
}
|
||||
|
||||
JSObject*
|
||||
nsGlobalWindow::GetContent(JSContext* aCx, ErrorResult& aError)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user