Commit 1fc94ce9 authored by Mason Freed's avatar Mason Freed Committed by Commit Bot

Remove polyfill check for html imports in WebUI

WebUI is in the process of upgrading to Polymer 3. In the
meantime, the Web Components APIs (particularly HTML Imports)
will be auto-re-enabled for WebUI pages, so that the existing
Polymer 2 code continues to function. A v0 polyfill was
previously being used to ensure compatibility on some pages,
but that approach has been abandoned in favor of a full
upgrade to P3. So the can_use_polyfill check can be
eliminated, and instead rely on the re-enabled features for
all WebUI pages.

Bug: 911943, 965770
Change-Id: Icd3a0d768c64d3e8b81cb89885872fcd67a875ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869622
Commit-Queue: Mason Freed <masonfreed@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Auto-Submit: Mason Freed <masonfreed@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707605}
parent 1b166df5
......@@ -39,7 +39,6 @@
#include "chrome/common/secure_origin_whitelist.h"
#include "chrome/common/thread_profiler.h"
#include "chrome/common/url_constants.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/renderer_resources.h"
......@@ -1572,14 +1571,5 @@ void ChromeContentRendererClient::DidSetUserAgent(
}
bool ChromeContentRendererClient::RequiresHtmlImports(const GURL& url) {
// Chrome Web UI pages are in the process of being migrated to use the HTML
// Imports Polyfill so that they will not require native imports. Return true
// for only pages that have not been updated yet. See
// https://crbug.com/937747.
bool can_use_polyfill = url.host() == chrome::kChromeUIExtensionsHost ||
url.host() == chrome::kChromeUIDownloadsHost;
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
can_use_polyfill |= url.host() == chrome::kChromeUIPrintHost;
#endif
return url.SchemeIs(content::kChromeUIScheme) && !can_use_polyfill;
return url.SchemeIs(content::kChromeUIScheme);
}
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