Bug 607573 - Make <input type=hidden> not set frameset-ok to "not ok". r=jonas, a=blocking2.0-betaN.

This commit is contained in:
Henri Sivonen 2010-11-18 10:19:59 +02:00
Родитель 2c7858cd7d
Коммит 4531f71b9a
3 изменённых файлов: 10 добавлений и 5 удалений

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

@ -1802,7 +1802,10 @@ public abstract class TreeBuilder<T> implements TokenHandler,
case XMP:
case IFRAME:
case SELECT:
if (mode == FRAMESET_OK) {
if (mode == FRAMESET_OK
&& !(group == INPUT && Portability.lowerCaseLiteralEqualsIgnoreAsciiCaseString(
"hidden",
attributes.getValue(AttributeName.TYPE)))) {
framesetOk = false;
mode = IN_BODY;
}

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

@ -896,7 +896,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
case NS_HTML5TREE_BUILDER_XMP:
case NS_HTML5TREE_BUILDER_IFRAME:
case NS_HTML5TREE_BUILDER_SELECT: {
if (mode == NS_HTML5TREE_BUILDER_FRAMESET_OK) {
if (mode == NS_HTML5TREE_BUILDER_FRAMESET_OK && !(group == NS_HTML5TREE_BUILDER_INPUT && nsHtml5Portability::lowerCaseLiteralEqualsIgnoreAsciiCaseString("hidden", attributes->getValue(nsHtml5AttributeName::ATTR_TYPE)))) {
framesetOk = PR_FALSE;
mode = NS_HTML5TREE_BUILDER_IN_BODY;
}

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

@ -1,8 +1,10 @@
#data
Placeholder
<input type="hidden"><frameset>
#errors
21: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.
31: “frameset” start tag seen.
31: End of file seen and there were open elements.
#document
| <html>
| <head>
| <body>
| "Placeholder"
| <frameset>