morgan pushed to branch maint-13.5 at The Tor Project / Applications / tor-browser-build
Commits:
13b1b67d by Pier Angelo Vendrame at 2024-10-17T18:19:32+00:00
Bug 41274: Improve changelog generation for major releases.
This commits implements --include-from to get linked issues from many
issues (potentially all the alpha release preps).
It also implements --exclude-from to avoid including issues that were
already linked to other rel preps (potentially the previous stables).
Also, make sure to look only for currently open issues, otherwise all
the various alpha relpreps would be matched when specifying the version
number.
- - - - -
4a3ec6ae by Pier Angelo Vendrame at 2024-10-17T18:19:41+00:00
Bug 41273: Bump Firefox/GeckoView tag when does not match HEAD.
If we detect the tag we would use for build does not match the HEAD of
the branch we are using, bump it preemptively.
Normally, we would add that tag when ready to build, so this change
can help us in case we forget to.
If the script is overzealous, we can change the build number before
committing.
- - - - -
2 changed files:
- tools/fetch_changelogs.py
- tools/relprep.py
Changes:
=====================================
tools/fetch_changelogs.py
=====================================
@@ -156,7 +156,7 @@ class ChangelogBuilder:
elif not is_mullvad and is_mullvad is not None:
labels += "¬[labels]=Sponsor 131"
r = requests.get(
- f"{API_URL}/projects/{PROJECT_ID}/issues?labels={labels}&search={issue_or_version}&in=title",
+ f"{API_URL}/projects/{PROJECT_ID}/issues?labels={labels}&search={issue_or_version}&in=title&state=opened",
headers=self.headers,
)
r.raise_for_status()
@@ -196,7 +196,7 @@ class ChangelogBuilder:
raise ValueError(
"Inconsistency detected: a browser was explicitly specified, but the issue does not have the correct labels."
)
- self.issue_id = issue["iid"]
+ self.relprep_issue = issue["iid"]
self.is_mullvad = has_s131
if self.version is None:
@@ -205,7 +205,9 @@ class ChangelogBuilder:
self.version = version_match.group()
def create(self, **kwargs):
- self._find_linked()
+ self._find_linked(
+ kwargs.get("include_from"), kwargs.get("exclude_from")
+ )
self._add_updates(kwargs)
self._sort_issues()
name = "Mullvad" if self.is_mullvad else "Tor"
@@ -233,16 +235,46 @@ class ChangelogBuilder:
text += f" * {issue}\n"
return text
- def _find_linked(self):
+ def _find_linked(self, include_relpreps=[], exclude_relpreps=[]):
self.issues = []
self.issues_build = []
+ if include_relpreps is None:
+ include_relpreps = [self.relprep_issue]
+ elif self.relprep_issue not in include_relpreps:
+ include_relpreps.append(self.relprep_issue)
+ if exclude_relpreps is None:
+ exclude_relpreps = []
+
+ included = {}
+ excluded = set()
+ for relprep in include_relpreps:
+ included.update(
+ {
+ issue["references"]["full"]: issue
+ for issue in self._get_linked_issues(relprep)
+ }
+ )
+ for relprep in exclude_relpreps:
+ excluded.update(
+ [
+ issue["references"]["full"]
+ for issue in self._get_linked_issues(relprep)
+ ]
+ )
+ for ex in excluded:
+ if ex in included:
+ included.pop(ex)
+ for data in included.values():
+ self._add_issue(data)
+
+ def _get_linked_issues(self, issue_id):
r = requests.get(
- f"{API_URL}/projects/{PROJECT_ID}/issues/{self.issue_id}/links",
+ f"{API_URL}/projects/{PROJECT_ID}/issues/{issue_id}/links",
headers=self.headers,
)
- for i in r.json():
- self._add_issue(i)
+ r.raise_for_status()
+ return r.json()
def _add_issue(self, gitlab_data):
self._add_entry(Issue(gitlab_data, self.is_mullvad))
@@ -334,6 +366,16 @@ if __name__ == "__main__":
help="New Mullvad Browser Extension version (if updated)",
)
parser.add_argument("--ublock", help="New uBlock version (if updated)")
+ parser.add_argument(
+ "--exclude-from",
+ help="Relprep issues to remove entries from, useful when doing a major release",
+ nargs="*",
+ )
+ parser.add_argument(
+ "--include-from",
+ help="Relprep issues to add entries from, useful when doing a major release",
+ nargs="*",
+ )
args = parser.parse_args()
if not args.issue_version:
@@ -350,17 +392,4 @@ if __name__ == "__main__":
sys.exit(2)
is_mullvad = args.browser == "mullvad-browser" if args.browser else None
cb = ChangelogBuilder(token, args.issue_version, is_mullvad)
- print(
- cb.create(
- date=args.date,
- firefox=args.firefox,
- tor=args.tor,
- noscript=args.noscript,
- openssl=args.openssl,
- zlib=args.zlib,
- zstd=args.zstd,
- go=args.go,
- mb_extension=args.mb_extension,
- ublock=args.ublock,
- )
- )
+ print(cb.create(**vars(args)))
=====================================
tools/relprep.py
=====================================
@@ -250,6 +250,7 @@ class ReleasePreparation:
logger.debug("About to fetch Firefox from %s.", remote)
repo.remotes["origin"].fetch()
tags = get_sorted_tags(repo)
+ tag_info = None
for t in tags:
m = re.match(
r"(\w+-browser)-([^-]+)-([\d\.]+)-(\d+)-build(\d+)", t.tag
@@ -259,8 +260,21 @@ class ReleasePreparation:
and m.group(1) == browser
and m.group(3) == self.version.major
):
+ logger.debug("Matched tag %s.", t.tag)
# firefox-version, rebase, build
- return (m.group(2), int(m.group(4)), int(m.group(5)))
+ tag_info = [m.group(2), int(m.group(4)), int(m.group(5))]
+ break
+ if tag_info is None:
+ raise RuntimeError("No compatible tag found.")
+ branch = t.tag[: m.end(4)]
+ logger.debug("Checking if tag %s is head of %s.", t.tag, branch)
+ if t.object != repo.remotes["origin"].refs[branch].commit:
+ logger.info(
+ "Found new commits after tag %s, bumping the build number preemptively.",
+ t.tag,
+ )
+ tag_info[2] += 1
+ return tag_info
def update_firefox_android(self):
logger.info("Updating firefox-android")
@@ -402,9 +416,7 @@ class ReleasePreparation:
source = self.find_input(config, "openssl")
# No need to update URL, as it uses a variable.
- hash_url = (
- f"https://github.com/openssl/openssl/releases/download/openssl-{version}/open…"
- )
+ hash_url = f"https://github.com/openssl/openssl/releases/download/openssl-{version}/open…"
r = requests.get(hash_url)
r.raise_for_status()
source["sha256sum"] = r.text.strip()
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/…
You're receiving this email because of your account on gitlab.torproject.org.
morgan pushed to branch maint-14.0 at The Tor Project / Applications / tor-browser-build
Commits:
11cdd993 by Pier Angelo Vendrame at 2024-10-17T16:05:28+02:00
Bug 41273: Bump Firefox/GeckoView tag when does not match HEAD.
If we detect the tag we would use for build does not match the HEAD of
the branch we are using, bump it preemptively.
Normally, we would add that tag when ready to build, so this change
can help us in case we forget to.
If the script is overzealous, we can change the build number before
committing.
- - - - -
1 changed file:
- tools/relprep.py
Changes:
=====================================
tools/relprep.py
=====================================
@@ -242,6 +242,7 @@ class ReleasePreparation:
logger.debug("About to fetch Firefox from %s.", remote)
repo.remotes["origin"].fetch()
tags = get_sorted_tags(repo)
+ tag_info = None
for t in tags:
m = re.match(
r"(\w+-browser)-([^-]+)-([\d\.]+)-(\d+)-build(\d+)", t.tag
@@ -251,8 +252,21 @@ class ReleasePreparation:
and m.group(1) == browser
and m.group(3) == self.version.major
):
+ logger.debug("Matched tag %s.", t.tag)
# firefox-version, rebase, build
- return (m.group(2), int(m.group(4)), int(m.group(5)))
+ tag_info = [m.group(2), int(m.group(4)), int(m.group(5))]
+ break
+ if tag_info is None:
+ raise RuntimeError("No compatible tag found.")
+ branch = t.tag[: m.end(4)]
+ logger.debug("Checking if tag %s is head of %s.", t.tag, branch)
+ if t.object != repo.remotes["origin"].refs[branch].commit:
+ logger.info(
+ "Found new commits after tag %s, bumping the build number preemptively.",
+ t.tag,
+ )
+ tag_info[2] += 1
+ return tag_info
def update_translations(self):
logger.info("Updating translations")
@@ -373,9 +387,7 @@ class ReleasePreparation:
source = self.find_input(config, "openssl")
# No need to update URL, as it uses a variable.
- hash_url = (
- f"https://github.com/openssl/openssl/releases/download/openssl-{version}/open…"
- )
+ hash_url = f"https://github.com/openssl/openssl/releases/download/openssl-{version}/open…"
r = requests.get(hash_url)
r.raise_for_status()
source["sha256sum"] = r.text.strip()
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/1…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/1…
You're receiving this email because of your account on gitlab.torproject.org.
morgan pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
11cdd993 by Pier Angelo Vendrame at 2024-10-17T16:05:28+02:00
Bug 41273: Bump Firefox/GeckoView tag when does not match HEAD.
If we detect the tag we would use for build does not match the HEAD of
the branch we are using, bump it preemptively.
Normally, we would add that tag when ready to build, so this change
can help us in case we forget to.
If the script is overzealous, we can change the build number before
committing.
- - - - -
1 changed file:
- tools/relprep.py
Changes:
=====================================
tools/relprep.py
=====================================
@@ -242,6 +242,7 @@ class ReleasePreparation:
logger.debug("About to fetch Firefox from %s.", remote)
repo.remotes["origin"].fetch()
tags = get_sorted_tags(repo)
+ tag_info = None
for t in tags:
m = re.match(
r"(\w+-browser)-([^-]+)-([\d\.]+)-(\d+)-build(\d+)", t.tag
@@ -251,8 +252,21 @@ class ReleasePreparation:
and m.group(1) == browser
and m.group(3) == self.version.major
):
+ logger.debug("Matched tag %s.", t.tag)
# firefox-version, rebase, build
- return (m.group(2), int(m.group(4)), int(m.group(5)))
+ tag_info = [m.group(2), int(m.group(4)), int(m.group(5))]
+ break
+ if tag_info is None:
+ raise RuntimeError("No compatible tag found.")
+ branch = t.tag[: m.end(4)]
+ logger.debug("Checking if tag %s is head of %s.", t.tag, branch)
+ if t.object != repo.remotes["origin"].refs[branch].commit:
+ logger.info(
+ "Found new commits after tag %s, bumping the build number preemptively.",
+ t.tag,
+ )
+ tag_info[2] += 1
+ return tag_info
def update_translations(self):
logger.info("Updating translations")
@@ -373,9 +387,7 @@ class ReleasePreparation:
source = self.find_input(config, "openssl")
# No need to update URL, as it uses a variable.
- hash_url = (
- f"https://github.com/openssl/openssl/releases/download/openssl-{version}/open…"
- )
+ hash_url = f"https://github.com/openssl/openssl/releases/download/openssl-{version}/open…"
r = requests.get(hash_url)
r.raise_for_status()
source["sha256sum"] = r.text.strip()
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/1…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/1…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch maint-14.0 at The Tor Project / Applications / tor-browser-build
Commits:
d35b529e by Pier Angelo Vendrame at 2024-10-17T15:38:12+02:00
Bug 41274: Improve changelog generation for major releases.
This commits implements --include-from to get linked issues from many
issues (potentially all the alpha release preps).
It also implements --exclude-from to avoid including issues that were
already linked to other rel preps (potentially the previous stables).
Also, make sure to look only for currently open issues, otherwise all
the various alpha relpreps would be matched when specifying the version
number.
- - - - -
1 changed file:
- tools/fetch_changelogs.py
Changes:
=====================================
tools/fetch_changelogs.py
=====================================
@@ -157,7 +157,7 @@ class ChangelogBuilder:
elif not is_mullvad and is_mullvad is not None:
labels += "¬[labels]=Sponsor 131"
r = requests.get(
- f"{API_URL}/projects/{PROJECT_ID}/issues?labels={labels}&search={issue_or_version}&in=title",
+ f"{API_URL}/projects/{PROJECT_ID}/issues?labels={labels}&search={issue_or_version}&in=title&state=opened",
headers=self.headers,
)
r.raise_for_status()
@@ -197,7 +197,7 @@ class ChangelogBuilder:
raise ValueError(
"Inconsistency detected: a browser was explicitly specified, but the issue does not have the correct labels."
)
- self.issue_id = issue["iid"]
+ self.relprep_issue = issue["iid"]
self.is_mullvad = has_s131
if self.version is None:
@@ -206,7 +206,9 @@ class ChangelogBuilder:
self.version = version_match.group()
def create(self, **kwargs):
- self._find_linked()
+ self._find_linked(
+ kwargs.get("include_from"), kwargs.get("exclude_from")
+ )
self._add_updates(kwargs)
self._sort_issues()
name = "Mullvad" if self.is_mullvad else "Tor"
@@ -234,16 +236,46 @@ class ChangelogBuilder:
text += f" * {issue}\n"
return text
- def _find_linked(self):
+ def _find_linked(self, include_relpreps=[], exclude_relpreps=[]):
self.issues = []
self.issues_build = []
+ if include_relpreps is None:
+ include_relpreps = [self.relprep_issue]
+ elif self.relprep_issue not in include_relpreps:
+ include_relpreps.append(self.relprep_issue)
+ if exclude_relpreps is None:
+ exclude_relpreps = []
+
+ included = {}
+ excluded = set()
+ for relprep in include_relpreps:
+ included.update(
+ {
+ issue["references"]["full"]: issue
+ for issue in self._get_linked_issues(relprep)
+ }
+ )
+ for relprep in exclude_relpreps:
+ excluded.update(
+ [
+ issue["references"]["full"]
+ for issue in self._get_linked_issues(relprep)
+ ]
+ )
+ for ex in excluded:
+ if ex in included:
+ included.pop(ex)
+ for data in included.values():
+ self._add_issue(data)
+
+ def _get_linked_issues(self, issue_id):
r = requests.get(
- f"{API_URL}/projects/{PROJECT_ID}/issues/{self.issue_id}/links",
+ f"{API_URL}/projects/{PROJECT_ID}/issues/{issue_id}/links",
headers=self.headers,
)
- for i in r.json():
- self._add_issue(i)
+ r.raise_for_status()
+ return r.json()
def _add_issue(self, gitlab_data):
self._add_entry(Issue(gitlab_data, self.is_mullvad))
@@ -335,6 +367,16 @@ if __name__ == "__main__":
help="New Mullvad Browser Extension version (if updated)",
)
parser.add_argument("--ublock", help="New uBlock version (if updated)")
+ parser.add_argument(
+ "--exclude-from",
+ help="Relprep issues to remove entries from, useful when doing a major release",
+ nargs="*",
+ )
+ parser.add_argument(
+ "--include-from",
+ help="Relprep issues to add entries from, useful when doing a major release",
+ nargs="*",
+ )
args = parser.parse_args()
if not args.issue_version:
@@ -351,17 +393,4 @@ if __name__ == "__main__":
sys.exit(2)
is_mullvad = args.browser == "mullvad-browser" if args.browser else None
cb = ChangelogBuilder(token, args.issue_version, is_mullvad)
- print(
- cb.create(
- date=args.date,
- firefox=args.firefox,
- tor=args.tor,
- noscript=args.noscript,
- openssl=args.openssl,
- zlib=args.zlib,
- zstd=args.zstd,
- go=args.go,
- mb_extension=args.mb_extension,
- ublock=args.ublock,
- )
- )
+ print(cb.create(**vars(args)))
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/d…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/d…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
d35b529e by Pier Angelo Vendrame at 2024-10-17T15:38:12+02:00
Bug 41274: Improve changelog generation for major releases.
This commits implements --include-from to get linked issues from many
issues (potentially all the alpha release preps).
It also implements --exclude-from to avoid including issues that were
already linked to other rel preps (potentially the previous stables).
Also, make sure to look only for currently open issues, otherwise all
the various alpha relpreps would be matched when specifying the version
number.
- - - - -
1 changed file:
- tools/fetch_changelogs.py
Changes:
=====================================
tools/fetch_changelogs.py
=====================================
@@ -157,7 +157,7 @@ class ChangelogBuilder:
elif not is_mullvad and is_mullvad is not None:
labels += "¬[labels]=Sponsor 131"
r = requests.get(
- f"{API_URL}/projects/{PROJECT_ID}/issues?labels={labels}&search={issue_or_version}&in=title",
+ f"{API_URL}/projects/{PROJECT_ID}/issues?labels={labels}&search={issue_or_version}&in=title&state=opened",
headers=self.headers,
)
r.raise_for_status()
@@ -197,7 +197,7 @@ class ChangelogBuilder:
raise ValueError(
"Inconsistency detected: a browser was explicitly specified, but the issue does not have the correct labels."
)
- self.issue_id = issue["iid"]
+ self.relprep_issue = issue["iid"]
self.is_mullvad = has_s131
if self.version is None:
@@ -206,7 +206,9 @@ class ChangelogBuilder:
self.version = version_match.group()
def create(self, **kwargs):
- self._find_linked()
+ self._find_linked(
+ kwargs.get("include_from"), kwargs.get("exclude_from")
+ )
self._add_updates(kwargs)
self._sort_issues()
name = "Mullvad" if self.is_mullvad else "Tor"
@@ -234,16 +236,46 @@ class ChangelogBuilder:
text += f" * {issue}\n"
return text
- def _find_linked(self):
+ def _find_linked(self, include_relpreps=[], exclude_relpreps=[]):
self.issues = []
self.issues_build = []
+ if include_relpreps is None:
+ include_relpreps = [self.relprep_issue]
+ elif self.relprep_issue not in include_relpreps:
+ include_relpreps.append(self.relprep_issue)
+ if exclude_relpreps is None:
+ exclude_relpreps = []
+
+ included = {}
+ excluded = set()
+ for relprep in include_relpreps:
+ included.update(
+ {
+ issue["references"]["full"]: issue
+ for issue in self._get_linked_issues(relprep)
+ }
+ )
+ for relprep in exclude_relpreps:
+ excluded.update(
+ [
+ issue["references"]["full"]
+ for issue in self._get_linked_issues(relprep)
+ ]
+ )
+ for ex in excluded:
+ if ex in included:
+ included.pop(ex)
+ for data in included.values():
+ self._add_issue(data)
+
+ def _get_linked_issues(self, issue_id):
r = requests.get(
- f"{API_URL}/projects/{PROJECT_ID}/issues/{self.issue_id}/links",
+ f"{API_URL}/projects/{PROJECT_ID}/issues/{issue_id}/links",
headers=self.headers,
)
- for i in r.json():
- self._add_issue(i)
+ r.raise_for_status()
+ return r.json()
def _add_issue(self, gitlab_data):
self._add_entry(Issue(gitlab_data, self.is_mullvad))
@@ -335,6 +367,16 @@ if __name__ == "__main__":
help="New Mullvad Browser Extension version (if updated)",
)
parser.add_argument("--ublock", help="New uBlock version (if updated)")
+ parser.add_argument(
+ "--exclude-from",
+ help="Relprep issues to remove entries from, useful when doing a major release",
+ nargs="*",
+ )
+ parser.add_argument(
+ "--include-from",
+ help="Relprep issues to add entries from, useful when doing a major release",
+ nargs="*",
+ )
args = parser.parse_args()
if not args.issue_version:
@@ -351,17 +393,4 @@ if __name__ == "__main__":
sys.exit(2)
is_mullvad = args.browser == "mullvad-browser" if args.browser else None
cb = ChangelogBuilder(token, args.issue_version, is_mullvad)
- print(
- cb.create(
- date=args.date,
- firefox=args.firefox,
- tor=args.tor,
- noscript=args.noscript,
- openssl=args.openssl,
- zlib=args.zlib,
- zstd=args.zstd,
- go=args.go,
- mb_extension=args.mb_extension,
- ublock=args.ublock,
- )
- )
+ print(cb.create(**vars(args)))
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/d…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/d…
You're receiving this email because of your account on gitlab.torproject.org.
morgan pushed to branch mullvad-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Mullvad Browser
Commits:
5d608b10 by hackademix at 2024-10-16T22:11:51+00:00
Bug 43101: Deep link to the startup security warning explanation.
- - - - -
1 changed file:
- security/sandbox/common/SandboxUtils.sys.mjs
Changes:
=====================================
security/sandbox/common/SandboxUtils.sys.mjs
=====================================
@@ -37,7 +37,7 @@ export var SandboxUtils = {
let buttons = [
{
- supportPage: "install-firefox-linux",
+ supportPage: "install-firefox-linux#w_security-features-warning",
"l10n-id": "sandbox-unprivileged-namespaces-howtofix",
},
{
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/5d6…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/5d6…
You're receiving this email because of your account on gitlab.torproject.org.
morgan pushed to branch base-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser
Commits:
7a7678d2 by hackademix at 2024-10-16T22:11:05+00:00
Bug 43101: Deep link to the startup security warning explanation.
- - - - -
1 changed file:
- security/sandbox/common/SandboxUtils.sys.mjs
Changes:
=====================================
security/sandbox/common/SandboxUtils.sys.mjs
=====================================
@@ -37,7 +37,7 @@ export var SandboxUtils = {
let buttons = [
{
- supportPage: "install-firefox-linux",
+ supportPage: "install-firefox-linux#w_security-features-warning",
"l10n-id": "sandbox-unprivileged-namespaces-howtofix",
},
{
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/7a7678d…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/7a7678d…
You're receiving this email because of your account on gitlab.torproject.org.
morgan pushed to branch tor-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser
Commits:
91952ef5 by hackademix at 2024-10-16T23:58:58+02:00
Bug 43101: Deep link to the startup security warning explanation.
- - - - -
1 changed file:
- security/sandbox/common/SandboxUtils.sys.mjs
Changes:
=====================================
security/sandbox/common/SandboxUtils.sys.mjs
=====================================
@@ -37,7 +37,7 @@ export var SandboxUtils = {
let buttons = [
{
- supportPage: "install-firefox-linux",
+ supportPage: "install-firefox-linux#w_security-features-warning",
"l10n-id": "sandbox-unprivileged-namespaces-howtofix",
},
{
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/91952ef…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/91952ef…
You're receiving this email because of your account on gitlab.torproject.org.
morgan pushed to branch mullvad-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Mullvad Browser
Commits:
e231e8a4 by hackademix at 2024-10-16T21:54:08+00:00
fixup! Bug 32308: Use direct browser sizing for letterboxing.
Bug 43217: Do not round letterboxing corners in fullscreen.
- - - - -
1 changed file:
- browser/base/content/browser.css
Changes:
=====================================
browser/base/content/browser.css
=====================================
@@ -113,6 +113,11 @@
background: var(--letterboxing-gradient-color2);
}
+browser:fullscreen {
+ --letterboxing-border-top-radius: 0;
+ --letterboxing-border-radius: 0;
+}
+
:root:not([inDOMFullscreen]) .letterboxing.letterboxing-ready .browserContainer:not(.responsive-mode)
> .browserStack:not(.exclude-letterboxing) {
place-content: var(--letterboxing-vertical-alignment) center;
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/e23…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/e23…
You're receiving this email because of your account on gitlab.torproject.org.
morgan pushed to branch base-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser
Commits:
b5bb3a75 by hackademix at 2024-10-16T21:53:32+00:00
fixup! Bug 32308: Use direct browser sizing for letterboxing.
Bug 43217: Do not round letterboxing corners in fullscreen.
- - - - -
1 changed file:
- browser/base/content/browser.css
Changes:
=====================================
browser/base/content/browser.css
=====================================
@@ -113,6 +113,11 @@
background: var(--letterboxing-gradient-color2);
}
+browser:fullscreen {
+ --letterboxing-border-top-radius: 0;
+ --letterboxing-border-radius: 0;
+}
+
:root:not([inDOMFullscreen]) .letterboxing.letterboxing-ready .browserContainer:not(.responsive-mode)
> .browserStack:not(.exclude-letterboxing) {
place-content: var(--letterboxing-vertical-alignment) center;
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/b5bb3a7…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/b5bb3a7…
You're receiving this email because of your account on gitlab.torproject.org.
morgan pushed to branch tor-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser
Commits:
e17547a9 by hackademix at 2024-10-16T23:28:06+02:00
fixup! Bug 32308: Use direct browser sizing for letterboxing.
Bug 43217: Do not round letterboxing corners in fullscreen.
- - - - -
1 changed file:
- browser/base/content/browser.css
Changes:
=====================================
browser/base/content/browser.css
=====================================
@@ -113,6 +113,11 @@
background: var(--letterboxing-gradient-color2);
}
+browser:fullscreen {
+ --letterboxing-border-top-radius: 0;
+ --letterboxing-border-radius: 0;
+}
+
:root:not([inDOMFullscreen]) .letterboxing.letterboxing-ready .browserContainer:not(.responsive-mode)
> .browserStack:not(.exclude-letterboxing) {
place-content: var(--letterboxing-vertical-alignment) center;
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/e17547a…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/e17547a…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch mullvad-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Mullvad Browser
Commits:
666891c7 by stransky at 2024-10-15T22:24:49+02:00
Bug 1501744 [Linux] Fill PointerEvents on the Gtk backend r=emilio
Patch author is tpxp <tpxp(a)live.fr>
Differential Revision: https://phabricator.services.mozilla.com/D215201
- - - - -
1 changed file:
- widget/gtk/nsWindow.cpp
Changes:
=====================================
widget/gtk/nsWindow.cpp
=====================================
@@ -784,6 +784,53 @@ void nsWindow::ReparentNativeWidget(nsIWidget* aNewParent) {
GtkWindowSetTransientFor(GTK_WINDOW(mShell), newParentWidget);
}
+static void InitPenEvent(WidgetMouseEvent& aGeckoEvent, GdkEvent* aEvent) {
+ // Find the source of the event
+ GdkDevice* device = gdk_event_get_source_device(aEvent);
+ GdkInputSource eSource = gdk_device_get_source(device);
+ gdouble value;
+
+ // We distinguish touch screens from pens using the event type
+ // Eraser corresponds to the pen with the "erase" button pressed
+ if (eSource != GDK_SOURCE_PEN && eSource != GDK_SOURCE_ERASER) {
+ bool XWaylandPen = false;
+#ifdef MOZ_X11
+ // Workaround : When using Xwayland, pens are reported as
+ // GDK_SOURCE_TOUCHSCREEN If eSource is GDK_SOURCE_TOUCHSCREEN and the
+ // GDK_AXIS_XTILT and GDK_AXIS_YTILT axes are reported then it's a pen and
+ // not a finger on a screen. Yes, that's a stupid heuristic but it works...
+ // Note, however, that the tilt values are not reliable
+ // Another approach could be use the device tool type, but that's only
+ // available in GTK > 3.22
+ XWaylandPen = (eSource == GDK_SOURCE_TOUCHSCREEN && GdkIsX11Display() &&
+ gdk_event_get_axis(aEvent, GDK_AXIS_XTILT, &value) &&
+ gdk_event_get_axis(aEvent, GDK_AXIS_YTILT, &value));
+#endif
+ if (!XWaylandPen) {
+ return;
+ }
+ LOGW("InitPenEvent(): Is XWayland pen");
+ }
+
+ aGeckoEvent.mInputSource = dom::MouseEvent_Binding::MOZ_SOURCE_PEN;
+ aGeckoEvent.pointerId = 1;
+
+ // The range of xtilt and ytilt are -1 to 1. Normalize it to -90 to 90.
+ if (gdk_event_get_axis(aEvent, GDK_AXIS_XTILT, &value)) {
+ aGeckoEvent.tiltX = int32_t(NS_round(value * 90));
+ }
+ if (gdk_event_get_axis(aEvent, GDK_AXIS_YTILT, &value)) {
+ aGeckoEvent.tiltY = int32_t(NS_round(value * 90));
+ }
+ if (gdk_event_get_axis(aEvent, GDK_AXIS_PRESSURE, &value)) {
+ aGeckoEvent.mPressure = (float)value;
+ // Make sure the pression is acceptable
+ MOZ_ASSERT(aGeckoEvent.mPressure >= 0.0 && aGeckoEvent.mPressure <= 1.0);
+ }
+
+ LOGW("InitPenEvent(): pressure %f\n", aGeckoEvent.mPressure);
+}
+
void nsWindow::SetModal(bool aModal) {
LOG("nsWindow::SetModal %d\n", aModal);
if (mIsDestroyed) {
@@ -4530,6 +4577,7 @@ void nsWindow::OnMotionNotifyEvent(GdkEventMotion* aEvent) {
event.AssignEventTime(GetWidgetEventTime(aEvent->time));
KeymapWrapper::InitInputEvent(event, aEvent->state);
+ InitPenEvent(event, (GdkEvent*)aEvent);
DispatchInputEvent(&event);
}
@@ -4806,6 +4854,7 @@ void nsWindow::OnButtonPressEvent(GdkEventButton* aEvent) {
InitButtonEvent(event, aEvent, refPoint);
event.mPressure = mLastMotionPressure;
+ InitPenEvent(event, (GdkEvent*)aEvent);
nsIWidget::ContentAndAPZEventStatus eventStatus = DispatchInputEvent(&event);
const bool defaultPrevented =
@@ -4875,6 +4924,8 @@ void nsWindow::OnButtonReleaseEvent(GdkEventButton* aEvent) {
// to use it for the doubleclick position check.
const LayoutDeviceIntPoint pos = event.mRefPoint;
+ InitPenEvent(event, (GdkEvent*)aEvent);
+
nsIWidget::ContentAndAPZEventStatus eventStatus = DispatchInputEvent(&event);
const bool defaultPrevented =
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/666…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/666…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch base-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser
Commits:
e9810c42 by stransky at 2024-10-15T22:22:35+02:00
Bug 1501744 [Linux] Fill PointerEvents on the Gtk backend r=emilio
Patch author is tpxp <tpxp(a)live.fr>
Differential Revision: https://phabricator.services.mozilla.com/D215201
- - - - -
1 changed file:
- widget/gtk/nsWindow.cpp
Changes:
=====================================
widget/gtk/nsWindow.cpp
=====================================
@@ -784,6 +784,53 @@ void nsWindow::ReparentNativeWidget(nsIWidget* aNewParent) {
GtkWindowSetTransientFor(GTK_WINDOW(mShell), newParentWidget);
}
+static void InitPenEvent(WidgetMouseEvent& aGeckoEvent, GdkEvent* aEvent) {
+ // Find the source of the event
+ GdkDevice* device = gdk_event_get_source_device(aEvent);
+ GdkInputSource eSource = gdk_device_get_source(device);
+ gdouble value;
+
+ // We distinguish touch screens from pens using the event type
+ // Eraser corresponds to the pen with the "erase" button pressed
+ if (eSource != GDK_SOURCE_PEN && eSource != GDK_SOURCE_ERASER) {
+ bool XWaylandPen = false;
+#ifdef MOZ_X11
+ // Workaround : When using Xwayland, pens are reported as
+ // GDK_SOURCE_TOUCHSCREEN If eSource is GDK_SOURCE_TOUCHSCREEN and the
+ // GDK_AXIS_XTILT and GDK_AXIS_YTILT axes are reported then it's a pen and
+ // not a finger on a screen. Yes, that's a stupid heuristic but it works...
+ // Note, however, that the tilt values are not reliable
+ // Another approach could be use the device tool type, but that's only
+ // available in GTK > 3.22
+ XWaylandPen = (eSource == GDK_SOURCE_TOUCHSCREEN && GdkIsX11Display() &&
+ gdk_event_get_axis(aEvent, GDK_AXIS_XTILT, &value) &&
+ gdk_event_get_axis(aEvent, GDK_AXIS_YTILT, &value));
+#endif
+ if (!XWaylandPen) {
+ return;
+ }
+ LOGW("InitPenEvent(): Is XWayland pen");
+ }
+
+ aGeckoEvent.mInputSource = dom::MouseEvent_Binding::MOZ_SOURCE_PEN;
+ aGeckoEvent.pointerId = 1;
+
+ // The range of xtilt and ytilt are -1 to 1. Normalize it to -90 to 90.
+ if (gdk_event_get_axis(aEvent, GDK_AXIS_XTILT, &value)) {
+ aGeckoEvent.tiltX = int32_t(NS_round(value * 90));
+ }
+ if (gdk_event_get_axis(aEvent, GDK_AXIS_YTILT, &value)) {
+ aGeckoEvent.tiltY = int32_t(NS_round(value * 90));
+ }
+ if (gdk_event_get_axis(aEvent, GDK_AXIS_PRESSURE, &value)) {
+ aGeckoEvent.mPressure = (float)value;
+ // Make sure the pression is acceptable
+ MOZ_ASSERT(aGeckoEvent.mPressure >= 0.0 && aGeckoEvent.mPressure <= 1.0);
+ }
+
+ LOGW("InitPenEvent(): pressure %f\n", aGeckoEvent.mPressure);
+}
+
void nsWindow::SetModal(bool aModal) {
LOG("nsWindow::SetModal %d\n", aModal);
if (mIsDestroyed) {
@@ -4530,6 +4577,7 @@ void nsWindow::OnMotionNotifyEvent(GdkEventMotion* aEvent) {
event.AssignEventTime(GetWidgetEventTime(aEvent->time));
KeymapWrapper::InitInputEvent(event, aEvent->state);
+ InitPenEvent(event, (GdkEvent*)aEvent);
DispatchInputEvent(&event);
}
@@ -4806,6 +4854,7 @@ void nsWindow::OnButtonPressEvent(GdkEventButton* aEvent) {
InitButtonEvent(event, aEvent, refPoint);
event.mPressure = mLastMotionPressure;
+ InitPenEvent(event, (GdkEvent*)aEvent);
nsIWidget::ContentAndAPZEventStatus eventStatus = DispatchInputEvent(&event);
const bool defaultPrevented =
@@ -4875,6 +4924,8 @@ void nsWindow::OnButtonReleaseEvent(GdkEventButton* aEvent) {
// to use it for the doubleclick position check.
const LayoutDeviceIntPoint pos = event.mRefPoint;
+ InitPenEvent(event, (GdkEvent*)aEvent);
+
nsIWidget::ContentAndAPZEventStatus eventStatus = DispatchInputEvent(&event);
const bool defaultPrevented =
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/e9810c4…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/e9810c4…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch tor-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser
Commits:
53e645fe by stransky at 2024-10-15T21:56:36+02:00
Bug 1501744 [Linux] Fill PointerEvents on the Gtk backend r=emilio
Patch author is tpxp <tpxp(a)live.fr>
Differential Revision: https://phabricator.services.mozilla.com/D215201
- - - - -
1 changed file:
- widget/gtk/nsWindow.cpp
Changes:
=====================================
widget/gtk/nsWindow.cpp
=====================================
@@ -784,6 +784,53 @@ void nsWindow::ReparentNativeWidget(nsIWidget* aNewParent) {
GtkWindowSetTransientFor(GTK_WINDOW(mShell), newParentWidget);
}
+static void InitPenEvent(WidgetMouseEvent& aGeckoEvent, GdkEvent* aEvent) {
+ // Find the source of the event
+ GdkDevice* device = gdk_event_get_source_device(aEvent);
+ GdkInputSource eSource = gdk_device_get_source(device);
+ gdouble value;
+
+ // We distinguish touch screens from pens using the event type
+ // Eraser corresponds to the pen with the "erase" button pressed
+ if (eSource != GDK_SOURCE_PEN && eSource != GDK_SOURCE_ERASER) {
+ bool XWaylandPen = false;
+#ifdef MOZ_X11
+ // Workaround : When using Xwayland, pens are reported as
+ // GDK_SOURCE_TOUCHSCREEN If eSource is GDK_SOURCE_TOUCHSCREEN and the
+ // GDK_AXIS_XTILT and GDK_AXIS_YTILT axes are reported then it's a pen and
+ // not a finger on a screen. Yes, that's a stupid heuristic but it works...
+ // Note, however, that the tilt values are not reliable
+ // Another approach could be use the device tool type, but that's only
+ // available in GTK > 3.22
+ XWaylandPen = (eSource == GDK_SOURCE_TOUCHSCREEN && GdkIsX11Display() &&
+ gdk_event_get_axis(aEvent, GDK_AXIS_XTILT, &value) &&
+ gdk_event_get_axis(aEvent, GDK_AXIS_YTILT, &value));
+#endif
+ if (!XWaylandPen) {
+ return;
+ }
+ LOGW("InitPenEvent(): Is XWayland pen");
+ }
+
+ aGeckoEvent.mInputSource = dom::MouseEvent_Binding::MOZ_SOURCE_PEN;
+ aGeckoEvent.pointerId = 1;
+
+ // The range of xtilt and ytilt are -1 to 1. Normalize it to -90 to 90.
+ if (gdk_event_get_axis(aEvent, GDK_AXIS_XTILT, &value)) {
+ aGeckoEvent.tiltX = int32_t(NS_round(value * 90));
+ }
+ if (gdk_event_get_axis(aEvent, GDK_AXIS_YTILT, &value)) {
+ aGeckoEvent.tiltY = int32_t(NS_round(value * 90));
+ }
+ if (gdk_event_get_axis(aEvent, GDK_AXIS_PRESSURE, &value)) {
+ aGeckoEvent.mPressure = (float)value;
+ // Make sure the pression is acceptable
+ MOZ_ASSERT(aGeckoEvent.mPressure >= 0.0 && aGeckoEvent.mPressure <= 1.0);
+ }
+
+ LOGW("InitPenEvent(): pressure %f\n", aGeckoEvent.mPressure);
+}
+
void nsWindow::SetModal(bool aModal) {
LOG("nsWindow::SetModal %d\n", aModal);
if (mIsDestroyed) {
@@ -4530,6 +4577,7 @@ void nsWindow::OnMotionNotifyEvent(GdkEventMotion* aEvent) {
event.AssignEventTime(GetWidgetEventTime(aEvent->time));
KeymapWrapper::InitInputEvent(event, aEvent->state);
+ InitPenEvent(event, (GdkEvent*)aEvent);
DispatchInputEvent(&event);
}
@@ -4806,6 +4854,7 @@ void nsWindow::OnButtonPressEvent(GdkEventButton* aEvent) {
InitButtonEvent(event, aEvent, refPoint);
event.mPressure = mLastMotionPressure;
+ InitPenEvent(event, (GdkEvent*)aEvent);
nsIWidget::ContentAndAPZEventStatus eventStatus = DispatchInputEvent(&event);
const bool defaultPrevented =
@@ -4875,6 +4924,8 @@ void nsWindow::OnButtonReleaseEvent(GdkEventButton* aEvent) {
// to use it for the doubleclick position check.
const LayoutDeviceIntPoint pos = event.mRefPoint;
+ InitPenEvent(event, (GdkEvent*)aEvent);
+
nsIWidget::ContentAndAPZEventStatus eventStatus = DispatchInputEvent(&event);
const bool defaultPrevented =
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/53e645f…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/53e645f…
You're receiving this email because of your account on gitlab.torproject.org.