Skip to content

Commit be1eb3c

Browse files
committed
Bug 1857999: Move XML stylesheet processing instructions to link elements. r=Gijs,webdriver-reviewers,settings-reviewers,application-update-reviewers,devtools-reviewers,places-reviewers,Standard8,whimboo,bytesized,ochameau
The result of running the automated script available at https://github.com/Mossop/depi Differential Revision: https://phabricator.services.mozilla.com/D190681
1 parent e9df606 commit be1eb3c

File tree

75 files changed

+558
-272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+558
-272
lines changed

browser/base/content/aboutDialog.xhtml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
# License, v. 2.0. If a copy of the MPL was not distributed with this
55
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
66

7-
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
8-
<?xml-stylesheet href="chrome://browser/content/aboutDialog.css" type="text/css"?>
9-
<?xml-stylesheet href="chrome://branding/content/aboutDialog.css" type="text/css"?>
10-
117
<window xmlns:html="http://www.w3.org/1999/xhtml"
128
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
139
id="aboutDialog"
@@ -28,6 +24,16 @@
2824
#endif
2925

3026
<linkset>
27+
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
28+
<html:link
29+
rel="stylesheet"
30+
href="chrome://browser/content/aboutDialog.css"
31+
/>
32+
<html:link
33+
rel="stylesheet"
34+
href="chrome://branding/content/aboutDialog.css"
35+
/>
36+
3137
<html:link rel="localization" href="branding/brand.ftl"/>
3238
<html:link rel="localization" href="browser/aboutDialog.ftl"/>
3339
</linkset>

browser/base/content/browser.xhtml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,10 @@
99
<!-- The "global.css" stylesheet is imported first to allow other stylesheets to
1010
override rules using selectors with the same specificity. This applies to
1111
both "content" and "skin" packages, which bug 1385444 will unify later. -->
12-
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
1312

1413
<!-- While these stylesheets are defined in Toolkit, they are only used in the
1514
main browser window, so we can load them here. Bug 1474241 is on file to
1615
consider moving these widgets to the "browser" folder. -->
17-
<?xml-stylesheet href="chrome://global/content/tabprompts.css" type="text/css"?>
18-
<?xml-stylesheet href="chrome://global/skin/tabprompts.css" type="text/css"?>
19-
20-
<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
21-
<?xml-stylesheet href="chrome://browser/content/tabbrowser.css" type="text/css"?>
22-
<?xml-stylesheet href="chrome://browser/content/downloads/downloads.css" type="text/css"?>
23-
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
24-
<?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?>
25-
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
26-
27-
<?xml-stylesheet href="chrome://browser/skin/controlcenter/panel.css" type="text/css"?>
28-
<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUI.css" type="text/css"?>
29-
<?xml-stylesheet href="chrome://browser/skin/downloads/downloads.css" type="text/css"?>
30-
<?xml-stylesheet href="chrome://browser/skin/searchbar.css" type="text/css"?>
31-
<?xml-stylesheet href="chrome://browser/skin/translations/panel.css" type="text/css"?>
32-
<?xml-stylesheet href="chrome://browser/skin/places/tree-icons.css" type="text/css"?>
33-
<?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css" type="text/css"?>
3416

