diff options
Diffstat (limited to 'WebCore/html/HTMLDocumentParser.h')
-rw-r--r-- | WebCore/html/HTMLDocumentParser.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/WebCore/html/HTMLDocumentParser.h b/WebCore/html/HTMLDocumentParser.h index d35cfaf..da21a2b 100644 --- a/WebCore/html/HTMLDocumentParser.h +++ b/WebCore/html/HTMLDocumentParser.h @@ -46,15 +46,20 @@ class HTMLTokenizer; class HTMLScriptRunner; class HTMLTreeBuilder; class HTMLPreloadScanner; -class LegacyHTMLTreeBuilder; class ScriptController; class ScriptSourceCode; class HTMLDocumentParser : public ScriptableDocumentParser, HTMLScriptRunnerHost, CachedResourceClient { public: - // FIXME: These constructors should be made private and replaced by create() methods. - HTMLDocumentParser(HTMLDocument*, bool reportErrors); - HTMLDocumentParser(DocumentFragment*, Element* contextElement, FragmentScriptingPermission); + static PassRefPtr<HTMLDocumentParser> create(HTMLDocument* document, bool reportErrors) + { + return adoptRef(new HTMLDocumentParser(document, reportErrors)); + } + static PassRefPtr<HTMLDocumentParser> create(DocumentFragment* fragment, Element* contextElement, FragmentScriptingPermission permission) + { + return adoptRef(new HTMLDocumentParser(fragment, contextElement, permission)); + } + virtual ~HTMLDocumentParser(); // Exposed for HTMLParserScheduler @@ -66,8 +71,12 @@ protected: virtual void insert(const SegmentedString&); virtual void finish(); + HTMLDocumentParser(HTMLDocument*, bool reportErrors); + HTMLDocumentParser(DocumentFragment*, Element* contextElement, FragmentScriptingPermission); + private: // DocumentParser + virtual void detach(); virtual bool hasInsertionPoint(); virtual void append(const SegmentedString&); virtual bool finishWasCalled(); @@ -78,9 +87,6 @@ private: virtual void executeScriptsWaitingForStylesheets(); virtual int lineNumber() const; virtual int columnNumber() const; - // FIXME: HTMLFormControlElement accesses the LegacyHTMLTreeBuilder via this method. - // Remove this when the LegacyHTMLTreeBuilder is no longer used. - virtual LegacyHTMLTreeBuilder* htmlTreeBuilder() const; // HTMLScriptRunnerHost virtual void watchForLoad(CachedResource*); |