зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
cd8a2f2c20
Коммит
c826eb751d
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче