Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 45e7ad9

Browse files
committed
👽️ Update patches
Note that this removes a lot of the content theming stuff because it was a bit broken. I want to find a better way of handling that anyway
1 parent ea1f520 commit 45e7ad9

File tree

37 files changed

+106
-525
lines changed

37 files changed

+106
-525
lines changed

src/browser/base/content/aboutRobots-xhtml.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
diff --git a/browser/base/content/aboutRobots.xhtml b/browser/base/content/aboutRobots.xhtml
2-
index 767b31067d6d82c1ddfdbf633ececc459c6480ae..21d09dfb758477930096b6c1b070642464a09e69 100644
2+
index 91bfad676708938748990876b062eb2116358138..8cfe3339acfbd58af165c2394ebef2a54996b76d 100644
33
--- a/browser/base/content/aboutRobots.xhtml
44
+++ b/browser/base/content/aboutRobots.xhtml
5-
@@ -14,6 +14,7 @@
5+
@@ -26,6 +26,7 @@
66
<linkset>
7-
<link rel="localization" href="browser/aboutRobots.ftl"/>
7+
<link rel="localization" href="browser/aboutRobots.ftl" />
88
</linkset>
99
+ <script src="chrome://browser/content/contentTheme.js"></script>
1010
</head>

src/browser/base/content/tabbrowser-tabs-js.patch

Lines changed: 20 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/browser/base/content/tabbrowser-tabs.js b/browser/base/content/tabbrowser-tabs.js
2-
index 0aa7ae602ea1048a9b05d7614aacacdb736f3e28..2cb17dcfd88db3d0f242ce2051847ad1fbed8041 100644
2+
index 06c2479886f0e3a7c5ba6d8d939a2c1f0f19442d..f73965ee9408b3f4c39646e6bda5b0c13f13628f 100644
33
--- a/browser/base/content/tabbrowser-tabs.js
44
+++ b/browser/base/content/tabbrowser-tabs.js
5-
@@ -517,19 +517,40 @@
5+
@@ -513,19 +513,40 @@
66
}
77
dt.setDragImage(toDrag, dragImageOffset, dragImageOffset);
88

@@ -17,14 +17,14 @@ index 0aa7ae602ea1048a9b05d7614aacacdb736f3e28..2cb17dcfd88db3d0f242ce2051847ad1
1717
// relative to the corner of the dragged tab.
1818
function clientX(ele) {
1919
+ if (verticalTabs) {
20-
+ return 0;
20+
+ return 0
2121
+ }
2222
+
2323
return ele.getBoundingClientRect().left;
2424
}
2525
+ function clientY(ele) {
2626
+ if (!verticalTabs) {
27-
+ return 0;
27+
+ return 0
2828
+ }
2929
+
3030
+ return ele.getBoundingClientRect().top;
@@ -44,7 +44,7 @@ index 0aa7ae602ea1048a9b05d7614aacacdb736f3e28..2cb17dcfd88db3d0f242ce2051847ad1
4444
movingTabs: (tab.multiselected ? gBrowser.selectedTabs : [tab]).filter(
4545
t => t.pinned == tab.pinned
4646
),
47-
@@ -609,21 +630,31 @@
47+
@@ -612,21 +633,31 @@
4848
}
4949
}
5050

