Changing the way content elements store their name information, previously the elements generally stored a name atom and a namespace ID, now they store a pointer to a shared structure containing the name atom, the prefix atom and the namespace ID. This structure is shared between nodes with unique names (ie same name, prefix and ns ID) within a document. Documents now hold a hash table of the names in the document. The changes to mozilla/rdf are not reviewed but they are approved by waterson@netscape.com and the changes to mozilla/layout are reviewed by buster@netscape.com.

This commit is contained in:
jst@netscape.com
2000-05-10 13:13:39 +00:00
parent 772b8e3001
commit fa72f71714
196 changed files with 3126 additions and 2421 deletions

View File

@@ -115,8 +115,18 @@ nsFileControlFrame::CreateAnonymousContent(nsIPresContext* aPresContext,
{
// create text field
nsIAtom* tag = NS_NewAtom("input");
if (NS_OK == NS_NewHTMLInputElement(&mTextContent, tag)) {
nsCOMPtr<nsIDocument> doc;
mContent->GetDocument(*getter_AddRefs(doc));
nsCOMPtr<nsINodeInfoManager> nimgr;
nsresult rv = doc->GetNodeInfoManager(*getter_AddRefs(nimgr));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsINodeInfo> nodeInfo;
nimgr->GetNodeInfo(nsHTMLAtoms::input, nsnull, kNameSpaceID_None,
*getter_AddRefs(nodeInfo));
if (NS_OK == NS_NewHTMLInputElement(&mTextContent, nodeInfo)) {
mTextContent->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, NS_ConvertASCIItoUCS2("text"), PR_FALSE);
if (nsFormFrame::GetDisabled(this)) {
nsCOMPtr<nsIDOMHTMLInputElement> textControl = do_QueryInterface(mTextContent);
@@ -129,8 +139,7 @@ nsFileControlFrame::CreateAnonymousContent(nsIPresContext* aPresContext,
// create browse button
nsIHTMLContent* browse = nsnull;
tag = NS_NewAtom("input");
if (NS_OK == NS_NewHTMLInputElement(&browse, tag)) {
if (NS_OK == NS_NewHTMLInputElement(&browse, nodeInfo)) {
browse->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, NS_ConvertASCIItoUCS2("button"), PR_FALSE);
//browse->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::value, nsAutoString("browse..."), PR_FALSE);