Index: Source/core/page/CreateWindow.cpp |
diff --git a/Source/core/page/CreateWindow.cpp b/Source/core/page/CreateWindow.cpp |
index 1a76d5740f7b092ad79f05452b9067862089628f..76cbce4fa76cdc4c260a246909ce9d8b534f12ef 100644 |
--- a/Source/core/page/CreateWindow.cpp |
+++ b/Source/core/page/CreateWindow.cpp |
@@ -30,6 +30,7 @@ |
#include "core/dom/Document.h" |
#include "core/frame/Frame.h" |
#include "core/loader/FrameLoadRequest.h" |
+#include "core/loader/NavigationPolicy.h" |
#include "core/page/Chrome.h" |
#include "core/page/ChromeClient.h" |
#include "core/page/Page.h" |
@@ -73,7 +74,13 @@ static Frame* createWindow(Frame* openerFrame, Frame* lookupFrame, const FrameLo |
if (!oldPage) |
return 0; |
- Page* page = oldPage->chrome().client().createWindow(openerFrame, request, features, policy, shouldSendReferrer); |
+ NavigationPolicy navigationPolicy = NavigationPolicyIgnore; |
+ for (size_t i = 0; i < features.additionalFeatures.size(); ++i) { |
+ if (features.additionalFeatures[i].lower() == "presentation") |
+ navigationPolicy = NavigationPolicyPresentationWindow; |
+ } |
+ Page* page = oldPage->chrome().client().createWindow(openerFrame, request, features, navigationPolicy, shouldSendReferrer); |
+ |
if (!page) |
return 0; |
@@ -106,7 +113,7 @@ static Frame* createWindow(Frame* openerFrame, Frame* lookupFrame, const FrameLo |
FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect); |
page->chrome().setWindowRect(newWindowRect); |
- page->chrome().show(policy); |
+ page->chrome().show(navigationPolicy); |
created = true; |
return frame; |