Skip to content

Commit

Permalink
Bug 1857999: Move XML stylesheet processing instructions to link elem…
Browse files Browse the repository at this point in the history
…ents. 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
  • Loading branch information
Mossop committed Oct 16, 2023
1 parent e945bed commit f71c7b3
Show file tree
Hide file tree
Showing 75 changed files with 558 additions and 272 deletions.
14 changes: 10 additions & 4 deletions browser/base/content/aboutDialog.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/aboutDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://branding/content/aboutDialog.css" type="text/css"?>

<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="aboutDialog"
Expand All @@ -28,6 +24,16 @@
#endif

<linkset>
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
<html:link
rel="stylesheet"
href="chrome://browser/content/aboutDialog.css"
/>
<html:link
rel="stylesheet"
href="chrome://branding/content/aboutDialog.css"
/>

<html:link rel="localization" href="branding/brand.ftl"/>
<html:link rel="localization" href="browser/aboutDialog.ftl"/>
</linkset>
Expand Down
44 changes: 26 additions & 18 deletions browser/base/content/browser.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,10 @@
<!-- The "global.css" stylesheet is imported first to allow other stylesheets to
override rules using selectors with the same specificity. This applies to
both "content" and "skin" packages, which bug 1385444 will unify later. -->
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>

<!-- While these stylesheets are defined in Toolkit, they are only used in the
main browser window, so we can load them here. Bug 1474241 is on file to
consider moving these widgets to the "browser" folder. -->
<?xml-stylesheet href="chrome://global/content/tabprompts.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/tabprompts.css" type="text/css"?>

<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/tabbrowser.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/downloads/downloads.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>

<?xml-stylesheet href="chrome://browser/skin/controlcenter/panel.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUI.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/downloads/downloads.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/searchbar.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/translations/panel.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/places/tree-icons.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css" type="text/css"?>

<html id="main-window"
xmlns:html="http://www.w3.org/1999/xhtml"
Expand Down Expand Up @@ -59,6 +41,32 @@
persist="screenX screenY width height sizemode"
data-l10n-sync="true">
<head>
<link rel="stylesheet" href="chrome://global/skin/global.css" />
<link rel="stylesheet" href="chrome://global/content/tabprompts.css" />
<link rel="stylesheet" href="chrome://global/skin/tabprompts.css" />
<link rel="stylesheet" href="chrome://browser/content/browser.css" />
<link rel="stylesheet" href="chrome://browser/content/tabbrowser.css" />
<link
rel="stylesheet"
href="chrome://browser/content/downloads/downloads.css"
/>
<link rel="stylesheet" href="chrome://browser/content/places/places.css" />
<link
rel="stylesheet"
href="chrome://browser/content/usercontext/usercontext.css"
/>
<link rel="stylesheet" href="chrome://browser/skin/" />
<link rel="stylesheet" href="chrome://browser/skin/controlcenter/panel.css" />
<link
rel="stylesheet"
href="chrome://browser/skin/customizableui/panelUI.css"
/>
<link rel="stylesheet" href="chrome://browser/skin/downloads/downloads.css" />
<link rel="stylesheet" href="chrome://browser/skin/searchbar.css" />
<link rel="stylesheet" href="chrome://browser/skin/translations/panel.css" />
<link rel="stylesheet" href="chrome://browser/skin/places/tree-icons.css" />
<link rel="stylesheet" href="chrome://browser/skin/places/editBookmark.css" />

<link rel="localization" href="branding/brand.ftl"/>
<link rel="localization" href="browser/allTabsMenu.ftl"/>
<link rel="localization" href="browser/appmenu.ftl"/>
Expand Down
6 changes: 4 additions & 2 deletions browser/base/content/hiddenWindowMac.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#define HIDDEN_WINDOW

<?xml-stylesheet href="chrome://browser/skin/webRTC-menubar-indicator.css" type="text/css"?>

