mirror of
https://github.com/zen-browser/desktop.git
synced 2026-05-20 03:51:20 +00:00
gh-13703: Fixed space swiping ocassionally being stuck (gh-13725)
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -34,3 +34,4 @@ build/signing/cert.pem
|
||||
build/signing/private_key.pem
|
||||
build/signing/private_key.p12
|
||||
|
||||
bloat-dump.log
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"build": "surfer build",
|
||||
"build:ui": "surfer build --ui",
|
||||
"start": "cd engine && python3 ./mach run --noprofile",
|
||||
"start:bloat": "XPCOM_MEM_BLOAT_LOG=1 npm start",
|
||||
"import": "npm run ffprefs && npm run import:dumps && surfer import",
|
||||
"import:dumps": "python3 scripts/update_service_dumps.py",
|
||||
"export": "surfer export",
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
|
||||
namespace zen {
|
||||
|
||||
NS_IMPL_ISUPPORTS0(nsZenBoostsBackend)
|
||||
|
||||
nsZenAccentOklab nsZenBoostsBackend::mCachedAccent{0};
|
||||
nsZenAccentOklab nsZenBoostsBackend::mCachedComplementary{0};
|
||||
float nsZenBoostsBackend::mCachedComplementaryRotationDeg = 0.0f;
|
||||
@@ -345,7 +347,7 @@ inline static void GetZenBoostsDataFromBrowsingContext(
|
||||
|
||||
} // namespace
|
||||
|
||||
static mozilla::StaticAutoPtr<nsZenBoostsBackend> sZenBoostsBackend;
|
||||
static mozilla::StaticRefPtr<nsZenBoostsBackend> sZenBoostsBackend;
|
||||
|
||||
auto nsZenBoostsBackend::GetInstance() -> nsZenBoostsBackend* {
|
||||
if (!XRE_IsContentProcess()) {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define mozilla_ZenBoostsBackend_h_
|
||||
|
||||
#include "nsColor.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "nsPresContext.h"
|
||||
|
||||
#include "mozilla/RefPtr.h"
|
||||
@@ -22,10 +23,11 @@ struct nsZenAccentOklab {
|
||||
float contrastFactor;
|
||||
};
|
||||
|
||||
class nsZenBoostsBackend final {
|
||||
class nsZenBoostsBackend final : public nsISupports {
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
explicit nsZenBoostsBackend() = default;
|
||||
~nsZenBoostsBackend() = default;
|
||||
|
||||
/**
|
||||
* Indicates whether the current frame being rendered is for anonymous
|
||||
@@ -90,6 +92,8 @@ class nsZenBoostsBackend final {
|
||||
bool mCachedCurrentInverted = false;
|
||||
|
||||
private:
|
||||
~nsZenBoostsBackend() = default;
|
||||
|
||||
/**
|
||||
* The presshell of the current document being rendered.
|
||||
*/
|
||||
|
||||
@@ -50,7 +50,8 @@ export class nsZenMenuBar {
|
||||
|
||||
const sibling = document.getElementById("viewSidebarMenuMenu");
|
||||
const togglePinnedItem = window.MozXULElement.parseXULToFragment(
|
||||
'<menuitem data-l10n-id="zen-menubar-toggle-pinned-tabs" />'
|
||||
'<menuitem data-l10n-id="zen-menubar-toggle-pinned-tabs"' +
|
||||
' data-l10n-args="{"pinnedAreCollapsed":""}" />'
|
||||
).querySelector("menuitem");
|
||||
if (!gZenWorkspaces.privateWindowOrDisabled) {
|
||||
sibling.after(togglePinnedItem);
|
||||
|
||||
@@ -257,7 +257,7 @@ window.gZenUIManager = {
|
||||
},
|
||||
|
||||
updateTabsToolbar() {
|
||||
const kUrlbarHeight = 335;
|
||||
const kUrlbarHeight = 333;
|
||||
gURLBar.style.setProperty(
|
||||
"--zen-urlbar-top",
|
||||
`${window.innerHeight / 2 - Math.max(kUrlbarHeight, window.windowUtils.getBoundsWithoutFlushing(gURLBar).height) / 2}px`
|
||||
|
||||
@@ -107,6 +107,11 @@ body,
|
||||
}
|
||||
}
|
||||
|
||||
:root[swipe-gesture] #tabbrowser-arrowscrollbox {
|
||||
/* See gh-13703 for rationale. */
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#zen-browser-background {
|
||||
/* This is conceptually a background, but putting this on a pseudo-element
|
||||
* avoids it from suppressing the chrome-content separator border, etc.
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
}
|
||||
|
||||
.urlbar {
|
||||
--urlbarView-separator-color: light-dark(hsl(0, 0%, 80%), hsl(0, 0%, 20%));
|
||||
--urlbarView-hover-background: var(--toolbarbutton-hover-background);
|
||||
--urlbarView-highlight-background: var(--toolbarbutton-hover-background);
|
||||
--urlbarview-separator-color: light-dark(hsl(0, 0%, 80%), hsl(0, 0%, 20%));
|
||||
--urlbarview-background-color-hover: var(--toolbarbutton-hover-background);
|
||||
border-radius: calc(var(--toolbarbutton-border-radius) - 2px);
|
||||
height: var(--urlbar-height);
|
||||
--urlbarView-results-padding: 10px !important;
|
||||
@@ -682,7 +681,7 @@
|
||||
}
|
||||
|
||||
#urlbar-results {
|
||||
max-height: 260px;
|
||||
max-height: 252px;
|
||||
overflow-y: auto;
|
||||
scrollbar-width: none;
|
||||
margin-block-start: calc(var(--urlbarView-results-padding) - 2px);
|
||||
|
||||
@@ -224,7 +224,7 @@ zen-folder[collapsed] > .tab-group-container {
|
||||
|
||||
/* Tabs popup */
|
||||
#zen-folder-tabs-popup {
|
||||
--arrowpanel-padding: 0;
|
||||
--panel-padding: 0;
|
||||
width: 250px;
|
||||
|
||||
& #zen-folder-tabs-search-no-results {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "nsStyleSheetService.h"
|
||||
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/css/SheetParsingMode.h"
|
||||
#include "mozilla/GlobalStyleSheetCache.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
@@ -72,6 +73,7 @@ auto ZenStyleSheetCache::Singleton() -> ZenStyleSheetCache* {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
if (!gZenModsCache) {
|
||||
gZenModsCache = new ZenStyleSheetCache;
|
||||
ClearOnShutdown(&gZenModsCache);
|
||||
}
|
||||
return gZenModsCache;
|
||||
}
|
||||
|
||||
@@ -346,12 +346,8 @@ zen-workspace {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
:root[swipe-gesture] &{
|
||||
pointer-events: none;
|
||||
|
||||
&::part(scrollbox) {
|
||||
scrollbar-width: none;
|
||||
}
|
||||
:root[swipe-gesture] &::part(scrollbox) {
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
&[overflowing] {
|
||||
|
||||
@@ -547,10 +547,12 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
|
||||
<menuseparator id="context_zen-pinned-tab-separator" hidden="true"/>
|
||||
<menuitem id="context_zen-replace-pinned-url-with-current"
|
||||
data-lazy-l10n-id="tab-context-zen-replace-pinned-url-with-current"
|
||||
data-l10n-args="{"isEssential":""}"
|
||||
hidden="true"
|
||||
command="cmd_zenReplacePinnedUrlWithCurrent"/>
|
||||
<menuitem id="context_zen-reset-pinned-tab"
|
||||
data-lazy-l10n-id="tab-context-zen-reset-pinned-tab"
|
||||
data-l10n-args="{"isEssential":""}"
|
||||
hidden="true"
|
||||
command="cmd_zenPinnedTabResetNoTab"/>
|
||||
`);
|
||||
|
||||
Reference in New Issue
Block a user