Bug 476097, ASSERTION: killing mutation events with <input type=file>, r+sr=bz

This commit is contained in:
Olli Pettay
2009-01-31 14:34:01 +02:00
parent 7d2c280743
commit c8cd3be1ef
3 changed files with 20 additions and 12 deletions

View File

@@ -162,6 +162,9 @@ nsFileControlFrame::CreateAnonymousContent(nsTArray<nsIContent*>& aElements)
if (!mTextContent)
return NS_ERROR_OUT_OF_MEMORY;
// Mark the element to be native anonymous before setting any attributes.
mTextContent->SetNativeAnonymous();
mTextContent->SetAttr(kNameSpaceID_None, nsGkAtoms::type,
NS_LITERAL_STRING("text"), PR_FALSE);
@@ -199,6 +202,9 @@ nsFileControlFrame::CreateAnonymousContent(nsTArray<nsIContent*>& aElements)
if (!mBrowse)
return NS_ERROR_OUT_OF_MEMORY;
// Mark the element to be native anonymous before setting any attributes.
mBrowse->SetNativeAnonymous();
mBrowse->SetAttr(kNameSpaceID_None, nsGkAtoms::type,
NS_LITERAL_STRING("button"), PR_FALSE);
nsCOMPtr<nsIDOMHTMLInputElement> fileContent = do_QueryInterface(mContent);