Files
gerrit/polygerrit-ui/app/index.html
Gert van Dijk 4262fdcf8c Perform fonts preloads in "anonymous" cross-origin mode
Rationale on why preloading fonts should be preloaded with the crossorigin
attribute set to "anonymous":
  https://drafts.csswg.org/css-fonts/#font-fetching-requirements
as referenced via
  https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content#Cross-origin_fetches

The latter explains that it should be set explicitly when preloading them
- which is what this change adds.

Requested on the mailing list:
https://groups.google.com/d/msg/repo-discuss/OR07NEaqHBk/ZhuBPa2YCAAJ

Bug: Issue 9483
Change-Id: I8acbdc7c038d740b6f20d8bc3825ae4d1e70a25a
2018-07-26 01:00:21 +02:00

49 lines
2.3 KiB
HTML

<!DOCTYPE html>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html lang="en">
<meta charset="utf-8">
<meta name="description" content="Gerrit Code Review">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<!--
RobotoMono fonts are used in styles/fonts.css
@see https://github.com/w3c/preload/issues/32 regarding crossorigin
-->
<link rel="preload" href="/fonts/RobotoMono-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="/fonts/RobotoMono-Regular.woff" as="font" type="font/woff" crossorigin="anonymous">
<link rel="preload" href="/fonts/Roboto-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="/fonts/Roboto-Regular.woff" as="font" type="font/woff" crossorigin="anonymous">
<link rel="preload" href="/fonts/Roboto-Medium.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="/fonts/Roboto-Medium.woff" as="font" type="font/woff" crossorigin="anonymous">
<link rel="stylesheet" href="/styles/fonts.css">
<link rel="stylesheet" href="/styles/main.css">
<script src="/bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<!--
- Content between webcomponents-lite and the load of the main app element
- run before polymer-resin is installed so may have security consequences.
- Contact your local security engineer if you have any questions, and
- CC them on any changes that load content before gr-app.html.
-
- github.com/Polymer/polymer-resin/blob/master/getting-started.md#integrating
-->
<link rel="preload" href="/elements/gr-app.js" as="script" crossorigin="anonymous">
<link rel="import" href="/elements/gr-app.html">
<body unresolved>
<gr-app id="app"></gr-app>