Bug 110391
| Summary: | Document::parsing() and Document::setParsing() are non-sense and should be removed | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | abarth, ahmad.saleem792, ap, bfulgham, cdumez, japhet, rniwa, tonyg |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Eric Seidel (no email)
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Lucas Forschler
Mass moving XML DOM bugs to the "DOM" Component.
Ahmad Saleem
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
This code still needs refactoring / reworking.