Files
cromite/build/patches/Disable-references-to-fonts.googleapis.com.patch
T

91 lines
4.7 KiB
Diff

From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sun, 15 Oct 2017 21:45:46 +0200
Subject: Disable references to fonts.googleapis.com
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
.../side_panel/read_anything/read_anything_toolbar.ts | 4 +---
.../content/browser/dom_distiller_viewer_source.cc | 2 +-
components/dom_distiller/core/html/dom_distiller_viewer.html | 2 --
components/dom_distiller/core/html/preview.html | 2 +-
.../dom_distiller/core/javascript/dom_distiller_viewer.js | 2 +-
.../crashpad/crashpad/doc/support/crashpad_doxygen.css | 3 +--
6 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.ts b/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.ts
--- a/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.ts
+++ b/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.ts
@@ -432,9 +432,7 @@ export class ReadAnythingToolbarElement extends ReadAnythingToolbarElementBase {
const link = document.createElement('link');
link.rel = 'preload';
link.as = 'style';
- link.href = 'https://fonts.googleapis.com/css?family=';
- link.href += chrome.readingMode.allFonts.join('|');
- link.href = link.href.replace(' ', '+');
+ this.setFontsLoaded();
link.addEventListener('load', () => {
link.media = 'all';
diff --git a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
--- a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
+++ b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
@@ -292,7 +292,7 @@ bool DomDistillerViewerSource::ShouldServiceRequest(
std::string DomDistillerViewerSource::GetContentSecurityPolicy(
network::mojom::CSPDirectiveName directive) {
if (directive == network::mojom::CSPDirectiveName::StyleSrc) {
- return "style-src 'self' https://fonts.googleapis.com;";
+ return "style-src 'self';";
} else if (directive == network::mojom::CSPDirectiveName::ChildSrc) {
return "child-src *;";
} else if (directive ==
diff --git a/components/dom_distiller/core/html/dom_distiller_viewer.html b/components/dom_distiller/core/html/dom_distiller_viewer.html
--- a/components/dom_distiller/core/html/dom_distiller_viewer.html
+++ b/components/dom_distiller/core/html/dom_distiller_viewer.html
@@ -12,8 +12,6 @@ found in the LICENSE file.
<!-- Placeholder for CSP. -->
$1
<title>$i18n{title}</title>
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
- rel="stylesheet">
<!-- Placeholder for CSS. -->
$2
</head>
diff --git a/components/dom_distiller/core/html/preview.html b/components/dom_distiller/core/html/preview.html
--- a/components/dom_distiller/core/html/preview.html
+++ b/components/dom_distiller/core/html/preview.html
@@ -11,7 +11,7 @@ found in the LICENSE file.
<meta name="theme-color" id="theme-color">
<title>Title goes here and it could be kind of lengthy - Publisher name</title>
<link href="../css/distilledpage.css" rel="stylesheet" type="text/css">
- <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
+ <link href='chrome://resources/css/roboto.css' rel='stylesheet' type='text/css'>
<style>
.english :lang(th) {display: none}
.english :lang(zh) {display: none}
diff --git a/components/dom_distiller/core/javascript/dom_distiller_viewer.js b/components/dom_distiller/core/javascript/dom_distiller_viewer.js
--- a/components/dom_distiller/core/javascript/dom_distiller_viewer.js
+++ b/components/dom_distiller/core/javascript/dom_distiller_viewer.js
@@ -109,7 +109,7 @@ function maybeSetWebFont() {
}
const e = document.createElement('link');
- e.href = 'https://fonts.googleapis.com/css?family=Roboto';
+ e.href = 'chrome://resources/css/roboto.css';
e.rel = 'stylesheet';
e.type = 'text/css';
document.head.appendChild(e);
diff --git a/third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css b/third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css
--- a/third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css
+++ b/third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css
@@ -12,8 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License. */
-@import "https://fonts.googleapis.com/css?family=Open+Sans:300,400,700&subset=latin,cyrillic-ext,greek-ext,cyrillic,greek,vietnamese,latin-ext";
-@import "https://fonts.googleapis.com/css?family=Source+Code+Pro";
+@import "chrome://resources/css/roboto.css";
body,
table,
--