summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/generated_resources.grd6
-rw-r--r--chrome/browser/about_flags.cc7
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc1
-rw-r--r--content/public/common/content_switches.cc3
-rw-r--r--content/public/common/content_switches.h1
-rw-r--r--content/renderer/render_thread_impl.cc3
6 files changed, 21 insertions, 0 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 0bf721b..c8a7bbd 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -5120,6 +5120,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_SHADOW_DOM_DESCRIPTION" desc="Description for the flag to enable Shadow DOM.">
This API allows web applications to use Web Components.
</message>
+ <message name="IDS_FLAGS_STYLE_SCOPED_NAME" desc="Name for the flag to enable &lt;style scoped&gt;.">
+ Enable &lt;style scoped&gt;.
+ </message>
+ <message name="IDS_FLAGS_STYLE_SCOPED_DESCRIPTION" desc="Description for the flag to enable &lt;style scoped&gt;.">
+ Honor the 'scoped' attribute in &amp;lt;style&amp;gt; elements.
+ </message>
<message name="IDS_FLAGS_WEBUI_TASK_MANAGER_NAME" desc="Title for the flag to use the WebUI task manager.">
Enable experimental task manager.
</message>
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 722d8a7..f0ec9dd 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -573,6 +573,13 @@ const Experiment kExperiments[] = {
SINGLE_VALUE_TYPE(switches::kEnableShadowDOM)
},
{
+ "enable-style-scoped",
+ IDS_FLAGS_STYLE_SCOPED_NAME,
+ IDS_FLAGS_STYLE_SCOPED_DESCRIPTION,
+ kOsAll,
+ SINGLE_VALUE_TYPE(switches::kEnableStyleScoped)
+ },
+ {
"ntp-app-install-hint",
IDS_FLAGS_APP_INSTALL_HINT_NAME,
IDS_FLAGS_APP_INSTALL_HINT_DESCRIPTION,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 34901fe..d78bf2e 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -677,6 +677,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kEnableMediaStream,
switches::kEnableShadowDOM,
switches::kEnableStrictSiteIsolation,
+ switches::kEnableStyleScoped,
switches::kDisableFullScreen,
switches::kEnablePepperTesting,
switches::kEnablePointerLock,
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index 9769372..e26f376 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -298,6 +298,9 @@ const char kEnableSeccompSandbox[] = "enable-seccomp-sandbox";
// Enable shadow DOM API
const char kEnableShadowDOM[] = "enable-shadow-dom";
+// Enable <style scoped>
+const char kEnableStyleScoped[] = "enable-style-scoped";
+
// On platforms that support it, enables smooth scroll animation.
const char kEnableSmoothScrolling[] = "enable-smooth-scrolling";
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index 4b59849..943da1a 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -100,6 +100,7 @@ extern const char kEnableSSLCachedInfo[];
extern const char kEnableSandboxLogging[];
extern const char kEnableSeccompSandbox[];
extern const char kEnableShadowDOM[];
+extern const char kEnableStyleScoped[];
CONTENT_EXPORT extern const char kEnableSmoothScrolling[];
CONTENT_EXPORT extern const char kEnableStatsTable[];
extern const char kEnableStrictSiteIsolation[];
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 04bb0d9..5d4e77b 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -565,6 +565,9 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
WebRuntimeFeatures::enableShadowDOM(
command_line.HasSwitch(switches::kEnableShadowDOM));
+ WebRuntimeFeatures::enableStyleScoped(
+ command_line.HasSwitch(switches::kEnableStyleScoped));
+
FOR_EACH_OBSERVER(RenderProcessObserver, observers_, WebKitInitialized());
if (content::GetContentClient()->renderer()->