Bug 514120. Don't bother looking for XBL bindings on non-XUL nodes in display:none subtrees. r=sicking,enn

This commit is contained in:
Boris Zbarsky 2009-10-01 16:17:25 -04:00
parent 967ffdcab4
commit 88806f4b54

View File

@ -7656,11 +7656,14 @@ static PRBool
GetBindingURL(nsIContent *aContent, nsIDocument *aDocument,
nsCSSValue::URL **aResult)
{
// If we have a frame the frame has already loaded the binding.
// If we have a frame the frame has already loaded the binding. And
// otherwise, don't do anything else here unless we're dealing with
// XUL.
nsIPresShell *shell = aDocument->GetPrimaryShell();
nsIFrame *frame;
if (!shell ||
(frame = shell->GetPrimaryFrameFor(aContent))) {
(frame = shell->GetPrimaryFrameFor(aContent)) ||
!aContent->IsXUL()) {
*aResult = nsnull;
return PR_TRUE;