Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1162)

Unified Diff: third_party/WebKit/Source/core/page/WindowFeatures.cpp

Issue 1459603002: Implement the 'noopener' window feature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nasko Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/page/WindowFeatures.cpp
diff --git a/third_party/WebKit/Source/core/page/WindowFeatures.cpp b/third_party/WebKit/Source/core/page/WindowFeatures.cpp
index ff1bcfb88e1e36e9445fa8c1146217a8b9cde047..bc3684bd5873affa4a8f58957c12d67437afca5a 100644
--- a/third_party/WebKit/Source/core/page/WindowFeatures.cpp
+++ b/third_party/WebKit/Source/core/page/WindowFeatures.cpp
@@ -48,6 +48,7 @@ WindowFeatures::WindowFeatures(const String& features)
, resizable(true)
, fullscreen(false)
, dialog(false)
+ , noopener(false)
{
/*
The IE rule is: all features except for channelmode and fullscreen default to YES, but
@@ -120,6 +121,7 @@ WindowFeatures::WindowFeatures(const String& features)
String keyString(buffer.substring(keyBegin, keyEnd - keyBegin));
String valueString(buffer.substring(valueBegin, valueEnd - valueBegin));
+
setWindowFeature(keyString, valueString);
}
}
@@ -161,6 +163,8 @@ void WindowFeatures::setWindowFeature(const String& keyString, const String& val
fullscreen = value;
} else if (keyString == "scrollbars") {
scrollbarsVisible = value;
+ } else if (keyString == "noopener") {
+ noopener = true;
} else if (value == 1) {
additionalFeatures.append(keyString);
}
@@ -174,6 +178,7 @@ WindowFeatures::WindowFeatures(const String& dialogFeaturesString, const IntRect
, locationBarVisible(false)
, fullscreen(false)
, dialog(true)
+ , noopener(false)
{
DialogFeaturesMap features;
parseDialogFeatures(dialogFeaturesString, features);
« no previous file with comments | « third_party/WebKit/Source/core/page/WindowFeatures.h ('k') | third_party/WebKit/Source/core/page/WindowFeaturesTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698