-
japhet@chromium.org authored
https://bugs.webkit.org/show_bug.cgi?id=101512 Reviewed by Adam Barth. Source/WebCore: No new tests, though several outputs changed because we no longer send resource load callbacks for empty loads. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): (WebCore::DocumentLoader::~DocumentLoader): (WebCore::DocumentLoader::finishedLoading): (WebCore::DocumentLoader::commitData): (WebCore::DocumentLoader::clearMainResourceLoader): (WebCore::DocumentLoader::isLoadingInAPISense): (WebCore::DocumentLoader::documentURL): (WebCore::DocumentLoader::isLoadingMainResource): (WebCore::DocumentLoader::maybeLoadEmpty): (WebCore): (WebCore::DocumentLoader::startLoadingMainResource): Handle empty main resource loads directly here. * loader/DocumentLoader.h: (WebCore::DocumentLoader::serverRedirectSourceForHistory): (DocumentLoader): * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): Initialize some variables whose values were previously being reset in init(). Given that the FrameLoader is in an inconsistent state before init() is called anyway, there doesn't seem to be a disadvantage to just initializing them to their post-init() values. (WebCore::FrameLoader::init): Just call startLoadingMainResource(), instead of doing a bunch of direct calls to functions FrameLoader shouldn't know about. * loader/FrameLoaderStateMachine.cpp: (WebCore::FrameLoaderStateMachine::FrameLoaderStateMachine): * loader/FrameLoaderStateMachine.h: * loader/MainResourceLoader.cpp: Throughout, remove the concept of an empty load. (WebCore::MainResourceLoader::loadNow): This only returned true when an empty load got deferred, which won't happen now. Return void and always treat as returning false. * loader/MainResourceLoader.h: (MainResourceLoader): Tools: * DumpRenderTree/chromium/WebViewHost.cpp: (WebViewHost::updateForCommittedLoad): This function doesn't play nicely with empty urls and incorrectly interprets them as a non-empty load. This change is required for http/tests/navigation/new-window-redirect-history.html to continue to pass in chromium. * TestWebKitAPI/Tests/WebKit2/AboutBlankLoad.cpp: This test relies on a callback that no longer is sent for about:blank loads. Hook into didFinishLoadForFrame() instead. (TestWebKitAPI::didFinishLoadForFrame): (TestWebKitAPI::TEST): LayoutTests: Don't expect resource load callbacks for empty loads. * http/tests/inspector/network/network-iframe-load-and-delete.html: * http/tests/loading/redirect-methods-expected.txt: * http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt: * http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt: * http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ce6c1baa