mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-05 01:16:35 +00:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||
index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..93be23da305a5e2e51bff1c5b5f287439a8fafa8 100644
|
||||
index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..84359791101c500ed354da8d0b4bf3c7e8be4563 100644
|
||||
--- a/browser/components/tabbrowser/content/tabs.js
|
||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||
@@ -649,7 +649,7 @@
|
||||
@@ -158,3 +158,73 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..93be23da305a5e2e51bff1c5b5f28743
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2726,12 +2730,14 @@
|
||||
selectedTab = {
|
||||
left: selectedTab.left,
|
||||
right: selectedTab.right,
|
||||
+ top: selectedTab.top,
|
||||
+ bottom: selectedTab.bottom,
|
||||
};
|
||||
}
|
||||
return [
|
||||
this._lastTabToScrollIntoView,
|
||||
this.arrowScrollbox.scrollClientRect,
|
||||
- { left: lastTabRect.left, right: lastTabRect.right },
|
||||
+ lastTabRect,
|
||||
selectedTab,
|
||||
];
|
||||
})
|
||||
@@ -2748,8 +2754,11 @@
|
||||
delete this._lastTabToScrollIntoView;
|
||||
// Is the new tab already completely visible?
|
||||
if (
|
||||
- scrollRect.left <= tabRect.left &&
|
||||
- tabRect.right <= scrollRect.right
|
||||
+ this.verticalMode
|
||||
+ ? scrollRect.top <= tabRect.top &&
|
||||
+ tabRect.bottom <= scrollRect.bottom
|
||||
+ : scrollRect.left <= tabRect.left &&
|
||||
+ tabRect.right <= scrollRect.right
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@@ -2757,21 +2766,29 @@
|
||||
if (this.arrowScrollbox.smoothScroll) {
|
||||
// Can we make both the new tab and the selected tab completely visible?
|
||||
if (
|
||||
- !selectedRect ||
|
||||
- Math.max(
|
||||
- tabRect.right - selectedRect.left,
|
||||
- selectedRect.right - tabRect.left
|
||||
- ) <= scrollRect.width
|
||||
+ !selectedRect || this.verticalMode
|
||||
+ ? Math.max(
|
||||
+ tabRect.bottom - selectedRect.top,
|
||||
+ selectedRect.bottom - tabRect.top
|
||||
+ ) <= scrollRect.height
|
||||
+ : Math.max(
|
||||
+ tabRect.right - selectedRect.left,
|
||||
+ selectedRect.right - tabRect.left
|
||||
+ ) <= scrollRect.width
|
||||
) {
|
||||
this.arrowScrollbox.ensureElementIsVisible(tabToScrollIntoView);
|
||||
return;
|
||||
}
|
||||
|
||||
- this.arrowScrollbox.scrollByPixels(
|
||||
- this.#rtlMode
|
||||
- ? selectedRect.right - scrollRect.right
|
||||
- : selectedRect.left - scrollRect.left
|
||||
- );
|
||||
+ let scrollPixels;
|
||||
+ if (this.verticalMode) {
|
||||
+ scrollPixels = tabRect.top - selectedRect.top;
|
||||
+ } else if (this.#rtlMode) {
|
||||
+ scrollPixels = selectedRect.right - scrollRect.right;
|
||||
+ } else {
|
||||
+ scrollPixels = selectedRect.left - scrollRect.left;
|
||||
+ }
|
||||
+ this.arrowScrollbox.scrollByPixels(scrollPixels);
|
||||
}
|
||||
|
||||
if (!this._animateElement.hasAttribute("highlight")) {
|
||||
|
@@ -53,8 +53,8 @@ body {
|
||||
|
||||
& button {
|
||||
opacity: 0;
|
||||
animation: fadeIn .5s ease-in-out forwards;
|
||||
animation-delay: .8s;
|
||||
animation: fadeIn 0.5s ease-in-out forwards;
|
||||
animation-delay: 0.8s;
|
||||
}
|
||||
|
||||
& button:nth-child(2) {
|
||||
@@ -258,7 +258,7 @@ input[type='checkbox'] {
|
||||
.delay-animation,
|
||||
.delay-animation-2 {
|
||||
opacity: 0;
|
||||
animation: fadeIn .5s ease-in-out forwards;
|
||||
animation: fadeIn 0.5s ease-in-out forwards;
|
||||
}
|
||||
|
||||
#importBrowser {
|
||||
@@ -345,7 +345,7 @@ input[type='checkbox'] {
|
||||
|
||||
#welcome {
|
||||
& h1 {
|
||||
animation-duration: .8s !important;
|
||||
animation-duration: 0.8s !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,7 +405,8 @@ input[type='checkbox'] {
|
||||
border: 3px solid light-dark(#000, #fff);
|
||||
}
|
||||
|
||||
#welcome, #thanks {
|
||||
#welcome,
|
||||
#thanks {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user