NEW 110391
Document::parsing() and Document::setParsing() are non-sense and should be removed
https://bugs.webkit.org/show_bug.cgi?id=110391
Summary Document::parsing() and Document::setParsing() are non-sense and should be re...
Eric Seidel (no email)
Reported 2013-02-20 14:58:16 PST
Document::parsing() and Document::setParsing() are non-sense and should be removed void Document::implicitOpen() { .... m_parser = createParser(); setParsing(true); setReadyState(Loading); } void Document::finishedParsing() { ASSERT(!scriptableDocumentParser() || !m_parser->isParsing()); ASSERT(!scriptableDocumentParser() || m_readyState != Loading); setParsing(false); ... void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy) { ... if (m_frame->document() && m_frame->document()->parsing()) { finishedParsing(); m_frame->document()->setParsing(false); } It's read in various places, and set some by the XML parsers. It appears to be part of the loader state machine, but doesn't ever consult the DocumentParser as to what it's actually doing, so is undoubtably confused. :)
Attachments
Lucas Forschler
Comment 1 2019-02-06 09:03:16 PST
Mass moving XML DOM bugs to the "DOM" Component.
Ahmad Saleem
Comment 2 2022-10-08 14:33:49 PDT
We still have these: https://github.com/WebKit/WebKit/blob/3337a23e60d4843d0ef0beda84b02115b2ca306d/Source/WebCore/dom/Document.h#L782 https://github.com/WebKit/WebKit/blob/ac4cebfbe41a934ff5d256c284c081b6ceec252b/Source/WebCore/dom/Document.cpp#L3338 void Document::setParsing(bool b) { m_bParsing = b; if (m_bParsing && !m_sharedObjectPool) m_sharedObjectPool = makeUnique<DocumentSharedObjectPool>(); if (!m_bParsing && view() && !view()->needsLayout()) view()->fireLayoutRelatedMilestonesIfNeeded(); } etc. __________ Do we need to keep it or is it something we have changed and now have different purpose about this code? Thanks!
Ryosuke Niwa
Comment 3 2022-10-08 21:23:40 PDT
This code still needs refactoring / reworking.
Note You need to log in before you can comment on or make changes to this bug.