false at the only point it is checked.
https://bugs.webkit.org/show_bug.cgi?id=83819
Reviewed by Adam Barth.
No new tests, no functionality change intended.
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::end): Merge with endIfNotLoadingMainResource(), always end, assert that we're still attached.
* loader/DocumentWriter.h:
* loader/FrameLoader.cpp:
* loader/FrameLoader.h: Remove isLoadingMainResource(), didEndDocument(), and m_isLoadingMainResource.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114062
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-04-12 Nate Chapin <japhet@chromium.org>
+
+ Remove FrameLoader:m_isLoadingMainResource, since it is always
+ false at the only point it is checked.
+ https://bugs.webkit.org/show_bug.cgi?id=83819
+
+ Reviewed by Adam Barth.
+
+ No new tests, no functionality change intended.
+
+ * loader/DocumentWriter.cpp:
+ (WebCore::DocumentWriter::end): Merge with endIfNotLoadingMainResource(), always end, assert that we're still attached.
+ * loader/DocumentWriter.h:
+ * loader/FrameLoader.cpp:
+ * loader/FrameLoader.h: Remove isLoadingMainResource(), didEndDocument(), and m_isLoadingMainResource.
+
2012-04-12 Rob Buis <rbuis@rim.com>
XMLSerializer().serializeToString() doesn't generate the XML declaration markup like Opera and Firefox
void DocumentWriter::end()
{
- m_frame->loader()->didEndDocument();
- endIfNotLoadingMainResource();
-}
-
-void DocumentWriter::endIfNotLoadingMainResource()
-{
- // FIXME: This isn't really the check we should be doing. We should re-work
- // how we end parsing to match the model in HTML5.
- if (m_frame->loader()->isLoadingMainResource() || !m_frame->page() || !m_frame->document())
- return;
+ ASSERT(m_frame->page());
+ ASSERT(m_frame->document());
// The parser is guaranteed to be released after this point. begin() would
// have to be called again before we can start writing more data.
private:
PassRefPtr<Document> createDocument(const KURL&);
void clear();
- void endIfNotLoadingMainResource();
Frame* m_frame;
, m_wasUnloadEventEmitted(false)
, m_pageDismissalEventBeingDispatched(NoDismissal)
, m_isComplete(false)
- , m_isLoadingMainResource(false)
, m_hasReceivedFirstData(false)
, m_needsClear(false)
, m_checkTimer(this, &FrameLoader::checkTimerFired)
}
m_isComplete = true; // to avoid calling completed() in finishedParsing()
- m_isLoadingMainResource = false;
m_didCallImplicitClose = true; // don't want that one either
if (m_frame->document() && m_frame->document()->parsing()) {
m_frame->editor()->clearLastEditCommand();
m_isComplete = false;
- m_isLoadingMainResource = true;
m_didCallImplicitClose = false;
// If we are still in the process of initializing an empty document then
m_needsClear = true;
m_isComplete = false;
m_didCallImplicitClose = false;
- m_isLoadingMainResource = true;
m_frame->document()->setReadyState(Document::Loading);
if (m_pendingStateObject) {
history()->restoreDocumentState();
}
-void FrameLoader::didEndDocument()
-{
- m_isLoadingMainResource = false;
-}
-
void FrameLoader::finishedParsing()
{
m_frame->injectUserScripts(InjectAtDocumentEnd);
void cancelAndClear();
void clear(bool clearWindowProperties = true, bool clearScriptObjects = true, bool clearFrameView = true);
- bool isLoadingMainResource() const { return m_isLoadingMainResource; }
bool isLoading() const;
bool frameHasLoaded() const;
// Callbacks from DocumentWriter
void didBeginDocument(bool dispatchWindowObjectAvailable);
- void didEndDocument();
void willSetEncoding();
void handledOnloadEvents();
bool m_wasUnloadEventEmitted;
PageDismissalType m_pageDismissalEventBeingDispatched;
bool m_isComplete;
- bool m_isLoadingMainResource;
RefPtr<SerializedScriptValue> m_pendingStateObject;