Format special element types (add \n to break huge line)

This commit is contained in:
iska
2015-03-15 17:54:20 +01:00
parent 424241de47
commit a1560ddf37
+13 -2
View File
@@ -29,11 +29,22 @@ NS_INLINE BOOL IsNodeHTMLIntegrationPoint(HTMLElement *node)
NS_INLINE BOOL IsSpecialElement(HTMLElement *element)
{
if (element.namespace == HTMLNamespaceHTML) {
return [element.tagName isEqualToAny:@"address", @"applet", @"area", @"article", @"aside", @"base", @"basefont", @"bgsound", @"blockquote", @"body", @"br", @"button", @"caption", @"center", @"col", @"colgroup", @"dd", @"details", @"dir", @"div", @"dl", @"dt", @"embed", @"fieldset", @"figcaption", @"figure", @"footer", @"form", @"frame", @"frameset", @"h1", @"h2", @"h3", @"h4", @"h5", @"h6", @"head", @"header", @"hgroup", @"hr", @"html", @"iframe", @"img", @"input", @"isindex", @"li", @"link", @"listing", @"main", @"marquee", @"menu", @"menuitem", @"meta", @"nav", @"noembed", @"noframes", @"noscript", @"object", @"ol", @"p", @"param", @"plaintext", @"pre", @"script", @"section", @"select", @"source", @"style", @"summary", @"table", @"tbody", @"td", @"template", @"textarea", @"tfoot", @"th", @"thead", @"title", @"tr", @"track", @"ul", @"wbr", @"xmp", nil];
return [element.tagName isEqualToAny:@"address", @"applet", @"area", @"article",
@"aside", @"base", @"basefont", @"bgsound", @"blockquote", @"body", @"br",
@"button", @"caption", @"center", @"col", @"colgroup", @"dd", @"details",
@"dir", @"div", @"dl", @"dt", @"embed", @"fieldset", @"figcaption",
@"figure", @"footer", @"form", @"frame", @"frameset", @"h1", @"h2", @"h3",
@"h4", @"h5", @"h6", @"head", @"header", @"hgroup", @"hr", @"html", @"iframe",
@"img", @"input", @"isindex", @"li", @"link", @"listing", @"main", @"marquee",
@"menu", @"menuitem", @"meta", @"nav", @"noembed", @"noframes", @"noscript",
@"object", @"ol", @"p", @"param", @"plaintext", @"pre", @"script", @"section",
@"select", @"source", @"style", @"summary", @"table", @"tbody", @"td",
@"template", @"textarea", @"tfoot", @"th", @"thead", @"title", @"tr",
@"track", @"ul", @"wbr", @"xmp", nil];
} else if (element.namespace == HTMLNamespaceMathML) {
return [element.tagName isEqualToAny:@"mi", @"mo", @"mn", @"ms", @"mtext", @"annotation-xml", nil];
} else if (element.namespace == HTMLNamespaceSVG) {
return [element.tagName isEqualToAny:@"foreignObject", @"desc", @"title", nil];
}
return NO;
}
}