mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 620267 Certain LFs following a <pre> or <textarea> get erroneously stripped r=hsivonen a=bz
This commit is contained in:
parent
59075a58ed
commit
b22f4f1a18
@ -832,6 +832,7 @@ public abstract class TreeBuilder<T> implements TokenHandler,
|
||||
public final void characters(@Const @NoLength char[] buf, int start, int length)
|
||||
throws SAXException {
|
||||
if (needToDropLF) {
|
||||
needToDropLF = false;
|
||||
if (buf[start] == '\n') {
|
||||
start++;
|
||||
length--;
|
||||
@ -839,7 +840,6 @@ public abstract class TreeBuilder<T> implements TokenHandler,
|
||||
return;
|
||||
}
|
||||
}
|
||||
needToDropLF = false;
|
||||
}
|
||||
|
||||
// optimize the most common case
|
||||
|
@ -177,6 +177,7 @@ void
|
||||
nsHtml5TreeBuilder::characters(const PRUnichar* buf, PRInt32 start, PRInt32 length)
|
||||
{
|
||||
if (needToDropLF) {
|
||||
needToDropLF = PR_FALSE;
|
||||
if (buf[start] == '\n') {
|
||||
start++;
|
||||
length--;
|
||||
@ -184,7 +185,6 @@ nsHtml5TreeBuilder::characters(const PRUnichar* buf, PRInt32 start, PRInt32 leng
|
||||
return;
|
||||
}
|
||||
}
|
||||
needToDropLF = PR_FALSE;
|
||||
}
|
||||
switch(mode) {
|
||||
case NS_HTML5TREE_BUILDER_IN_BODY:
|
||||
|
Loading…
Reference in New Issue
Block a user