зеркало из https://github.com/mozilla/pjs.git
Bug 562008 - HTML5 section DOM elements should be of type HTMLElement; r=mrbkap,sicking,timeless,ehsan sr=jst
This commit is contained in:
Родитель
8ba0b73887
Коммит
a4e51660a1
|
@ -110,7 +110,9 @@ GK_ATOM(applyImports, "apply-imports")
|
|||
GK_ATOM(applyTemplates, "apply-templates")
|
||||
GK_ATOM(archive, "archive")
|
||||
GK_ATOM(area, "area")
|
||||
GK_ATOM(article, "article")
|
||||
GK_ATOM(ascending, "ascending")
|
||||
GK_ATOM(aside, "aside")
|
||||
GK_ATOM(aspectRatio, "aspect-ratio")
|
||||
GK_ATOM(assign, "assign")
|
||||
GK_ATOM(async, "async")
|
||||
|
@ -379,6 +381,7 @@ GK_ATOM(followingSibling, "following-sibling")
|
|||
GK_ATOM(font, "font")
|
||||
GK_ATOM(fontWeight, "font-weight")
|
||||
GK_ATOM(fontpicker, "fontpicker")
|
||||
GK_ATOM(footer, "footer")
|
||||
GK_ATOM(_for, "for")
|
||||
GK_ATOM(forEach, "for-each")
|
||||
GK_ATOM(form, "form")
|
||||
|
@ -412,8 +415,10 @@ GK_ATOM(HARD, "HARD")
|
|||
GK_ATOM(hasSameNode, "has-same-node")
|
||||
GK_ATOM(hbox, "hbox")
|
||||
GK_ATOM(head, "head")
|
||||
GK_ATOM(header, "header")
|
||||
GK_ATOM(headers, "headers")
|
||||
GK_ATOM(height, "height")
|
||||
GK_ATOM(hgroup, "hgroup")
|
||||
GK_ATOM(hidden, "hidden")
|
||||
GK_ATOM(hidechrome, "hidechrome")
|
||||
GK_ATOM(highest, "highest")
|
||||
|
@ -567,6 +572,7 @@ GK_ATOM(_namespace, "namespace")
|
|||
GK_ATOM(namespaceAlias, "namespace-alias")
|
||||
GK_ATOM(namespaceUri, "namespace-uri")
|
||||
GK_ATOM(NaN, "NaN")
|
||||
GK_ATOM(nav, "nav")
|
||||
GK_ATOM(negate, "negate")
|
||||
GK_ATOM(never, "never")
|
||||
GK_ATOM(_new, "new")
|
||||
|
@ -819,6 +825,7 @@ GK_ATOM(scrollbarbutton, "scrollbarbutton")
|
|||
GK_ATOM(scrollbox, "scrollbox")
|
||||
GK_ATOM(scrollcorner, "scrollcorner")
|
||||
GK_ATOM(scrolling, "scrolling")
|
||||
GK_ATOM(section, "section")
|
||||
GK_ATOM(select, "select")
|
||||
GK_ATOM(selectPopupList, "selectPopupList")
|
||||
GK_ATOM(selectable, "selectable")
|
||||
|
|
|
@ -59,6 +59,7 @@ CPPSRCS = \
|
|||
nsFormSubmission.cpp \
|
||||
nsImageMapUtils.cpp \
|
||||
nsTextEditorState.cpp \
|
||||
nsHTMLElement.cpp \
|
||||
nsHTMLAnchorElement.cpp \
|
||||
nsHTMLAreaElement.cpp \
|
||||
nsHTMLBRElement.cpp \
|
||||
|
|
|
@ -981,7 +981,6 @@ NS_NewHTML##_elementName##Element(nsINodeInfo *aNodeInfo, PRUint32 aFromParser)\
|
|||
return new nsHTML##_elementName##Element(aNodeInfo, aFromParser); \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A macro to implement the getter and setter for a given string
|
||||
* valued content property. The method uses the generic GetAttr and
|
||||
|
@ -1318,6 +1317,7 @@ NS_NewHTML##_elementName##Element(nsINodeInfo *aNodeInfo, \
|
|||
return NS_NewHTMLSharedElement(aNodeInfo, aFromParser); \
|
||||
}
|
||||
|
||||
NS_DECLARE_NS_NEW_HTML_ELEMENT() // HTMLElement
|
||||
NS_DECLARE_NS_NEW_HTML_ELEMENT(Shared)
|
||||
NS_DECLARE_NS_NEW_HTML_ELEMENT(SharedList)
|
||||
NS_DECLARE_NS_NEW_HTML_ELEMENT(SharedObject)
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Mozilla Foundation
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Mounir Lamouri <mounir.lamouri@mozilla.com> (original author)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
|
||||
|
||||
class nsHTMLElement : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLElement
|
||||
{
|
||||
public:
|
||||
nsHTMLElement(nsINodeInfo *aNodeInfo);
|
||||
virtual ~nsHTMLElement();
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// nsIDOMNode
|
||||
NS_FORWARD_NSIDOMNODE(nsGenericHTMLElement::)
|
||||
|
||||
// nsIDOMElement
|
||||
NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLElement::)
|
||||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLElement::)
|
||||
|
||||
nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const;
|
||||
};
|
||||
|
||||
NS_IMPL_NS_NEW_HTML_ELEMENT() // HTMLElement
|
||||
|
||||
nsHTMLElement::nsHTMLElement(nsINodeInfo* aNodeInfo)
|
||||
: nsGenericHTMLElement(aNodeInfo)
|
||||
{
|
||||
}
|
||||
|
||||
nsHTMLElement::~nsHTMLElement()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(nsHTMLElement, nsGenericElement)
|
||||
NS_IMPL_RELEASE_INHERITED(nsHTMLElement, nsGenericElement)
|
||||
|
||||
DOMCI_DATA(HTMLElement, nsHTMLElement)
|
||||
|
||||
NS_INTERFACE_TABLE_HEAD(nsHTMLElement)
|
||||
NS_HTML_CONTENT_INTERFACE_TABLE0(nsHTMLElement)
|
||||
NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(nsHTMLElement,
|
||||
nsGenericHTMLElement)
|
||||
NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLElement)
|
||||
|
||||
NS_IMPL_ELEMENT_CLONE(nsHTMLElement)
|
||||
|
|
@ -162,7 +162,6 @@ _TEST_FILES = test_bug589.html \
|
|||
test_bug536895.html \
|
||||
test_bug458037.xhtml \
|
||||
test_bug556645.html \
|
||||
test_bug559284.html \
|
||||
test_bug551670.html \
|
||||
test_bug346485.html \
|
||||
test_bug555567.html \
|
||||
|
|
|
@ -111,12 +111,15 @@ objectIfaces2.push("nsIImageLoadingContent");
|
|||
head
|
||||
html
|
||||
*/
|
||||
|
||||
HTML_TAG("a", "Anchor", [ "nsIDOMNSHTMLAnchorElement2" ]);
|
||||
HTML_TAG("abbr", "Span");
|
||||
HTML_TAG("acronym", "Span");
|
||||
HTML_TAG("address", "Span");
|
||||
HTML_TAG("applet", "Applet", [], objectIfaces);
|
||||
HTML_TAG("area", "Area", [ "nsIDOMNSHTMLAreaElement2" ]);
|
||||
HTML_TAG("article", ""); // HTMLElement
|
||||
HTML_TAG("aside", ""); // HTMLElement
|
||||
HTML_TAG("b", "Span");
|
||||
HTML_TAG("base", "Base");
|
||||
HTML_TAG("bdo", "Span");
|
||||
|
@ -145,6 +148,7 @@ HTML_TAG("em", "Span");
|
|||
HTML_TAG("embed", "Embed", [ "nsIDOMGetSVGDocument" ], objectIfaces);
|
||||
HTML_TAG("fieldset", "FieldSet");
|
||||
HTML_TAG("font", "Font");
|
||||
HTML_TAG("footer", "") // HTMLElement
|
||||
HTML_TAG("form", "Form", [], [ "nsIWebProgressListener" ]);
|
||||
HTML_TAG("frame", "Frame", [], [ "nsIFrameLoaderOwner" ]);
|
||||
HTML_TAG("frameset", "FrameSet");
|
||||
|
@ -155,6 +159,8 @@ HTML_TAG("h4", "Heading");
|
|||
HTML_TAG("h5", "Heading");
|
||||
HTML_TAG("h6", "Heading");
|
||||
HTML_TAG("head", "Head");
|
||||
HTML_TAG("header", "") // HTMLElement
|
||||
HTML_TAG("hgroup", "") // HTMLElement
|
||||
HTML_TAG("hr", "HR");
|
||||
HTML_TAG("html", "Html");
|
||||
HTML_TAG("i", "Span");
|
||||
|
@ -180,6 +186,7 @@ HTML_TAG("marquee", "Div");
|
|||
HTML_TAG("menu", "Menu");
|
||||
HTML_TAG("meta", "Meta");
|
||||
HTML_TAG("multicol", "Span");
|
||||
HTML_TAG("nav", "") // HTMLElement
|
||||
HTML_TAG("nobr", "Span");
|
||||
HTML_TAG("noembed", "Div");
|
||||
HTML_TAG("noframes", "Div");
|
||||
|
@ -197,6 +204,7 @@ HTML_TAG("q", "Quote");
|
|||
HTML_TAG("s", "Span");
|
||||
HTML_TAG("samp", "Span");
|
||||
HTML_TAG("script", "Script", [], [ "nsIScriptLoaderObserver" ]);
|
||||
HTML_TAG("section", "") // HTMLElement
|
||||
HTML_TAG("select", "Select");
|
||||
HTML_TAG("small", "Span");
|
||||
HTML_TAG("spacer", "Spacer");
|
||||
|
|
|
@ -1,74 +0,0 @@
|
|||
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=559284
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 559284</title>
|
||||
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=559284">Mozilla Bug 559284</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
<section id="section"></section>
|
||||
<nav id="nav"></nav>
|
||||
<article id="article"></article>
|
||||
<aside id="aside"></aside>
|
||||
<hgroup id="hgroup"></hgroup>
|
||||
<header id="header"></header>
|
||||
<footer id="footer"></footer>
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 559284 **/
|
||||
todo_is($("section").constructor, "[object HTMLElement]",
|
||||
"Constructor should be section");
|
||||
todo_is($("section").toString().substring(0, 19), "[object HTMLElement",
|
||||
"Section should be HTMLElement");
|
||||
is($("section") instanceof HTMLElement, true,
|
||||
"Section should be instance of HTMLElement");
|
||||
todo_is($("nav").constructor, "[object HTMLElement]",
|
||||
"Constructor should be nav");
|
||||
todo_is($("nav").toString().substring(0, 19), "[object HTMLElement",
|
||||
"Nav should be HTMLElement");
|
||||
is($("nav") instanceof HTMLElement, true,
|
||||
"Nav should be instance of HTMLElement");
|
||||
todo_is($("article").constructor, "[object HTMLElement]",
|
||||
"Constructor should be article");
|
||||
todo_is($("article").toString().substring(0, 19), "[object HTMLElement",
|
||||
"Article should be HTMLElement");
|
||||
is($("article") instanceof HTMLElement, true,
|
||||
"Article should be instance of HTMLElement");
|
||||
todo_is($("aside").constructor, "[object HTMLElement]",
|
||||
"Constructor should be aside");
|
||||
todo_is($("aside").toString().substring(0, 19), "[object HTMLElement",
|
||||
"Aside should be HTMLElement");
|
||||
is($("aside") instanceof HTMLElement, true,
|
||||
"Aside should be instance of HTMLElement");
|
||||
todo_is($("hgroup").constructor, "[object HTMLElement]",
|
||||
"Constructor should be hgroup");
|
||||
todo_is($("hgroup").toString().substring(0, 19), "[object HTMLElement",
|
||||
"Hgroup should be HTMLElement");
|
||||
is($("hgroup") instanceof HTMLElement, true,
|
||||
"Hgroup should be instance of HTMLElement");
|
||||
todo_is($("header").constructor, "[object HTMLElement]",
|
||||
"Constructor should be header");
|
||||
todo_is($("header").toString().substring(0, 19), "[object HTMLElement",
|
||||
"Header should be HTMLElement");
|
||||
is($("header") instanceof HTMLElement, true,
|
||||
"Header should be instance of HTMLElement");
|
||||
todo_is($("footer").constructor, "[object HTMLElement]",
|
||||
"Constructor should be footer");
|
||||
todo_is($("footer").toString().substring(0, 19), "[object HTMLElement",
|
||||
"Footer should be HTMLElement");
|
||||
is($("footer") instanceof HTMLElement, true,
|
||||
"Footer should be instance of HTMLElement");
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -248,6 +248,7 @@
|
|||
#include "nsIDOMLinkStyle.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIDOMNSHTMLDocument.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsIDOMNSHTMLElement.h"
|
||||
#include "nsIDOMHTMLAnchorElement.h"
|
||||
#include "nsIDOMNSHTMLAnchorElement2.h"
|
||||
|
@ -723,6 +724,8 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
|||
ARRAY_SCRIPTABLE_FLAGS)
|
||||
|
||||
// HTML element classes
|
||||
NS_DEFINE_CLASSINFO_DATA(HTMLElement, nsElementSH,
|
||||
ELEMENT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(HTMLAnchorElement, nsElementSH,
|
||||
ELEMENT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(HTMLAppletElement, nsHTMLPluginObjElementSH,
|
||||
|
@ -2337,6 +2340,12 @@ nsDOMClassInfo::Init()
|
|||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLCollection)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(HTMLElement, nsIDOMHTMLElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLElement)
|
||||
DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(HTMLAnchorElement, nsIDOMHTMLAnchorElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLAnchorElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLAnchorElement)
|
||||
|
|
|
@ -84,6 +84,7 @@ DOMCI_CLASS(HTMLOptionsCollection)
|
|||
DOMCI_CLASS(HTMLCollection)
|
||||
|
||||
// HTML element classes
|
||||
DOMCI_CLASS(HTMLElement)
|
||||
DOMCI_CLASS(HTMLAnchorElement)
|
||||
DOMCI_CLASS(HTMLAppletElement)
|
||||
DOMCI_CLASS(HTMLAreaElement)
|
||||
|
|
|
@ -117,6 +117,13 @@ EDITOR_ATOM(hr, "hr")
|
|||
EDITOR_ATOM(table, "table")
|
||||
EDITOR_ATOM(fieldset, "fieldset")
|
||||
EDITOR_ATOM(address, "address")
|
||||
EDITOR_ATOM(article, "article")
|
||||
EDITOR_ATOM(aside, "aside")
|
||||
EDITOR_ATOM(footer, "footer")
|
||||
EDITOR_ATOM(header, "header")
|
||||
EDITOR_ATOM(hgroup, "hgroup")
|
||||
EDITOR_ATOM(nav, "nav")
|
||||
EDITOR_ATOM(section, "section")
|
||||
// Unclear from
|
||||
// DTD, block?
|
||||
EDITOR_ATOM(body, "body")
|
||||
|
|
|
@ -489,9 +489,10 @@ nsHTMLEditUtils::SupportsAlignAttr(nsIDOMNode * aNode)
|
|||
// button, form, input, label, select, textarea
|
||||
#define GROUP_FORMCONTROL (1 << 6)
|
||||
|
||||
// address, applet, blockquote, button, center, del, dir, div, dl, fieldset,
|
||||
// form, h1, h2, h3, h4, h5, h6, hr, iframe, ins, isindex, map, menu, noframes,
|
||||
// noscript, object, ol, p, pre, table, ul
|
||||
// address, applet, article, aside, blockquote, button, center, del, dir, div,
|
||||
// dl, fieldset, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, hr,
|
||||
// iframe, ins, isindex, map, menu, nav, noframes, noscript, object, ol, p, pre,
|
||||
// table, section, ul
|
||||
#define GROUP_BLOCK (1 << 7)
|
||||
|
||||
// frame, frameset
|
||||
|
@ -537,6 +538,9 @@ nsHTMLEditUtils::SupportsAlignAttr(nsIDOMNode * aNode)
|
|||
// ol, ul
|
||||
#define GROUP_OL_UL (1 << 21)
|
||||
|
||||
// h1, h2, h3, h4, h5, h6
|
||||
#define GROUP_HEADING (1 << 22)
|
||||
|
||||
#define GROUP_INLINE_ELEMENT \
|
||||
(GROUP_FONTSTYLE | GROUP_PHRASE | GROUP_SPECIAL | GROUP_FORMCONTROL | \
|
||||
GROUP_LEAF)
|
||||
|
@ -571,6 +575,8 @@ static const nsElementInfo kElements[eHTMLTag_userdefined] = {
|
|||
ELEM(applet, PR_TRUE, PR_TRUE, GROUP_SPECIAL | GROUP_BLOCK,
|
||||
GROUP_FLOW_ELEMENT | GROUP_OBJECT_CONTENT),
|
||||
ELEM(area, PR_FALSE, PR_FALSE, GROUP_MAP_CONTENT, GROUP_NONE),
|
||||
ELEM(article, PR_TRUE, PR_TRUE, GROUP_BLOCK, GROUP_FLOW_ELEMENT),
|
||||
ELEM(aside, PR_TRUE, PR_TRUE, GROUP_BLOCK, GROUP_FLOW_ELEMENT),
|
||||
#if defined(MOZ_MEDIA)
|
||||
ELEM(audio, PR_FALSE, PR_FALSE, GROUP_NONE, GROUP_NONE),
|
||||
#endif
|
||||
|
@ -605,16 +611,25 @@ static const nsElementInfo kElements[eHTMLTag_userdefined] = {
|
|||
ELEM(embed, PR_FALSE, PR_FALSE, GROUP_NONE, GROUP_NONE),
|
||||
ELEM(fieldset, PR_TRUE, PR_TRUE, GROUP_BLOCK, GROUP_FLOW_ELEMENT),
|
||||
ELEM(font, PR_TRUE, PR_TRUE, GROUP_SPECIAL, GROUP_INLINE_ELEMENT),
|
||||
ELEM(footer, PR_TRUE, PR_TRUE, GROUP_BLOCK, GROUP_FLOW_ELEMENT),
|
||||
ELEM(form, PR_TRUE, PR_TRUE, GROUP_BLOCK, GROUP_FLOW_ELEMENT),
|
||||
ELEM(frame, PR_FALSE, PR_FALSE, GROUP_FRAME, GROUP_NONE),
|
||||
ELEM(frameset, PR_TRUE, PR_TRUE, GROUP_FRAME, GROUP_FRAME),
|
||||
ELEM(h1, PR_TRUE, PR_FALSE, GROUP_BLOCK, GROUP_INLINE_ELEMENT),
|
||||
ELEM(h2, PR_TRUE, PR_FALSE, GROUP_BLOCK, GROUP_INLINE_ELEMENT),
|
||||
ELEM(h3, PR_TRUE, PR_FALSE, GROUP_BLOCK, GROUP_INLINE_ELEMENT),
|
||||
ELEM(h4, PR_TRUE, PR_FALSE, GROUP_BLOCK, GROUP_INLINE_ELEMENT),
|
||||
ELEM(h5, PR_TRUE, PR_FALSE, GROUP_BLOCK, GROUP_INLINE_ELEMENT),
|
||||
ELEM(h6, PR_TRUE, PR_FALSE, GROUP_BLOCK, GROUP_INLINE_ELEMENT),
|
||||
ELEM(h1, PR_TRUE, PR_FALSE, GROUP_BLOCK | GROUP_HEADING,
|
||||
GROUP_INLINE_ELEMENT),
|
||||
ELEM(h2, PR_TRUE, PR_FALSE, GROUP_BLOCK | GROUP_HEADING,
|
||||
GROUP_INLINE_ELEMENT),
|
||||
ELEM(h3, PR_TRUE, PR_FALSE, GROUP_BLOCK | GROUP_HEADING,
|
||||
GROUP_INLINE_ELEMENT),
|
||||
ELEM(h4, PR_TRUE, PR_FALSE, GROUP_BLOCK | GROUP_HEADING,
|
||||
GROUP_INLINE_ELEMENT),
|
||||
ELEM(h5, PR_TRUE, PR_FALSE, GROUP_BLOCK | GROUP_HEADING,
|
||||
GROUP_INLINE_ELEMENT),
|
||||
ELEM(h6, PR_TRUE, PR_FALSE, GROUP_BLOCK | GROUP_HEADING,
|
||||
GROUP_INLINE_ELEMENT),
|
||||
ELEM(head, PR_TRUE, PR_FALSE, GROUP_TOPLEVEL, GROUP_HEAD_CONTENT),
|
||||
ELEM(header, PR_TRUE, PR_TRUE, GROUP_BLOCK, GROUP_FLOW_ELEMENT),
|
||||
ELEM(hgroup, PR_TRUE, PR_FALSE, GROUP_BLOCK, GROUP_HEADING),
|
||||
ELEM(hr, PR_FALSE, PR_FALSE, GROUP_BLOCK, GROUP_NONE),
|
||||
ELEM(html, PR_TRUE, PR_FALSE, GROUP_TOPLEVEL, GROUP_TOPLEVEL),
|
||||
ELEM(i, PR_TRUE, PR_TRUE, GROUP_FONTSTYLE, GROUP_INLINE_ELEMENT),
|
||||
|
@ -638,6 +653,7 @@ static const nsElementInfo kElements[eHTMLTag_userdefined] = {
|
|||
ELEM(menu, PR_TRUE, PR_FALSE, GROUP_BLOCK, GROUP_LI),
|
||||
ELEM(meta, PR_FALSE, PR_FALSE, GROUP_HEAD_CONTENT, GROUP_NONE),
|
||||
ELEM(multicol, PR_FALSE, PR_FALSE, GROUP_NONE, GROUP_NONE),
|
||||
ELEM(nav, PR_TRUE, PR_TRUE, GROUP_BLOCK, GROUP_FLOW_ELEMENT),
|
||||
ELEM(nobr, PR_FALSE, PR_FALSE, GROUP_NONE, GROUP_NONE),
|
||||
ELEM(noembed, PR_FALSE, PR_FALSE, GROUP_NONE, GROUP_NONE),
|
||||
ELEM(noframes, PR_TRUE, PR_TRUE, GROUP_BLOCK, GROUP_FLOW_ELEMENT),
|
||||
|
@ -661,6 +677,7 @@ static const nsElementInfo kElements[eHTMLTag_userdefined] = {
|
|||
ELEM(samp, PR_TRUE, PR_TRUE, GROUP_PHRASE, GROUP_INLINE_ELEMENT),
|
||||
ELEM(script, PR_TRUE, PR_FALSE, GROUP_HEAD_CONTENT | GROUP_SPECIAL,
|
||||
GROUP_LEAF),
|
||||
ELEM(section, PR_TRUE, PR_TRUE, GROUP_BLOCK, GROUP_FLOW_ELEMENT),
|
||||
ELEM(select, PR_TRUE, PR_FALSE, GROUP_FORMCONTROL, GROUP_SELECT_CONTENT),
|
||||
ELEM(small, PR_TRUE, PR_TRUE, GROUP_FONTSTYLE, GROUP_INLINE_ELEMENT),
|
||||
#if defined(MOZ_MEDIA)
|
||||
|
|
|
@ -69,6 +69,8 @@ HTML_TAG(acronym, Span)
|
|||
HTML_TAG(address, Span)
|
||||
HTML_TAG(applet, SharedObject)
|
||||
HTML_TAG(area, Area)
|
||||
HTML_TAG(article, ) // HTMLElement instance
|
||||
HTML_TAG(aside, ) // HTMLElement instance
|
||||
#if defined(MOZ_MEDIA)
|
||||
HTML_TAG(audio, Audio)
|
||||
#endif
|
||||
|
@ -101,6 +103,7 @@ HTML_TAG(em, Span)
|
|||
HTML_TAG(embed, SharedObject)
|
||||
HTML_TAG(fieldset, FieldSet)
|
||||
HTML_TAG(font, Font)
|
||||
HTML_TAG(footer, ) // HTMLElement instance
|
||||
HTML_TAG(form, Form)
|
||||
HTML_TAG(frame, Frame)
|
||||
HTML_TAG(frameset, FrameSet)
|
||||
|
@ -111,6 +114,8 @@ HTML_TAG(h4, Heading)
|
|||
HTML_TAG(h5, Heading)
|
||||
HTML_TAG(h6, Heading)
|
||||
HTML_TAG(head, Shared)
|
||||
HTML_TAG(header, ) // HTMLElement instance
|
||||
HTML_TAG(hgroup, ) // HTMLElement instance
|
||||
HTML_TAG(hr, HR)
|
||||
HTML_TAG(html, Shared)
|
||||
HTML_TAG(i, Span)
|
||||
|
@ -132,6 +137,7 @@ HTML_TAG(marquee, Div)
|
|||
HTML_TAG(menu, Shared)
|
||||
HTML_TAG(meta, Meta)
|
||||
HTML_TAG(multicol, Span)
|
||||
HTML_TAG(nav, ) // HTMLElement instance
|
||||
HTML_TAG(nobr, Span)
|
||||
HTML_TAG(noembed, Div)
|
||||
HTML_TAG(noframes, Div)
|
||||
|
@ -149,6 +155,7 @@ HTML_TAG(q, Shared)
|
|||
HTML_TAG(s, Span)
|
||||
HTML_TAG(samp, Span)
|
||||
HTML_TAG(script, Script)
|
||||
HTML_TAG(section, ) // HTMLElement instance
|
||||
HTML_TAG(select, Select)
|
||||
HTML_TAG(small, Span)
|
||||
#if defined(MOZ_MEDIA)
|
||||
|
|
|
@ -250,6 +250,24 @@ const nsHTMLElement gHTMLElements[] = {
|
|||
/*special props, prop-range*/ kNonContainer,kDefaultPropRange,
|
||||
/*special parents,kids*/ &gAreaParent,0,
|
||||
},
|
||||
{
|
||||
/*tag*/ eHTMLTag_article,
|
||||
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
|
||||
/*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
|
||||
/*autoclose starttags and endtags*/ 0,0,0,0,
|
||||
/*parent,incl,exclgroups*/ kBlock, (kSelf|kFlowEntity), kNone,
|
||||
/*special props, prop-range*/ 0,kDefaultPropRange,
|
||||
/*special parents,kids*/ 0,0,
|
||||
},
|
||||
{
|
||||
/*tag*/ eHTMLTag_aside,
|
||||
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
|
||||
/*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
|
||||
/*autoclose starttags and endtags*/ 0,0,0,0,
|
||||
/*parent,incl,exclgroups*/ kBlock, (kSelf|kFlowEntity), kNone,
|
||||
/*special props, prop-range*/ 0,kDefaultPropRange,
|
||||
/*special parents,kids*/ 0,0,
|
||||
},
|
||||
#if defined(MOZ_MEDIA)
|
||||
{
|
||||
/*tag*/ eHTMLTag_audio,
|
||||
|
@ -522,6 +540,15 @@ const nsHTMLElement gHTMLElements[] = {
|
|||
/*special props, prop-range*/ 0, kDefaultPropRange,
|
||||
/*special parents,kids*/ 0,&gFontKids,
|
||||
},
|
||||
{
|
||||
/*tag*/ eHTMLTag_footer,
|
||||
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
|
||||
/*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
|
||||
/*autoclose starttags and endtags*/ 0,0,0,0,
|
||||
/*parent,incl,exclgroups*/ kBlock, (kSelf|kFlowEntity), kNone,
|
||||
/*special props, prop-range*/ 0,kDefaultPropRange,
|
||||
/*special parents,kids*/ 0,0,
|
||||
},
|
||||
{
|
||||
/*tag*/ eHTMLTag_form,
|
||||
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
|
||||
|
@ -613,6 +640,24 @@ const nsHTMLElement gHTMLElements[] = {
|
|||
/*special props, prop-range*/ kNoStyleLeaksIn, kDefaultPropRange,
|
||||
/*special parents,kids*/ &gInHTML,0,
|
||||
},
|
||||
{
|
||||
/*tag*/ eHTMLTag_header,
|
||||
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
|
||||
/*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
|
||||
/*autoclose starttags and endtags*/ 0,0,0,0,
|
||||
/*parent,incl,exclgroups*/ kBlock, (kSelf|kFlowEntity), kNone,
|
||||
/*special props, prop-range*/ 0,kDefaultPropRange,
|
||||
/*special parents,kids*/ 0,0,
|
||||
},
|
||||
{
|
||||
/*tag*/ eHTMLTag_hgroup,
|
||||
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
|
||||
/*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
|
||||
/*autoclose starttags and endtags*/ 0,0,0,0,
|
||||
/*parent,incl,exclgroups*/ kBlock, (kSelf|kFlowEntity), kNone,
|
||||
/*special props, prop-range*/ 0,kDefaultPropRange,
|
||||
/*special parents,kids*/ 0,0,
|
||||
},
|
||||
{
|
||||
/*tag*/ eHTMLTag_hr,
|
||||
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
|
||||
|
@ -802,6 +847,15 @@ const nsHTMLElement gHTMLElements[] = {
|
|||
/*special props, prop-range*/ 0,kDefaultPropRange,
|
||||
/*special parents,kids*/ 0,0,
|
||||
},
|
||||
{
|
||||
/*tag*/ eHTMLTag_nav,
|
||||
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
|
||||
/*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
|
||||
/*autoclose starttags and endtags*/ 0,0,0,0,
|
||||
/*parent,incl,exclgroups*/ kBlock, (kSelf|kFlowEntity), kNone,
|
||||
/*special props, prop-range*/ 0,kDefaultPropRange,
|
||||
/*special parents,kids*/ 0,0,
|
||||
},
|
||||
{
|
||||
/*tag*/ eHTMLTag_nobr,
|
||||
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
|
||||
|
@ -955,6 +1009,15 @@ const nsHTMLElement gHTMLElements[] = {
|
|||
/*special props, prop-range*/ kNoStyleLeaksIn|kLegalOpen, kNoPropRange,
|
||||
/*special parents,kids*/ 0,&gContainsText,
|
||||
},
|
||||
{
|
||||
/*tag*/ eHTMLTag_section,
|
||||
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
|
||||
/*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
|
||||
/*autoclose starttags and endtags*/ 0,0,0,0,
|
||||
/*parent,incl,exclgroups*/ kBlock, (kSelf|kFlowEntity), kNone,
|
||||
/*special props, prop-range*/ 0,kDefaultPropRange,
|
||||
/*special parents,kids*/ 0,0,
|
||||
},
|
||||
{
|
||||
/*tag*/ eHTMLTag_select,
|
||||
/*requiredAncestor*/ eHTMLTag_unknown, eHTMLTag_unknown,
|
||||
|
|
|
@ -57,6 +57,10 @@ static const PRUnichar sHTMLTagUnicodeName_applet[] =
|
|||
{'a', 'p', 'p', 'l', 'e', 't', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_area[] =
|
||||
{'a', 'r', 'e', 'a', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_article[] =
|
||||
{'a', 'r', 't', 'i', 'c', 'l', 'e', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_aside[] =
|
||||
{'a', 's', 'i', 'd', 'e', '\0'};
|
||||
#if defined(MOZ_MEDIA)
|
||||
static const PRUnichar sHTMLTagUnicodeName_audio[] =
|
||||
{'a', 'u', 'd', 'i', 'o', '\0'};
|
||||
|
@ -121,6 +125,8 @@ static const PRUnichar sHTMLTagUnicodeName_fieldset[] =
|
|||
{'f', 'i', 'e', 'l', 'd', 's', 'e', 't', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_font[] =
|
||||
{'f', 'o', 'n', 't', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_footer[] =
|
||||
{'f', 'o', 'o', 't', 'e', 'r', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_form[] =
|
||||
{'f', 'o', 'r', 'm', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_frame[] =
|
||||
|
@ -141,6 +147,10 @@ static const PRUnichar sHTMLTagUnicodeName_h6[] =
|
|||
{'h', '6', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_head[] =
|
||||
{'h', 'e', 'a', 'd', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_header[] =
|
||||
{'h', 'e', 'a', 'd', 'e', 'r', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_hgroup[] =
|
||||
{'h', 'g', 'r', 'o', 'u', 'p', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_hr[] =
|
||||
{'h', 'r', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_html[] =
|
||||
|
@ -183,6 +193,8 @@ static const PRUnichar sHTMLTagUnicodeName_meta[] =
|
|||
{'m', 'e', 't', 'a', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_multicol[] =
|
||||
{'m', 'u', 'l', 't', 'i', 'c', 'o', 'l', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_nav[] =
|
||||
{'n', 'a', 'v', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_nobr[] =
|
||||
{'n', 'o', 'b', 'r', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_noembed[] =
|
||||
|
@ -217,6 +229,8 @@ static const PRUnichar sHTMLTagUnicodeName_samp[] =
|
|||
{'s', 'a', 'm', 'p', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_script[] =
|
||||
{'s', 'c', 'r', 'i', 'p', 't', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_section[] =
|
||||
{'s', 'e', 'c', 't', 'i', 'o', 'n', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_select[] =
|
||||
{'s', 'e', 'l', 'e', 'c', 't', '\0'};
|
||||
static const PRUnichar sHTMLTagUnicodeName_small[] =
|
||||
|
|
Загрузка…
Ссылка в новой задаче