haikuwebkit/LayoutTests/fast/loader/iframe-meta-refresh-base-bl...

15 lines
276 B
HTML
Raw Permalink Normal View History

REGRESSION (r183498): Certain types of frame loads in iframes with <base target="_blank"> can open urls in new window/tabs https://bugs.webkit.org/show_bug.cgi?id=145580 Reviewed by Mark Lam. Source/WebCore: Tests: fast/loader/fragment-navigation-base-blank.html fast/loader/iframe-meta-refresh-base-blank.html fast/loader/iframe-set-location-base-blank.html fast/loader/refresh-iframe-base-blank.html Before 183498, callers of FrameLoader::changeLocation() got automatically assigned a frame name of "_self". After 183498, many remained without a frame name. Later on, FrameLoader applies the <base> target as their frame name if they don't already have one. When the <base> target is "_blank", that causes a new window/tab. Restoring "_self" to these call sites fixes this. * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::openInNewTab): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::navigate): * loader/FrameLoadRequest.h: (WebCore::FrameLoadRequest::FrameLoadRequest): * loader/NavigationScheduler.cpp: (WebCore::NavigationScheduler::scheduleLocationChange): * page/DOMWindow.cpp: (WebCore::DOMWindow::createWindow): Tools: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didSameDocumentNavigationForFrame): Implement the dump for "didChangeLocationWithinPageForFrame" LayoutTests: * fast/loader/fragment-navigation-base-blank-expected.txt: Added. * fast/loader/fragment-navigation-base-blank.html: Added. * fast/loader/iframe-meta-refresh-base-blank-expected.txt: Added. * fast/loader/iframe-meta-refresh-base-blank.html: Added. * fast/loader/iframe-set-location-base-blank-expected.txt: Added. * fast/loader/iframe-set-location-base-blank.html: Added. * fast/loader/refresh-iframe-base-blank-expected.txt: Added. * fast/loader/refresh-iframe-base-blank.html: Added. * fast/loader/resources/fragment-navigation-base-blank.html: Added. * fast/loader/resources/iframe-meta-refresh-base-blank.html: Added. * fast/loader/resources/iframe-set-location-base-blank.html: Added. * fast/loader/resources/notify-done-with-window-count.html: Added. * fast/loader/resources/refresh-iframe-base-blank-frame.html: Added. Canonical link: https://commits.webkit.org/163639@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185155 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-06-03 17:33:16 +00:00
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
testRunner.setCanOpenWindows(true);
testRunner.dumpFrameLoadCallbacks();
}
</script>
<body>
<iframe src="resources/iframe-meta-refresh-base-blank.html"></iframe>
</body>