Backed out 8 changesets (bug 959150) for Linux debug build bustage on a CLOSED TREE.
Backed out changeset 30bdc9b15e8e (bug 959150) Backed out changeset 630e489aed30 (bug 959150) Backed out changeset c6874004efe7 (bug 959150) Backed out changeset ebc67518a962 (bug 959150) Backed out changeset 14441e528582 (bug 959150) Backed out changeset 8d0ae8bffb08 (bug 959150) Backed out changeset 603b63c33e9a (bug 959150) Backed out changeset 261e2d244c54 (bug 959150)
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
#include "nsString.h"
|
||||
#include "nsNameSpaceManager.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsTraceRefcnt.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "jArray.h"
|
||||
#include "nsHtml5DocumentMode.h"
|
||||
#include "nsHtml5ArrayCopy.h"
|
||||
@@ -53,8 +53,6 @@
|
||||
#include "nsHtml5PlainTextUtils.h"
|
||||
#include "nsHtml5ViewSourceUtils.h"
|
||||
#include "mozilla/Likely.h"
|
||||
#include "nsIContentHandle.h"
|
||||
#include "nsHtml5OplessBuilder.h"
|
||||
|
||||
#include "nsHtml5Tokenizer.h"
|
||||
#include "nsHtml5MetaScanner.h"
|
||||
@@ -91,7 +89,7 @@ nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self)
|
||||
charBuffer = jArray<char16_t,int32_t>::newJArray(1024);
|
||||
framesetOk = true;
|
||||
if (fragment) {
|
||||
nsIContentHandle* elt;
|
||||
nsIContent** elt;
|
||||
if (contextNode) {
|
||||
elt = contextNode;
|
||||
} else {
|
||||
@@ -121,7 +119,7 @@ nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self)
|
||||
} else {
|
||||
mode = NS_HTML5TREE_BUILDER_INITIAL;
|
||||
if (tokenizer->isViewingXmlSource()) {
|
||||
nsIContentHandle* elt = createElement(kNameSpaceID_SVG, nsHtml5Atoms::svg, tokenizer->emptyAttributes());
|
||||
nsIContent** elt = createElement(kNameSpaceID_SVG, nsHtml5Atoms::svg, tokenizer->emptyAttributes());
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(nsHtml5ElementName::ELT_SVG, nsHtml5Atoms::svg, elt);
|
||||
currentPtr++;
|
||||
stack[currentPtr] = node;
|
||||
@@ -1890,7 +1888,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
if (selfClosing) {
|
||||
errSelfClosing();
|
||||
}
|
||||
if (!mBuilder && attributes != nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES) {
|
||||
if (attributes != nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES) {
|
||||
delete attributes;
|
||||
}
|
||||
}
|
||||
@@ -3585,7 +3583,7 @@ nsHtml5TreeBuilder::adoptionAgencyEndTag(nsIAtom* name)
|
||||
}
|
||||
MOZ_ASSERT(node == listOfActiveFormattingElements[nodeListPos]);
|
||||
MOZ_ASSERT(node == stack[nodePos]);
|
||||
nsIContentHandle* clone = createElement(kNameSpaceID_XHTML, node->name, node->attributes->cloneAttributes(nullptr));
|
||||
nsIContent** clone = createElement(kNameSpaceID_XHTML, node->name, node->attributes->cloneAttributes(nullptr));
|
||||
nsHtml5StackNode* newNode = new nsHtml5StackNode(node->getFlags(), node->ns, node->name, clone, node->popName, node->attributes);
|
||||
node->dropAttributes();
|
||||
stack[nodePos] = newNode;
|
||||
@@ -3606,7 +3604,7 @@ nsHtml5TreeBuilder::adoptionAgencyEndTag(nsIAtom* name)
|
||||
detachFromParent(lastNode->node);
|
||||
appendElement(lastNode->node, commonAncestor->node);
|
||||
}
|
||||
nsIContentHandle* clone = createElement(kNameSpaceID_XHTML, formattingElt->name, formattingElt->attributes->cloneAttributes(nullptr));
|
||||
nsIContent** clone = createElement(kNameSpaceID_XHTML, formattingElt->name, formattingElt->attributes->cloneAttributes(nullptr));
|
||||
nsHtml5StackNode* formattingClone = new nsHtml5StackNode(formattingElt->getFlags(), formattingElt->ns, formattingElt->name, clone, formattingElt->popName, formattingElt->attributes);
|
||||
formattingElt->dropAttributes();
|
||||
appendChildrenToNewParent(furthestBlock->node, clone);
|
||||
@@ -3767,7 +3765,7 @@ nsHtml5TreeBuilder::reconstructTheActiveFormattingElements()
|
||||
while (entryPos < listPtr) {
|
||||
entryPos++;
|
||||
nsHtml5StackNode* entry = listOfActiveFormattingElements[entryPos];
|
||||
nsIContentHandle* clone = createElement(kNameSpaceID_XHTML, entry->name, entry->attributes->cloneAttributes(nullptr));
|
||||
nsIContent** clone = createElement(kNameSpaceID_XHTML, entry->name, entry->attributes->cloneAttributes(nullptr));
|
||||
nsHtml5StackNode* entryClone = new nsHtml5StackNode(entry->getFlags(), entry->ns, entry->name, clone, entry->popName, entry->attributes);
|
||||
entry->dropAttributes();
|
||||
nsHtml5StackNode* currentNode = stack[currentPtr];
|
||||
@@ -3784,7 +3782,7 @@ nsHtml5TreeBuilder::reconstructTheActiveFormattingElements()
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::insertIntoFosterParent(nsIContentHandle* child)
|
||||
nsHtml5TreeBuilder::insertIntoFosterParent(nsIContent** child)
|
||||
{
|
||||
int32_t tablePos = findLastOrRoot(NS_HTML5TREE_BUILDER_TABLE);
|
||||
int32_t templatePos = findLastOrRoot(NS_HTML5TREE_BUILDER_TEMPLATE);
|
||||
@@ -3846,7 +3844,7 @@ nsHtml5TreeBuilder::popOnEof()
|
||||
void
|
||||
nsHtml5TreeBuilder::appendHtmlElementToDocumentAndPush(nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIContentHandle* elt = createHtmlElementSetAsRoot(attributes);
|
||||
nsIContent** elt = createHtmlElementSetAsRoot(attributes);
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(nsHtml5ElementName::ELT_HTML, elt);
|
||||
push(node);
|
||||
}
|
||||
@@ -3860,7 +3858,7 @@ nsHtml5TreeBuilder::appendHtmlElementToDocumentAndPush()
|
||||
void
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushHeadElement(nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIContentHandle* elt = createElement(kNameSpaceID_XHTML, nsHtml5Atoms::head, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, nsHtml5Atoms::head, attributes);
|
||||
appendElement(elt, stack[currentPtr]->node);
|
||||
headPointer = elt;
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(nsHtml5ElementName::ELT_HEAD, elt);
|
||||
@@ -3882,7 +3880,7 @@ nsHtml5TreeBuilder::appendToCurrentNodeAndPushBodyElement()
|
||||
void
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushFormElementMayFoster(nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIContentHandle* elt = createElement(kNameSpaceID_XHTML, nsHtml5Atoms::form, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, nsHtml5Atoms::form, attributes);
|
||||
if (!isTemplateContents()) {
|
||||
formPointer = elt;
|
||||
}
|
||||
@@ -3900,8 +3898,7 @@ nsHtml5TreeBuilder::appendToCurrentNodeAndPushFormElementMayFoster(nsHtml5HtmlAt
|
||||
void
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushFormattingElementMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsHtml5HtmlAttributes* clone = attributes->cloneAttributes(nullptr);
|
||||
nsIContentHandle* elt = createElement(kNameSpaceID_XHTML, elementName->name, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, elementName->name, attributes);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -3909,7 +3906,7 @@ nsHtml5TreeBuilder::appendToCurrentNodeAndPushFormattingElementMayFoster(nsHtml5
|
||||
} else {
|
||||
appendElement(elt, current->node);
|
||||
}
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(elementName, elt, clone);
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(elementName, elt, attributes->cloneAttributes(nullptr));
|
||||
push(node);
|
||||
append(node);
|
||||
node->retain();
|
||||
@@ -3918,7 +3915,7 @@ nsHtml5TreeBuilder::appendToCurrentNodeAndPushFormattingElementMayFoster(nsHtml5
|
||||
void
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElement(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIContentHandle* elt = createElement(kNameSpaceID_XHTML, elementName->name, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, elementName->name, attributes);
|
||||
appendElement(elt, stack[currentPtr]->node);
|
||||
if (nsHtml5ElementName::ELT_TEMPLATE == elementName) {
|
||||
elt = getDocumentFragmentForTemplate(elt);
|
||||
@@ -3931,7 +3928,7 @@ void
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIAtom* popName = elementName->name;
|
||||
nsIContentHandle* elt = createElement(kNameSpaceID_XHTML, popName, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, popName, attributes);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -3947,11 +3944,7 @@ void
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFosterMathML(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIAtom* popName = elementName->name;
|
||||
bool markAsHtmlIntegrationPoint = false;
|
||||
if (nsHtml5ElementName::ELT_ANNOTATION_XML == elementName && annotationXmlEncodingPermitsHtml(attributes)) {
|
||||
markAsHtmlIntegrationPoint = true;
|
||||
}
|
||||
nsIContentHandle* elt = createElement(kNameSpaceID_MathML, popName, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_MathML, popName, attributes);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -3959,6 +3952,10 @@ nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFosterMathML(nsHtml5Elem
|
||||
} else {
|
||||
appendElement(elt, current->node);
|
||||
}
|
||||
bool markAsHtmlIntegrationPoint = false;
|
||||
if (nsHtml5ElementName::ELT_ANNOTATION_XML == elementName && annotationXmlEncodingPermitsHtml(attributes)) {
|
||||
markAsHtmlIntegrationPoint = true;
|
||||
}
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(elementName, elt, popName, markAsHtmlIntegrationPoint);
|
||||
push(node);
|
||||
}
|
||||
@@ -3977,7 +3974,7 @@ void
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFosterSVG(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIAtom* popName = elementName->camelCaseName;
|
||||
nsIContentHandle* elt = createElement(kNameSpaceID_SVG, popName, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_SVG, popName, attributes);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -3990,9 +3987,9 @@ nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFosterSVG(nsHtml5Element
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form)
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes, nsIContent** form)
|
||||
{
|
||||
nsIContentHandle* elt = createElement(kNameSpaceID_XHTML, elementName->name, attributes, !form || fragment || isTemplateContents() ? nullptr : form);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, elementName->name, attributes, !form || fragment || isTemplateContents() ? nullptr : form);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -4005,9 +4002,9 @@ nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFoster(nsHtml5ElementNam
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrentMayFoster(nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form)
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrentMayFoster(nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContent** form)
|
||||
{
|
||||
nsIContentHandle* elt = createElement(kNameSpaceID_XHTML, name, attributes, !form || fragment || isTemplateContents() ? nullptr : form);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, name, attributes, !form || fragment || isTemplateContents() ? nullptr : form);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -4023,7 +4020,7 @@ void
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrentMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIAtom* popName = elementName->name;
|
||||
nsIContentHandle* elt = createElement(kNameSpaceID_XHTML, popName, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, popName, attributes);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -4039,7 +4036,7 @@ void
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrentMayFosterSVG(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIAtom* popName = elementName->camelCaseName;
|
||||
nsIContentHandle* elt = createElement(kNameSpaceID_SVG, popName, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_SVG, popName, attributes);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -4055,7 +4052,7 @@ void
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrentMayFosterMathML(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIAtom* popName = elementName->name;
|
||||
nsIContentHandle* elt = createElement(kNameSpaceID_MathML, popName, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_MathML, popName, attributes);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -4068,9 +4065,9 @@ nsHtml5TreeBuilder::appendVoidElementToCurrentMayFosterMathML(nsHtml5ElementName
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrent(nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form)
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrent(nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContent** form)
|
||||
{
|
||||
nsIContentHandle* elt = createElement(kNameSpaceID_XHTML, name, attributes, !form || fragment || isTemplateContents() ? nullptr : form);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, name, attributes, !form || fragment || isTemplateContents() ? nullptr : form);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
appendElement(elt, current->node);
|
||||
elementPushed(kNameSpaceID_XHTML, name, elt);
|
||||
@@ -4080,7 +4077,7 @@ nsHtml5TreeBuilder::appendVoidElementToCurrent(nsIAtom* name, nsHtml5HtmlAttribu
|
||||
void
|
||||
nsHtml5TreeBuilder::appendVoidFormToCurrent(nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIContentHandle* elt = createElement(kNameSpaceID_XHTML, nsHtml5Atoms::form, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, nsHtml5Atoms::form, attributes);
|
||||
formPointer = elt;
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
appendElement(elt, current->node);
|
||||
@@ -4110,7 +4107,7 @@ nsHtml5TreeBuilder::isInForeignButNotHtmlOrMathTextIntegrationPoint()
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::setFragmentContext(nsIAtom* context, int32_t ns, nsIContentHandle* node, bool quirks)
|
||||
nsHtml5TreeBuilder::setFragmentContext(nsIAtom* context, int32_t ns, nsIContent** node, bool quirks)
|
||||
{
|
||||
this->contextName = context;
|
||||
this->contextNamespace = ns;
|
||||
@@ -4119,7 +4116,7 @@ nsHtml5TreeBuilder::setFragmentContext(nsIAtom* context, int32_t ns, nsIContentH
|
||||
this->quirks = quirks;
|
||||
}
|
||||
|
||||
nsIContentHandle*
|
||||
nsIContent**
|
||||
nsHtml5TreeBuilder::currentNode()
|
||||
{
|
||||
return stack[currentPtr]->node;
|
||||
@@ -4328,19 +4325,19 @@ nsHtml5TreeBuilder::findInArray(nsHtml5StackNode* node, jArray<nsHtml5StackNode*
|
||||
return -1;
|
||||
}
|
||||
|
||||
nsIContentHandle*
|
||||
nsIContent**
|
||||
nsHtml5TreeBuilder::getFormPointer()
|
||||
{
|
||||
return formPointer;
|
||||
}
|
||||
|
||||
nsIContentHandle*
|
||||
nsIContent**
|
||||
nsHtml5TreeBuilder::getHeadPointer()
|
||||
{
|
||||
return headPointer;
|
||||
}
|
||||
|
||||
nsIContentHandle*
|
||||
nsIContent**
|
||||
nsHtml5TreeBuilder::getDeepTreeSurrogateParent()
|
||||
{
|
||||
return deepTreeSurrogateParent;
|
||||
|
||||
Reference in New Issue
Block a user