3517
<html id="main-window"
3618
xmlns:html="http://www.w3.org/1999/xhtml"
@@ -59,6 +41,32 @@
5941
persist="screenX screenY width height sizemode"
6042
data-l10n-sync="true">
6143
<head>
44+
<link rel="stylesheet" href="chrome://global/skin/global.css" />
45+
<link rel="stylesheet" href="chrome://global/content/tabprompts.css" />
46+
<link rel="stylesheet" href="chrome://global/skin/tabprompts.css" />
47+
<link rel="stylesheet" href="chrome://browser/content/browser.css" />
48+
<link rel="stylesheet" href="chrome://browser/content/tabbrowser.css" />
49+
<link
50+
rel="stylesheet"
51+
href="chrome://browser/content/downloads/downloads.css"
52+
/>
53+
<link rel="stylesheet" href="chrome://browser/content/places/places.css" />
54+
<link
55+
rel="stylesheet"
56+
href="chrome://browser/content/usercontext/usercontext.css"
57+
/>
58+
<link rel="stylesheet" href="chrome://browser/skin/" />
59+
<link rel="stylesheet" href="chrome://browser/skin/controlcenter/panel.css" />
60+
<link
61+
rel="stylesheet"
62+
href="chrome://browser/skin/customizableui/panelUI.css"
63+
/>
64+
<link rel="stylesheet" href="chrome://browser/skin/downloads/downloads.css" />
65+
<link rel="stylesheet" href="chrome://browser/skin/searchbar.css" />
66+
<link rel="stylesheet" href="chrome://browser/skin/translations/panel.css" />
67+
<link rel="stylesheet" href="chrome://browser/skin/places/tree-icons.css" />
68+
<link rel="stylesheet" href="chrome://browser/skin/places/editBookmark.css" />
69+
6270
<link rel="localization" href="branding/brand.ftl"/>
6371
<link rel="localization" href="browser/allTabsMenu.ftl"/>
6472
<link rel="localization" href="browser/appmenu.ftl"/>

browser/base/content/hiddenWindowMac.xhtml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
77
#define HIDDEN_WINDOW
88

9-
<?xml-stylesheet href="chrome://browser/skin/webRTC-menubar-indicator.css" type="text/css"?>
10-
119
<window id="main-window"
1210
xmlns:html="http://www.w3.org/1999/xhtml"
1311
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
1412
data-l10n-sync="true">
13+
<html:link
14+
rel="stylesheet"
15+
href="chrome://browser/skin/webRTC-menubar-indicator.css"
16+
/>
1517

1618
#include macWindow.inc.xhtml
1719

browser/base/content/pageinfo/pageInfo.xhtml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
# License, v. 2.0. If a copy of the MPL was not distributed with this
44
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
55

6-
<?xml-stylesheet href="chrome://browser/content/pageinfo/pageInfo.css" type="text/css"?>
7-
<?xml-stylesheet href="chrome://browser/skin/pageInfo.css" type="text/css"?>
8-
96
<window id="main-window"
107
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
118
xmlns:html="http://www.w3.org/1999/xhtml"
@@ -19,6 +16,12 @@
1916
persist="screenX screenY width height sizemode">
2017

2118
<linkset>
19+
<html:link
20+
rel="stylesheet"
21+
href="chrome://browser/content/pageinfo/pageInfo.css"
22+
/>
23+
<html:link rel="stylesheet" href="chrome://browser/skin/pageInfo.css" />
24+
2225
<html:link rel="localization" href="browser/pageInfo.ftl"/>
2326
</linkset>
2427
#ifdef XP_MACOSX

browser/base/content/safeMode.xhtml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
- License, v. 2.0. If a copy of the MPL was not distributed with this
55
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
66

7-
<?xml-stylesheet href="chrome://global/skin/global.css"?>
8-
<?xml-stylesheet href="chrome://browser/content/safeMode.css"?>
9-
107
<window
118
xmlns:html="http://www.w3.org/1999/xhtml"
129
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
@@ -21,6 +18,12 @@
2118
buttonidextra1="refresh-profile"
2219
>
2320
<linkset>
21+
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
22+
<html:link
23+
rel="stylesheet"
24+
href="chrome://browser/content/safeMode.css"
25+
/>
26+
2427
<html:link rel="localization" href="branding/brand.ftl" />
2528
<html:link rel="localization" href="browser/safeMode.ftl" />
2629
</linkset>

browser/base/content/sanitize.xhtml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
- License, v. 2.0. If a copy of the MPL was not distributed with this
66
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
77
8-
<?xml-stylesheet href="chrome://global/skin/global.css"?>
9-
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
10-
<?xml-stylesheet href="chrome://browser/skin/sanitizeDialog.css"?>
11-
12-
<?xml-stylesheet href="chrome://browser/content/sanitizeDialog.css"?>
13-
148
<!DOCTYPE window>
159
1610
<window
@@ -28,6 +22,20 @@
2822
</hbox>
2923