<window id="main-window"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
data-l10n-sync="true">
<html:link
rel="stylesheet"
href="chrome://browser/skin/webRTC-menubar-indicator.css"
/>

#include macWindow.inc.xhtml

Expand Down
9 changes: 6 additions & 3 deletions browser/base/content/pageinfo/pageInfo.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

<?xml-stylesheet href="chrome://browser/content/pageinfo/pageInfo.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/pageInfo.css" type="text/css"?>

<window id="main-window"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
Expand All @@ -19,6 +16,12 @@
persist="screenX screenY width height sizemode">

<linkset>
<html:link
rel="stylesheet"
href="chrome://browser/content/pageinfo/pageInfo.css"
/>
<html:link rel="stylesheet" href="chrome://browser/skin/pageInfo.css" />

<html:link rel="localization" href="browser/pageInfo.ftl"/>
</linkset>
#ifdef XP_MACOSX
Expand Down
9 changes: 6 additions & 3 deletions browser/base/content/safeMode.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<?xml-stylesheet href="chrome://global/skin/global.css"?>
<?xml-stylesheet href="chrome://browser/content/safeMode.css"?>

<window
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
Expand All @@ -21,6 +18,12 @@
buttonidextra1="refresh-profile"
>
<linkset>
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
<html:link
rel="stylesheet"
href="chrome://browser/content/safeMode.css"
/>

<html:link rel="localization" href="branding/brand.ftl" />
<html:link rel="localization" href="browser/safeMode.ftl" />
</linkset>
Expand Down
20 changes: 14 additions & 6 deletions browser/base/content/sanitize.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/global.css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
<?xml-stylesheet href="chrome://browser/skin/sanitizeDialog.css"?>

<?xml-stylesheet href="chrome://browser/content/sanitizeDialog.css"?>

<!DOCTYPE window>
<window
Expand All @@ -28,6 +22,20 @@
</hbox>

<linkset>
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
<html:link
rel="stylesheet"
href="chrome://browser/skin/preferences/preferences.css"
/>
<html:link
rel="stylesheet"
href="chrome://browser/skin/sanitizeDialog.css"
/>
<html:link
rel="stylesheet"
href="chrome://browser/content/sanitizeDialog.css"
/>

<html:link rel="localization" href="browser/sanitize.ftl" />
</linkset>

Expand Down
11 changes: 7 additions & 4 deletions browser/base/content/webext-panels.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?>

<window id="webextpanels-window"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
Expand All @@ -22,6 +18,13 @@
<script src="chrome://global/content/editMenuOverlay.js"/>

<linkset>
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
<html:link rel="stylesheet" href="chrome://browser/skin/" />
<html:link
rel="stylesheet"
href="chrome://browser/content/usercontext/usercontext.css"
/>

<html:link rel="localization" href="toolkit/branding/brandings.ftl"/>
<html:link rel="localization" href="toolkit/global/textActions.ftl"/>
<html:link rel="localization" href="browser/browserContext.ftl"/>
Expand Down
6 changes: 3 additions & 3 deletions browser/base/content/webrtcIndicator.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/webRTC-indicator.css" type="text/css"?>

<!DOCTYPE html>

<html
Expand All @@ -16,6 +13,9 @@
chromemargin="0,0,0,0"
>
<head>
<link rel="stylesheet" href="chrome://global/skin/global.css" />
<link rel="stylesheet" href="chrome://browser/skin/webRTC-indicator.css" />

<link rel="localization" href="branding/brand.ftl" />
<link rel="localization" href="browser/webrtcIndicator.ftl" />
<title data-l10n-id="webrtc-indicator-title"></title>
Expand Down
9 changes: 6 additions & 3 deletions browser/base/content/webrtcLegacyIndicator.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/webRTC-legacy-indicator.css" type="text/css"?>

<!DOCTYPE window>

<window xmlns:html="http://www.w3.org/1999/xhtml"
Expand All @@ -23,6 +20,12 @@
orient="horizontal"
>
<linkset>
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
<html:link
rel="stylesheet"
href="chrome://browser/skin/webRTC-legacy-indicator.css"
/>

