fix for bug 209780 - do UTF16->UTF8 conversion outside the recursion, so that we don't constantly convert the string we're looking for
r=dbaron, sr=jst git-svn-id: svn://10.0.0.236/trunk@144059 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -162,7 +162,7 @@ IsNamedItem(nsIContent* aContent, nsIAtom *aTag, nsAString& aName);
|
||||
|
||||
// MatchElementId is defined in nsXMLDocument.cpp
|
||||
nsIContent *
|
||||
MatchElementId(nsIContent *aContent, const nsAString& aId);
|
||||
MatchElementId(nsIContent *aContent, const nsACString& aUTF8Id, const nsAString& aId);
|
||||
|
||||
|
||||
static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
|
||||
@@ -2839,7 +2839,7 @@ nsHTMLDocument::GetElementById(const nsAString& aElementId,
|
||||
"getElementById(\"\") called, fix caller?");
|
||||
|
||||
if (mRootContent && !aElementId.IsEmpty()) {
|
||||
e = MatchElementId(mRootContent, aElementId);
|
||||
e = MatchElementId(mRootContent, NS_ConvertUCS2toUTF8(aElementId), aElementId);
|
||||
}
|
||||
|
||||
if (!e) {
|
||||
|
||||
Reference in New Issue
Block a user