3024
<linkset>
25+
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
26+
<html:link
27+
rel="stylesheet"
28+
href="chrome://browser/skin/preferences/preferences.css"
29+
/>
30+
<html:link
31+
rel="stylesheet"
32+
href="chrome://browser/skin/sanitizeDialog.css"
33+
/>
34+
<html:link
35+
rel="stylesheet"
36+
href="chrome://browser/content/sanitizeDialog.css"
37+
/>
38+
3139
<html:link rel="localization" href="browser/sanitize.ftl" />
3240
</linkset>
3341

browser/base/content/webext-panels.xhtml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
# License, v. 2.0. If a copy of the MPL was not distributed with this
66
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
77
8-
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
9-
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
10-
<?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?>
11-
128
<window id="webextpanels-window"
139
xmlns:html="http://www.w3.org/1999/xhtml"
1410
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
@@ -22,6 +18,13 @@
2218
<script src="chrome://global/content/editMenuOverlay.js"/>
2319

2420
<linkset>
21+
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
22+
<html:link rel="stylesheet" href="chrome://browser/skin/" />
23+
<html:link
24+
rel="stylesheet"
25+
href="chrome://browser/content/usercontext/usercontext.css"
26+
/>
27+
2528
<html:link rel="localization" href="toolkit/branding/brandings.ftl"/>
2629
<html:link rel="localization" href="toolkit/global/textActions.ftl"/>
2730
<html:link rel="localization" href="browser/browserContext.ftl"/>

browser/base/content/webrtcIndicator.xhtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
- License, v. 2.0. If a copy of the MPL was not distributed with this
44
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
55

6-
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
7-
<?xml-stylesheet href="chrome://browser/skin/webRTC-indicator.css" type="text/css"?>
8-
96
<!DOCTYPE html>
107

118
<html
@@ -16,6 +13,9 @@
1613
chromemargin="0,0,0,0"
1714
>
1815
<head>
16+
<link rel="stylesheet" href="chrome://global/skin/global.css" />
17+
<link rel="stylesheet" href="chrome://browser/skin/webRTC-indicator.css" />
18+
1919
<link rel="localization" href="branding/brand.ftl" />
2020
<link rel="localization" href="browser/webrtcIndicator.ftl" />
2121
<title data-l10n-id="webrtc-indicator-title"></title>

browser/base/content/webrtcLegacyIndicator.xhtml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
# License, v. 2.0. If a copy of the MPL was not distributed with this
55
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
66

7-
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
8-
<?xml-stylesheet href="chrome://browser/skin/webRTC-legacy-indicator.css" type="text/css"?>
9-
107
<!DOCTYPE window>
118

129
<window xmlns:html="http://www.w3.org/1999/xhtml"
@@ -23,6 +20,12 @@
2320
orient="horizontal"
2421
>
2522
<linkset>
23+
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
24+
<html:link
25+
rel="stylesheet"
26+
href="chrome://browser/skin/webRTC-legacy-indicator.css"
27+
/>
28+
2629
<html:link rel="localization" href="branding/brand.ftl"/>
2730
<html:link rel="localization" href="browser/webrtcIndicator.ftl"/>
2831
</linkset>

browser/components/downloads/content/contentAreaDownloadsView.xhtml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
# License, v. 2.0. If a copy of the MPL was not distributed with this
55
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
66

7-
<?xml-stylesheet href="chrome://global/skin/global.css"?>
8-
<?xml-stylesheet href="chrome://browser/content/downloads/contentAreaDownloadsView.css"?>
9-
<?xml-stylesheet href="chrome://browser/skin/downloads/contentAreaDownloadsView.css"?>
10-
<?xml-stylesheet href="chrome://browser/content/downloads/downloads.css"?>
11-
<?xml-stylesheet href="chrome://browser/skin/downloads/allDownloadsView.css"?>
12-
137
<!DOCTYPE window>
148

159
<window id="contentAreaDownloadsView"
@@ -19,6 +13,24 @@
1913
csp="default-src chrome:; img-src chrome: moz-icon:; object-src 'none'">
2014

