mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-24 11:27:49 +00:00
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:
parent
cd8a2f2c20
commit
c826eb751d
@ -301,6 +301,15 @@ nsScrollbarsProp::GetVisible(PRBool *aVisible)
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsScrollbarsProp::SetVisible(PRBool aVisible)
|
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
|
/* Scrollbars, unlike the other barprops, implement visibility directly
|
||||||
rather than handing off to the superclass (and from there to the
|
rather than handing off to the superclass (and from there to the
|
||||||
chrome window) because scrollbar visibility uniquely applies only
|
chrome window) because scrollbar visibility uniquely applies only
|
||||||
|
Loading…
x
Reference in New Issue
Block a user