mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
ported mozilla upstream change: Bug 1355441 - Reuse StackNode in TreeBuilder to avoid malloc. r=hsivonen.
This commit is contained in:
parent
0f035317a3
commit
b7a35ab2cd
8 changed files with 578 additions and 177 deletions
|
|
@ -88,6 +88,9 @@ class nsHtml5TreeBuilder : public nsAHtml5TreeBuilderState
|
|||
nsIContentHandle* contextNode;
|
||||
autoJArray<int32_t,int32_t> templateModeStack;
|
||||
int32_t templateModePtr;
|
||||
autoJArray<nsHtml5StackNode*, int32_t> stackNodes;
|
||||
int32_t stackNodesIdx;
|
||||
int32_t numStackNodes;
|
||||
autoJArray<nsHtml5StackNode*,int32_t> stack;
|
||||
int32_t currentPtr;
|
||||
autoJArray<nsHtml5StackNode*,int32_t> listOfActiveFormattingElements;
|
||||
|
|
@ -187,6 +190,33 @@ class nsHtml5TreeBuilder : public nsAHtml5TreeBuilderState
|
|||
void addAttributesToHtml(nsHtml5HtmlAttributes* attributes);
|
||||
void pushHeadPointerOntoStack();
|
||||
void reconstructTheActiveFormattingElements();
|
||||
|
||||
public:
|
||||
void notifyUnusedStackNode(int32_t idxInStackNodes);
|
||||
|
||||
private:
|
||||
nsHtml5StackNode* getUnusedStackNode();
|
||||
nsHtml5StackNode* createStackNode(int32_t flags,
|
||||
int32_t ns,
|
||||
nsIAtom* name,
|
||||
nsIContentHandle* node,
|
||||
nsIAtom* popName,
|
||||
nsHtml5HtmlAttributes* attributes);
|
||||
nsHtml5StackNode* createStackNode(nsHtml5ElementName* elementName,
|
||||
nsIContentHandle* node);
|
||||
nsHtml5StackNode* createStackNode(nsHtml5ElementName* elementName,
|
||||
nsIContentHandle* node,
|
||||
nsHtml5HtmlAttributes* attributes);
|
||||
nsHtml5StackNode* createStackNode(nsHtml5ElementName* elementName,
|
||||
nsIContentHandle* node,
|
||||
nsIAtom* popName);
|
||||
nsHtml5StackNode* createStackNode(nsHtml5ElementName* elementName,
|
||||
nsIAtom* popName,
|
||||
nsIContentHandle* node);
|
||||
nsHtml5StackNode* createStackNode(nsHtml5ElementName* elementName,
|
||||
nsIContentHandle* node,
|
||||
nsIAtom* popName,
|
||||
bool markAsIntegrationPoint);
|
||||
void insertIntoFosterParent(nsIContentHandle* child);
|
||||
nsIContentHandle* createAndInsertFosterParentedElement(int32_t ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes);
|
||||
nsIContentHandle* createAndInsertFosterParentedElement(int32_t ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue