Fix for bug 252589 (Textbox attribute "multiline" seems broken). r+sr=jst.

This commit is contained in:
peterv%propagandism.org 2004-08-06 11:56:46 +00:00
Родитель 4ae5a46ffa
Коммит f0d5139d7d
3 изменённых файлов: 19 добавлений и 8 удалений

Просмотреть файл

@ -619,6 +619,12 @@ public:
return mSecurityInfo;
}
/**
* Returns the default namespace ID used for elements created in this
* document.
*/
virtual PRInt32 GetDefaultNamespaceID() const = 0;
protected:
nsString mDocumentTitle;
nsCOMPtr<nsIURI> mDocumentURI;

Просмотреть файл

@ -895,11 +895,11 @@ nsXULElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
NS_ENSURE_TRUE(mSlots, NS_ERROR_UNEXPECTED);
rv = NS_NewXULElement(getter_AddRefs(result), mSlots->mNodeInfo);
if (NS_SUCCEEDED(rv)) {
// XXX setting document on nodes not in a document so XBL will bind
// and chrome won't break. Make XBL bind to document-less nodes!
result->SetDocument(mDocument, PR_TRUE, PR_TRUE);
}
NS_ENSURE_SUCCESS(rv, rv);
// XXX setting document on nodes not in a document so XBL will bind
// and chrome won't break. Make XBL bind to document-less nodes!
result->SetDocument(mDocument, PR_TRUE, PR_TRUE);
}
// Copy attributes

Просмотреть файл

@ -102,6 +102,7 @@
#include "nsEditorUtils.h"
#include "nsISelectionDisplay.h"
#include "nsINameSpaceManager.h"
#include "nsIHTMLDocument.h"
#define NS_ERROR_EDITOR_NO_SELECTION NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_EDITOR,1)
#define NS_ERROR_EDITOR_NO_TEXTNODE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_EDITOR,2)
@ -5069,9 +5070,13 @@ nsEditor::CreateHTMLContent(const nsAString& aTag, nsIContent** aContent)
if (!tag)
return NS_ERROR_OUT_OF_MEMORY;
// XXX If editor starts supporting XHTML documents, the kNameSpaceID_None
// should be kNameSpaceID_XHTML for those documents.
return doc->CreateElem(tag, nsnull, kNameSpaceID_None, PR_TRUE, aContent);
nsCOMPtr<nsIHTMLDocument> htmlDoc = do_QueryInterface(tempDoc);
if (htmlDoc) {
return doc->CreateElem(tag, nsnull, doc->GetDefaultNamespaceID(),
PR_TRUE, aContent);
}
return doc->CreateElem(tag, nsnull, kNameSpaceID_XHTML, PR_FALSE, aContent);
}
nsresult