mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1118134 - expose a method to set chromemargin. r=mstange r=bz
This commit is contained in:
parent
f71d34f608
commit
df21c24cb2
@ -3888,6 +3888,28 @@ nsDOMWindowUtils::SetAudioVolume(float aVolume)
|
|||||||
return window->SetAudioVolume(aVolume);
|
return window->SetAudioVolume(aVolume);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsDOMWindowUtils::SetChromeMargin(int32_t aTop,
|
||||||
|
int32_t aRight,
|
||||||
|
int32_t aBottom,
|
||||||
|
int32_t aLeft)
|
||||||
|
{
|
||||||
|
nsCOMPtr<nsPIDOMWindow> window = do_QueryReferent(mWindow);
|
||||||
|
if (window) {
|
||||||
|
nsCOMPtr<nsIBaseWindow> baseWindow = do_QueryInterface(window->GetDocShell());
|
||||||
|
if (baseWindow) {
|
||||||
|
nsCOMPtr<nsIWidget> widget;
|
||||||
|
baseWindow->GetMainWidget(getter_AddRefs(widget));
|
||||||
|
if (widget) {
|
||||||
|
nsIntMargin margins(aTop, aRight, aBottom, aLeft);
|
||||||
|
return widget->SetNonClientMargins(margins);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDOMWindowUtils::XpconnectArgument(nsIDOMWindowUtils* aThis)
|
nsDOMWindowUtils::XpconnectArgument(nsIDOMWindowUtils* aThis)
|
||||||
{
|
{
|
||||||
|
@ -50,7 +50,7 @@ interface nsITranslationNodeList;
|
|||||||
interface nsIJSRAIIHelper;
|
interface nsIJSRAIIHelper;
|
||||||
interface nsIContentPermissionRequest;
|
interface nsIContentPermissionRequest;
|
||||||
|
|
||||||
[scriptable, uuid(5ed850de-2b57-4555-ac48-93292e852eab)]
|
[scriptable, uuid(c8b21a1e-a69c-11e4-801f-0f8dde75d4c2)]
|
||||||
interface nsIDOMWindowUtils : nsISupports {
|
interface nsIDOMWindowUtils : nsISupports {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1737,6 +1737,16 @@ interface nsIDOMWindowUtils : nsISupports {
|
|||||||
* May throw NS_ERROR_NOT_AVAILABLE.
|
* May throw NS_ERROR_NOT_AVAILABLE.
|
||||||
*/
|
*/
|
||||||
readonly attribute unsigned long long framesReflowed;
|
readonly attribute unsigned long long framesReflowed;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls the amount of chrome that should be visible on each side of
|
||||||
|
* the window. Works like the chromemargin xul:window attribute.
|
||||||
|
* This should only be used with non-XUL windows.
|
||||||
|
*/
|
||||||
|
void setChromeMargin(in int32_t aTop,
|
||||||
|
in int32_t aRight,
|
||||||
|
in int32_t aBottom,
|
||||||
|
in int32_t aLeft);
|
||||||
};
|
};
|
||||||
|
|
||||||
[scriptable, uuid(c694e359-7227-4392-a138-33c0cc1f15a6)]
|
[scriptable, uuid(c694e359-7227-4392-a138-33c0cc1f15a6)]
|
||||||
|
@ -2016,6 +2016,8 @@ NS_IMETHODIMP nsCocoaWindow::SetNonClientMargins(nsIntMargin &margins)
|
|||||||
|
|
||||||
SetDrawsInTitlebar(margins.top == 0);
|
SetDrawsInTitlebar(margins.top == 0);
|
||||||
|
|
||||||
|
return NS_OK;
|
||||||
|
|
||||||
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user