mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 13:43:44 +00:00
applied bug1385272.diff
This commit is contained in:
@@ -1027,6 +1027,15 @@ nsDocumentEncoder::EncodeToString(nsAString& aOutputString)
|
||||
return EncodeToStringWithMaxLength(0, aOutputString);
|
||||
}
|
||||
|
||||
static bool ParentIsTR(nsIContent* aContent) {
|
||||
mozilla::dom::Element* parent = aContent->GetParentElement();
|
||||
if (!parent) {
|
||||
return false;
|
||||
}
|
||||
return parent->IsHTML(nsGkAtoms::tr);
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocumentEncoder::EncodeToStringWithMaxLength(uint32_t aMaxLength,
|
||||
nsAString& aOutputString)
|
||||
@@ -1093,7 +1102,7 @@ nsDocumentEncoder::EncodeToStringWithMaxLength(uint32_t aMaxLength,
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(node);
|
||||
if (content && content->IsHTML(nsGkAtoms::tr)) {
|
||||
if (content && content->IsHTML(nsGkAtoms::tr) && !ParentIsTR(content)) {
|
||||
nsINode* n = content;
|
||||
if (!prevNode) {
|
||||
// Went from a non-<tr> to a <tr>
|
||||
|
||||
Reference in New Issue
Block a user