mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 17:24:29 +00:00
Remove unused code, b=199704, r=peterv, sr=jst
This commit is contained in:
parent
6f253a970c
commit
c6058a5ff9
@ -1808,38 +1808,6 @@ nsXULDocument::GetHeight(PRInt32* aHeight)
|
||||
return result;
|
||||
}
|
||||
|
||||
static nsresult
|
||||
GetElementByAttribute(nsIContent* aContent,
|
||||
nsIAtom* aAttrName,
|
||||
const nsAString& aAttrValue,
|
||||
PRBool aUniversalMatch,
|
||||
nsIDOMElement** aResult)
|
||||
{
|
||||
nsAutoString value;
|
||||
nsresult rv = aContent->GetAttr(kNameSpaceID_None, aAttrName, value);
|
||||
if (rv == NS_CONTENT_ATTR_HAS_VALUE) {
|
||||
if (aUniversalMatch || value.Equals(aAttrValue))
|
||||
return CallQueryInterface(aContent, aResult);
|
||||
}
|
||||
|
||||
PRInt32 childCount;
|
||||
aContent->ChildCount(childCount);
|
||||
|
||||
for (PRInt32 i = 0; i < childCount; ++i) {
|
||||
nsCOMPtr<nsIContent> current;
|
||||
aContent->ChildAt(i, *getter_AddRefs(current));
|
||||
|
||||
GetElementByAttribute(current, aAttrName, aAttrValue, aUniversalMatch,
|
||||
aResult);
|
||||
|
||||
if (*aResult)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
// nsIDOMXULDocument interface
|
||||
|
Loading…
x
Reference in New Issue
Block a user