First swipe at resolving <rdar://problem/9125145> and https://bugs.webkit.org/show_bu...
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 May 2011 21:15:46 +0000 (21:15 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 May 2011 21:15:46 +0000 (21:15 +0000)
commit8d08488eb9cd54610b639e6b339777e14b1a7da5
tree5fa687bfefc5af6ecac2668c7ff6e68e1908c8d7
parent987199898dcd3f05bc5ffa3856a0f6c9d6dbf780
First swipe at resolving <rdar://problem/9125145> and https://bugs.webkit.org/show_bug.cgi?id=61494

Reviewed by Darin Adler.

Make the Document be intelligent about returning its DocumentLoader, including the possibility that
the DocumentLoader will be null.

No new tests. No change in behavior.

Instead of storing the DocumentLoader at construction and never changing it,
always calculate it based on the FrameLoader's current DocumentLoader:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::suggestedMIMEType):
(WebCore::Document::lastModified):
(WebCore::Document::initSecurityContext):
(WebCore::Document::updateURLForPushOrReplaceState):
(WebCore::Document::loader):
* dom/Document.h:

Null-check or ASSERT that the DocumentLoader exists (or both) depending on the scenario:
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::executeIfJavaScriptURL):
* html/MediaDocument.cpp:
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
* platform/mac/HTMLConverter.mm:
(fileWrapperForElement):

* WebCore.exp.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/bindings/ScriptControllerBase.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/html/MediaDocument.cpp
Source/WebCore/html/PluginDocument.cpp
Source/WebCore/platform/mac/HTMLConverter.mm