Bug 114850: scrollbars permanently hidden when using window.scrollbars.visible = false, patch by Martijn Wargers <martijn.martijn@gmail.com>, r+sr=bzbarsky

This commit is contained in:
gavin%gavinsharp.com 2005-12-30 16:57:46 +00:00
Родитель cd8a2f2c20
Коммит c826eb751d
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -301,6 +301,15 @@ nsScrollbarsProp::GetVisible(PRBool *aVisible)
NS_IMETHODIMP
nsScrollbarsProp::SetVisible(PRBool aVisible)
{
PRBool enabled = PR_FALSE;
nsCOMPtr<nsIScriptSecurityManager>
securityManager(do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID));
if (securityManager)
securityManager->IsCapabilityEnabled("UniversalBrowserWrite", &enabled);
if (!enabled)
return NS_OK;
/* Scrollbars, unlike the other barprops, implement visibility directly
rather than handing off to the superclass (and from there to the
chrome window) because scrollbar visibility uniquely applies only