Commit af141058 authored by Jun Kokatsu's avatar Jun Kokatsu Committed by Commit Bot

Move style addition to top of head tag in incognito NTP

Link tag modification that was moved down to body tag in
crrev.com/c/2239707, which caused a blink when opening incognito NTP.
This change move the code on top of head tag so that the blink won't
happen.

Bug: 1105744
Change-Id: I1bfb583208767e86058f77fd1757e4bd2eaad26d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2300278
Commit-Queue: Jun Kokatsu <Jun.Kokatsu@microsoft.com>
Commit-Queue: Evan Stade <estade@chromium.org>
Auto-Submit: Jun Kokatsu <Jun.Kokatsu@microsoft.com>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788804}
parent 82044381
...@@ -8,9 +8,15 @@ ...@@ -8,9 +8,15 @@
<meta charset="utf-8"> <meta charset="utf-8">
<title>$i18n{title}</title> <title>$i18n{title}</title>
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<link id="incognitothemecss" rel="stylesheet">
<script src="chrome://resources/js/util.js"></script>
<script>
// Until themes can clear the cache, force-reload the theme stylesheet.
$('incognitothemecss').href =
'chrome://theme/css/incognito_tab_theme.css?' + Date.now();
</script>
<link rel="stylesheet" href="chrome://resources/css/text_defaults_md.css"> <link rel="stylesheet" href="chrome://resources/css/text_defaults_md.css">
<link rel="stylesheet" href="incognito_tab.css"> <link rel="stylesheet" href="incognito_tab.css">
<link id="incognitothemecss" rel="stylesheet">
</head> </head>
<body> <body>
<div class="content"> <div class="content">
...@@ -43,12 +49,6 @@ ...@@ -43,12 +49,6 @@
<a class="learn-more-button" href="$i18n{learnMoreLink}">$i18n{learnMore}</a> <a class="learn-more-button" href="$i18n{learnMoreLink}">$i18n{learnMore}</a>
</div> </div>
<script src="chrome://resources/js/cr.js"></script> <script src="chrome://resources/js/cr.js"></script>
<script src="chrome://resources/js/util.js"></script>
<script>
// Until themes can clear the cache, force-reload the theme stylesheet.
$('incognitothemecss').href =
'chrome://theme/css/incognito_tab_theme.css?' + Date.now();
</script>
<script src="incognito_tab.js"></script> <script src="incognito_tab.js"></script>
<!-- Lazy-load cr_elements to avoid performance penalty introduced by loading Polymer --> <!-- Lazy-load cr_elements to avoid performance penalty introduced by loading Polymer -->
<script type="module" src="chrome://resources/cr_elements/cr_toggle/cr_toggle.m.js" async></script> <script type="module" src="chrome://resources/cr_elements/cr_toggle/cr_toggle.m.js" async></script>
......
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