Skip to content
  • beidson@apple.com's avatar
    First swipe at resolving <rdar://problem/9125145> and https://bugs.webkit.org/show_bug.cgi?id=61494 · fdf7571f
    beidson@apple.com authored
            
    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: http://svn.webkit.org/repository/webkit/trunk@87566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    fdf7571f