2115
<linkset>
16+
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
17+
<html:link
18+
rel="stylesheet"
19+
href="chrome://browser/content/downloads/contentAreaDownloadsView.css"
20+
/>
21+
<html:link
22+
rel="stylesheet"
23+
href="chrome://browser/skin/downloads/contentAreaDownloadsView.css"
24+
/>
25+
<html:link
26+
rel="stylesheet"
27+
href="chrome://browser/content/downloads/downloads.css"
28+
/>
29+
<html:link
30+
rel="stylesheet"
31+
href="chrome://browser/skin/downloads/allDownloadsView.css"
32+
/>
33+
2234
<html:link rel="localization" href="toolkit/global/textActions.ftl"/>
2335
<html:link rel="localization" href="browser/downloads.ftl" />
2436
</linkset>

browser/components/migration/content/migration.xhtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# License, v. 2.0. If a copy of the MPL was not distributed with this
44
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
55

6-
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
7-
86
<window id="migrationWizard"
97
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
108
xmlns:html="http://www.w3.org/1999/xhtml"
@@ -15,6 +13,8 @@
1513
style="min-width: 40em;"
1614
buttons="accept,cancel">
1715
<linkset>
16+
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
17+
1818
<html:link rel="localization" href="branding/brand.ftl"/>
1919
<html:link rel="localization" href="toolkit/global/wizard.ftl"/>
2020
<html:link rel="localization" href="browser/migration.ftl"/>

browser/components/places/content/bookmarkProperties.xhtml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
- License, v. 2.0. If a copy of the MPL was not distributed with this
55
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
66

7-
<?xml-stylesheet href="chrome://global/skin/global.css"?>
8-
<?xml-stylesheet href="chrome://global/content/commonDialog.css" type="text/css"?>
9-
<?xml-stylesheet href="chrome://global/skin/commonDialog.css" type="text/css"?>
10-
<?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css"?>
11-
<?xml-stylesheet href="chrome://browser/skin/places/tree-icons.css"?>
12-
<?xml-stylesheet href="chrome://browser/content/places/places.css"?>
13-
147
<!DOCTYPE window>
158

169
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
@@ -24,6 +17,25 @@
2417
buttons="accept, cancel">
2518

2619
<linkset>
20+
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
21+
<html:link
22+
rel="stylesheet"
23+
href="chrome://global/content/commonDialog.css"
24+
/>
25+
<html:link rel="stylesheet" href="chrome://global/skin/commonDialog.css" />
26+
<html:link
27+
rel="stylesheet"
28+
href="chrome://browser/skin/places/editBookmark.css"
29+
/>
30+
<html:link
31+
rel="stylesheet"
32+
href="chrome://browser/skin/places/tree-icons.css"
33+
/>
34+
<html:link
35+
rel="stylesheet"
36+
href="chrome://browser/content/places/places.css"
37+
/>
38+
2739
<html:link rel="localization" href="browser/editBookmarkOverlay.ftl"/>
2840
</linkset>
2941

browser/components/places/content/bookmarksSidebar.xhtml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
- License, v. 2.0. If a copy of the MPL was not distributed with this
44
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
55

6-
<?xml-stylesheet href="chrome://browser/content/places/places.css"?>
7-
<?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css"?>
8-
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
9-
<?xml-stylesheet href="chrome://browser/skin/places/tree-icons.css"?>
10-
<?xml-stylesheet href="chrome://browser/skin/places/sidebar.css"?>
11-
126
<!DOCTYPE window>
137

148
<window id="bookmarksPanel"
@@ -27,6 +21,24 @@
2721
<script src="chrome://global/content/editMenuOverlay.js"/>
2822

2923
<linkset>
24+
<html:link
25+
rel="stylesheet"
26+
href="chrome://browser/content/places/places.css"
27+
/>
28+
<html:link
29+
rel="stylesheet"
30+
href="chrome://browser/content/usercontext/usercontext.css"
31+
/>
32+
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
33+
<html:link
34+
rel="stylesheet"
35+
href="chrome://browser/skin/places/tree-icons.css"
36+
/>
37+
<html:link
38+
rel="stylesheet"
39+
href="chrome://browser/skin/places/sidebar.css"
40+
/>
41+
3042
<html:link rel="localization" href="toolkit/global/textActions.ftl"/>
3143
<html:link rel="localization" href="browser/browser.ftl"/>
3244
<html:link rel="localization" href="browser/places.ftl"/>

0 commit comments

Comments
 (0)