Bug 596168 - Make non-space characters in the "in foreign content" insertion mode set frameset-ok to not OK. rs=jonas, a=jst.
This commit is contained in:
@@ -853,16 +853,14 @@ public abstract class TreeBuilder<T> implements TokenHandler,
|
|||||||
needToDropLF = false;
|
needToDropLF = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inForeign) {
|
|
||||||
accumulateCharacters(buf, start, length);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// optimize the most common case
|
// optimize the most common case
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case IN_BODY:
|
case IN_BODY:
|
||||||
case IN_CELL:
|
case IN_CELL:
|
||||||
case IN_CAPTION:
|
case IN_CAPTION:
|
||||||
|
if (!inForeign) {
|
||||||
reconstructTheActiveFormattingElements();
|
reconstructTheActiveFormattingElements();
|
||||||
|
}
|
||||||
// fall through
|
// fall through
|
||||||
case TEXT:
|
case TEXT:
|
||||||
accumulateCharacters(buf, start, length);
|
accumulateCharacters(buf, start, length);
|
||||||
@@ -919,8 +917,10 @@ public abstract class TreeBuilder<T> implements TokenHandler,
|
|||||||
* Reconstruct the active formatting
|
* Reconstruct the active formatting
|
||||||
* elements, if any.
|
* elements, if any.
|
||||||
*/
|
*/
|
||||||
|
if (!inForeign) {
|
||||||
flushCharacters();
|
flushCharacters();
|
||||||
reconstructTheActiveFormattingElements();
|
reconstructTheActiveFormattingElements();
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Append the token's character to the
|
* Append the token's character to the
|
||||||
* current node.
|
* current node.
|
||||||
@@ -1113,8 +1113,10 @@ public abstract class TreeBuilder<T> implements TokenHandler,
|
|||||||
* Reconstruct the active formatting
|
* Reconstruct the active formatting
|
||||||
* elements, if any.
|
* elements, if any.
|
||||||
*/
|
*/
|
||||||
|
if (!inForeign) {
|
||||||
flushCharacters();
|
flushCharacters();
|
||||||
reconstructTheActiveFormattingElements();
|
reconstructTheActiveFormattingElements();
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Append the token's character to the
|
* Append the token's character to the
|
||||||
* current node.
|
* current node.
|
||||||
|
|||||||
@@ -191,16 +191,14 @@ nsHtml5TreeBuilder::characters(const PRUnichar* buf, PRInt32 start, PRInt32 leng
|
|||||||
}
|
}
|
||||||
needToDropLF = PR_FALSE;
|
needToDropLF = PR_FALSE;
|
||||||
}
|
}
|
||||||
if (inForeign) {
|
|
||||||
accumulateCharacters(buf, start, length);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
switch(mode) {
|
switch(mode) {
|
||||||
case NS_HTML5TREE_BUILDER_IN_BODY:
|
case NS_HTML5TREE_BUILDER_IN_BODY:
|
||||||
case NS_HTML5TREE_BUILDER_IN_CELL:
|
case NS_HTML5TREE_BUILDER_IN_CELL:
|
||||||
case NS_HTML5TREE_BUILDER_IN_CAPTION: {
|
case NS_HTML5TREE_BUILDER_IN_CAPTION: {
|
||||||
|
if (!inForeign) {
|
||||||
reconstructTheActiveFormattingElements();
|
reconstructTheActiveFormattingElements();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
case NS_HTML5TREE_BUILDER_TEXT: {
|
case NS_HTML5TREE_BUILDER_TEXT: {
|
||||||
accumulateCharacters(buf, start, length);
|
accumulateCharacters(buf, start, length);
|
||||||
return;
|
return;
|
||||||
@@ -243,8 +241,10 @@ nsHtml5TreeBuilder::characters(const PRUnichar* buf, PRInt32 start, PRInt32 leng
|
|||||||
accumulateCharacters(buf, start, i - start);
|
accumulateCharacters(buf, start, i - start);
|
||||||
start = i;
|
start = i;
|
||||||
}
|
}
|
||||||
|
if (!inForeign) {
|
||||||
flushCharacters();
|
flushCharacters();
|
||||||
reconstructTheActiveFormattingElements();
|
reconstructTheActiveFormattingElements();
|
||||||
|
}
|
||||||
NS_HTML5_BREAK(charactersloop);
|
NS_HTML5_BREAK(charactersloop);
|
||||||
}
|
}
|
||||||
case NS_HTML5TREE_BUILDER_IN_SELECT:
|
case NS_HTML5TREE_BUILDER_IN_SELECT:
|
||||||
@@ -343,8 +343,10 @@ nsHtml5TreeBuilder::characters(const PRUnichar* buf, PRInt32 start, PRInt32 leng
|
|||||||
accumulateCharacters(buf, start, i - start);
|
accumulateCharacters(buf, start, i - start);
|
||||||
start = i;
|
start = i;
|
||||||
}
|
}
|
||||||
|
if (!inForeign) {
|
||||||
flushCharacters();
|
flushCharacters();
|
||||||
reconstructTheActiveFormattingElements();
|
reconstructTheActiveFormattingElements();
|
||||||
|
}
|
||||||
NS_HTML5_BREAK(charactersloop);
|
NS_HTML5_BREAK(charactersloop);
|
||||||
}
|
}
|
||||||
case NS_HTML5TREE_BUILDER_IN_TABLE:
|
case NS_HTML5TREE_BUILDER_IN_TABLE:
|
||||||
|
|||||||
@@ -11,5 +11,4 @@ var html5Exceptions = {
|
|||||||
"<!doctype html><summary><article></summary>a" : true, // Bug 596171
|
"<!doctype html><summary><article></summary>a" : true, // Bug 596171
|
||||||
"<!doctype html><p><figcaption>" : true, // http://www.w3.org/Bugs/Public/show_bug.cgi?id=10589
|
"<!doctype html><p><figcaption>" : true, // http://www.w3.org/Bugs/Public/show_bug.cgi?id=10589
|
||||||
"<!doctype html><figcaption><article></figcaption>a" : true, // http://www.w3.org/Bugs/Public/show_bug.cgi?id=10589
|
"<!doctype html><figcaption><article></figcaption>a" : true, // http://www.w3.org/Bugs/Public/show_bug.cgi?id=10589
|
||||||
"<!doctype html><svg>a</svg><frameset><frame>" : true, // Bug 596168
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user