summaryrefslogtreecommitdiffstats
path: root/dom/base/nsXHTMLContentSerializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/nsXHTMLContentSerializer.cpp')
-rwxr-xr-xdom/base/nsXHTMLContentSerializer.cpp36
1 files changed, 4 insertions, 32 deletions
diff --git a/dom/base/nsXHTMLContentSerializer.cpp b/dom/base/nsXHTMLContentSerializer.cpp
index 0a39ef663..f7a0f9e1b 100755
--- a/dom/base/nsXHTMLContentSerializer.cpp
+++ b/dom/base/nsXHTMLContentSerializer.cpp
@@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -15,6 +14,7 @@
#include "nsIDOMElement.h"
#include "nsIContent.h"
#include "nsIDocument.h"
+#include "nsElementTable.h"
#include "nsNameSpaceManager.h"
#include "nsString.h"
#include "nsUnicharUtils.h"
@@ -27,7 +27,6 @@
#include "nsEscape.h"
#include "nsITextToSubURI.h"
#include "nsCRT.h"
-#include "nsIParserService.h"
#include "nsContentUtils.h"
#include "nsLWBrkCIID.h"
#include "nsIScriptElement.h"
@@ -667,18 +666,7 @@ nsXHTMLContentSerializer::LineBreakBeforeOpen(int32_t aNamespaceID, nsIAtom* aNa
aName == nsGkAtoms::html) {
return true;
}
- else {
- nsIParserService* parserService = nsContentUtils::GetParserService();
-
- if (parserService) {
- bool res;
- parserService->
- IsBlock(parserService->HTMLCaseSensitiveAtomTagToId(aName), res);
- return res;
- }
- }
-
- return mAddSpace;
+ return nsHTMLElement::IsBlock(nsHTMLTags::CaseSensitiveAtomTagToId(aName));
}
bool
@@ -748,31 +736,15 @@ nsXHTMLContentSerializer::LineBreakAfterClose(int32_t aNamespaceID, nsIAtom* aNa
(aName == nsGkAtoms::tr) ||
(aName == nsGkAtoms::th) ||
(aName == nsGkAtoms::td) ||
- (aName == nsGkAtoms::pre) ||
(aName == nsGkAtoms::title) ||
- (aName == nsGkAtoms::li) ||
(aName == nsGkAtoms::dt) ||
(aName == nsGkAtoms::dd) ||
- (aName == nsGkAtoms::blockquote) ||
(aName == nsGkAtoms::select) ||
(aName == nsGkAtoms::option) ||
- (aName == nsGkAtoms::p) ||
- (aName == nsGkAtoms::map) ||
- (aName == nsGkAtoms::div)) {
+ (aName == nsGkAtoms::map)) {
return true;
}
- else {
- nsIParserService* parserService = nsContentUtils::GetParserService();
-
- if (parserService) {
- bool res;
- parserService->
- IsBlock(parserService->HTMLCaseSensitiveAtomTagToId(aName), res);
- return res;
- }
- }
-
- return false;
+ return nsHTMLElement::IsBlock(nsHTMLTags::CaseSensitiveAtomTagToId(aName));
}