Commit 3229bc0e authored by Mason Freed's avatar Mason Freed Committed by Commit Bot

Remove HTMLImportsOnlyChromeEnabled flag

This flag was disabled by default, but was always enabled when
the HTMLImports flag was enabled. It therefore served no purpose,
other than as a plan for future internal Chromium features that
still depended on HTML Imports. There are places in code that
still require HTML Imports, but those directly enable the
HTMLImports flag, such as [1]. Removing this flag simplifies
the process of understanding what is using HTML Imports.

Bug: 911943
Change-Id: I89ed53a83e414c2d549c0056600a8583d820c873
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879950
Commit-Queue: Mason Freed <masonfreed@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Auto-Submit: Mason Freed <masonfreed@chromium.org>
Reviewed-by: default avatarYoav Weiss <yoavweiss@chromium.org>
Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709250}
parent a4965c92
......@@ -177,22 +177,10 @@ LinkResource* HTMLLinkElement::LinkResourceToProcess() {
if (!link_) {
if (rel_attribute_.IsImport()) {
// Only create an import link when HTML imports are enabled. Either:
// 1) For chrome internal resources only, if HTMLImportsOnlyChromeEnabled.
// 2) The WebComponentsV0 origin trial is enabled.
bool imports_enabled =
RuntimeEnabledFeatures::HTMLImportsOnlyChromeEnabled() &&
(Href().Protocol() == "chrome" ||
Href().Protocol() == "chrome-extension");
if (!imports_enabled) {
imports_enabled =
RuntimeEnabledFeatures::HTMLImportsEnabled(&GetDocument());
}
if (imports_enabled) {
link_ = MakeGarbageCollected<LinkImport>(this);
} else {
// Only create an import link when HTML imports are enabled.
if (!RuntimeEnabledFeatures::HTMLImportsEnabled(&GetDocument()))
return nullptr;
}
link_ = MakeGarbageCollected<LinkImport>(this);
} else if (rel_attribute_.IsManifest()) {
link_ = MakeGarbageCollected<LinkManifest>(this);
} else {
......
......@@ -647,7 +647,6 @@ void WebRuntimeFeatures::EnableCustomElementsV0(bool enable) {
void WebRuntimeFeatures::EnableHTMLImports(bool enable) {
RuntimeEnabledFeatures::SetHTMLImportsEnabled(enable);
RuntimeEnabledFeatures::SetHTMLImportsOnlyChromeEnabled(enable);
}
void WebRuntimeFeatures::EnableSignedExchangePrefetchCacheForNavigations(
......
......@@ -757,10 +757,6 @@
origin_trial_feature_name: "WebComponentsV0",
status: "stable",
},
// Allow import only chrome internal resources.
{
name: "HTMLImportsOnlyChrome",
},
{
name: "IDBObserver",
status: "experimental",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment