diff options
Diffstat (limited to 'parser/html/nsHtml5TreeBuilder.h')
-rw-r--r-- | parser/html/nsHtml5TreeBuilder.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/parser/html/nsHtml5TreeBuilder.h b/parser/html/nsHtml5TreeBuilder.h index 91ba79ee2..4f484a104 100644 --- a/parser/html/nsHtml5TreeBuilder.h +++ b/parser/html/nsHtml5TreeBuilder.h @@ -312,6 +312,20 @@ class nsHtml5TreeBuilder : public nsAHtml5TreeBuilderState private: bool quirks; bool isSrcdocDocument; + inline nsHtml5ContentCreatorFunction htmlCreator(mozilla::dom::HTMLContentCreatorFunction htmlCreator) + { + nsHtml5ContentCreatorFunction creator; + creator.html = htmlCreator; + return creator; + } + + inline nsHtml5ContentCreatorFunction svgCreator(mozilla::dom::SVGContentCreatorFunction svgCreator) + { + nsHtml5ContentCreatorFunction creator; + creator.svg = svgCreator; + return creator; + } + public: void startTokenization(nsHtml5Tokenizer* self); void doctype(nsIAtom* name, nsHtml5String publicIdentifier, nsHtml5String systemIdentifier, bool forceQuirks); @@ -388,8 +402,8 @@ class nsHtml5TreeBuilder : public nsAHtml5TreeBuilderState void pushHeadPointerOntoStack(); void reconstructTheActiveFormattingElements(); void insertIntoFosterParent(nsIContentHandle* child); - nsIContentHandle* createAndInsertFosterParentedElement(int32_t ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes); - nsIContentHandle* createAndInsertFosterParentedElement(int32_t ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form); + nsIContentHandle* createAndInsertFosterParentedElement(int32_t ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsHtml5ContentCreatorFunction creator); + nsIContentHandle* createAndInsertFosterParentedElement(int32_t ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form, nsHtml5ContentCreatorFunction creator); bool isInStack(nsHtml5StackNode* node); void popTemplateMode(); void pop(); @@ -408,24 +422,24 @@ class nsHtml5TreeBuilder : public nsAHtml5TreeBuilderState bool annotationXmlEncodingPermitsHtml(nsHtml5HtmlAttributes* attributes); void appendToCurrentNodeAndPushElementMayFosterSVG(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); void appendToCurrentNodeAndPushElementMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form); - void appendVoidElementToCurrentMayFoster(nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form); + void appendVoidElementToCurrentMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form); void appendVoidElementToCurrentMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); void appendVoidElementToCurrentMayFosterSVG(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); void appendVoidElementToCurrentMayFosterMathML(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes); - void appendVoidElementToCurrent(nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form); + void appendVoidInputToCurrent(nsHtml5HtmlAttributes* attributes, nsIContentHandle* form); void appendVoidFormToCurrent(nsHtml5HtmlAttributes* attributes); protected: void accumulateCharacters(const char16_t* buf, int32_t start, int32_t length); void requestSuspension(); - nsIContentHandle* createElement(int32_t ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* intendedParent); - nsIContentHandle* createElement(int32_t ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form, nsIContentHandle* intendedParent); + nsIContentHandle* createElement(int32_t ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* intendedParent, nsHtml5ContentCreatorFunction creator); + nsIContentHandle* createElement(int32_t ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form, nsIContentHandle* intendedParent, nsHtml5ContentCreatorFunction creator); nsIContentHandle* createHtmlElementSetAsRoot(nsHtml5HtmlAttributes* attributes); void detachFromParent(nsIContentHandle* element); bool hasChildren(nsIContentHandle* element); void appendElement(nsIContentHandle* child, nsIContentHandle* newParent); void appendChildrenToNewParent(nsIContentHandle* oldParent, nsIContentHandle* newParent); void insertFosterParentedChild(nsIContentHandle* child, nsIContentHandle* table, nsIContentHandle* stackParent); - nsIContentHandle* createAndInsertFosterParentedElement(int32_t ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form, nsIContentHandle* table, nsIContentHandle* stackParent); + nsIContentHandle* createAndInsertFosterParentedElement(int32_t ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContentHandle* form, nsIContentHandle* table, nsIContentHandle* stackParent, nsHtml5ContentCreatorFunction creator); ;void insertFosterParentedCharacters(char16_t* buf, int32_t start, int32_t length, nsIContentHandle* table, nsIContentHandle* stackParent); void appendCharacters(nsIContentHandle* parent, char16_t* buf, int32_t start, int32_t length); void appendIsindexPrompt(nsIContentHandle* parent); |