<html:link rel="localization" href="branding/brand.ftl"/>
<html:link rel="localization" href="browser/webrtcIndicator.ftl"/>
</linkset>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

<?xml-stylesheet href="chrome://global/skin/global.css"?>
<?xml-stylesheet href="chrome://browser/content/downloads/contentAreaDownloadsView.css"?>
<?xml-stylesheet href="chrome://browser/skin/downloads/contentAreaDownloadsView.css"?>
<?xml-stylesheet href="chrome://browser/content/downloads/downloads.css"?>
<?xml-stylesheet href="chrome://browser/skin/downloads/allDownloadsView.css"?>

<!DOCTYPE window>

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

<linkset>
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
<html:link
rel="stylesheet"
href="chrome://browser/content/downloads/contentAreaDownloadsView.css"
/>
<html:link
rel="stylesheet"
href="chrome://browser/skin/downloads/contentAreaDownloadsView.css"
/>
<html:link
rel="stylesheet"
href="chrome://browser/content/downloads/downloads.css"
/>
<html:link
rel="stylesheet"
href="chrome://browser/skin/downloads/allDownloadsView.css"
/>

<html:link rel="localization" href="toolkit/global/textActions.ftl"/>
<html:link rel="localization" href="browser/downloads.ftl" />
</linkset>
Expand Down
4 changes: 2 additions & 2 deletions browser/components/migration/content/migration.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>

<window id="migrationWizard"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
Expand All @@ -15,6 +13,8 @@
style="min-width: 40em;"
buttons="accept,cancel">
<linkset>
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />

<html:link rel="localization" href="branding/brand.ftl"/>
<html:link rel="localization" href="toolkit/global/wizard.ftl"/>
<html:link rel="localization" href="browser/migration.ftl"/>
Expand Down
26 changes: 19 additions & 7 deletions browser/components/places/content/bookmarkProperties.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<?xml-stylesheet href="chrome://global/skin/global.css"?>
<?xml-stylesheet href="chrome://global/content/commonDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/commonDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css"?>
<?xml-stylesheet href="chrome://browser/skin/places/tree-icons.css"?>
<?xml-stylesheet href="chrome://browser/content/places/places.css"?>

<!DOCTYPE window>

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

<linkset>
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
<html:link
rel="stylesheet"
href="chrome://global/content/commonDialog.css"
/>
<html:link rel="stylesheet" href="chrome://global/skin/commonDialog.css" />
<html:link
rel="stylesheet"
href="chrome://browser/skin/places/editBookmark.css"
/>
<html:link
rel="stylesheet"
href="chrome://browser/skin/places/tree-icons.css"
/>
<html:link
rel="stylesheet"
href="chrome://browser/content/places/places.css"
/>

<html:link rel="localization" href="browser/editBookmarkOverlay.ftl"/>
</linkset>

Expand Down
24 changes: 18 additions & 6 deletions browser/components/places/content/bookmarksSidebar.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<?xml-stylesheet href="chrome://browser/content/places/places.css"?>
<?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css"?>
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/places/tree-icons.css"?>
<?xml-stylesheet href="chrome://browser/skin/places/sidebar.css"?>

<!DOCTYPE window>

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

<linkset>
<html:link
rel="stylesheet"
href="chrome://browser/content/places/places.css"
/>
<html:link
rel="stylesheet"
href="chrome://browser/content/usercontext/usercontext.css"
/>
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
<html:link
rel="stylesheet"
href="chrome://browser/skin/places/tree-icons.css"
/>
<html:link
rel="stylesheet"
href="chrome://browser/skin/places/sidebar.css"
/>

<html:link rel="localization" href="toolkit/global/textActions.ftl"/>
<html:link rel="localization" href="browser/browser.ftl"/>
<html:link rel="localization" href="browser/places.ftl"/>
Expand Down
Loading

0 comments on commit f71c7b3

Please sign in to comment.