b=380359; fix bug in checkbox/checkbooleanattr; r=roc

This commit is contained in:
Vladimir Vukicevic 2009-04-14 10:22:04 -07:00
parent 9af6bdf08f
commit 89e600459d

View File

@ -81,6 +81,9 @@ nsNativeTheme::GetContentState(nsIFrame* aFrame, PRUint8 aWidgetType)
if (isXULCheckboxRadio)
aFrame = aFrame->GetParent();
if (!aFrame->GetContent())
return 0;
nsIPresShell *shell = GetPresShell(aFrame);
if (!shell)
return 0;
@ -103,6 +106,9 @@ nsNativeTheme::CheckBooleanAttr(nsIFrame* aFrame, nsIAtom* aAtom)
return PR_FALSE;
nsIContent* content = aFrame->GetContent();
if (!content)
return PR_FALSE;
if (content->IsNodeOfType(nsINode::eHTML))
return content->HasAttr(kNameSpaceID_None, aAtom);