зеркало из https://github.com/mozilla/gecko-dev.git
Bug 568515 - xmp and plaintext element should be considered as HTMLElement, not HTMLSpanElement, r=sicking
This commit is contained in:
Родитель
f277316a2c
Коммит
b19d8dfb73
|
@ -61,9 +61,6 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLElement::)
|
||||
|
||||
virtual nsresult GetInnerHTML(nsAString& aInnerHTML);
|
||||
virtual nsresult SetInnerHTML(const nsAString& aInnerHTML);
|
||||
|
||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
||||
};
|
||||
|
||||
|
@ -98,29 +95,6 @@ NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLSpanElement)
|
|||
NS_IMPL_ELEMENT_CLONE(nsHTMLSpanElement)
|
||||
|
||||
|
||||
nsresult
|
||||
nsHTMLSpanElement::GetInnerHTML(nsAString& aInnerHTML)
|
||||
{
|
||||
if (mNodeInfo->Equals(nsGkAtoms::xmp) ||
|
||||
mNodeInfo->Equals(nsGkAtoms::plaintext)) {
|
||||
nsContentUtils::GetNodeTextContent(this, PR_FALSE, aInnerHTML);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return nsGenericHTMLElement::GetInnerHTML(aInnerHTML);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsHTMLSpanElement::SetInnerHTML(const nsAString& aInnerHTML)
|
||||
{
|
||||
if (mNodeInfo->Equals(nsGkAtoms::xmp) ||
|
||||
mNodeInfo->Equals(nsGkAtoms::plaintext)) {
|
||||
return nsContentUtils::SetNodeTextContent(this, aInnerHTML, PR_TRUE);
|
||||
}
|
||||
|
||||
return nsGenericHTMLElement::SetInnerHTML(aInnerHTML);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
class nsHTMLUnknownElement : public nsHTMLSpanElement
|
||||
|
|
|
@ -198,7 +198,7 @@ HTML_TAG("optgroup", "OptGroup");
|
|||
HTML_TAG("option", "Option");
|
||||
HTML_TAG("p", "Paragraph");
|
||||
HTML_TAG("param", "Param");
|
||||
HTML_TAG("plaintext", "Span");
|
||||
HTML_TAG("plaintext", ""); // HTMLElement
|
||||
HTML_TAG("pre", "Pre");
|
||||
HTML_TAG("q", "Quote");
|
||||
HTML_TAG("s", "Span");
|
||||
|
@ -228,7 +228,7 @@ HTML_TAG("u", "Span");
|
|||
HTML_TAG("ul", "UList");
|
||||
HTML_TAG("var", "Span");
|
||||
HTML_TAG("wbr", "WBR");
|
||||
HTML_TAG("xmp", "Span");
|
||||
HTML_TAG("xmp", ""); // HTMLElement
|
||||
|
||||
function tagName(aTag) {
|
||||
return "<" + aTag + ">";
|
||||
|
|
|
@ -149,7 +149,7 @@ HTML_TAG(option, Option)
|
|||
HTML_TAG(output, Output)
|
||||
HTML_TAG(p, Paragraph)
|
||||
HTML_TAG(param, Shared)
|
||||
HTML_TAG(plaintext, Span)
|
||||
HTML_TAG(plaintext, ) // HTMLElement instance
|
||||
HTML_TAG(pre, Pre)
|
||||
HTML_TAG(q, Shared)
|
||||
HTML_TAG(s, Span)
|
||||
|
@ -185,7 +185,7 @@ HTML_TAG(var, Span)
|
|||
HTML_TAG(video, Video)
|
||||
#endif
|
||||
HTML_TAG(wbr, Shared)
|
||||
HTML_TAG(xmp, Span)
|
||||
HTML_TAG(xmp, ) // HTMLElement instance
|
||||
|
||||
|
||||
/* These are not for tags. But they will be included in the nsHTMLTag
|
||||
|
|
Загрузка…
Ссылка в новой задаче