2 <html i18n-values=
"dir:textdirection">
4 <meta name=
"viewport" content=
"width=device-width, initial-scale=1.0,
5 maximum-scale=1.0, user-scalable=no">
6 <title i18n-content=
"title">
11 background-color: #E6E6E6;
12 font-family: Helvetica, Arial, sans-serif;
14 margin:
50px
40px
20px
40px;
24 /* Don't use the main frame div when the error is in a subframe. */
25 html[subframe] #main-frame-error {
29 /* Don't use the subframe error div when the error is in a main frame. */
30 html:not([subframe]) #sub-frame-error {
35 background-color: #fbfbfb;
36 border:
1px solid #AAA;
37 border-bottom:
1px solid #
888;
40 <if expr=
"not is_android and not pp_ifdef('ios')">
41 /* Not done on mobile for performance reasons. */
42 box-shadow:
0px
2px
2px #AAA;
49 -webkit-margin-start:
0px;
54 margin:
10px
0px
25px
0px;
61 text-decoration: none;
65 -webkit-user-select: none;
70 * Can't access chrome://theme/IDR_ERROR_NETWORK_GENERIC from an untrusted
71 * renderer process, so embed the resource manually.
73 content: -webkit-image-set(
74 url('../../app/theme/default_100_percent/common/error_network_generic.png')
1x,
75 url('../../app/theme/default_200_percent/common/error_network_generic.png')
2x);
79 content: -webkit-image-set(
80 url('../../app/theme/default_100_percent/common/error_network_offline.png')
1x,
81 url('../../app/theme/default_200_percent/common/error_network_offline.png')
2x);
85 margin:
20px
20px
20px
25px;
90 -webkit-transition: height ease-in
218ms;
94 background-color: #f9f9f9;
95 border-top:
1px solid #EEE;
105 #sub-frame-error-details {
107 <if expr=
"not is_android and not pp_ifdef('ios')">
108 /* Not done on mobile for performance reasons. */
109 text-shadow:
0 1px
0 rgba(
255,
255,
255,
0.3);
113 [jscontent=failedUrl] {
114 overflow-wrap: break-word;
118 border:
1px solid rgba(
0,
0,
0,
0.25);
124 -webkit-user-select: none;
126 <if expr=
"not is_android">
127 /* iOS does not support linear-gradient without a prefix. */
128 background-image: -webkit-linear-gradient(#ededed, #ededed
38%, #dedede);
129 text-shadow:
0 1px
0 rgb(
240,
240,
240);
131 <if expr=
"is_android">
132 /* Android uses flat background colors. */
133 background-color: #ededed;
136 <if expr=
"not is_android and not pp_ifdef('ios')">
137 /* Not done on mobile for performance reasons. */
138 box-shadow:
0 1px
0 rgba(
0,
0,
0,
0.08), inset
0 1px
2px rgba(
255,
255,
255,
0.75);
143 border:
1px solid rgba(
0,
0,
0,
0.3);
145 <if expr=
"not is_android">
146 background-image: -webkit-linear-gradient(#f0f0f0, #f0f0f0
38%, #e0e0e0);
148 <if expr=
"is_android">
149 background-color: #f0f0f0;
151 <if expr=
"not is_android and not pp_ifdef('ios')">
152 box-shadow:
0 1px
0 rgba(
0,
0,
0,
0.12), inset
0 1px
2px rgba(
255,
255,
255,
0.95);
157 border:
1px solid rgba(
0,
0,
0,
0.3);
159 <if expr=
"not is_android">
160 background-image: -webkit-linear-gradient(#e7e7e7, #e7e7e7
38%, #d7d7d7);
162 <if expr=
"is_android">
163 background-color: #e7e7e7;
165 <if expr=
"not is_android and not pp_ifdef('ios')">
172 <if expr=
"not is_android">
173 background-image: -webkit-linear-gradient(#
5d9aff, #
5d9aff
38%, #
5891f0);
174 border:
1px solid rgba(
45,
102,
195,
1);
175 text-shadow:
0 1px
0 rgba(
0,
0,
0,
0.5);
177 <if expr=
"is_android">
178 background-color: rgb(
39,
180,
231);
179 border:
1px solid rgb(
0,
152,
206);
181 <if expr=
"not is_android and not pp_ifdef('ios')">
182 box-shadow:
0 1px
0 rgba(
0,
0,
0,
0.15), inset
0 1px
2px rgba(
255,
255,
255,
0.2);
186 #reload-button:hover {
187 <if expr=
"not is_android">
188 background-image: -webkit-linear-gradient(#
659efd, #
659efd
38%, #
6097f1);
189 border:
1px solid rgba(
45,
102,
195,
1);
191 <if expr=
"not is_android and not pp_ifdef('ios')">
192 box-shadow:
0 1px
0 rgba(
0,
0,
0,
0.25), inset
0 1px
2px rgba(
255,
255,
255,
0.2);
196 #reload-button:active {
197 <if expr=
"not is_android">
198 background-image: -webkit-linear-gradient(#
6095ed, #
6095ed
38%, #
6095ed);
199 border:
1px solid rgb(
38,
84,
160);
201 <if expr=
"is_android">
202 background-color: rgb(
0,
152,
206);
204 <if expr=
"not is_android and not pp_ifdef('ios')">
205 box-shadow: inset
0 1px
1px rgba(
0,
0,
0,
0.1);
231 /* Increase line height at higher resolutions. */
232 @media (min-width:
641px) and (min-height:
641px) {
238 /* Decrease padding at low sizes. */
239 @media (max-width:
640px), (max-height:
640px) {
244 margin:
10px
0px
15px
0px;
263 /* Don't allow overflow when in a subframe. */
264 html[subframe] body {
269 -webkit-align-items: center;
270 background-color: #DDD;
271 display: -webkit-flex;
272 -webkit-flex-flow: column;
274 -webkit-justify-content: center;
281 #sub-frame-error:hover {
282 background-color: #EEE;
285 #sub-frame-error-details {
290 /* Show details only when hovering. */
291 #sub-frame-error:hover #sub-frame-error-details {
295 /* If the iframe is too small, always hide the error code. */
296 /* TODO(mmenke): See if overflow: no-display works better, once supported. */
297 @media (max-width:
200px), (max-height:
95px) {
298 #sub-frame-error-details {
308 function toggleHelpBox() {
309 var helpBoxOuter
= document
.getElementById('help-box-outer');
310 helpBoxOuter
.classList
.toggle('hidden');
311 var moreLessButton
= document
.getElementById('more-less-button');
312 if (helpBoxOuter
.classList
.contains('hidden')) {
313 moreLessButton
.innerText
= moreLessButton
.moreText
;
315 moreLessButton
.innerText
= moreLessButton
.lessText
;
319 function diagnoseErrors() {
320 var extension_id
= "idddmepepmjcgiedknnmlbadcokidhoa";
321 var diagnose_frame
= document
.getElementById('diagnose-frame');
322 diagnose_frame
.innerHTML
=
323 '<iframe src="chrome-extension://' + extension_id
+
324 '/index.html"></iframe>';
328 // Subframes use a different layout but the same html file. This is to make it
329 // easier to support platforms that load the error page via different
330 // mechanisms (Currently just iOS).
331 if (window
.top
.location
!= window
.location
)
332 document
.documentElement
.setAttribute('subframe', '');
334 function updateForDnsProbe(strings
) {
335 var context
= new JsEvalContext(strings
);
336 jstProcess(context
, document
.getElementById('help-box-outer'));
337 jstProcess(context
, document
.getElementById('details'));
340 <if expr
="is_macosx or is_linux or is_android">
341 //Re-orders buttons. Used on Mac, Linux, and Android, where reload should go on the right.
342 function swapButtonOrder() {
343 reloadButton
= document
.getElementById('reload-button');
344 moreLessButton
= document
.getElementById('more-less-button');
345 reloadButton
.parentNode
.insertBefore(moreLessButton
, reloadButton
);
347 document
.addEventListener("DOMContentLoaded", swapButtonOrder
);
353 <div id=
"main-frame-error">
355 <div id=
"content-top">
357 <div><img class=
"icon" jseval=
"this.classList.add(iconClass)"></div>
358 <span i18n-content=
"heading"></span>
361 <button id=
"reload-button" onclick=
"location = this.url" jsselect=
"reload" jsvalues=
".url:reloadUrl" jscontent=
"msg"></button>
362 <button id=
"more-less-button" onclick=
"toggleHelpBox()" jsdisplay=
"more" jsvalues=
".moreText:more; .lessText:less;" jscontent=
"more"></button>
365 <!-- Outer and inner divs are needed both for margins and sizing. -->
366 <div id=
"help-box-outer" class=
"hidden">
367 <div id=
"help-box-inner">
368 <div jsselect=
"summary">
369 <span jsvalues=
".innerHTML:msg"></span>
372 <div class=
"suggestions" jsselect=
"suggestions">
373 <div class=
"suggestion-header" jsvalues=
".innerHTML:header"></div>
374 <div class=
"suggestion-body" jsvalues=
".innerHTML:body"></div>
376 <button id=
"diagnose-button" onclick=
"diagnoseErrors()"
377 jscontent=
"diagnose" jsdisplay=
"diagnose"></button>
378 <div id=
"diagnose-frame" class=
"hidden"></div>
379 <div class=
"error-code" jscontent=
"errorCode"></div>
384 <div id=
"sub-frame-error">
385 <!-- Show details when hovering over the icon, in case the details are
386 hidden because they're too large. -->
387 <img class=
"icon" jseval=
"this.classList.add(iconClass)" jsvalues=
".title:errorDetails">
388 <div id=
"sub-frame-error-details" jsvalues=
".innerHTML:errorDetails"></div>