From ae71cf3df139bd1373b60effc23e5715094a922a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 7 Jun 2016 13:42:42 -0700 Subject: [PATCH] Add disableBlinkFeatures option --- atom/browser/web_contents_preferences.cc | 7 +++++++ atom/common/options_switches.cc | 3 +++ atom/common/options_switches.h | 1 + 3 files changed, 11 insertions(+) diff --git a/atom/browser/web_contents_preferences.cc b/atom/browser/web_contents_preferences.cc index a32e23de68f5..8a7eee09201f 100644 --- a/atom/browser/web_contents_preferences.cc +++ b/atom/browser/web_contents_preferences.cc @@ -166,6 +166,13 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches( command_line->AppendSwitchASCII(::switches::kEnableBlinkFeatures, blink_features); + // Disable blink features. + std::string disable_blink_features; + if (web_preferences.GetString(options::kDisableBlinkFeatures, + &disable_blink_features)) + command_line->AppendSwitchASCII(::switches::kDisableBlinkFeatures, + disable_blink_features); + // The initial visibility state. NativeWindow* window = NativeWindow::FromWebContents(web_contents); diff --git a/atom/common/options_switches.cc b/atom/common/options_switches.cc index de130eee13eb..2447d7324b99 100644 --- a/atom/common/options_switches.cc +++ b/atom/common/options_switches.cc @@ -109,6 +109,9 @@ const char kScrollBounce[] = "scrollBounce"; // Enable blink features. const char kBlinkFeatures[] = "blinkFeatures"; +// Disable blink features. +const char kDisableBlinkFeatures[] = "disableBlinkFeatures"; + } // namespace options namespace switches { diff --git a/atom/common/options_switches.h b/atom/common/options_switches.h index fadde79f18c8..0f75e56dcb30 100644 --- a/atom/common/options_switches.h +++ b/atom/common/options_switches.h @@ -58,6 +58,7 @@ extern const char kExperimentalCanvasFeatures[]; extern const char kOpenerID[]; extern const char kScrollBounce[]; extern const char kBlinkFeatures[]; +extern const char kDisableBlinkFeatures[]; } // namespace options