зеркало из https://github.com/mozilla/gecko-dev.git
Back out changeset 0fb81504b0aa due to Windows build breaking.
This commit is contained in:
Родитель
87fe96d0dc
Коммит
2c1e020e87
|
@ -51,7 +51,7 @@ class nsIDocument;
|
|||
[ptr] native nsINodePtr(nsINode);
|
||||
[ptr] native nsIDocumentPtr(nsIDocument);
|
||||
|
||||
[scriptable, uuid(82adaeca-63ee-44eb-830a-e1678bb8745e)]
|
||||
[scriptable, uuid(c0da5b87-0ba7-4d7c-8cb3-fcb02af4253d)]
|
||||
interface nsIDocumentEncoderNodeFixup : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -272,7 +272,6 @@ interface nsIDocumentEncoder : nsISupports
|
|||
* @param aNode The node to encode.
|
||||
*/
|
||||
void setNode(in nsIDOMNode aNode);
|
||||
[noscript] void setNativeNode(in nsINodePtr aNode);
|
||||
|
||||
/**
|
||||
* If the container is set to a non-null value, then its
|
||||
|
|
|
@ -301,14 +301,6 @@ nsDocumentEncoder::SetNode(nsIDOMNode* aNode)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocumentEncoder::SetNativeNode(nsINode* aNode)
|
||||
{
|
||||
mNodeIsContainer = false;
|
||||
mNode = aNode;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocumentEncoder::SetContainerNode(nsIDOMNode *aContainer)
|
||||
{
|
||||
|
|
|
@ -120,7 +120,6 @@
|
|||
#include "nsPLDOMEvent.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/dom/FromParser.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
@ -667,12 +666,14 @@ nsGenericHTMLElement::GetOffsetParent(nsIDOMElement** aOffsetParent)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGenericHTMLElement::GetMarkup(bool aIncludeSelf, nsAString& aMarkup)
|
||||
nsGenericHTMLElement::GetInnerHTML(nsAString& aInnerHTML)
|
||||
{
|
||||
aMarkup.Truncate();
|
||||
aInnerHTML.Truncate();
|
||||
|
||||
nsIDocument* doc = OwnerDoc();
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsAutoString contentType;
|
||||
if (IsInHTMLDocument()) {
|
||||
contentType.AssignLiteral("text/html");
|
||||
|
@ -697,37 +698,21 @@ nsGenericHTMLElement::GetMarkup(bool aIncludeSelf, nsAString& aMarkup)
|
|||
|
||||
NS_ENSURE_TRUE(docEncoder, NS_ERROR_FAILURE);
|
||||
|
||||
nsresult rv = docEncoder->NativeInit(doc, contentType,
|
||||
nsIDocumentEncoder::OutputEncodeBasicEntities |
|
||||
// Output DOM-standard newlines
|
||||
nsIDocumentEncoder::OutputLFLineBreak |
|
||||
// Don't do linebreaking that's not present in
|
||||
// the source
|
||||
nsIDocumentEncoder::OutputRaw);
|
||||
rv = docEncoder->NativeInit(doc, contentType,
|
||||
nsIDocumentEncoder::OutputEncodeBasicEntities |
|
||||
// Output DOM-standard newlines
|
||||
nsIDocumentEncoder::OutputLFLineBreak |
|
||||
// Don't do linebreaking that's not present in
|
||||
// the source
|
||||
nsIDocumentEncoder::OutputRaw);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (aIncludeSelf) {
|
||||
docEncoder->SetNativeNode(this);
|
||||
} else {
|
||||
docEncoder->SetNativeContainerNode(this);
|
||||
}
|
||||
rv = docEncoder->EncodeToString(aMarkup);
|
||||
if (!aIncludeSelf) {
|
||||
doc->SetCachedEncoder(docEncoder.forget());
|
||||
}
|
||||
docEncoder->SetNativeContainerNode(this);
|
||||
rv = docEncoder->EncodeToString(aInnerHTML);
|
||||
doc->SetCachedEncoder(docEncoder.forget());
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericHTMLElement::GetInnerHTML(nsAString& aInnerHTML) {
|
||||
return GetMarkup(false, aInnerHTML);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGenericHTMLElement::GetOuterHTML(nsAString& aOuterHTML) {
|
||||
return GetMarkup(true, aOuterHTML);
|
||||
}
|
||||
|
||||
void
|
||||
nsGenericHTMLElement::FireMutationEventsForDirectParsing(nsIDocument* aDoc,
|
||||
nsIContent* aDest,
|
||||
|
@ -755,6 +740,8 @@ nsGenericHTMLElement::SetInnerHTML(const nsAString& aInnerHTML)
|
|||
{
|
||||
nsIDocument* doc = OwnerDoc();
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
// Batch possible DOMSubtreeModified events.
|
||||
mozAutoSubtreeModified subtree(doc, nsnull);
|
||||
|
||||
|
@ -771,7 +758,8 @@ nsGenericHTMLElement::SetInnerHTML(const nsAString& aInnerHTML)
|
|||
|
||||
nsAutoScriptLoaderDisabler sld(doc);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsIDOMDocumentFragment> df;
|
||||
|
||||
if (doc->IsHTML()) {
|
||||
PRInt32 oldChildCount = GetChildCount();
|
||||
rv = nsContentUtils::ParseFragmentHTML(aInnerHTML,
|
||||
|
@ -784,7 +772,6 @@ nsGenericHTMLElement::SetInnerHTML(const nsAString& aInnerHTML)
|
|||
// HTML5 parser has notified, but not fired mutation events.
|
||||
FireMutationEventsForDirectParsing(doc, this, oldChildCount);
|
||||
} else {
|
||||
nsCOMPtr<nsIDOMDocumentFragment> df;
|
||||
rv = nsContentUtils::CreateContextualFragment(this, aInnerHTML,
|
||||
true,
|
||||
getter_AddRefs(df));
|
||||
|
@ -802,71 +789,6 @@ nsGenericHTMLElement::SetInnerHTML(const nsAString& aInnerHTML)
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGenericHTMLElement::SetOuterHTML(const nsAString& aOuterHTML)
|
||||
{
|
||||
nsINode* parent = GetNodeParent();
|
||||
if (!parent) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (parent->NodeType() == nsIDOMNode::DOCUMENT_NODE) {
|
||||
return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR;
|
||||
}
|
||||
|
||||
if (OwnerDoc()->IsHTML()) {
|
||||
nsIAtom* localName;
|
||||
PRInt32 namespaceID;
|
||||
if (parent->IsElement()) {
|
||||
localName = static_cast<nsIContent*>(parent)->Tag();
|
||||
namespaceID = static_cast<nsIContent*>(parent)->GetNameSpaceID();
|
||||
} else {
|
||||
NS_ASSERTION(parent->NodeType() == nsIDOMNode::DOCUMENT_FRAGMENT_NODE,
|
||||
"How come the parent isn't a document, a fragment or an element?");
|
||||
localName = nsGkAtoms::body;
|
||||
namespaceID = kNameSpaceID_XHTML;
|
||||
}
|
||||
nsCOMPtr<nsIDOMDocumentFragment> df;
|
||||
nsresult rv = NS_NewDocumentFragment(getter_AddRefs(df),
|
||||
OwnerDoc()->NodeInfoManager());
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr<nsIContent> fragment = do_QueryInterface(df);
|
||||
nsContentUtils::ParseFragmentHTML(aOuterHTML,
|
||||
fragment,
|
||||
localName,
|
||||
namespaceID,
|
||||
OwnerDoc()->GetCompatibilityMode() ==
|
||||
eCompatibility_NavQuirks,
|
||||
PR_TRUE);
|
||||
parent->ReplaceChild(fragment, this, &rv);
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsINode> context;
|
||||
if (parent->IsElement()) {
|
||||
context = parent;
|
||||
} else {
|
||||
NS_ASSERTION(parent->NodeType() == nsIDOMNode::DOCUMENT_FRAGMENT_NODE,
|
||||
"How come the parent isn't a document, a fragment or an element?");
|
||||
nsCOMPtr<nsINodeInfo> info =
|
||||
OwnerDoc()->NodeInfoManager()->GetNodeInfo(nsGkAtoms::body,
|
||||
nsnull,
|
||||
kNameSpaceID_XHTML,
|
||||
nsIDOMNode::ELEMENT_NODE);
|
||||
context = NS_NewHTMLBodyElement(info.forget(), FROM_PARSER_FRAGMENT);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMDocumentFragment> df;
|
||||
nsresult rv = nsContentUtils::CreateContextualFragment(context,
|
||||
aOuterHTML,
|
||||
PR_TRUE,
|
||||
getter_AddRefs(df));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr<nsINode> fragment = do_QueryInterface(df);
|
||||
parent->ReplaceChild(fragment, this, &rv);
|
||||
return rv;
|
||||
}
|
||||
|
||||
enum nsAdjacentPosition {
|
||||
eBeforeBegin,
|
||||
eAfterBegin,
|
||||
|
|
|
@ -132,8 +132,6 @@ public:
|
|||
nsresult GetOffsetParent(nsIDOMElement** aOffsetParent);
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML);
|
||||
NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML);
|
||||
NS_IMETHOD GetOuterHTML(nsAString& aOuterHTML);
|
||||
NS_IMETHOD SetOuterHTML(const nsAString& aOuterHTML);
|
||||
NS_IMETHOD InsertAdjacentHTML(const nsAString& aPosition,
|
||||
const nsAString& aText);
|
||||
nsresult ScrollIntoView(bool aTop, PRUint8 optional_argc);
|
||||
|
@ -163,10 +161,6 @@ public:
|
|||
nsresult ClearDataset();
|
||||
nsresult GetContextMenu(nsIDOMHTMLMenuElement** aContextMenu);
|
||||
|
||||
protected:
|
||||
nsresult GetMarkup(bool aIncludeSelf, nsAString& aMarkup);
|
||||
|
||||
public:
|
||||
// Implementation for nsIContent
|
||||
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||
nsIContent* aBindingParent,
|
||||
|
@ -1577,12 +1571,6 @@ protected:
|
|||
NS_SCRIPTABLE NS_IMETHOD SetSpellcheck(bool aSpellcheck) { \
|
||||
return _to SetSpellcheck(aSpellcheck); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetOuterHTML(nsAString& aOuterHTML) { \
|
||||
return _to GetOuterHTML(aOuterHTML); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetOuterHTML(const nsAString& aOuterHTML) { \
|
||||
return _to SetOuterHTML(aOuterHTML); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD InsertAdjacentHTML(const nsAString& position, const nsAString& text) { \
|
||||
return _to InsertAdjacentHTML(position, text); \
|
||||
} \
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(bcb54394-d9f8-4bcb-bbbb-eca9826cdbca)]
|
||||
[scriptable, uuid(2da904fa-83da-426d-a320-a6868192583e)]
|
||||
interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString href;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(a06bca18-791f-474e-a031-bf6c2bd14994)]
|
||||
[scriptable, uuid(c874e500-a185-4d69-96dd-474d1137e21f)]
|
||||
interface nsIDOMHTMLAppletElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(7e607c36-aecc-4dee-a93a-95e22a374bfb)]
|
||||
[scriptable, uuid(d88c8515-5a27-4955-8ca5-18c908433cfd)]
|
||||
interface nsIDOMHTMLAreaElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString alt;
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
* @status UNDER_DEVELOPMENT
|
||||
*/
|
||||
|
||||
[scriptable, uuid(756e2792-b937-4a70-bd1f-9d6820473e7e)]
|
||||
[scriptable, uuid(f4115c13-bc51-4c3b-a5c0-9106af9f7368)]
|
||||
interface nsIDOMHTMLAudioElement : nsIDOMHTMLMediaElement
|
||||
{
|
||||
// Setup the audio stream for writing
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(7eefd466-7c4d-499a-a076-e33204e69dc3)]
|
||||
[scriptable, uuid(a4f319d7-442d-4154-8c60-b9acdca87523)]
|
||||
interface nsIDOMHTMLBRElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString clear;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(e55cd224-b603-4976-892a-20b11d469394)]
|
||||
[scriptable, uuid(1ba4957f-629e-4410-b5fd-64f2b7eeb32c)]
|
||||
interface nsIDOMHTMLBaseElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString href;
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(6c377d44-a5d1-4f0f-860a-9858d2cb5679)]
|
||||
[scriptable, uuid(dcf343a9-fa7f-4e16-b122-0ece0d8bdea9)]
|
||||
interface nsIDOMHTMLBodyElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString aLink;
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
interface nsIDOMValidityState;
|
||||
|
||||
[scriptable, uuid(79f034f0-5c13-4101-9598-412e1eac1986)]
|
||||
[scriptable, uuid(4b48e075-a05b-480f-9e37-fcd88e7aebdd)]
|
||||
interface nsIDOMHTMLButtonElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean autofocus;
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
interface nsIDOMFile;
|
||||
interface nsIVariant;
|
||||
|
||||
[scriptable, uuid(dbbeeba1-3c20-4d9d-ac82-98b69fd819a9)]
|
||||
[scriptable, uuid(e1ea26e6-4141-487f-a9cf-d7e9344b571c)]
|
||||
interface nsIDOMHTMLCanvasElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute unsigned long width;
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
* @status UNDER_DEVELOPMENT
|
||||
*/
|
||||
|
||||
[scriptable, uuid(13032f74-4150-4768-ab5e-51f4de39a300)]
|
||||
[scriptable, uuid(4c466da8-5c6d-427f-95f5-bba96ab99c96)]
|
||||
interface nsIDOMHTMLCommandElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString type;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(50e9ff30-0982-4074-bc65-313f41be8624)]
|
||||
[scriptable, uuid(f3e65e2b-e079-4970-bb5d-f96ac9cd18c5)]
|
||||
interface nsIDOMHTMLDListElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean compact;
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
interface nsIDOMHTMLCollection;
|
||||
|
||||
[scriptable, uuid(3bace78b-9eca-4990-a5d6-9c2b8c32cc8a)]
|
||||
[scriptable, uuid(312ed7c1-8c62-4d80-bbd9-99d7ea4377e6)]
|
||||
interface nsIDOMHTMLDataListElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute nsIDOMHTMLCollection options;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(a99e86ae-7761-4145-b8a4-5a91186051f1)]
|
||||
[scriptable, uuid(1e04cd43-edc0-4658-bd77-d67661af6c9c)]
|
||||
interface nsIDOMHTMLDirectoryElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean compact;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(6815b902-8e04-49dd-977b-0a8785e5ffaf)]
|
||||
[scriptable, uuid(771be9ee-b883-4556-bf90-2d7c904fe94d)]
|
||||
interface nsIDOMHTMLDivElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
|
|
@ -53,7 +53,7 @@ interface nsIDOMHTMLMenuElement;
|
|||
* with changes from the work-in-progress WHATWG HTML specification:
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
[scriptable, uuid(4eccf8a3-8bf5-43f3-a728-f5b632f7db3a)]
|
||||
[scriptable, uuid(0a21bb68-d8bd-4b2a-a3db-048a02e81c62)]
|
||||
interface nsIDOMHTMLElement : nsIDOMElement
|
||||
{
|
||||
// metadata attributes
|
||||
|
@ -86,7 +86,6 @@ interface nsIDOMHTMLElement : nsIDOMElement
|
|||
|
||||
// DOM Parsing and Serialization
|
||||
attribute DOMString innerHTML;
|
||||
attribute DOMString outerHTML;
|
||||
void insertAdjacentHTML(in DOMString position,
|
||||
in DOMString text);
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element
|
||||
*/
|
||||
|
||||
[scriptable, uuid(940a15c2-0d48-4186-b4d8-067fa1ce5675)]
|
||||
[scriptable, uuid(d6309fc7-e9d2-4087-b452-490ed84f2dc2)]
|
||||
interface nsIDOMHTMLEmbedElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
interface nsIDOMValidityState;
|
||||
|
||||
[scriptable, uuid(781ae103-b030-4aad-b2d5-96e5c2317dec)]
|
||||
[scriptable, uuid(e153c20e-7a3d-4184-865c-ee7c6d9b65df)]
|
||||
interface nsIDOMHTMLFieldSetElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean disabled;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(1c9778ee-a49c-40ee-9b93-c0ff15630431)]
|
||||
[scriptable, uuid(8a205975-86cb-44db-b20e-df7f2d200580)]
|
||||
interface nsIDOMHTMLFontElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString color;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(d873b251-6f96-4e70-baf5-aaa935aabe59)]
|
||||
[scriptable, uuid(8fe67952-6f7b-4d6e-b17b-79a454687e5f)]
|
||||
interface nsIDOMHTMLFormElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString acceptCharset;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(318fdc4a-3fca-4099-94aa-c9a1c30ca2b9)]
|
||||
[scriptable, uuid(6de9d59d-42fd-44df-bb41-22cd64a85d4f)]
|
||||
interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString frameBorder;
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(6eefbe6d-182c-42e9-9850-af1892b6f2e4)]
|
||||
[scriptable, uuid(a9423392-0f92-4b25-8700-49d28752c092)]
|
||||
interface nsIDOMHTMLFrameSetElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString cols;
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(b94bff8f-dfa7-4dd8-8d97-c301dd9de729)]
|
||||
[scriptable, uuid(a6950d69-a376-4ad5-a911-8f91abb2b15d)]
|
||||
interface nsIDOMHTMLHRElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(628fe597-6408-4387-9fcb-75381e2b2dd0)]
|
||||
[scriptable, uuid(6d049c37-2cee-4c04-816c-270973e58ccf)]
|
||||
interface nsIDOMHTMLHeadElement : nsIDOMHTMLElement
|
||||
{
|
||||
};
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(964c94b0-5571-44e7-9b29-f81c6ea7828a)]
|
||||
[scriptable, uuid(c3c30a05-1dc0-413a-85f6-3c4d5af5f2b6)]
|
||||
interface nsIDOMHTMLHeadingElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(4bafbc15-aa88-4021-9ad6-e14189b7227b)]
|
||||
[scriptable, uuid(84825a7d-d5c7-4b1a-9d2a-b3e5df055824)]
|
||||
interface nsIDOMHTMLHtmlElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString version;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(5ef30718-fe45-43a2-a478-a9e3cbf3a118)]
|
||||
[scriptable, uuid(166c1cdb-9af5-4217-9a2f-f9dae0923e85)]
|
||||
interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(56d9191f-5a94-432f-af70-6fccdeaf614b)]
|
||||
[scriptable, uuid(02dbe3c7-e75e-4a35-989c-b6f6d7a3108f)]
|
||||
interface nsIDOMHTMLImageElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString alt;
|
||||
|
|
|
@ -54,7 +54,7 @@ interface nsIDOMValidityState;
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(7330cd35-c930-4f45-ae61-f5380c30222d)]
|
||||
[scriptable, uuid(81cc1b30-02e1-4779-ac9e-0091933478a4)]
|
||||
interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString accept;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(85b15d13-be6d-4653-9c70-22a13d510247)]
|
||||
[scriptable, uuid(cb9bbac6-3198-4159-9ee9-262eef35f265)]
|
||||
interface nsIDOMHTMLLIElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString type;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(ddbca449-625d-467c-a22d-7887474f9eb9)]
|
||||
[scriptable, uuid(0c36c887-04e3-4926-a916-8e3596130f9a)]
|
||||
interface nsIDOMHTMLLabelElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute nsIDOMHTMLFormElement form;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(dac72753-6919-414b-b771-9e1e86e7749c)]
|
||||
[scriptable, uuid(cabacc5f-5179-4c97-be60-0af8feafb4c9)]
|
||||
interface nsIDOMHTMLLegendElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute nsIDOMHTMLFormElement form;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(2ece79f4-83d7-499c-946f-ae9ab93147b7)]
|
||||
[scriptable, uuid(2f238f84-1b45-4ef9-9cda-bd1430ce9304)]
|
||||
interface nsIDOMHTMLLinkElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean disabled;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(c919bc49-bd49-4b89-ba70-5c74c4ef504a)]
|
||||
[scriptable, uuid(3fb8ec10-8778-418d-9c83-556e46f115a9)]
|
||||
interface nsIDOMHTMLMapElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute nsIDOMHTMLCollection areas;
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
#endif
|
||||
%}
|
||||
|
||||
[scriptable, uuid(642a3b85-4edb-4c01-a162-06b5d88171e7)]
|
||||
[scriptable, uuid(85baaa10-73ab-4a48-a57a-b3951b67e494)]
|
||||
interface nsIDOMHTMLMediaElement : nsIDOMHTMLElement
|
||||
{
|
||||
// error state
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(06d48250-45e0-4f26-9a07-d9b5a3f08bb6)]
|
||||
[scriptable, uuid(12de9196-b164-43e0-9347-f23e1bffbede)]
|
||||
interface nsIDOMHTMLMenuElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean compact;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
* @status UNDER_DEVELOPMENT
|
||||
*/
|
||||
|
||||
[scriptable, uuid(4680ec24-94f0-4eb7-9413-98f9a857de72)]
|
||||
[scriptable, uuid(e0469d92-a137-4329-9d4b-9f2ba5ce8e77)]
|
||||
interface nsIDOMHTMLMenuItemElement : nsIDOMHTMLCommandElement
|
||||
{
|
||||
};
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(db476657-5f59-4e29-84a6-50afe6f85ac7)]
|
||||
[scriptable, uuid(c883b92b-5ae0-4563-894a-fa7f0e9aacda)]
|
||||
interface nsIDOMHTMLMetaElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString content;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(170733d4-aad5-4f6e-86c0-94845ea6116d)]
|
||||
[scriptable, uuid(417626fa-191c-41e5-aed5-f6157b408e72)]
|
||||
interface nsIDOMHTMLModElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString cite;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(31a5f083-59a6-41c3-8a0b-e58e484c6516)]
|
||||
[scriptable, uuid(11e66686-b1ef-47be-9025-ffc20b875e4a)]
|
||||
interface nsIDOMHTMLOListElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean compact;
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
interface nsIDOMValidityState;
|
||||
|
||||
[scriptable, uuid(40037f4a-5bae-476f-977b-bbd8e78aaefe)]
|
||||
[scriptable, uuid(5d873128-d4e3-4e89-8900-599155167105)]
|
||||
interface nsIDOMHTMLObjectElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute nsIDOMHTMLFormElement form;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(ab55d67a-aabb-4441-b182-8ff2bd7d157e)]
|
||||
[scriptable, uuid(7b585d49-1da3-4fc6-a50c-b661063c2edc)]
|
||||
interface nsIDOMHTMLOptGroupElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean disabled;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(7c5bf0ac-6230-4ee0-8b82-e7ebf211af03)]
|
||||
[scriptable, uuid(c20ead8a-cb89-43b1-89ed-8f4713bf8452)]
|
||||
interface nsIDOMHTMLOptionElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean disabled;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
interface nsIDOMDOMSettableTokenList;
|
||||
interface nsIDOMValidityState;
|
||||
|
||||
[scriptable, uuid(f2074cdb-19cb-447a-935c-9f4402dc1b5e)]
|
||||
[scriptable, uuid(7d1fb2a9-7678-409e-8eb5-9216c47c233b)]
|
||||
interface nsIDOMHTMLOutputElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute nsIDOMDOMSettableTokenList htmlFor;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(e4f498f4-e3c5-46fe-92d0-c9957ccab530)]
|
||||
[scriptable, uuid(d5d3eb33-0925-4555-be2f-4078dec49f59)]
|
||||
interface nsIDOMHTMLParagraphElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(d832b1ac-9bb6-4df0-9d9e-f7c040759672)]
|
||||
[scriptable, uuid(ccffedb8-f234-474e-9af4-576eba766023)]
|
||||
interface nsIDOMHTMLParamElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString name;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(f4088dff-649c-4eff-a3a4-dbd6333cdc44)]
|
||||
[scriptable, uuid(c9d9b45a-e7d9-4dfb-abae-f3b9e6addbaa)]
|
||||
interface nsIDOMHTMLPreElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute long width;
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
* @status UNDER_DEVELOPMENT
|
||||
*/
|
||||
|
||||
[scriptable, uuid(9b1d2263-b60f-4d18-b4d1-66e8c3867c79)]
|
||||
[scriptable, uuid(aa830aa2-a4ea-455e-8285-8344cadb4c6d)]
|
||||
interface nsIDOMHTMLProgressElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute double value;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(55643647-2eda-4a45-af55-b2ba6c40c5f5)]
|
||||
[scriptable, uuid(820ccd14-2479-4e4a-99d3-76d138caf7ec)]
|
||||
interface nsIDOMHTMLQuoteElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString cite;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(4b6a0957-5466-4134-8a0a-dd7e4675c106)]
|
||||
[scriptable, uuid(e6252d3b-521a-4f79-9d57-2721a81e7cc2)]
|
||||
interface nsIDOMHTMLScriptElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString src;
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
interface nsIDOMValidityState;
|
||||
|
||||
[scriptable, uuid(98f111e0-2b7e-4abd-984b-2cc1d174fe44)]
|
||||
[scriptable, uuid(30a948a3-61a0-453c-a1e4-de67a1664746)]
|
||||
interface nsIDOMHTMLSelectElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean autofocus;
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
* @status UNDER_DEVELOPMENT
|
||||
*/
|
||||
|
||||
[scriptable, uuid(c49d9a78-fa02-49c9-b239-9cd51e99f866)]
|
||||
[scriptable, uuid(dcac4414-37e2-409f-b0a6-8231007e585b)]
|
||||
interface nsIDOMHTMLSourceElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString src;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(247fc8c4-92f3-427b-af6f-41b13f28287d)]
|
||||
[scriptable, uuid(e72a6069-4987-480b-a349-ffd5fbebd59f)]
|
||||
interface nsIDOMHTMLStyleElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean disabled;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(db0e641f-ba2b-4c67-8da1-4e418cc5fbf7)]
|
||||
[scriptable, uuid(cbd44d29-3120-470d-a7fb-fac4730c8b4b)]
|
||||
interface nsIDOMHTMLTableCaptionElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(4caa7af0-fec4-44c1-9a81-e1f14166e60c)]
|
||||
[scriptable, uuid(03dd5118-7eaf-4bd3-a4a7-77f3f7eb8539)]
|
||||
interface nsIDOMHTMLTableCellElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute long cellIndex;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(9a4d1f6a-fb19-4886-b0d8-dcd201566580)]
|
||||
[scriptable, uuid(d221534a-d13c-43b2-9ba0-7e0dd7452856)]
|
||||
interface nsIDOMHTMLTableColElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(0f809b97-9311-45c4-a44e-7145f354438b)]
|
||||
[scriptable, uuid(bba4b8b2-d01c-4c9b-abc8-3df28d048e68)]
|
||||
interface nsIDOMHTMLTableElement : nsIDOMHTMLElement
|
||||
{
|
||||
// Modified in DOM Level 2:
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(d24a80d4-491d-4e36-9349-afd3c6999b3e)]
|
||||
[scriptable, uuid(b0199f36-9e76-4ec6-867f-850e388d6244)]
|
||||
interface nsIDOMHTMLTableRowElement : nsIDOMHTMLElement
|
||||
{
|
||||
// Modified in DOM Level 2:
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(6acc106e-96a2-4519-8f3a-142ebbdc1bb1)]
|
||||
[scriptable, uuid(ac2e2719-71f1-4485-ac1e-694e7e49bd2a)]
|
||||
interface nsIDOMHTMLTableSectionElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
|
|
|
@ -53,7 +53,7 @@ interface nsIDOMValidityState;
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(16db703d-4816-440c-bcb3-c1ae0cae6532)]
|
||||
[scriptable, uuid(88d09917-d2da-4737-a887-277a2f9750c7)]
|
||||
interface nsIDOMHTMLTextAreaElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean autofocus;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(e20fd651-6240-4f20-b8f0-6cc25cb699b7)]
|
||||
[scriptable, uuid(5cb8cfaf-7551-422b-9b03-58d756e54339)]
|
||||
interface nsIDOMHTMLTitleElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString text;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(2467d39c-2c30-407e-9b67-ea5f231b7809)]
|
||||
[scriptable, uuid(1f409357-8cea-4f69-9f0c-4149886b63a1)]
|
||||
interface nsIDOMHTMLUListElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean compact;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
*
|
||||
* @see <http://www.whatwg.org/html/#htmlunknownelement>
|
||||
*/
|
||||
[scriptable, uuid(5f922c13-c2c1-4c49-b7c2-0e4e5c8e6860)]
|
||||
[scriptable, uuid(0d69049f-8181-47f1-a7f7-e5417dd54136)]
|
||||
interface nsIDOMHTMLUnknownElement : nsIDOMHTMLElement
|
||||
{
|
||||
};
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
* @status UNDER_DEVELOPMENT
|
||||
*/
|
||||
|
||||
[scriptable, uuid(390b974b-1c3a-4700-8001-5ef832c4b4bf)]
|
||||
[scriptable, uuid(5e1e4453-96fe-4cc0-9c32-7e9355b4f917)]
|
||||
interface nsIDOMHTMLVideoElement : nsIDOMHTMLMediaElement
|
||||
{
|
||||
attribute long width;
|
||||
|
|
|
@ -45,8 +45,6 @@ include $(DEPTH)/config/autoconf.mk
|
|||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
_TEST_FILES = \
|
||||
test_outerHTML.html \
|
||||
test_outerHTML.xhtml \
|
||||
497633.html \
|
||||
489127.html \
|
||||
historyframes.html \
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=92264
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 92264</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body onload="runTest();">
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=92264">Mozilla Bug 92264</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
<div id="wrap"><dl></dl><p id="thep">foo<span>bar</span></p><ol></ol></div>
|
||||
<table id="thetable"><tbody><tr><td>1</td></tr><tr id="thetr"><td>2</td></tr><tr><td>3</td></tr></tbody></table>
|
||||
<iframe></iframe>
|
||||
<div id="fragmentwrap"></div>
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 92264 **/
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTest() {
|
||||
|
||||
var thep = document.getElementById("thep");
|
||||
var wrap = document.getElementById("wrap");
|
||||
is(thep.outerHTML, '<p id="thep">foo<span>bar</span></p>', "Unexpected thep outerHTML");
|
||||
thep.outerHTML = "<ul></ul><tr></tr><p></p>";
|
||||
is(wrap.innerHTML, "<dl></dl><ul></ul><p></p><ol></ol>", "Bad outerHTML parsing inside wrap");
|
||||
|
||||
var thetr = document.getElementById("thetr");
|
||||
thetr.outerHTML = "<tr><td>a</td></tr><div></div><tr><td>b</td></tr>";
|
||||
var thetable = document.getElementById("thetable");
|
||||
is(thetable.innerHTML, "<tbody><tr><td>1</td></tr><tr><td>a</td></tr><div></div><tr><td>b</td></tr><tr><td>3</td></tr></tbody>", "Wrong outerHTML parsing inside table");
|
||||
|
||||
var iframe = document.getElementsByTagName("iframe")[0];
|
||||
var oldbody = iframe.contentDocument.body;
|
||||
iframe.contentDocument.body.outerHTML = "<body></body>";
|
||||
isnot(oldbody, iframe.contentDocument.body, "Failed to replace body");
|
||||
is(iframe.contentDocument.getElementsByTagName("body").length, 1, "Should have gotten one body");
|
||||
// Yes, two heads per spec. Also Ragnarök and Chrome produce two heads.
|
||||
is(iframe.contentDocument.getElementsByTagName("head").length, 2, "Should have gotten two heads");
|
||||
|
||||
try {
|
||||
document.documentElement.outerHTML = "<html></html>";
|
||||
ok(false, "Should have thrown an exception");
|
||||
} catch(e) {
|
||||
is(e.code, 7, "outerHTML should throw NO_MODIFICATION_ALLOWED_ERR");
|
||||
}
|
||||
|
||||
var f = document.createDocumentFragment();
|
||||
var dl = document.createElement("dl");
|
||||
var p = document.createElement("p");
|
||||
var ol = document.createElement("ol");
|
||||
f.appendChild(dl);
|
||||
f.appendChild(p);
|
||||
f.appendChild(ol);
|
||||
p.outerHTML = "<ul></ul><tr></tr><body></body><p></p>";
|
||||
var fragmentwrap = document.getElementById("fragmentwrap");
|
||||
fragmentwrap.appendChild(f);
|
||||
is(fragmentwrap.innerHTML, "<dl></dl><ul></ul><p></p><ol></ol>", "Bad outerHTML parsing in fragment");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,74 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=92264
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 92264</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body onload="runTest();">
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=92264">Mozilla Bug 92264</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
<div id="wrap"><dl></dl><p id="thep">foo<span>bar</span></p><ol></ol></div>
|
||||
<table id="thetable"><tbody><tr><td>1</td></tr><tr id="thetr"><td>2</td></tr><tr><td>3</td></tr></tbody></table>
|
||||
<iframe></iframe>
|
||||
<div id="fragmentwrap"></div>
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
<![CDATA[
|
||||
|
||||
/** Test for Bug 92264 **/
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTest() {
|
||||
|
||||
var thep = document.getElementById("thep");
|
||||
var wrap = document.getElementById("wrap");
|
||||
is(thep.outerHTML, '<p xmlns="http://www.w3.org/1999/xhtml" id="thep">foo<span>bar</span></p>', "Unexpected thep outerHTML");
|
||||
thep.outerHTML = "<ul></ul><tr></tr><p></p>";
|
||||
is(wrap.innerHTML, '<dl xmlns="http://www.w3.org/1999/xhtml"></dl><ul xmlns="http://www.w3.org/1999/xhtml"></ul><tr xmlns="http://www.w3.org/1999/xhtml"></tr><p xmlns="http://www.w3.org/1999/xhtml"></p><ol xmlns="http://www.w3.org/1999/xhtml"></ol>', "Bad outerHTML parsing inside wrap");
|
||||
|
||||
var thetr = document.getElementById("thetr");
|
||||
thetr.outerHTML = "<tr><td>a</td></tr><div></div><tr><td>b</td></tr>";
|
||||
var thetable = document.getElementById("thetable");
|
||||
is(thetable.innerHTML, '<tbody xmlns="http://www.w3.org/1999/xhtml"><tr><td>1</td></tr><tr><td>a</td></tr><div></div><tr><td>b</td></tr><tr><td>3</td></tr></tbody>', "Wrong outerHTML parsing inside table");
|
||||
|
||||
var iframe = document.getElementsByTagName("iframe")[0];
|
||||
var oldbody = iframe.contentDocument.body;
|
||||
iframe.contentDocument.body.outerHTML = "<body></body>";
|
||||
isnot(oldbody, iframe.contentDocument.body, "Failed to replace body");
|
||||
is(iframe.contentDocument.getElementsByTagName("body").length, 1, "Should have gotten one body");
|
||||
// Yes, two heads per spec. Also Ragnarök and Chrome produce two heads.
|
||||
is(iframe.contentDocument.getElementsByTagName("head").length, 2, "Should have gotten two heads");
|
||||
|
||||
try {
|
||||
document.documentElement.outerHTML = "<html></html>";
|
||||
ok(false, "Should have thrown an exception");
|
||||
} catch(e) {
|
||||
is(e.code, 7, "outerHTML should throw NO_MODIFICATION_ALLOWED_ERR");
|
||||
}
|
||||
|
||||
var f = document.createDocumentFragment();
|
||||
var dl = document.createElement("dl");
|
||||
var p = document.createElement("p");
|
||||
var ol = document.createElement("ol");
|
||||
f.appendChild(dl);
|
||||
f.appendChild(p);
|
||||
f.appendChild(ol);
|
||||
p.outerHTML = "<ul></ul><tr></tr><body></body><p></p>";
|
||||
var fragmentwrap = document.getElementById("fragmentwrap");
|
||||
fragmentwrap.appendChild(f);
|
||||
is(fragmentwrap.innerHTML, '<dl xmlns="http://www.w3.org/1999/xhtml"></dl><ul xmlns="http://www.w3.org/1999/xhtml"></ul><tr xmlns="http://www.w3.org/1999/xhtml"></tr><body xmlns="http://www.w3.org/1999/xhtml"></body><p xmlns="http://www.w3.org/1999/xhtml"></p><ol xmlns="http://www.w3.org/1999/xhtml"></ol>', "Bad outerHTML parsing in fragment");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче