Backed out 4 changesets (bug 1113238) for mochitest-dt failures.
Backed out changeset 8439a009837d (bug 1113238) Backed out changeset 34b89a4f9dea (bug 1113238) Backed out changeset ce0ed9dc4d6d (bug 1113238) Backed out changeset 9dd632bab2aa (bug 1113238) CLOSED TREE
This commit is contained in:
@@ -192,7 +192,7 @@ nsHTMLContentSerializer::AppendElementStart(Element* aElement,
|
||||
|
||||
bool lineBreakBeforeOpen = LineBreakBeforeOpen(ns, name);
|
||||
|
||||
if ((mDoFormat || forceFormat) && !mDoRaw && !PreLevel()) {
|
||||
if ((mDoFormat || forceFormat) && !mPreLevel && !mDoRaw) {
|
||||
if (mColPos && lineBreakBeforeOpen) {
|
||||
AppendNewLineToString(aStr);
|
||||
}
|
||||
@@ -225,7 +225,7 @@ nsHTMLContentSerializer::AppendElementStart(Element* aElement,
|
||||
MaybeEnterInPreContent(content);
|
||||
|
||||
// for block elements, we increase the indentation
|
||||
if ((mDoFormat || forceFormat) && !mDoRaw && !PreLevel())
|
||||
if ((mDoFormat || forceFormat) && !mPreLevel && !mDoRaw)
|
||||
IncrIndentation(name);
|
||||
|
||||
// Need to keep track of OL and LI elements in order to get ordinal number
|
||||
@@ -280,8 +280,8 @@ nsHTMLContentSerializer::AppendElementStart(Element* aElement,
|
||||
++mDisableEntityEncoding;
|
||||
}
|
||||
|
||||
if ((mDoFormat || forceFormat) && !mDoRaw && !PreLevel() &&
|
||||
LineBreakAfterOpen(ns, name)) {
|
||||
if ((mDoFormat || forceFormat) && !mPreLevel &&
|
||||
!mDoRaw && LineBreakAfterOpen(ns, name)) {
|
||||
AppendNewLineToString(aStr);
|
||||
}
|
||||
|
||||
@@ -312,18 +312,18 @@ nsHTMLContentSerializer::AppendElementEnd(Element* aElement,
|
||||
bool forceFormat = !(mFlags & nsIDocumentEncoder::OutputIgnoreMozDirty) &&
|
||||
content->HasAttr(kNameSpaceID_None, nsGkAtoms::mozdirty);
|
||||
|
||||
if ((mDoFormat || forceFormat) && !mDoRaw && !PreLevel()) {
|
||||
if ((mDoFormat || forceFormat) && !mPreLevel && !mDoRaw) {
|
||||
DecrIndentation(name);
|
||||
}
|
||||
|
||||
if (name == nsGkAtoms::script) {
|
||||
nsCOMPtr<nsIScriptElement> script = do_QueryInterface(aElement);
|
||||
|
||||
if (ShouldMaintainPreLevel() && script && script->IsMalformed()) {
|
||||
if (script && script->IsMalformed()) {
|
||||
// We're looking at a malformed script tag. This means that the end tag
|
||||
// was missing in the source. Imitate that here by not serializing the end
|
||||
// tag.
|
||||
--PreLevel();
|
||||
--mPreLevel;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
@@ -351,7 +351,7 @@ nsHTMLContentSerializer::AppendElementEnd(Element* aElement,
|
||||
}
|
||||
}
|
||||
|
||||
if ((mDoFormat || forceFormat) && !mDoRaw && !PreLevel()) {
|
||||
if ((mDoFormat || forceFormat) && !mPreLevel && !mDoRaw) {
|
||||
|
||||
bool lineBreakBeforeClose = LineBreakBeforeClose(ns, name);
|
||||
|
||||
@@ -377,8 +377,8 @@ nsHTMLContentSerializer::AppendElementEnd(Element* aElement,
|
||||
|
||||
MaybeLeaveFromPreContent(content);
|
||||
|
||||
if ((mDoFormat || forceFormat)&& !mDoRaw && !PreLevel()
|
||||
&& LineBreakAfterClose(ns, name)) {
|
||||
if ((mDoFormat || forceFormat) && !mPreLevel
|
||||
&& !mDoRaw && LineBreakAfterClose(ns, name)) {
|
||||
AppendNewLineToString(aStr);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user