@@ -72,8 +72,7 @@ index 0aa7ae602ea1048a9b05d7614aacacdb736f3e28..2cb17dcfd88db3d0f242ce2051847ad1
7272
+ minMargin + scrollRect[width],
7373
+ scrollRect[right]
7474
);
75-
- if (RTL_UI) {
76-
+ if (RTL_UI && !verticalTabs) {
75+
if (RTL_UI) {
7776
[minMargin, maxMargin] = [
7877
- this.clientWidth - maxMargin,
7978
- this.clientWidth - minMargin,
@@ -82,10 +81,10 @@ index 0aa7ae602ea1048a9b05d7614aacacdb736f3e28..2cb17dcfd88db3d0f242ce2051847ad1
8281
];
8382
}
8483
newMargin = pixelsToScroll > 0 ? maxMargin : minMargin;
85-
@@ -634,30 +665,38 @@
86-
let tabRect = this._getVisibleTabs()
87-
.at(-1)
88-
.getBoundingClientRect();
84+
@@ -635,30 +666,40 @@
85+
let children = this.allTabs;
86+
if (newIndex == children.length) {
87+
let tabRect = this._getVisibleTabs().at(-1).getBoundingClientRect();
8988
- if (RTL_UI) {
9089
- newMargin = rect.right - tabRect.left;
9190
+ if (RTL_UI && !verticalTabs) {
@@ -114,7 +113,8 @@ index 0aa7ae602ea1048a9b05d7614aacacdb736f3e28..2cb17dcfd88db3d0f242ce2051847ad1
114113
+ if (RTL_UI && !verticalTabs) {
115114
newMargin *= -1;
116115
}
117-
- ind.style.transform = "translate(" + Math.round(newMargin) + "px)";
116+
ind.style.transform = "translate(" + Math.round(newMargin) + "px)";
117+
+
118118
+ ind.style.transform =
119119
+ "translate(" + verticalTabs
120120
+ ? "0, "
@@ -130,32 +130,16 @@ index 0aa7ae602ea1048a9b05d7614aacacdb736f3e28..2cb17dcfd88db3d0f242ce2051847ad1
130130
var dt = event.dataTransfer;
131131
var dropEffect = dt.dropEffect;
132132
var draggedTab;
133-
@@ -714,7 +753,11 @@
133+
@@ -715,7 +756,7 @@
134134
incrementDropIndex = false;
135135
}
136136

137137
- if (oldTranslateX && oldTranslateX != newTranslateX && !gReduceMotion) {
138-
+ if (
139-
+ oldTranslateX &&
140-
+ oldTranslateX != newTranslateX &&
141-
+ !(gReduceMotion || verticalTabs)
142-
+ ) {
138+
+ if (oldTranslateX && oldTranslateX != newTranslateX && !(gReduceMotion || verticalTabs)) {
143139
for (let tab of movingTabs) {
144140
tab.setAttribute("tabdrop-samewindow", "true");
145141
tab.style.transform = "translateX(" + newTranslateX + "px)";
146-
@@ -1519,6 +1562,11 @@
147-
}
148-
149-
_animateTabMove(event) {
150-
+ const verticalTabs = Services.prefs.getBoolPref(
151-
+ "pulse.tabs.vertical",
152-
+ false
153-
+ );
154-
+
155-
let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
156-
let movingTabs = draggedTab._dragData.movingTabs;
157-
158-
@@ -1530,19 +1578,28 @@
142+
@@ -1485,19 +1526,28 @@
159143
}
160144
}
161145

@@ -190,7 +174,7 @@ index 0aa7ae602ea1048a9b05d7614aacacdb736f3e28..2cb17dcfd88db3d0f242ce2051847ad1
190174

191175
let pinned = draggedTab.pinned;
192176
let numPinned = gBrowser._numPinnedTabs;
193-
@@ -1551,36 +1608,40 @@
177+
@@ -1506,36 +1556,40 @@
194178
pinned ? numPinned : undefined
195179
);
196180

@@ -204,8 +188,8 @@ index 0aa7ae602ea1048a9b05d7614aacacdb736f3e28..2cb17dcfd88db3d0f242ce2051847ad1
204188
+ let tabWidth = draggedTab.getBoundingClientRect()[dimensions];
205189
let shiftWidth = tabWidth * movingTabs.length;
206190
+
207-
+ // We want to store the output value as both the width and the height to
208-
+ // force compatibility with code elsewhere
191+
+ // We want to store the output value as the width and the height to force
192+
+ // compatibility with code elsewhere
209193
draggedTab._dragData.tabWidth = tabWidth;
210194
+ draggedTab._dragData.tabHeight = tabWidth;
211195

@@ -242,7 +226,7 @@ index 0aa7ae602ea1048a9b05d7614aacacdb736f3e28..2cb17dcfd88db3d0f242ce2051847ad1
242226
}
243227

244228
draggedTab._dragData.translateX = translateX;
245-
@@ -1613,11 +1674,11 @@
229+
@@ -1568,11 +1622,11 @@
246230
if (tabs[mid] == draggedTab && ++mid > high) {
247231
break;
248232
}
@@ -256,7 +240,7 @@ index 0aa7ae602ea1048a9b05d7614aacacdb736f3e28..2cb17dcfd88db3d0f242ce2051847ad1
256240
tabCenter
257241
) {
258242
low = mid + 1;
259-
@@ -1640,16 +1701,16 @@
243+
@@ -1595,16 +1649,16 @@
260244
for (let tab of tabs) {
261245
if (tab != draggedTab) {
262246
let shift = getTabShift(tab, newIndex);

src/browser/components/BrowserGlue-sys-mjs.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs
2-
index fd088d0918705c25e541a568409478eaeabb69db..67cdb5ca87e1747223826b8addd847857e50babe 100644
2+
index 92acb0c98ca47dee170a723ca64a936ff47fd80c..f8ecf6643cab815de9316decc0861b00fdfe9db4 100644
33
--- a/browser/components/BrowserGlue.sys.mjs
44
+++ b/browser/components/BrowserGlue.sys.mjs
5-
@@ -565,13 +565,8 @@ let JSWINDOWACTORS = {
5+
@@ -569,14 +569,8 @@ let JSWINDOWACTORS = {
66
includeChrome: true,
77
allFrames: true,
88
matches: [
@@ -13,12 +13,13 @@ index fd088d0918705c25e541a568409478eaeabb69db..67cdb5ca87e1747223826b8addd84785
1313
- "chrome://browser/content/places/historySidebar.xhtml",
1414
- "chrome://browser/content/places/bookmarksSidebar.xhtml",
1515
- "about:firefoxview",
16+
- "about:firefoxview-next",
1617
+ "about:*",
1718
+ "chrome://*"
1819
],
1920
},
2021

21-
@@ -4392,6 +4387,24 @@ BrowserGlue.prototype = {
22+
@@ -4406,6 +4400,23 @@ BrowserGlue.prototype = {
2223
},
2324

2425
async _maybeShowDefaultBrowserPrompt() {
@@ -38,12 +39,11 @@ index fd088d0918705c25e541a568409478eaeabb69db..67cdb5ca87e1747223826b8addd84785
3839
+ this._showWelcomeDialog()
3940
+
4041
+ // =========================================================================
41-
+
4242
+
4343
// Highest priority is about:welcome window modal experiment
4444
// Second highest priority is the upgrade dialog, which can include a "primary
4545
// browser" request and is limited in various ways, e.g., major upgrades.
46-
@@ -4866,6 +4879,18 @@ BrowserGlue.prototype = {
46+
@@ -4864,6 +4875,18 @@ BrowserGlue.prototype = {
4747
"nsIObserver",
4848
"nsISupportsWeakReference",
4949
]),

src/browser/components/aboutlogins/content/aboutLoginsImportReport-html.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
diff --git a/browser/components/aboutlogins/content/aboutLoginsImportReport.html b/browser/components/aboutlogins/content/aboutLoginsImportReport.html
2-
index c8a768c7d867464771b2a37e3fb7361e17370a59..2d770c8ad36febd9fc02dadca4ba88caa31c77db 100644
2+
index 5f52fdf29e15a30b01c33a5b91ca751d3abfba3a..f4e903b57d8b79d5b7ffad7523fe808f51b913ab 100644
33
--- a/browser/components/aboutlogins/content/aboutLoginsImportReport.html
44
+++ b/browser/components/aboutlogins/content/aboutLoginsImportReport.html
5-
@@ -19,6 +19,7 @@
6-
<link rel="stylesheet" href="chrome://browser/content/aboutlogins/aboutLoginsImportReport.css">
7-
<link rel="stylesheet" href="chrome://browser/content/aboutlogins/common.css">
8-
<link rel="icon" href="chrome://branding/content/icon32.png">
5+
@@ -34,6 +34,7 @@
6+
href="chrome://browser/content/aboutlogins/common.css"
7+
/>
8+
<link rel="icon" href="chrome://branding/content/icon32.png" />
99
+ <script src="chrome://browser/content/contentTheme.js"></script>
1010
</head>
1111
<body class="importreport">

src/browser/components/customizableui/CustomizableUI-jsm.patch

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
2+
index ca629263080e3e2ba1d0ef2b15b11769fed433a8..ff5a28d40fdf2222ea7232c2a41182b4e305f92a 100644
3+
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
4+
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
5+
@@ -12,6 +12,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
6+
AddonManager: "resource://gre/modules/AddonManager.sys.mjs",
7+
AddonManagerPrivate: "resource://gre/modules/AddonManager.sys.mjs",
8+
CustomizableWidgets: "resource:///modules/CustomizableWidgets.sys.mjs",
9+
+ ExtensionCommon: "resource://gre/modules/ExtensionCommon.sys.mjs",
10+
PanelMultiView: "resource:///modules/PanelMultiView.sys.mjs",
11+
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
12+
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
13+
@@ -29,6 +30,7 @@ XPCOMUtils.defineLazyGetter(lazy, "gWidgetsBundle", function () {
14+
});
15+
16+
const kDefaultThemeID = "default-theme@mozilla.org";
17+
+const kUBlockOriginID = "uBlock0@raymondhill.net";
18+
19+
const kSpecialWidgetPfx = "customizableui-special-";
20+
21+
@@ -238,17 +240,18 @@ var CustomizableUIInternal = {
22+
false
23+
);
24+
25+
+ const { makeWidgetId } = lazy.ExtensionCommon;
26+
let navbarPlacements = [
27+
"back-button",
28+
- "forward-button",
29+
"stop-reload-button",
30+
+ "forward-button",
31+
Services.policies.isAllowed("removeHomeButtonByDefault")
32+
? null
33+
: "home-button",
34+
"spring",
35+
+ `${makeWidgetId(kUBlockOriginID)}-browser-action`,
36+
"urlbar-container",
37+
"spring",
38+
- "save-to-pocket-button",
39+
"downloads-button",
40+
AppConstants.MOZ_DEV_EDITION ? "developer-button" : null,
41+
"fxa-toolbar-menu-button",
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
diff --git a/browser/components/enterprisepolicies/content/aboutPolicies.html b/browser/components/enterprisepolicies/content/aboutPolicies.html
2-
index 41a9e6bdf632c278432f69a4778bcc8ef01e2d14..63b5819cd48884997651602c3b8930b11398f05c 100644
2+
index 624d4f24be98676554b855afcfa139a05800e063..de2f8859daf7bbb421a054cbb4328c2101040038 100644
33
--- a/browser/components/enterprisepolicies/content/aboutPolicies.html
44
+++ b/browser/components/enterprisepolicies/content/aboutPolicies.html
5-
@@ -18,6 +18,7 @@
6-
<link rel="localization" href="toolkit/branding/accounts.ftl">
7-
<link rel="localization" href="toolkit/branding/brandings.ftl">
8-
<script src="chrome://browser/content/policies/aboutPolicies.js"></script>
9-
+ <script src="chrome://browser/content/contentTheme.js"></script>
10-
</head>
11-
<body id="body">
12-
<div id="categories">
5+
@@ -27,6 +27,7 @@
6+
<link rel="localization" href="toolkit/branding/accounts.ftl" />
7+
<link rel="localization" href="toolkit/branding/brandings.ftl" />
8+
<script src="chrome://browser/content/policies/aboutPolicies.js"></script>
9+
+ <script src="chrome://browser/content/contentTheme.js"></script>
10+
</head>
11+
<body id="body">
12+
<div id="categories">

src/browser/components/extensions/ext-browser-json.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
diff --git a/browser/components/extensions/ext-browser.json b/browser/components/extensions/ext-browser.json
2-
index 8bcbc5c1febf6f4f79cbd84a7b94c6a9d8952bc7..485bfcf0804b865ff6b19083852de07d106049cc 100644
2+
index 9fb9d562e42558c87676783455e9d2c9938411cc..07cef4ddc27ac1ae93b64c3fb39d65f31303ae51 100644
33
--- a/browser/components/extensions/ext-browser.json
44
+++ b/browser/components/extensions/ext-browser.json
5-
@@ -193,6 +193,14 @@
6-
["sidebarAction"]
7-
]
5+
@@ -150,6 +150,14 @@
6+
"manifest": ["sidebar_action"],
7+
"paths": [["sidebarAction"]]
88
},
99
+ "sidebars": {
1010
+ "url": "chrome://browser/content/parent/ext-sidebars.js",

src/browser/components/protections/content/protections-html.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
diff --git a/browser/components/protections/content/protections.html b/browser/components/protections/content/protections.html
2-
index fd6dfbade23b78282cdb81fb9c9d80b1fa250731..edb12e3472881c709ee71ed88e786495916e576b 100644
2+
index 1374c30fd7d13f7f3b609cedbf9ee553eee5d8e8..1d8082250689e0322c85c8e1b0605a49faaf0d7d 100644
33
--- a/browser/components/protections/content/protections.html
44
+++ b/browser/components/protections/content/protections.html
5-
@@ -19,6 +19,7 @@
6-
<link rel="icon" href="chrome://browser/skin/controlcenter/dashboard.svg">
7-
<script type="module" src="chrome://browser/content/protections.mjs"></script>
5+
@@ -25,6 +25,7 @@
6+
src="chrome://browser/content/protections.mjs"
7+
></script>
88
<title data-l10n-id="protection-report-webpage-title"></title>
99
+ <script src="chrome://browser/content/contentTheme.js"></script>
1010
</head>

src/browser/components/tabunloader/content/aboutUnloads-html.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
diff --git a/browser/components/tabunloader/content/aboutUnloads.html b/browser/components/tabunloader/content/aboutUnloads.html
2-
index 8d1e846b61cbe16baf4f3d43b4b23502bb6f2be1..34e9395ebb0d8a619f249d463d72839ed6c0490f 100644
2+
index 193840cd99123953e579585bf24b8370b5beffae..1c3e01688a5dbba81dd1dc7de01c30d3b29bec43 100644
33
--- a/browser/components/tabunloader/content/aboutUnloads.html
44
+++ b/browser/components/tabunloader/content/aboutUnloads.html
5-
@@ -17,6 +17,7 @@
6-
<link rel="localization" href="branding/brand.ftl"/>
7-
<script src="chrome://browser/content/tabunloader/aboutUnloads.js">
8-
</script>
5+
@@ -22,6 +22,7 @@
6+
<link rel="localization" href="browser/aboutUnloads.ftl" />
7+
<link rel="localization" href="branding/brand.ftl" />
8+
<script src="chrome://browser/content/tabunloader/aboutUnloads.js"></script>
99
+ <script src="chrome://browser/content/contentTheme.js"></script>
1010
</head>
1111
<body>

0 commit comments

Comments
 (0)