tor-commits
Threads by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 1 participants
- 215398 discussions
[Git][tpo/applications/tor-browser-build][main] Bug 41048: Remove the kcp-go project
by Pier Angelo Vendrame (@pierov) 15 Dec '23
by Pier Angelo Vendrame (@pierov) 15 Dec '23
15 Dec '23
Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
959bdfb9 by Pier Angelo Vendrame at 2023-12-15T09:15:18+00:00
Bug 41048: Remove the kcp-go project
- - - - -
1 changed file:
- − projects/kcp-go/remove-crypt-fec.patch
Changes:
=====================================
projects/kcp-go/remove-crypt-fec.patch deleted
=====================================
@@ -1,1019 +0,0 @@
-From 0b9d0759f979a5d828b747ea51771f307c53d221 Mon Sep 17 00:00:00 2001
-From: David Fifield <david(a)bamsoftware.com>
-Date: Thu, 9 Apr 2020 11:27:44 -0600
-Subject: [PATCH] Remove crypt and FEC dependencies.
-
----
- crypt.go | 618 -----------------------------------------------------
- fec.go | 337 -----------------------------
- removed.go | 29 +++
- 3 files changed, 29 insertions(+), 955 deletions(-)
- delete mode 100644 crypt.go
- delete mode 100644 fec.go
- create mode 100644 removed.go
-
-diff --git a/crypt.go b/crypt.go
-deleted file mode 100644
-index d882852..0000000
---- a/crypt.go
-+++ /dev/null
-@@ -1,618 +0,0 @@
--package kcp
--
--import (
-- "crypto/aes"
-- "crypto/cipher"
-- "crypto/des"
-- "crypto/sha1"
-- "unsafe"
--
-- xor "github.com/templexxx/xorsimd"
-- "github.com/tjfoc/gmsm/sm4"
--
-- "golang.org/x/crypto/blowfish"
-- "golang.org/x/crypto/cast5"
-- "golang.org/x/crypto/pbkdf2"
-- "golang.org/x/crypto/salsa20"
-- "golang.org/x/crypto/tea"
-- "golang.org/x/crypto/twofish"
-- "golang.org/x/crypto/xtea"
--)
--
--var (
-- initialVector = []byte{167, 115, 79, 156, 18, 172, 27, 1, 164, 21, 242, 193, 252, 120, 230, 107}
-- saltxor = `sH3CIVoF#rWLtJo6`
--)
--
--// BlockCrypt defines encryption/decryption methods for a given byte slice.
--// Notes on implementing: the data to be encrypted contains a builtin
--// nonce at the first 16 bytes
--type BlockCrypt interface {
-- // Encrypt encrypts the whole block in src into dst.
-- // Dst and src may point at the same memory.
-- Encrypt(dst, src []byte)
--
-- // Decrypt decrypts the whole block in src into dst.
-- // Dst and src may point at the same memory.
-- Decrypt(dst, src []byte)
--}
--
--type salsa20BlockCrypt struct {
-- key [32]byte
--}
--
--// NewSalsa20BlockCrypt https://en.wikipedia.org/wiki/Salsa20
--func NewSalsa20BlockCrypt(key []byte) (BlockCrypt, error) {
-- c := new(salsa20BlockCrypt)
-- copy(c.key[:], key)
-- return c, nil
--}
--
--func (c *salsa20BlockCrypt) Encrypt(dst, src []byte) {
-- salsa20.XORKeyStream(dst[8:], src[8:], src[:8], &c.key)
-- copy(dst[:8], src[:8])
--}
--func (c *salsa20BlockCrypt) Decrypt(dst, src []byte) {
-- salsa20.XORKeyStream(dst[8:], src[8:], src[:8], &c.key)
-- copy(dst[:8], src[:8])
--}
--
--type sm4BlockCrypt struct {
-- encbuf [sm4.BlockSize]byte // 64bit alignment enc/dec buffer
-- decbuf [2 * sm4.BlockSize]byte
-- block cipher.Block
--}
--
--// NewSM4BlockCrypt https://github.com/tjfoc/gmsm/tree/master/sm4
--func NewSM4BlockCrypt(key []byte) (BlockCrypt, error) {
-- c := new(sm4BlockCrypt)
-- block, err := sm4.NewCipher(key)
-- if err != nil {
-- return nil, err
-- }
-- c.block = block
-- return c, nil
--}
--
--func (c *sm4BlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
--func (c *sm4BlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
--
--type twofishBlockCrypt struct {
-- encbuf [twofish.BlockSize]byte
-- decbuf [2 * twofish.BlockSize]byte
-- block cipher.Block
--}
--
--// NewTwofishBlockCrypt https://en.wikipedia.org/wiki/Twofish
--func NewTwofishBlockCrypt(key []byte) (BlockCrypt, error) {
-- c := new(twofishBlockCrypt)
-- block, err := twofish.NewCipher(key)
-- if err != nil {
-- return nil, err
-- }
-- c.block = block
-- return c, nil
--}
--
--func (c *twofishBlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
--func (c *twofishBlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
--
--type tripleDESBlockCrypt struct {
-- encbuf [des.BlockSize]byte
-- decbuf [2 * des.BlockSize]byte
-- block cipher.Block
--}
--
--// NewTripleDESBlockCrypt https://en.wikipedia.org/wiki/Triple_DES
--func NewTripleDESBlockCrypt(key []byte) (BlockCrypt, error) {
-- c := new(tripleDESBlockCrypt)
-- block, err := des.NewTripleDESCipher(key)
-- if err != nil {
-- return nil, err
-- }
-- c.block = block
-- return c, nil
--}
--
--func (c *tripleDESBlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
--func (c *tripleDESBlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
--
--type cast5BlockCrypt struct {
-- encbuf [cast5.BlockSize]byte
-- decbuf [2 * cast5.BlockSize]byte
-- block cipher.Block
--}
--
--// NewCast5BlockCrypt https://en.wikipedia.org/wiki/CAST-128
--func NewCast5BlockCrypt(key []byte) (BlockCrypt, error) {
-- c := new(cast5BlockCrypt)
-- block, err := cast5.NewCipher(key)
-- if err != nil {
-- return nil, err
-- }
-- c.block = block
-- return c, nil
--}
--
--func (c *cast5BlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
--func (c *cast5BlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
--
--type blowfishBlockCrypt struct {
-- encbuf [blowfish.BlockSize]byte
-- decbuf [2 * blowfish.BlockSize]byte
-- block cipher.Block
--}
--
--// NewBlowfishBlockCrypt https://en.wikipedia.org/wiki/Blowfish_(cipher)
--func NewBlowfishBlockCrypt(key []byte) (BlockCrypt, error) {
-- c := new(blowfishBlockCrypt)
-- block, err := blowfish.NewCipher(key)
-- if err != nil {
-- return nil, err
-- }
-- c.block = block
-- return c, nil
--}
--
--func (c *blowfishBlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
--func (c *blowfishBlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
--
--type aesBlockCrypt struct {
-- encbuf [aes.BlockSize]byte
-- decbuf [2 * aes.BlockSize]byte
-- block cipher.Block
--}
--
--// NewAESBlockCrypt https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
--func NewAESBlockCrypt(key []byte) (BlockCrypt, error) {
-- c := new(aesBlockCrypt)
-- block, err := aes.NewCipher(key)
-- if err != nil {
-- return nil, err
-- }
-- c.block = block
-- return c, nil
--}
--
--func (c *aesBlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
--func (c *aesBlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
--
--type teaBlockCrypt struct {
-- encbuf [tea.BlockSize]byte
-- decbuf [2 * tea.BlockSize]byte
-- block cipher.Block
--}
--
--// NewTEABlockCrypt https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm
--func NewTEABlockCrypt(key []byte) (BlockCrypt, error) {
-- c := new(teaBlockCrypt)
-- block, err := tea.NewCipherWithRounds(key, 16)
-- if err != nil {
-- return nil, err
-- }
-- c.block = block
-- return c, nil
--}
--
--func (c *teaBlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
--func (c *teaBlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
--
--type xteaBlockCrypt struct {
-- encbuf [xtea.BlockSize]byte
-- decbuf [2 * xtea.BlockSize]byte
-- block cipher.Block
--}
--
--// NewXTEABlockCrypt https://en.wikipedia.org/wiki/XTEA
--func NewXTEABlockCrypt(key []byte) (BlockCrypt, error) {
-- c := new(xteaBlockCrypt)
-- block, err := xtea.NewCipher(key)
-- if err != nil {
-- return nil, err
-- }
-- c.block = block
-- return c, nil
--}
--
--func (c *xteaBlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
--func (c *xteaBlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
--
--type simpleXORBlockCrypt struct {
-- xortbl []byte
--}
--
--// NewSimpleXORBlockCrypt simple xor with key expanding
--func NewSimpleXORBlockCrypt(key []byte) (BlockCrypt, error) {
-- c := new(simpleXORBlockCrypt)
-- c.xortbl = pbkdf2.Key(key, []byte(saltxor), 32, mtuLimit, sha1.New)
-- return c, nil
--}
--
--func (c *simpleXORBlockCrypt) Encrypt(dst, src []byte) { xor.Bytes(dst, src, c.xortbl) }
--func (c *simpleXORBlockCrypt) Decrypt(dst, src []byte) { xor.Bytes(dst, src, c.xortbl) }
--
--type noneBlockCrypt struct{}
--
--// NewNoneBlockCrypt does nothing but copying
--func NewNoneBlockCrypt(key []byte) (BlockCrypt, error) {
-- return new(noneBlockCrypt), nil
--}
--
--func (c *noneBlockCrypt) Encrypt(dst, src []byte) { copy(dst, src) }
--func (c *noneBlockCrypt) Decrypt(dst, src []byte) { copy(dst, src) }
--
--// packet encryption with local CFB mode
--func encrypt(block cipher.Block, dst, src, buf []byte) {
-- switch block.BlockSize() {
-- case 8:
-- encrypt8(block, dst, src, buf)
-- case 16:
-- encrypt16(block, dst, src, buf)
-- default:
-- panic("unsupported cipher block size")
-- }
--}
--
--// optimized encryption for the ciphers which works in 8-bytes
--func encrypt8(block cipher.Block, dst, src, buf []byte) {
-- tbl := buf[:8]
-- block.Encrypt(tbl, initialVector)
-- n := len(src) / 8
-- base := 0
-- repeat := n / 8
-- left := n % 8
-- ptr_tbl := (*uint64)(unsafe.Pointer(&tbl[0]))
--
-- for i := 0; i < repeat; i++ {
-- s := src[base:][0:64]
-- d := dst[base:][0:64]
-- // 1
-- *(*uint64)(unsafe.Pointer(&d[0])) = *(*uint64)(unsafe.Pointer(&s[0])) ^ *ptr_tbl
-- block.Encrypt(tbl, d[0:8])
-- // 2
-- *(*uint64)(unsafe.Pointer(&d[8])) = *(*uint64)(unsafe.Pointer(&s[8])) ^ *ptr_tbl
-- block.Encrypt(tbl, d[8:16])
-- // 3
-- *(*uint64)(unsafe.Pointer(&d[16])) = *(*uint64)(unsafe.Pointer(&s[16])) ^ *ptr_tbl
-- block.Encrypt(tbl, d[16:24])
-- // 4
-- *(*uint64)(unsafe.Pointer(&d[24])) = *(*uint64)(unsafe.Pointer(&s[24])) ^ *ptr_tbl
-- block.Encrypt(tbl, d[24:32])
-- // 5
-- *(*uint64)(unsafe.Pointer(&d[32])) = *(*uint64)(unsafe.Pointer(&s[32])) ^ *ptr_tbl
-- block.Encrypt(tbl, d[32:40])
-- // 6
-- *(*uint64)(unsafe.Pointer(&d[40])) = *(*uint64)(unsafe.Pointer(&s[40])) ^ *ptr_tbl
-- block.Encrypt(tbl, d[40:48])
-- // 7
-- *(*uint64)(unsafe.Pointer(&d[48])) = *(*uint64)(unsafe.Pointer(&s[48])) ^ *ptr_tbl
-- block.Encrypt(tbl, d[48:56])
-- // 8
-- *(*uint64)(unsafe.Pointer(&d[56])) = *(*uint64)(unsafe.Pointer(&s[56])) ^ *ptr_tbl
-- block.Encrypt(tbl, d[56:64])
-- base += 64
-- }
--
-- switch left {
-- case 7:
-- *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *ptr_tbl
-- block.Encrypt(tbl, dst[base:])
-- base += 8
-- fallthrough
-- case 6:
-- *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *ptr_tbl
-- block.Encrypt(tbl, dst[base:])
-- base += 8
-- fallthrough
-- case 5:
-- *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *ptr_tbl
-- block.Encrypt(tbl, dst[base:])
-- base += 8
-- fallthrough
-- case 4:
-- *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *ptr_tbl
-- block.Encrypt(tbl, dst[base:])
-- base += 8
-- fallthrough
-- case 3:
-- *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *ptr_tbl
-- block.Encrypt(tbl, dst[base:])
-- base += 8
-- fallthrough
-- case 2:
-- *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *ptr_tbl
-- block.Encrypt(tbl, dst[base:])
-- base += 8
-- fallthrough
-- case 1:
-- *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *ptr_tbl
-- block.Encrypt(tbl, dst[base:])
-- base += 8
-- fallthrough
-- case 0:
-- xorBytes(dst[base:], src[base:], tbl)
-- }
--}
--
--// optimized encryption for the ciphers which works in 16-bytes
--func encrypt16(block cipher.Block, dst, src, buf []byte) {
-- tbl := buf[:16]
-- block.Encrypt(tbl, initialVector)
-- n := len(src) / 16
-- base := 0
-- repeat := n / 8
-- left := n % 8
-- for i := 0; i < repeat; i++ {
-- s := src[base:][0:128]
-- d := dst[base:][0:128]
-- // 1
-- xor.Bytes16Align(d[0:16], s[0:16], tbl)
-- block.Encrypt(tbl, d[0:16])
-- // 2
-- xor.Bytes16Align(d[16:32], s[16:32], tbl)
-- block.Encrypt(tbl, d[16:32])
-- // 3
-- xor.Bytes16Align(d[32:48], s[32:48], tbl)
-- block.Encrypt(tbl, d[32:48])
-- // 4
-- xor.Bytes16Align(d[48:64], s[48:64], tbl)
-- block.Encrypt(tbl, d[48:64])
-- // 5
-- xor.Bytes16Align(d[64:80], s[64:80], tbl)
-- block.Encrypt(tbl, d[64:80])
-- // 6
-- xor.Bytes16Align(d[80:96], s[80:96], tbl)
-- block.Encrypt(tbl, d[80:96])
-- // 7
-- xor.Bytes16Align(d[96:112], s[96:112], tbl)
-- block.Encrypt(tbl, d[96:112])
-- // 8
-- xor.Bytes16Align(d[112:128], s[112:128], tbl)
-- block.Encrypt(tbl, d[112:128])
-- base += 128
-- }
--
-- switch left {
-- case 7:
-- xor.Bytes16Align(dst[base:], src[base:], tbl)
-- block.Encrypt(tbl, dst[base:])
-- base += 16
-- fallthrough
-- case 6:
-- xor.Bytes16Align(dst[base:], src[base:], tbl)
-- block.Encrypt(tbl, dst[base:])
-- base += 16
-- fallthrough
-- case 5:
-- xor.Bytes16Align(dst[base:], src[base:], tbl)
-- block.Encrypt(tbl, dst[base:])
-- base += 16
-- fallthrough
-- case 4:
-- xor.Bytes16Align(dst[base:], src[base:], tbl)
-- block.Encrypt(tbl, dst[base:])
-- base += 16
-- fallthrough
-- case 3:
-- xor.Bytes16Align(dst[base:], src[base:], tbl)
-- block.Encrypt(tbl, dst[base:])
-- base += 16
-- fallthrough
-- case 2:
-- xor.Bytes16Align(dst[base:], src[base:], tbl)
-- block.Encrypt(tbl, dst[base:])
-- base += 16
-- fallthrough
-- case 1:
-- xor.Bytes16Align(dst[base:], src[base:], tbl)
-- block.Encrypt(tbl, dst[base:])
-- base += 16
-- fallthrough
-- case 0:
-- xorBytes(dst[base:], src[base:], tbl)
-- }
--}
--
--// decryption
--func decrypt(block cipher.Block, dst, src, buf []byte) {
-- switch block.BlockSize() {
-- case 8:
-- decrypt8(block, dst, src, buf)
-- case 16:
-- decrypt16(block, dst, src, buf)
-- default:
-- panic("unsupported cipher block size")
-- }
--}
--
--// decrypt 8 bytes block, all byte slices are supposed to be 64bit aligned
--func decrypt8(block cipher.Block, dst, src, buf []byte) {
-- tbl := buf[0:8]
-- next := buf[8:16]
-- block.Encrypt(tbl, initialVector)
-- n := len(src) / 8
-- base := 0
-- repeat := n / 8
-- left := n % 8
-- ptr_tbl := (*uint64)(unsafe.Pointer(&tbl[0]))
-- ptr_next := (*uint64)(unsafe.Pointer(&next[0]))
--
-- for i := 0; i < repeat; i++ {
-- s := src[base:][0:64]
-- d := dst[base:][0:64]
-- // 1
-- block.Encrypt(next, s[0:8])
-- *(*uint64)(unsafe.Pointer(&d[0])) = *(*uint64)(unsafe.Pointer(&s[0])) ^ *ptr_tbl
-- // 2
-- block.Encrypt(tbl, s[8:16])
-- *(*uint64)(unsafe.Pointer(&d[8])) = *(*uint64)(unsafe.Pointer(&s[8])) ^ *ptr_next
-- // 3
-- block.Encrypt(next, s[16:24])
-- *(*uint64)(unsafe.Pointer(&d[16])) = *(*uint64)(unsafe.Pointer(&s[16])) ^ *ptr_tbl
-- // 4
-- block.Encrypt(tbl, s[24:32])
-- *(*uint64)(unsafe.Pointer(&d[24])) = *(*uint64)(unsafe.Pointer(&s[24])) ^ *ptr_next
-- // 5
-- block.Encrypt(next, s[32:40])
-- *(*uint64)(unsafe.Pointer(&d[32])) = *(*uint64)(unsafe.Pointer(&s[32])) ^ *ptr_tbl
-- // 6
-- block.Encrypt(tbl, s[40:48])
-- *(*uint64)(unsafe.Pointer(&d[40])) = *(*uint64)(unsafe.Pointer(&s[40])) ^ *ptr_next
-- // 7
-- block.Encrypt(next, s[48:56])
-- *(*uint64)(unsafe.Pointer(&d[48])) = *(*uint64)(unsafe.Pointer(&s[48])) ^ *ptr_tbl
-- // 8
-- block.Encrypt(tbl, s[56:64])
-- *(*uint64)(unsafe.Pointer(&d[56])) = *(*uint64)(unsafe.Pointer(&s[56])) ^ *ptr_next
-- base += 64
-- }
--
-- switch left {
-- case 7:
-- block.Encrypt(next, src[base:])
-- *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *(*uint64)(unsafe.Pointer(&tbl[0]))
-- tbl, next = next, tbl
-- base += 8
-- fallthrough
-- case 6:
-- block.Encrypt(next, src[base:])
-- *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *(*uint64)(unsafe.Pointer(&tbl[0]))
-- tbl, next = next, tbl
-- base += 8
-- fallthrough
-- case 5:
-- block.Encrypt(next, src[base:])
-- *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *(*uint64)(unsafe.Pointer(&tbl[0]))
-- tbl, next = next, tbl
-- base += 8
-- fallthrough
-- case 4:
-- block.Encrypt(next, src[base:])
-- *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *(*uint64)(unsafe.Pointer(&tbl[0]))
-- tbl, next = next, tbl
-- base += 8
-- fallthrough
-- case 3:
-- block.Encrypt(next, src[base:])
-- *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *(*uint64)(unsafe.Pointer(&tbl[0]))
-- tbl, next = next, tbl
-- base += 8
-- fallthrough
-- case 2:
-- block.Encrypt(next, src[base:])
-- *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *(*uint64)(unsafe.Pointer(&tbl[0]))
-- tbl, next = next, tbl
-- base += 8
-- fallthrough
-- case 1:
-- block.Encrypt(next, src[base:])
-- *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *(*uint64)(unsafe.Pointer(&tbl[0]))
-- tbl, next = next, tbl
-- base += 8
-- fallthrough
-- case 0:
-- xorBytes(dst[base:], src[base:], tbl)
-- }
--}
--
--func decrypt16(block cipher.Block, dst, src, buf []byte) {
-- tbl := buf[0:16]
-- next := buf[16:32]
-- block.Encrypt(tbl, initialVector)
-- n := len(src) / 16
-- base := 0
-- repeat := n / 8
-- left := n % 8
-- for i := 0; i < repeat; i++ {
-- s := src[base:][0:128]
-- d := dst[base:][0:128]
-- // 1
-- block.Encrypt(next, s[0:16])
-- xor.Bytes16Align(d[0:16], s[0:16], tbl)
-- // 2
-- block.Encrypt(tbl, s[16:32])
-- xor.Bytes16Align(d[16:32], s[16:32], next)
-- // 3
-- block.Encrypt(next, s[32:48])
-- xor.Bytes16Align(d[32:48], s[32:48], tbl)
-- // 4
-- block.Encrypt(tbl, s[48:64])
-- xor.Bytes16Align(d[48:64], s[48:64], next)
-- // 5
-- block.Encrypt(next, s[64:80])
-- xor.Bytes16Align(d[64:80], s[64:80], tbl)
-- // 6
-- block.Encrypt(tbl, s[80:96])
-- xor.Bytes16Align(d[80:96], s[80:96], next)
-- // 7
-- block.Encrypt(next, s[96:112])
-- xor.Bytes16Align(d[96:112], s[96:112], tbl)
-- // 8
-- block.Encrypt(tbl, s[112:128])
-- xor.Bytes16Align(d[112:128], s[112:128], next)
-- base += 128
-- }
--
-- switch left {
-- case 7:
-- block.Encrypt(next, src[base:])
-- xor.Bytes16Align(dst[base:], src[base:], tbl)
-- tbl, next = next, tbl
-- base += 16
-- fallthrough
-- case 6:
-- block.Encrypt(next, src[base:])
-- xor.Bytes16Align(dst[base:], src[base:], tbl)
-- tbl, next = next, tbl
-- base += 16
-- fallthrough
-- case 5:
-- block.Encrypt(next, src[base:])
-- xor.Bytes16Align(dst[base:], src[base:], tbl)
-- tbl, next = next, tbl
-- base += 16
-- fallthrough
-- case 4:
-- block.Encrypt(next, src[base:])
-- xor.Bytes16Align(dst[base:], src[base:], tbl)
-- tbl, next = next, tbl
-- base += 16
-- fallthrough
-- case 3:
-- block.Encrypt(next, src[base:])
-- xor.Bytes16Align(dst[base:], src[base:], tbl)
-- tbl, next = next, tbl
-- base += 16
-- fallthrough
-- case 2:
-- block.Encrypt(next, src[base:])
-- xor.Bytes16Align(dst[base:], src[base:], tbl)
-- tbl, next = next, tbl
-- base += 16
-- fallthrough
-- case 1:
-- block.Encrypt(next, src[base:])
-- xor.Bytes16Align(dst[base:], src[base:], tbl)
-- tbl, next = next, tbl
-- base += 16
-- fallthrough
-- case 0:
-- xorBytes(dst[base:], src[base:], tbl)
-- }
--}
--
--// per bytes xors
--func xorBytes(dst, a, b []byte) int {
-- n := len(a)
-- if len(b) < n {
-- n = len(b)
-- }
-- if n == 0 {
-- return 0
-- }
--
-- for i := 0; i < n; i++ {
-- dst[i] = a[i] ^ b[i]
-- }
-- return n
--}
-diff --git a/fec.go b/fec.go
-deleted file mode 100644
-index 97cd40b..0000000
---- a/fec.go
-+++ /dev/null
-@@ -1,337 +0,0 @@
--package kcp
--
--import (
-- "encoding/binary"
-- "sync/atomic"
--
-- "github.com/klauspost/reedsolomon"
--)
--
--const (
-- fecHeaderSize = 6
-- fecHeaderSizePlus2 = fecHeaderSize + 2 // plus 2B data size
-- typeData = 0xf1
-- typeParity = 0xf2
-- fecExpire = 60000
--)
--
--// fecPacket is a decoded FEC packet
--type fecPacket []byte
--
--func (bts fecPacket) seqid() uint32 { return binary.LittleEndian.Uint32(bts) }
--func (bts fecPacket) flag() uint16 { return binary.LittleEndian.Uint16(bts[4:]) }
--func (bts fecPacket) data() []byte { return bts[6:] }
--
--// fecElement has auxcilliary time field
--type fecElement struct {
-- fecPacket
-- ts uint32
--}
--
--// fecDecoder for decoding incoming packets
--type fecDecoder struct {
-- rxlimit int // queue size limit
-- dataShards int
-- parityShards int
-- shardSize int
-- rx []fecElement // ordered receive queue
--
-- // caches
-- decodeCache [][]byte
-- flagCache []bool
--
-- // zeros
-- zeros []byte
--
-- // RS decoder
-- codec reedsolomon.Encoder
--}
--
--func newFECDecoder(rxlimit, dataShards, parityShards int) *fecDecoder {
-- if dataShards <= 0 || parityShards <= 0 {
-- return nil
-- }
-- if rxlimit < dataShards+parityShards {
-- return nil
-- }
--
-- dec := new(fecDecoder)
-- dec.rxlimit = rxlimit
-- dec.dataShards = dataShards
-- dec.parityShards = parityShards
-- dec.shardSize = dataShards + parityShards
-- codec, err := reedsolomon.New(dataShards, parityShards)
-- if err != nil {
-- return nil
-- }
-- dec.codec = codec
-- dec.decodeCache = make([][]byte, dec.shardSize)
-- dec.flagCache = make([]bool, dec.shardSize)
-- dec.zeros = make([]byte, mtuLimit)
-- return dec
--}
--
--// decode a fec packet
--func (dec *fecDecoder) decode(in fecPacket) (recovered [][]byte) {
-- // insertion
-- n := len(dec.rx) - 1
-- insertIdx := 0
-- for i := n; i >= 0; i-- {
-- if in.seqid() == dec.rx[i].seqid() { // de-duplicate
-- return nil
-- } else if _itimediff(in.seqid(), dec.rx[i].seqid()) > 0 { // insertion
-- insertIdx = i + 1
-- break
-- }
-- }
--
-- // make a copy
-- pkt := fecPacket(xmitBuf.Get().([]byte)[:len(in)])
-- copy(pkt, in)
-- elem := fecElement{pkt, currentMs()}
--
-- // insert into ordered rx queue
-- if insertIdx == n+1 {
-- dec.rx = append(dec.rx, elem)
-- } else {
-- dec.rx = append(dec.rx, fecElement{})
-- copy(dec.rx[insertIdx+1:], dec.rx[insertIdx:]) // shift right
-- dec.rx[insertIdx] = elem
-- }
--
-- // shard range for current packet
-- shardBegin := pkt.seqid() - pkt.seqid()%uint32(dec.shardSize)
-- shardEnd := shardBegin + uint32(dec.shardSize) - 1
--
-- // max search range in ordered queue for current shard
-- searchBegin := insertIdx - int(pkt.seqid()%uint32(dec.shardSize))
-- if searchBegin < 0 {
-- searchBegin = 0
-- }
-- searchEnd := searchBegin + dec.shardSize - 1
-- if searchEnd >= len(dec.rx) {
-- searchEnd = len(dec.rx) - 1
-- }
--
-- // re-construct datashards
-- if searchEnd-searchBegin+1 >= dec.dataShards {
-- var numshard, numDataShard, first, maxlen int
--
-- // zero caches
-- shards := dec.decodeCache
-- shardsflag := dec.flagCache
-- for k := range dec.decodeCache {
-- shards[k] = nil
-- shardsflag[k] = false
-- }
--
-- // shard assembly
-- for i := searchBegin; i <= searchEnd; i++ {
-- seqid := dec.rx[i].seqid()
-- if _itimediff(seqid, shardEnd) > 0 {
-- break
-- } else if _itimediff(seqid, shardBegin) >= 0 {
-- shards[seqid%uint32(dec.shardSize)] = dec.rx[i].data()
-- shardsflag[seqid%uint32(dec.shardSize)] = true
-- numshard++
-- if dec.rx[i].flag() == typeData {
-- numDataShard++
-- }
-- if numshard == 1 {
-- first = i
-- }
-- if len(dec.rx[i].data()) > maxlen {
-- maxlen = len(dec.rx[i].data())
-- }
-- }
-- }
--
-- if numDataShard == dec.dataShards {
-- // case 1: no loss on data shards
-- dec.rx = dec.freeRange(first, numshard, dec.rx)
-- } else if numshard >= dec.dataShards {
-- // case 2: loss on data shards, but it's recoverable from parity shards
-- for k := range shards {
-- if shards[k] != nil {
-- dlen := len(shards[k])
-- shards[k] = shards[k][:maxlen]
-- copy(shards[k][dlen:], dec.zeros)
-- } else if k < dec.dataShards {
-- shards[k] = xmitBuf.Get().([]byte)[:0]
-- }
-- }
-- if err := dec.codec.ReconstructData(shards); err == nil {
-- for k := range shards[:dec.dataShards] {
-- if !shardsflag[k] {
-- // recovered data should be recycled
-- recovered = append(recovered, shards[k])
-- }
-- }
-- }
-- dec.rx = dec.freeRange(first, numshard, dec.rx)
-- }
-- }
--
-- // keep rxlimit
-- if len(dec.rx) > dec.rxlimit {
-- if dec.rx[0].flag() == typeData { // track the unrecoverable data
-- atomic.AddUint64(&DefaultSnmp.FECShortShards, 1)
-- }
-- dec.rx = dec.freeRange(0, 1, dec.rx)
-- }
--
-- // timeout policy
-- current := currentMs()
-- numExpired := 0
-- for k := range dec.rx {
-- if _itimediff(current, dec.rx[k].ts) > fecExpire {
-- numExpired++
-- continue
-- }
-- break
-- }
-- if numExpired > 0 {
-- dec.rx = dec.freeRange(0, numExpired, dec.rx)
-- }
-- return
--}
--
--// free a range of fecPacket
--func (dec *fecDecoder) freeRange(first, n int, q []fecElement) []fecElement {
-- for i := first; i < first+n; i++ { // recycle buffer
-- xmitBuf.Put([]byte(q[i].fecPacket))
-- }
--
-- if first == 0 && n < cap(q)/2 {
-- return q[n:]
-- }
-- copy(q[first:], q[first+n:])
-- return q[:len(q)-n]
--}
--
--// release all segments back to xmitBuf
--func (dec *fecDecoder) release() {
-- if n := len(dec.rx); n > 0 {
-- dec.rx = dec.freeRange(0, n, dec.rx)
-- }
--}
--
--type (
-- // fecEncoder for encoding outgoing packets
-- fecEncoder struct {
-- dataShards int
-- parityShards int
-- shardSize int
-- paws uint32 // Protect Against Wrapped Sequence numbers
-- next uint32 // next seqid
--
-- shardCount int // count the number of datashards collected
-- maxSize int // track maximum data length in datashard
--
-- headerOffset int // FEC header offset
-- payloadOffset int // FEC payload offset
--
-- // caches
-- shardCache [][]byte
-- encodeCache [][]byte
--
-- // zeros
-- zeros []byte
--
-- // RS encoder
-- codec reedsolomon.Encoder
-- }
--)
--
--func newFECEncoder(dataShards, parityShards, offset int) *fecEncoder {
-- if dataShards <= 0 || parityShards <= 0 {
-- return nil
-- }
-- enc := new(fecEncoder)
-- enc.dataShards = dataShards
-- enc.parityShards = parityShards
-- enc.shardSize = dataShards + parityShards
-- enc.paws = 0xffffffff / uint32(enc.shardSize) * uint32(enc.shardSize)
-- enc.headerOffset = offset
-- enc.payloadOffset = enc.headerOffset + fecHeaderSize
--
-- codec, err := reedsolomon.New(dataShards, parityShards)
-- if err != nil {
-- return nil
-- }
-- enc.codec = codec
--
-- // caches
-- enc.encodeCache = make([][]byte, enc.shardSize)
-- enc.shardCache = make([][]byte, enc.shardSize)
-- for k := range enc.shardCache {
-- enc.shardCache[k] = make([]byte, mtuLimit)
-- }
-- enc.zeros = make([]byte, mtuLimit)
-- return enc
--}
--
--// encodes the packet, outputs parity shards if we have collected quorum datashards
--// notice: the contents of 'ps' will be re-written in successive calling
--func (enc *fecEncoder) encode(b []byte) (ps [][]byte) {
-- // The header format:
-- // | FEC SEQID(4B) | FEC TYPE(2B) | SIZE (2B) | PAYLOAD(SIZE-2) |
-- // |<-headerOffset |<-payloadOffset
-- enc.markData(b[enc.headerOffset:])
-- binary.LittleEndian.PutUint16(b[enc.payloadOffset:], uint16(len(b[enc.payloadOffset:])))
--
-- // copy data from payloadOffset to fec shard cache
-- sz := len(b)
-- enc.shardCache[enc.shardCount] = enc.shardCache[enc.shardCount][:sz]
-- copy(enc.shardCache[enc.shardCount][enc.payloadOffset:], b[enc.payloadOffset:])
-- enc.shardCount++
--
-- // track max datashard length
-- if sz > enc.maxSize {
-- enc.maxSize = sz
-- }
--
-- // Generation of Reed-Solomon Erasure Code
-- if enc.shardCount == enc.dataShards {
-- // fill '0' into the tail of each datashard
-- for i := 0; i < enc.dataShards; i++ {
-- shard := enc.shardCache[i]
-- slen := len(shard)
-- copy(shard[slen:enc.maxSize], enc.zeros)
-- }
--
-- // construct equal-sized slice with stripped header
-- cache := enc.encodeCache
-- for k := range cache {
-- cache[k] = enc.shardCache[k][enc.payloadOffset:enc.maxSize]
-- }
--
-- // encoding
-- if err := enc.codec.Encode(cache); err == nil {
-- ps = enc.shardCache[enc.dataShards:]
-- for k := range ps {
-- enc.markParity(ps[k][enc.headerOffset:])
-- ps[k] = ps[k][:enc.maxSize]
-- }
-- }
--
-- // counters resetting
-- enc.shardCount = 0
-- enc.maxSize = 0
-- }
--
-- return
--}
--
--func (enc *fecEncoder) markData(data []byte) {
-- binary.LittleEndian.PutUint32(data, enc.next)
-- binary.LittleEndian.PutUint16(data[4:], typeData)
-- enc.next++
--}
--
--func (enc *fecEncoder) markParity(data []byte) {
-- binary.LittleEndian.PutUint32(data, enc.next)
-- binary.LittleEndian.PutUint16(data[4:], typeParity)
-- // sequence wrap will only happen at parity shard
-- enc.next = (enc.next + 1) % enc.paws
--}
-diff --git a/removed.go b/removed.go
-new file mode 100644
-index 0000000..5ecf446
---- /dev/null
-+++ b/removed.go
-@@ -0,0 +1,29 @@
-+package kcp
-+
-+// Dummy implementations for types from crypt.go and fec.go, removed to reduce
-+// dependencies.
-+
-+const (
-+ fecHeaderSize = 6
-+ fecHeaderSizePlus2 = fecHeaderSize + 2
-+ typeData = 0xf1
-+ typeParity = 0xf2
-+)
-+
-+type (
-+ BlockCrypt interface {
-+ Encrypt(_, _ []byte)
-+ Decrypt(_, _ []byte)
-+ }
-+ fecDecoder struct{}
-+ fecEncoder struct{}
-+ fecPacket []byte
-+)
-+
-+func newFECDecoder(rxlimit, dataShards, parityShards int) *fecDecoder { return nil }
-+func newFECEncoder(dataShards, parityShards, offset int) *fecEncoder { return nil }
-+
-+func (_ *fecDecoder) decode(in fecPacket) [][]byte { panic("disabled") }
-+func (_ *fecDecoder) release() { panic("disabled") }
-+func (_ *fecEncoder) encode(b []byte) [][]byte { panic("disabled") }
-+func (_ fecPacket) flag() uint16 { panic("disabled") }
---
-2.20.1
-
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/9…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/9…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/firefox-android] Pushed new tag firefox-android-115.2.1-13.5-1-build3
by ma1 (@ma1) 14 Dec '23
by ma1 (@ma1) 14 Dec '23
14 Dec '23
ma1 pushed new tag firefox-android-115.2.1-13.5-1-build3 at The Tor Project / Applications / firefox-android
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/tree/firef…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/firefox-android] Pushed new tag firefox-android-115.2.1-13.0-1-build11
by ma1 (@ma1) 14 Dec '23
by ma1 (@ma1) 14 Dec '23
14 Dec '23
ma1 pushed new tag firefox-android-115.2.1-13.0-1-build11 at The Tor Project / Applications / firefox-android
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/tree/firef…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] 2 commits: Bug 1823316 - Use 'Snackbar' themed Dialog to notify on making app full-screen
by ma1 (@ma1) 14 Dec '23
by ma1 (@ma1) 14 Dec '23
14 Dec '23
ma1 pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android
Commits:
af11e480 by t-p-white at 2023-12-14T20:08:19+01:00
Bug 1823316 - Use 'Snackbar' themed Dialog to notify on making app full-screen
- - - - -
068e68e8 by Tarik Eshaq at 2023-12-14T20:09:55+01:00
Bug 1865488: Adds server parameter to push subscription
(cherry picked from commit f66bc9d4981d9bba7091389d9f0a6864291d38fe)
- - - - -
9 changed files:
- + android-components/components/feature/prompts/src/main/java/mozilla/components/feature/prompts/dialog/FullScreenNotificationDialog.kt
- android-components/components/feature/sitepermissions/src/main/java/mozilla/components/feature/sitepermissions/SitePermissionsFeature.kt
- fenix/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt
- fenix/app/src/main/java/org/mozilla/fenix/push/WebPushEngineIntegration.kt
- + fenix/app/src/main/res/layout/full_screen_notification_dialog.xml
- focus-android/app/src/main/java/org/mozilla/focus/browser/integration/FullScreenIntegration.kt
- focus-android/app/src/main/java/org/mozilla/focus/fragment/BrowserFragment.kt
- + focus-android/app/src/main/res/layout/dialog_full_screen_notification.xml
- focus-android/app/src/test/java/org/mozilla/focus/browser/integration/FullScreenIntegrationTest.kt
Changes:
=====================================
android-components/components/feature/prompts/src/main/java/mozilla/components/feature/prompts/dialog/FullScreenNotificationDialog.kt
=====================================
@@ -0,0 +1,69 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * 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/. */
+
+package mozilla.components.feature.prompts.dialog
+
+import android.app.Dialog
+import android.os.Bundle
+import android.view.Gravity
+import android.view.WindowManager
+import androidx.annotation.LayoutRes
+import androidx.appcompat.app.AlertDialog
+import androidx.fragment.app.DialogFragment
+import androidx.fragment.app.FragmentManager
+import androidx.lifecycle.lifecycleScope
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.launch
+
+private const val TAG = "mozac_feature_prompts_full_screen_notification_dialog"
+private const val SNACKBAR_DURATION_LONG_MS = 3000L
+
+/**
+ * UI to show a 'full screen mode' notification.
+ */
+interface FullScreenNotification {
+ /**
+ * Show the notification.
+ *
+ * @param fragmentManager the [FragmentManager] to add this notification to.
+ */
+ fun show(fragmentManager: FragmentManager)
+}
+
+/**
+ * [DialogFragment] that is configured to match the style and behaviour of a Snackbar.
+ *
+ * @property layout the layout to use for the dialog.
+ */
+class FullScreenNotificationDialog(@LayoutRes val layout: Int) :
+ DialogFragment(), FullScreenNotification {
+ override fun show(fragmentManager: FragmentManager) = super.show(fragmentManager, TAG)
+
+ override fun onCreateDialog(savedInstanceState: Bundle?): Dialog = requireActivity().let {
+ val view = layoutInflater.inflate(layout, null)
+ AlertDialog.Builder(it).setView(view).create()
+ }
+
+ override fun onStart() {
+ super.onStart()
+
+ dialog?.let { dialog ->
+ dialog.window?.let { window ->
+ // Prevent any user input from key or other button events to it.
+ window.setFlags(
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
+ )
+
+ window.setGravity(Gravity.BOTTOM)
+ window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND)
+ }
+
+ lifecycleScope.launch {
+ delay(SNACKBAR_DURATION_LONG_MS)
+ dismiss()
+ }
+ }
+ }
+}
=====================================
android-components/components/feature/sitepermissions/src/main/java/mozilla/components/feature/sitepermissions/SitePermissionsFeature.kt
=====================================
@@ -70,7 +70,9 @@ import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged
import java.security.InvalidParameterException
import mozilla.components.ui.icons.R as iconsR
-internal const val FRAGMENT_TAG = "mozac_feature_sitepermissions_prompt_dialog"
+internal const val PROMPT_FRAGMENT_TAG = "mozac_feature_sitepermissions_prompt_dialog"
+
+private const val FULL_SCREEN_NOTIFICATION_TAG = "mozac_feature_prompts_full_screen_notification_dialog"
@VisibleForTesting
internal const val STORAGE_ACCESS_DOCUMENTATION_URL =
@@ -124,7 +126,7 @@ class SitePermissionsFeature(
private var loadingScope: CoroutineScope? = null
override fun start() {
- fragmentManager.findFragmentByTag(FRAGMENT_TAG)?.let { fragment ->
+ fragmentManager.findFragmentByTag(PROMPT_FRAGMENT_TAG)?.let { fragment ->
// There's still a [SitePermissionsDialogFragment] visible from the last time. Re-attach
// this feature so that the fragment can invoke the callback on this feature once the user
// makes a selection. This can happen when the app was in the background and on resume
@@ -439,8 +441,16 @@ class SitePermissionsFeature(
} else {
handleNoRuledFlow(permissionFromStorage, permissionRequest, origin)
}
- prompt?.show(fragmentManager, FRAGMENT_TAG)
- return prompt
+
+ val fullScreenNotificationDisplayed =
+ fragmentManager.fragments.any { fragment -> fragment.tag == FULL_SCREEN_NOTIFICATION_TAG }
+
+ return if (fullScreenNotificationDisplayed || prompt == null) {
+ null
+ } else {
+ prompt.show(fragmentManager, PROMPT_FRAGMENT_TAG)
+ prompt
+ }
}
@VisibleForTesting
=====================================
fenix/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt
=====================================
@@ -17,7 +17,6 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.accessibility.AccessibilityManager
-import android.widget.Toast
import androidx.activity.result.ActivityResultLauncher
import androidx.annotation.CallSuper
import androidx.annotation.VisibleForTesting
@@ -74,6 +73,7 @@ import mozilla.components.feature.prompts.PromptFeature
import mozilla.components.feature.prompts.PromptFeature.Companion.PIN_REQUEST
import mozilla.components.feature.prompts.address.AddressDelegate
import mozilla.components.feature.prompts.creditcard.CreditCardDelegate
+import mozilla.components.feature.prompts.dialog.FullScreenNotificationDialog
import mozilla.components.feature.prompts.login.LoginDelegate
import mozilla.components.feature.prompts.share.ShareDelegate
import mozilla.components.feature.readerview.ReaderViewFeature
@@ -1465,10 +1465,11 @@ abstract class BaseBrowserFragment :
if (inFullScreen) {
// Close find in page bar if opened
findInPageIntegration.onBackPressed()
- Toast
- .makeText(requireContext(), R.string.full_screen_notification, Toast.LENGTH_SHORT)
- .show()
- activity?.enterToImmersiveMode()
+
+ FullScreenNotificationDialog(R.layout.full_screen_notification_dialog).show(
+ parentFragmentManager,
+ )
+
(view as? SwipeGestureLayout)?.isSwipeEnabled = false
browserToolbarView.collapse()
browserToolbarView.view.isVisible = false
=====================================
fenix/app/src/main/java/org/mozilla/fenix/push/WebPushEngineIntegration.kt
=====================================
@@ -58,8 +58,6 @@ internal class WebPushEngineDelegate(
private val logger = Logger("WebPushEngineDelegate")
override fun onGetSubscription(scope: String, onSubscription: (WebPushSubscription?) -> Unit) {
- // We don't have the appServerKey unless an app is creating a new subscription so we
- // allow the key to be null since it won't be overridden from a previous subscription.
pushFeature.getSubscription(scope) {
onSubscription(it?.toEnginePushSubscription())
}
@@ -72,9 +70,7 @@ internal class WebPushEngineDelegate(
) {
pushFeature.subscribe(
scope = scope,
- // See the full note at the implementation of `toEnginePushSubscription`.
- // Issue: https://github.com/mozilla/application-services/issues/2698
- appServerKey = null,
+ appServerKey = serverKey?.toEncodedBase64String(),
onSubscribeError = {
logger.error("Error on push onSubscribe.")
onSubscribe(null)
@@ -104,13 +100,12 @@ internal fun AutoPushSubscription.toEnginePushSubscription() = WebPushSubscripti
publicKey = this.publicKey.toDecodedByteArray(),
endpoint = this.endpoint,
authSecret = this.authKey.toDecodedByteArray(),
- // We don't send the `serverKey` because the code path from that will query
- // the push database for this key, which leads to an exception thrown.
- // Our workaround for now is to not put the server key in to begin with (which
- // will probably break a lot of sites).
- // See: https://github.com/mozilla/application-services/issues/2698
+ // We don't have the appServerKey unless an app is creating a new subscription so we
+ // allow the key to be null since it won't be overridden from a previous subscription.
appServerKey = null,
)
private fun String.toDecodedByteArray() =
Base64.decode(this.toByteArray(), Base64.URL_SAFE or Base64.NO_PADDING or Base64.NO_WRAP)
+private fun ByteArray.toEncodedBase64String() =
+ Base64.encodeToString(this, Base64.URL_SAFE or Base64.NO_PADDING or Base64.NO_WRAP)
=====================================
fenix/app/src/main/res/layout/full_screen_notification_dialog.xml
=====================================
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - 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/. -->
+
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/full_screen_notification"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="8dp"
+ android:background="@drawable/fenix_snackbar_background"
+ android:elevation="4dp"
+ android:minHeight="48dp"
+ android:orientation="horizontal"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp">
+
+ <TextView
+ android:id="@+id/full_screen_notification_text"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:letterSpacing="0.05"
+ android:maxLines="2"
+ android:minHeight="46dp"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:text="@string/full_screen_notification"
+ android:textAlignment="textStart"
+ android:textColor="@color/photonWhite"
+ android:textSize="18sp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ tools:text="@string/full_screen_notification" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>
=====================================
focus-android/app/src/main/java/org/mozilla/focus/browser/integration/FullScreenIntegration.kt
=====================================
@@ -7,12 +7,14 @@ package org.mozilla.focus.browser.integration
import android.app.Activity
import android.os.Build
import android.view.View
-import android.widget.Toast
import androidx.annotation.VisibleForTesting
import androidx.core.view.isVisible
+import androidx.fragment.app.FragmentManager
import mozilla.components.browser.state.store.BrowserStore
import mozilla.components.browser.toolbar.BrowserToolbar
import mozilla.components.concept.engine.EngineView
+import mozilla.components.feature.prompts.dialog.FullScreenNotification
+import mozilla.components.feature.prompts.dialog.FullScreenNotificationDialog
import mozilla.components.feature.session.FullScreenFeature
import mozilla.components.feature.session.SessionUseCases
import mozilla.components.support.base.feature.LifecycleAwareFeature
@@ -26,6 +28,7 @@ import org.mozilla.focus.ext.hide
import org.mozilla.focus.ext.showAsFixed
import org.mozilla.focus.utils.Settings
+@Suppress("LongParameterList")
class FullScreenIntegration(
val activity: Activity,
val store: BrowserStore,
@@ -35,6 +38,7 @@ class FullScreenIntegration(
private val toolbarView: BrowserToolbar,
private val statusBar: View,
private val engineView: EngineView,
+ private val parentFragmentManager: FragmentManager,
) : LifecycleAwareFeature, UserInteractionHandler {
@VisibleForTesting
internal var feature = FullScreenFeature(
@@ -54,14 +58,16 @@ class FullScreenIntegration(
}
@VisibleForTesting
- internal fun fullScreenChanged(enabled: Boolean) {
+ internal fun fullScreenChanged(
+ enabled: Boolean,
+ fullScreenNotification: FullScreenNotification =
+ FullScreenNotificationDialog(R.layout.dialog_full_screen_notification),
+ ) {
if (enabled) {
enterBrowserFullscreen()
statusBar.isVisible = false
- Toast
- .makeText(activity, R.string.full_screen_notification, Toast.LENGTH_SHORT)
- .show()
+ fullScreenNotification.show(parentFragmentManager)
switchToImmersiveMode()
} else {
=====================================
focus-android/app/src/main/java/org/mozilla/focus/fragment/BrowserFragment.kt
=====================================
@@ -272,6 +272,7 @@ class BrowserFragment :
binding.browserToolbar,
binding.statusBarBackground,
binding.engineView,
+ parentFragmentManager,
),
this,
view,
=====================================
focus-android/app/src/main/res/layout/dialog_full_screen_notification.xml
=====================================
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - 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/. -->
+
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/full_screen_notification_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_margin="8dp"
+ android:background="@drawable/focus_snackbar_background"
+ android:elevation="4dp"
+ android:minHeight="48dp"
+ android:orientation="horizontal"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp">
+
+ <TextView
+ android:id="@+id/full_screen_notification_text"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:letterSpacing="0.05"
+ android:maxLines="2"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:text="@string/full_screen_notification"
+ android:textAlignment="textStart"
+ android:textColor="@color/snackbarTextColor"
+ android:textSize="14sp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ tools:text="@string/full_screen_notification" />
+</androidx.constraintlayout.widget.ConstraintLayout>
=====================================
focus-android/app/src/test/java/org/mozilla/focus/browser/integration/FullScreenIntegrationTest.kt
=====================================
@@ -12,11 +12,11 @@ import android.view.WindowManager
import androidx.core.view.isVisible
import mozilla.components.browser.engine.gecko.GeckoEngineView
import mozilla.components.browser.toolbar.BrowserToolbar
+import mozilla.components.feature.prompts.dialog.FullScreenNotification
import mozilla.components.feature.session.FullScreenFeature
import mozilla.components.support.test.any
import mozilla.components.support.test.mock
import mozilla.components.support.test.robolectric.testContext
-import org.junit.Assert.assertNotNull
import org.junit.Test
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.runner.RunWith
@@ -26,7 +26,6 @@ import org.mockito.Mockito.never
import org.mockito.Mockito.spy
import org.mockito.Mockito.times
import org.mockito.Mockito.verify
-import org.mozilla.focus.R
import org.mozilla.focus.ext.disableDynamicBehavior
import org.mozilla.focus.ext.enableDynamicBehavior
import org.mozilla.focus.ext.hide
@@ -34,7 +33,6 @@ import org.mozilla.focus.ext.showAsFixed
import org.mozilla.focus.utils.Settings
import org.robolectric.Robolectric
import org.robolectric.RobolectricTestRunner
-import org.robolectric.shadows.ShadowToast
@RunWith(RobolectricTestRunner::class)
internal class FullScreenIntegrationTest {
@@ -50,6 +48,7 @@ internal class FullScreenIntegrationTest {
mock(),
mock(),
mock(),
+ mock(),
).apply {
this.feature = feature
}
@@ -71,6 +70,7 @@ internal class FullScreenIntegrationTest {
mock(),
mock(),
mock(),
+ mock(),
).apply {
this.feature = feature
}
@@ -92,6 +92,7 @@ internal class FullScreenIntegrationTest {
mock(),
mock(),
mock(),
+ mock(),
).apply {
this.feature = feature
}
@@ -117,6 +118,7 @@ internal class FullScreenIntegrationTest {
mock(),
mock(),
mock(),
+ mock(),
)
integration.viewportFitChanged(33)
@@ -141,6 +143,7 @@ internal class FullScreenIntegrationTest {
mock(),
mock(),
mock(),
+ mock(),
)
integration.switchToImmersiveMode()
@@ -169,6 +172,7 @@ internal class FullScreenIntegrationTest {
mock(),
mock(),
mock(),
+ mock(),
)
integration.exitImmersiveMode()
@@ -195,6 +199,7 @@ internal class FullScreenIntegrationTest {
toolbar,
mock(),
engineView,
+ mock(),
)
integration.enterBrowserFullscreen()
@@ -220,6 +225,7 @@ internal class FullScreenIntegrationTest {
toolbar,
mock(),
engineView,
+ mock(),
)
integration.enterBrowserFullscreen()
@@ -250,6 +256,7 @@ internal class FullScreenIntegrationTest {
toolbar,
mock(),
engineView,
+ mock(),
)
integration.exitBrowserFullscreen()
@@ -278,6 +285,7 @@ internal class FullScreenIntegrationTest {
toolbar,
mock(),
engineView,
+ mock(),
)
integration.exitBrowserFullscreen()
@@ -308,21 +316,17 @@ internal class FullScreenIntegrationTest {
toolbar,
statusBar,
engineView,
+ mock(),
),
)
- integration.fullScreenChanged(true)
+ val fullScreenNotification = mock<FullScreenNotification>()
+ integration.fullScreenChanged(true, fullScreenNotification)
verify(integration).enterBrowserFullscreen()
- verify(integration).switchToImmersiveMode()
verify(statusBar).isVisible = false
-
- val toast = ShadowToast.getTextOfLatestToast()
- assertNotNull(toast)
- assertEquals(
- testContext.getString(R.string.full_screen_notification),
- toast,
- )
+ verify(fullScreenNotification).show(any())
+ verify(integration).switchToImmersiveMode()
}
@Test
@@ -352,6 +356,7 @@ internal class FullScreenIntegrationTest {
toolbar,
statusBar,
engineView,
+ mock(),
),
)
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/compare/06…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/compare/06…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.0-1] 2 commits: Bug 1823316 - Use 'Snackbar' themed Dialog to notify on making app full-screen
by richard (@richard) 14 Dec '23
by richard (@richard) 14 Dec '23
14 Dec '23
richard pushed to branch firefox-android-115.2.1-13.0-1 at The Tor Project / Applications / firefox-android
Commits:
a0805d02 by t-p-white at 2023-12-14T15:36:13+01:00
Bug 1823316 - Use 'Snackbar' themed Dialog to notify on making app full-screen
- - - - -
8ff2dd1b by Tarik Eshaq at 2023-12-14T15:36:22+01:00
Bug 1865488: Adds server parameter to push subscription
(cherry picked from commit f66bc9d4981d9bba7091389d9f0a6864291d38fe)
- - - - -
9 changed files:
- + android-components/components/feature/prompts/src/main/java/mozilla/components/feature/prompts/dialog/FullScreenNotificationDialog.kt
- android-components/components/feature/sitepermissions/src/main/java/mozilla/components/feature/sitepermissions/SitePermissionsFeature.kt
- fenix/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt
- fenix/app/src/main/java/org/mozilla/fenix/push/WebPushEngineIntegration.kt
- + fenix/app/src/main/res/layout/full_screen_notification_dialog.xml
- focus-android/app/src/main/java/org/mozilla/focus/browser/integration/FullScreenIntegration.kt
- focus-android/app/src/main/java/org/mozilla/focus/fragment/BrowserFragment.kt
- + focus-android/app/src/main/res/layout/dialog_full_screen_notification.xml
- focus-android/app/src/test/java/org/mozilla/focus/browser/integration/FullScreenIntegrationTest.kt
Changes:
=====================================
android-components/components/feature/prompts/src/main/java/mozilla/components/feature/prompts/dialog/FullScreenNotificationDialog.kt
=====================================
@@ -0,0 +1,69 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * 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/. */
+
+package mozilla.components.feature.prompts.dialog
+
+import android.app.Dialog
+import android.os.Bundle
+import android.view.Gravity
+import android.view.WindowManager
+import androidx.annotation.LayoutRes
+import androidx.appcompat.app.AlertDialog
+import androidx.fragment.app.DialogFragment
+import androidx.fragment.app.FragmentManager
+import androidx.lifecycle.lifecycleScope
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.launch
+
+private const val TAG = "mozac_feature_prompts_full_screen_notification_dialog"
+private const val SNACKBAR_DURATION_LONG_MS = 3000L
+
+/**
+ * UI to show a 'full screen mode' notification.
+ */
+interface FullScreenNotification {
+ /**
+ * Show the notification.
+ *
+ * @param fragmentManager the [FragmentManager] to add this notification to.
+ */
+ fun show(fragmentManager: FragmentManager)
+}
+
+/**
+ * [DialogFragment] that is configured to match the style and behaviour of a Snackbar.
+ *
+ * @property layout the layout to use for the dialog.
+ */
+class FullScreenNotificationDialog(@LayoutRes val layout: Int) :
+ DialogFragment(), FullScreenNotification {
+ override fun show(fragmentManager: FragmentManager) = super.show(fragmentManager, TAG)
+
+ override fun onCreateDialog(savedInstanceState: Bundle?): Dialog = requireActivity().let {
+ val view = layoutInflater.inflate(layout, null)
+ AlertDialog.Builder(it).setView(view).create()
+ }
+
+ override fun onStart() {
+ super.onStart()
+
+ dialog?.let { dialog ->
+ dialog.window?.let { window ->
+ // Prevent any user input from key or other button events to it.
+ window.setFlags(
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
+ )
+
+ window.setGravity(Gravity.BOTTOM)
+ window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND)
+ }
+
+ lifecycleScope.launch {
+ delay(SNACKBAR_DURATION_LONG_MS)
+ dismiss()
+ }
+ }
+ }
+}
=====================================
android-components/components/feature/sitepermissions/src/main/java/mozilla/components/feature/sitepermissions/SitePermissionsFeature.kt
=====================================
@@ -70,7 +70,9 @@ import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged
import java.security.InvalidParameterException
import mozilla.components.ui.icons.R as iconsR
-internal const val FRAGMENT_TAG = "mozac_feature_sitepermissions_prompt_dialog"
+internal const val PROMPT_FRAGMENT_TAG = "mozac_feature_sitepermissions_prompt_dialog"
+
+private const val FULL_SCREEN_NOTIFICATION_TAG = "mozac_feature_prompts_full_screen_notification_dialog"
@VisibleForTesting
internal const val STORAGE_ACCESS_DOCUMENTATION_URL =
@@ -124,7 +126,7 @@ class SitePermissionsFeature(
private var loadingScope: CoroutineScope? = null
override fun start() {
- fragmentManager.findFragmentByTag(FRAGMENT_TAG)?.let { fragment ->
+ fragmentManager.findFragmentByTag(PROMPT_FRAGMENT_TAG)?.let { fragment ->
// There's still a [SitePermissionsDialogFragment] visible from the last time. Re-attach
// this feature so that the fragment can invoke the callback on this feature once the user
// makes a selection. This can happen when the app was in the background and on resume
@@ -439,8 +441,16 @@ class SitePermissionsFeature(
} else {
handleNoRuledFlow(permissionFromStorage, permissionRequest, origin)
}
- prompt?.show(fragmentManager, FRAGMENT_TAG)
- return prompt
+
+ val fullScreenNotificationDisplayed =
+ fragmentManager.fragments.any { fragment -> fragment.tag == FULL_SCREEN_NOTIFICATION_TAG }
+
+ return if (fullScreenNotificationDisplayed || prompt == null) {
+ null
+ } else {
+ prompt.show(fragmentManager, PROMPT_FRAGMENT_TAG)
+ prompt
+ }
}
@VisibleForTesting
=====================================
fenix/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt
=====================================
@@ -17,7 +17,6 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.accessibility.AccessibilityManager
-import android.widget.Toast
import androidx.activity.result.ActivityResultLauncher
import androidx.annotation.CallSuper
import androidx.annotation.VisibleForTesting
@@ -74,6 +73,7 @@ import mozilla.components.feature.prompts.PromptFeature
import mozilla.components.feature.prompts.PromptFeature.Companion.PIN_REQUEST
import mozilla.components.feature.prompts.address.AddressDelegate
import mozilla.components.feature.prompts.creditcard.CreditCardDelegate
+import mozilla.components.feature.prompts.dialog.FullScreenNotificationDialog
import mozilla.components.feature.prompts.login.LoginDelegate
import mozilla.components.feature.prompts.share.ShareDelegate
import mozilla.components.feature.readerview.ReaderViewFeature
@@ -1465,10 +1465,11 @@ abstract class BaseBrowserFragment :
if (inFullScreen) {
// Close find in page bar if opened
findInPageIntegration.onBackPressed()
- Toast
- .makeText(requireContext(), R.string.full_screen_notification, Toast.LENGTH_SHORT)
- .show()
- activity?.enterToImmersiveMode()
+
+ FullScreenNotificationDialog(R.layout.full_screen_notification_dialog).show(
+ parentFragmentManager,
+ )
+
(view as? SwipeGestureLayout)?.isSwipeEnabled = false
browserToolbarView.collapse()
browserToolbarView.view.isVisible = false
=====================================
fenix/app/src/main/java/org/mozilla/fenix/push/WebPushEngineIntegration.kt
=====================================
@@ -58,8 +58,6 @@ internal class WebPushEngineDelegate(
private val logger = Logger("WebPushEngineDelegate")
override fun onGetSubscription(scope: String, onSubscription: (WebPushSubscription?) -> Unit) {
- // We don't have the appServerKey unless an app is creating a new subscription so we
- // allow the key to be null since it won't be overridden from a previous subscription.
pushFeature.getSubscription(scope) {
onSubscription(it?.toEnginePushSubscription())
}
@@ -72,9 +70,7 @@ internal class WebPushEngineDelegate(
) {
pushFeature.subscribe(
scope = scope,
- // See the full note at the implementation of `toEnginePushSubscription`.
- // Issue: https://github.com/mozilla/application-services/issues/2698
- appServerKey = null,
+ appServerKey = serverKey?.toEncodedBase64String(),
onSubscribeError = {
logger.error("Error on push onSubscribe.")
onSubscribe(null)
@@ -104,13 +100,12 @@ internal fun AutoPushSubscription.toEnginePushSubscription() = WebPushSubscripti
publicKey = this.publicKey.toDecodedByteArray(),
endpoint = this.endpoint,
authSecret = this.authKey.toDecodedByteArray(),
- // We don't send the `serverKey` because the code path from that will query
- // the push database for this key, which leads to an exception thrown.
- // Our workaround for now is to not put the server key in to begin with (which
- // will probably break a lot of sites).
- // See: https://github.com/mozilla/application-services/issues/2698
+ // We don't have the appServerKey unless an app is creating a new subscription so we
+ // allow the key to be null since it won't be overridden from a previous subscription.
appServerKey = null,
)
private fun String.toDecodedByteArray() =
Base64.decode(this.toByteArray(), Base64.URL_SAFE or Base64.NO_PADDING or Base64.NO_WRAP)
+private fun ByteArray.toEncodedBase64String() =
+ Base64.encodeToString(this, Base64.URL_SAFE or Base64.NO_PADDING or Base64.NO_WRAP)
=====================================
fenix/app/src/main/res/layout/full_screen_notification_dialog.xml
=====================================
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - 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/. -->
+
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/full_screen_notification"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="8dp"
+ android:background="@drawable/fenix_snackbar_background"
+ android:elevation="4dp"
+ android:minHeight="48dp"
+ android:orientation="horizontal"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp">
+
+ <TextView
+ android:id="@+id/full_screen_notification_text"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:letterSpacing="0.05"
+ android:maxLines="2"
+ android:minHeight="46dp"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:text="@string/full_screen_notification"
+ android:textAlignment="textStart"
+ android:textColor="@color/photonWhite"
+ android:textSize="18sp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ tools:text="@string/full_screen_notification" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>
=====================================
focus-android/app/src/main/java/org/mozilla/focus/browser/integration/FullScreenIntegration.kt
=====================================
@@ -7,12 +7,14 @@ package org.mozilla.focus.browser.integration
import android.app.Activity
import android.os.Build
import android.view.View
-import android.widget.Toast
import androidx.annotation.VisibleForTesting
import androidx.core.view.isVisible
+import androidx.fragment.app.FragmentManager
import mozilla.components.browser.state.store.BrowserStore
import mozilla.components.browser.toolbar.BrowserToolbar
import mozilla.components.concept.engine.EngineView
+import mozilla.components.feature.prompts.dialog.FullScreenNotification
+import mozilla.components.feature.prompts.dialog.FullScreenNotificationDialog
import mozilla.components.feature.session.FullScreenFeature
import mozilla.components.feature.session.SessionUseCases
import mozilla.components.support.base.feature.LifecycleAwareFeature
@@ -26,6 +28,7 @@ import org.mozilla.focus.ext.hide
import org.mozilla.focus.ext.showAsFixed
import org.mozilla.focus.utils.Settings
+@Suppress("LongParameterList")
class FullScreenIntegration(
val activity: Activity,
val store: BrowserStore,
@@ -35,6 +38,7 @@ class FullScreenIntegration(
private val toolbarView: BrowserToolbar,
private val statusBar: View,
private val engineView: EngineView,
+ private val parentFragmentManager: FragmentManager,
) : LifecycleAwareFeature, UserInteractionHandler {
@VisibleForTesting
internal var feature = FullScreenFeature(
@@ -54,14 +58,16 @@ class FullScreenIntegration(
}
@VisibleForTesting
- internal fun fullScreenChanged(enabled: Boolean) {
+ internal fun fullScreenChanged(
+ enabled: Boolean,
+ fullScreenNotification: FullScreenNotification =
+ FullScreenNotificationDialog(R.layout.dialog_full_screen_notification),
+ ) {
if (enabled) {
enterBrowserFullscreen()
statusBar.isVisible = false
- Toast
- .makeText(activity, R.string.full_screen_notification, Toast.LENGTH_SHORT)
- .show()
+ fullScreenNotification.show(parentFragmentManager)
switchToImmersiveMode()
} else {
=====================================
focus-android/app/src/main/java/org/mozilla/focus/fragment/BrowserFragment.kt
=====================================
@@ -272,6 +272,7 @@ class BrowserFragment :
binding.browserToolbar,
binding.statusBarBackground,
binding.engineView,
+ parentFragmentManager,
),
this,
view,
=====================================
focus-android/app/src/main/res/layout/dialog_full_screen_notification.xml
=====================================
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - 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/. -->
+
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/full_screen_notification_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_margin="8dp"
+ android:background="@drawable/focus_snackbar_background"
+ android:elevation="4dp"
+ android:minHeight="48dp"
+ android:orientation="horizontal"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp">
+
+ <TextView
+ android:id="@+id/full_screen_notification_text"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:letterSpacing="0.05"
+ android:maxLines="2"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:text="@string/full_screen_notification"
+ android:textAlignment="textStart"
+ android:textColor="@color/snackbarTextColor"
+ android:textSize="14sp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ tools:text="@string/full_screen_notification" />
+</androidx.constraintlayout.widget.ConstraintLayout>
=====================================
focus-android/app/src/test/java/org/mozilla/focus/browser/integration/FullScreenIntegrationTest.kt
=====================================
@@ -12,11 +12,11 @@ import android.view.WindowManager
import androidx.core.view.isVisible
import mozilla.components.browser.engine.gecko.GeckoEngineView
import mozilla.components.browser.toolbar.BrowserToolbar
+import mozilla.components.feature.prompts.dialog.FullScreenNotification
import mozilla.components.feature.session.FullScreenFeature
import mozilla.components.support.test.any
import mozilla.components.support.test.mock
import mozilla.components.support.test.robolectric.testContext
-import org.junit.Assert.assertNotNull
import org.junit.Test
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.runner.RunWith
@@ -26,7 +26,6 @@ import org.mockito.Mockito.never
import org.mockito.Mockito.spy
import org.mockito.Mockito.times
import org.mockito.Mockito.verify
-import org.mozilla.focus.R
import org.mozilla.focus.ext.disableDynamicBehavior
import org.mozilla.focus.ext.enableDynamicBehavior
import org.mozilla.focus.ext.hide
@@ -34,7 +33,6 @@ import org.mozilla.focus.ext.showAsFixed
import org.mozilla.focus.utils.Settings
import org.robolectric.Robolectric
import org.robolectric.RobolectricTestRunner
-import org.robolectric.shadows.ShadowToast
@RunWith(RobolectricTestRunner::class)
internal class FullScreenIntegrationTest {
@@ -50,6 +48,7 @@ internal class FullScreenIntegrationTest {
mock(),
mock(),
mock(),
+ mock(),
).apply {
this.feature = feature
}
@@ -71,6 +70,7 @@ internal class FullScreenIntegrationTest {
mock(),
mock(),
mock(),
+ mock(),
).apply {
this.feature = feature
}
@@ -92,6 +92,7 @@ internal class FullScreenIntegrationTest {
mock(),
mock(),
mock(),
+ mock(),
).apply {
this.feature = feature
}
@@ -117,6 +118,7 @@ internal class FullScreenIntegrationTest {
mock(),
mock(),
mock(),
+ mock(),
)
integration.viewportFitChanged(33)
@@ -141,6 +143,7 @@ internal class FullScreenIntegrationTest {
mock(),
mock(),
mock(),
+ mock(),
)
integration.switchToImmersiveMode()
@@ -169,6 +172,7 @@ internal class FullScreenIntegrationTest {
mock(),
mock(),
mock(),
+ mock(),
)
integration.exitImmersiveMode()
@@ -195,6 +199,7 @@ internal class FullScreenIntegrationTest {
toolbar,
mock(),
engineView,
+ mock(),
)
integration.enterBrowserFullscreen()
@@ -220,6 +225,7 @@ internal class FullScreenIntegrationTest {
toolbar,
mock(),
engineView,
+ mock(),
)
integration.enterBrowserFullscreen()
@@ -250,6 +256,7 @@ internal class FullScreenIntegrationTest {
toolbar,
mock(),
engineView,
+ mock(),
)
integration.exitBrowserFullscreen()
@@ -278,6 +285,7 @@ internal class FullScreenIntegrationTest {
toolbar,
mock(),
engineView,
+ mock(),
)
integration.exitBrowserFullscreen()
@@ -308,21 +316,17 @@ internal class FullScreenIntegrationTest {
toolbar,
statusBar,
engineView,
+ mock(),
),
)
- integration.fullScreenChanged(true)
+ val fullScreenNotification = mock<FullScreenNotification>()
+ integration.fullScreenChanged(true, fullScreenNotification)
verify(integration).enterBrowserFullscreen()
- verify(integration).switchToImmersiveMode()
verify(statusBar).isVisible = false
-
- val toast = ShadowToast.getTextOfLatestToast()
- assertNotNull(toast)
- assertEquals(
- testContext.getString(R.string.full_screen_notification),
- toast,
- )
+ verify(fullScreenNotification).show(any())
+ verify(integration).switchToImmersiveMode()
}
@Test
@@ -352,6 +356,7 @@ internal class FullScreenIntegrationTest {
toolbar,
statusBar,
engineView,
+ mock(),
),
)
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/compare/33…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/compare/33…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.6.0esr-13.0-1] squash! MB 79: Add Mullvad Browser MAR signing keys
by boklm (@boklm) 14 Dec '23
by boklm (@boklm) 14 Dec '23
14 Dec '23
boklm pushed to branch mullvad-browser-115.6.0esr-13.0-1 at The Tor Project / Applications / Mullvad Browser
Commits:
65b3f1db by Nicolas Vigier at 2023-12-14T16:46:37+01:00
squash! MB 79: Add Mullvad Browser MAR signing keys
MB 256: Add mullvad-browser nightly mar signing key
- - - - -
2 changed files:
- toolkit/mozapps/update/updater/nightly_aurora_level3_primary.der
- toolkit/mozapps/update/updater/nightly_aurora_level3_secondary.der
Changes:
=====================================
toolkit/mozapps/update/updater/nightly_aurora_level3_primary.der
=====================================
Binary files a/toolkit/mozapps/update/updater/nightly_aurora_level3_primary.der and b/toolkit/mozapps/update/updater/nightly_aurora_level3_primary.der differ
=====================================
toolkit/mozapps/update/updater/nightly_aurora_level3_secondary.der
=====================================
Binary files a/toolkit/mozapps/update/updater/nightly_aurora_level3_secondary.der and b/toolkit/mozapps/update/updater/nightly_aurora_level3_secondary.der differ
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/65b…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/65b…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser-build][main] Bug 41043: Create script to push build requests to Mullvad build servers
by richard (@richard) 14 Dec '23
by richard (@richard) 14 Dec '23
14 Dec '23
richard pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
338d8950 by Richard Pospesel at 2023-12-14T16:11:19+00:00
Bug 41043: Create script to push build requests to Mullvad build servers
- - - - -
4 changed files:
- Makefile
- projects/release/config
- + projects/release/kick_devmole_build
- rbm.local.conf.example
Changes:
=====================================
Makefile
=====================================
@@ -685,6 +685,10 @@ torbrowser-signtag-release: submodule-update
torbrowser-signtag-alpha: submodule-update
$(rbm) build release --step signtag --target alpha --target torbrowser
+# requires var/devmole_auth_token to be set in rbm.local.conf
+torbrowser-kick-devmole-build: submodule-update
+ $(rbm) build release --step kick_devmole_build --target torbrowser
+
# requires tpo_user variable be set in rbm.local.conf
mullvadbrowser-upload-sha256sums-release: submodule-update
$(rbm) build release --step upload_sha256sums --target release --target mullvadbrowser
@@ -699,6 +703,10 @@ mullvadbrowser-signtag-release: submodule-update
mullvadbrowser-signtag-alpha: submodule-update
$(rbm) build release --step signtag --target alpha --target mullvadbrowser
+# requires var/devmole_auth_token to be set in rbm.local.conf
+mullvadbrowser-kick-devmole-build: submodule-update
+ $(rbm) build release --step kick_devmole_build --target mullvadbrowser
+
fetch: submodule-update
$(rbm) fetch
=====================================
projects/release/config
=====================================
@@ -279,3 +279,8 @@ steps:
name: mar-tools
pkg_type: fetch_martools
compare_mar_signed_unsigned: '[% INCLUDE compare_mar_signed_unsigned %]'
+ kick_devmole_build:
+ build_log: '-'
+ debug: 0
+ input_files: []
+ kick_devmole_build: '[% INCLUDE kick_devmole_build %]'
=====================================
projects/release/kick_devmole_build
=====================================
@@ -0,0 +1,42 @@
+#!/usr/bin/bash
+
+# This script triggers a build of Tor or Mullvad Browser on Mullvad Infrastructure
+# Hashes are saved here: https://cdn.stagemole.eu/hashes/
+# A Mullvad build server auth token (var/devmole_auth_token) is required to build
+# For now you have to be connecting from Sweden (ie via Malmö or Gothenburg exits using MullvadVPN) for your request to succeed
+
+set -e
+
+# get our build tag
+TAG=[% c("var/git_tag_prefix") %]-[% c("var/torbrowser_version") %]-[% c("var/torbrowser_build") %]
+
+# check for tag existence
+if ! git rev-parse ${TAG} > /dev/null 2>&1; then
+ echo "Error: build tag '${TAG}' does not exist"
+ exit 1
+fi
+
+# determine whether alpha or release based on the build tag
+RELEASE=
+if [[ "${TAG}" =~ ^(mb|tbb)-[1-9][0-9]\.[05]a[1-9][0-9]*-build[1-9]$ ]]; then
+ RELEASE="alpha"
+elif [[ "${TAG}" =~ ^(mb|tbb)-[1-9][0-9]\.[05](\.[1-9][0-9]*)?-build[1-9]$ ]]; then
+ RELEASE="release"
+else
+ echo "Error: malformed build tag '${TAG}'"
+ exit 1
+fi
+
+# get auth token for submission to devmole build server
+AUTH_TOKEN=[% c("buildconf/devmole_auth_token") %]
+if [[ "${AUTH_TOKEN}" = "" ]]; then
+ echo "AUTH_TOKEN: ${AUTH_TOKEN}"
+ echo "Error: buildconf/devmole_auth_token missing from rbm.local.conf"
+ exit 1
+fi
+
+# make request
+curl -X POST "https://drone-server.devmole.eu/api/repos/mullvad/browser-build/builds?bran…" -H "Authorization: Bearer ${AUTH_TOKEN}" -H "Accept: application/json"
+
+echo
+echo Hashes will appear here: https://cdn.stagemole.eu/hashes/[% c("var/projectname") %]/[% c("var/torbrowser_version") %]-[% c("var/torbrowser_build") %]
=====================================
rbm.local.conf.example
=====================================
@@ -42,6 +42,11 @@ buildconf:
### signing the tag.
#git_signtag_opt: '-u keyid'
+ ### The buildconf/devmole_auth_token option is used for starting remote builds on
+ ### Mullvad's devmole server using the kick_devmole_build step in the release
+ ### project. Such a token can be acquired from the Mullvad sysadmins.
+ #devmole_auth_token: abcdefghijklmnopqrstuvwxyz012345
+
var:
local_conf: 1
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/3…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/3…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser-build][main] Bug 41044: Add version.json file to Mullvad Browser
by richard (@richard) 14 Dec '23
by richard (@richard) 14 Dec '23
14 Dec '23
richard pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
00416964 by Nicolas Vigier at 2023-12-14T14:37:24+00:00
Bug 41044: Add version.json file to Mullvad Browser
Add a file to make it easier to detect the version of Mullvad Browser
installed, like the tbb_version.json file we have in Tor Browser.
- - - - -
2 changed files:
- projects/browser/build
- projects/browser/config
Changes:
=====================================
projects/browser/build
=====================================
@@ -302,10 +302,9 @@ do
[% c("touch") %] defaults/preferences/[% c("var/prefs_file") %]
zip -Xm omni.ja defaults/preferences/[% c("var/prefs_file") %]
rm -rf defaults
- [% IF c("var/tor-browser") %]
- # create tbb_version.json file for tor-browser#25020
- echo '{"version":"[% c("var/torbrowser_version") %]","architecture":"[% c("var/mar_osname") %]","channel":"[% c("var/channel") %]","locale":"en-US"}' > ../tbb_version.json
- [% END -%]
+ # create tbb_version.json (torbrowser) or version.json (mullvadbrowser)
+ # file for tor-browser#25020 and tor-browser-build#41044
+ echo '{"version":"[% c("var/torbrowser_version") %]","architecture":"[% c("var/mar_osname") %]","channel":"[% c("var/channel") %]","locale":"en-US"}' > ../[% c("var/version_json") %]
popd
done
=====================================
projects/browser/config
=====================================
@@ -13,6 +13,7 @@ var:
- bzip2
- jq
mar_osname: '[% c("var/osname") %]'
+ version_json: version.json
targets:
linux:
@@ -49,6 +50,7 @@ targets:
torbrowser:
var:
prefs_file: 000-tor-browser.js
+ version_json: tbb_version.json
basebrowser:
var:
prefs_file: 001-base-profile.js
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/0…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/0…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser-build][main] 2 commits: Bug 41042: Add options to include updates in the changelog scripts.
by richard (@richard) 14 Dec '23
by richard (@richard) 14 Dec '23
14 Dec '23
richard pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
2854ab80 by Pier Angelo Vendrame at 2023-12-14T13:48:08+00:00
Bug 41042: Add options to include updates in the changelog scripts.
Pass the new version of components as arguments to avoid having to
change the changelog output after it has been generated by the script.
- - - - -
ae04fe1d by Pier Angelo Vendrame at 2023-12-14T13:48:08+00:00
Update the GitLab templates.
Update the release preparations for the new changelog script arguments
and also to fix some steps that were not correct anymore.
- - - - -
7 changed files:
- .gitlab/issue_templates/Release Prep - Mullvad Browser Alpha.md
- .gitlab/issue_templates/Release Prep - Mullvad Browser Stable.md
- .gitlab/issue_templates/Release Prep - Tor Browser Alpha.md
- .gitlab/issue_templates/Release Prep - Tor Browser Stable.md
- .gitlab/merge_request_templates/default.md
- + .gitlab/merge_request_templates/relprep.md
- tools/fetch-changelogs.py
Changes:
=====================================
.gitlab/issue_templates/Release Prep - Mullvad Browser Alpha.md
=====================================
@@ -62,26 +62,20 @@
- [ ] ***(Optional)*** If new version available, update `mullvad-extension` section of `input_files` in `projects/browser/config`
- [ ] `URL`
- [ ] `sha256sum`
- - [ ] Update `ChangeLog-MB.txt`
- - [ ] Ensure ChangeLog-MB.txt is sync'd between alpha and stable branches
- - [ ] Check the linked issues: ask people to check if any are missing, remove the not fixed ones
- - [ ] Run `tools/fetch-changelogs.py $(TOR_BROWSER_VERSION)` or `tools/fetch-changelogs.py '#$(ISSUE_NUMBER)'`
- - Make sure you have `requests` installed (e.g., `apt install python3-requests`)
- - The first time you run this script you will need to generate an access token; the script will guide you
- - [ ] Copy the output of the script to the beginning of `ChangeLog-MB.txt` and update its output
- - [ ] Version
- - [ ] Browser Name
- - [ ] Release Date
- - [ ] Under `All Platforms` include any version updates for:
- - NoScript
- - uBlock-origin
- - Mullvad Browser Extension
- - Firefox
- - [ ] Open MR with above changes
- - [ ] Build the MR after initial review on at least two of:
- - [ ] Tor Project build machine
- - [ ] Mullvad build machine
- - [ ] Local developer machine
+ - [ ] Update `ChangeLog-MB.txt`
+ - [ ] Ensure `ChangeLog-MB.txt` is sync'd between alpha and stable branches
+ - [ ] Check the linked issues: ask people to check if any are missing, remove the not fixed ones
+ - [ ] Run `tools/fetch-changelogs.py $(ISSUE_NUMBER) --date $date $updateArgs`
+ - Make sure you have `requests` installed (e.g., `apt install python3-requests`)
+ - The first time you run this script you will need to generate an access token; the script will guide you
+ - `$updateArgs` should be these arguments, depending on what you actually updated:
+ - [ ] `--firefox`
+ - [ ] `--no-script`
+ - [ ] `--ublock`
+ - E.g., `tools/fetch-changelogs.py 41029 --date 'December 19 2023' --firefox 115.6.0esr --no-script 11.4.29 --ublock 1.54.0`
+ - `--date $date` is optional, if omitted it will be the date on which you run the command
+ - [ ] Copy the output of the script to the beginning of `ChangeLog-MB.txt` and adjust its output
+ - [ ] Open MR with above changes, using the template for release preparations
- [ ] Ensure builders have matching builds
- [ ] Merge
- [ ] Sign+Tag
@@ -92,32 +86,11 @@
- pierov
- richard
- [ ] Run: `make mullvadbrowser-signtag-alpha`
- - [ ] Push tag to `origin`
-
-</details>
-
-<details>
- <summary>QA</summary>
-
- ### send the build
- - [ ] Email Mullvad QA: support(a)mullvad.net, rui(a)mullvad.net
- <details>
- <summary>email template</summary>
-
- Subject:
- New build: Mullvad Browser $(MULLVAD_BROWSER_VERION) (unsigned)
-
- Body:
- unsigned builds: https://tb-build-05.torproject.org/~$(BUILDER)/builds/mullvadbrowser/alpha/…
-
- changelog:
- ...
-
- </details>
-
- - ***(Optional)*** Add additional information:
- - [ ] Note any new functionality which needs testing
- - [ ] Link to any known issues
+ - [ ] Push tag to `upstream`
+ - [ ] Build the tag on at least two of:
+ - [ ] Tor Project build machine
+ - [ ] Mullvad build machine
+ - [ ] Local developer machine
</details>
=====================================
.gitlab/issue_templates/Release Prep - Mullvad Browser Stable.md
=====================================
@@ -60,7 +60,20 @@ Mullvad Browser Stable lives in the various `maint-$(MULLVAD_BROWSER_MAJOR).$(MU
- [ ] ***(Optional)*** If new version available, update `mullvad-extension` section of `input_files` in `projects/browser/config`
- [ ] `URL`
- [ ] `sha256sum`
-- [ ] Open MR with above changes
+- [ ] Update `ChangeLog-MB.txt`
+ - [ ] Ensure `ChangeLog-MB.txt` is sync'd between alpha and stable branches
+ - [ ] Check the linked issues: ask people to check if any are missing, remove the not fixed ones
+ - [ ] Run `tools/fetch-changelogs.py $(ISSUE_NUMBER) --date $date $updateArgs`
+ - Make sure you have `requests` installed (e.g., `apt install python3-requests`)
+ - The first time you run this script you will need to generate an access token; the script will guide you
+ - `$updateArgs` should be these arguments, depending on what you actually updated:
+ - [ ] `--firefox`
+ - [ ] `--no-script`
+ - [ ] `--ublock`
+ - E.g., `tools/fetch-changelogs.py 41029 --date 'December 19 2023' --firefox 115.6.0esr --no-script 11.4.29 --ublock 1.54.0`
+ - `--date $date` is optional, if omitted it will be the date on which you run the command
+ - [ ] Copy the output of the script to the beginning of `ChangeLog-MB.txt` and adjust its output
+- [ ] Open MR with above changes, using the template for release preparations
- [ ] Merge
- [ ] Sign/Tag commit: `make mullvadbrowser-signtag-release`
- [ ] Push tag to `origin`
@@ -70,32 +83,6 @@ Mullvad Browser Stable lives in the various `maint-$(MULLVAD_BROWSER_MAJOR).$(MU
</details>
-<details>
- <summary>QA</summary>
-
-### send the build
-
- - [ ] Email Mullvad QA: support(a)mullvad.net, rui(a)mullvad.net
- <details>
- <summary>email template</summary>
-
- Subject:
- New build: Mullvad Browser $(MULLVAD_BROWSER_VERION) (unsigned)
-
- Body:
- unsigned builds: https://tb-build-05.torproject.org/~$(BUILDER)/builds/mullvadbrowser/releas…
-
- changelog:
- ...
-
- </details>
-
- - ***(Optional)*** Add additional information:
- - [ ] Note any new functionality which needs testing
- - [ ] Link to any known issues
-
-</details>
-
<details>
<summary>Signing</summary>
@@ -192,4 +179,4 @@ Mullvad Browser Stable lives in the various `maint-$(MULLVAD_BROWSER_MAJOR).$(MU
</details>
-/label ~"Release Prep"
+/label ~"Release Prep" ~"Sponsor 131"
=====================================
.gitlab/issue_templates/Release Prep - Tor Browser Alpha.md
=====================================
@@ -93,30 +93,22 @@
- [ ] Change the `version` to `$PIPELINEID`
- [ ] Update `sha256sum` in the `input_files` section
- [ ] Update `ChangeLog-TBB.txt`
- - [ ] Ensure ChangeLog-TBB.txt is sync'd between alpha and stable branches
+ - [ ] Ensure `ChangeLog-TBB.txt` is sync'd between alpha and stable branches
- [ ] Check the linked issues: ask people to check if any are missing, remove the not fixed ones
- - [ ] Run `tools/fetch-changelogs.py $(TOR_BROWSER_VERSION)` or `tools/fetch-changelogs.py '#$(ISSUE_NUMBER)'`
+ - [ ] Run `tools/fetch-changelogs.py $(ISSUE_NUMBER) --date $date $updateArgs`
- Make sure you have `requests` installed (e.g., `apt install python3-requests`)
- The first time you run this script you will need to generate an access token; the script will guide you
- - [ ] Copy the output of the script to the beginning of `ChangeLog-TBB.txt` and update its output
- - [ ] Version
- - [ ] Browser Name
- - [ ] Release Date
- - [ ] Under `All Platforms` include any version updates for:
- - NoScript
- - tor
- - OpenSSL
- - lyrebird
- - Snowflake
- - [ ] Under `Windows + macOS + Linux` include any version updates for:
- - Firefox
- - [ ] Under `Android` include any version updates for:
- - Geckoview
- - [ ] Under `Windows + Android` include any version updates for:
- - zlib
- - [ ] Under `Build System/All Platforms` include any version updates for:
- - Go
- - [ ] Open MR with above changes
+ - `$updateArgs` should be these arguments, depending on what you actually updated:
+ - [ ] `--firefox` (be sure to include esr at the end if needed, which is usually the case)
+ - [ ] `--tor`
+ - [ ] `--no-script`
+ - [ ] `--openssl`
+ - [ ] `--zlib`
+ - [ ] `--go`
+ - E.g., `tools/fetch-changelogs.py 41028 --date 'December 19 2023' --firefox 115.6.0esr --tor 0.4.8.10 --no-script 11.4.29 --zlib 1.3 --go 1.21.5 --openssl 3.0.12`
+ - `--date $date` is optional, if omitted it will be the date on which you run the command
+ - [ ] Copy the output of the script to the beginning of `ChangeLog-TBB.txt` and adjust its output
+ - [ ] Open MR with above changes, using the template for release preparations
- [ ] Build the MR after initial review on at least two of:
- [ ] Tor Project build machine
- [ ] Mullvad build machine
=====================================
.gitlab/issue_templates/Release Prep - Tor Browser Stable.md
=====================================
@@ -45,10 +45,11 @@ Tor Browser Stable lives in the various `maint-$(TOR_BROWSER_MAJOR).$(TOR_BROWSE
- [ ] ***(Optional)*** `var/firefox_platform_version` : update to latest `$(ESR_VERSION)` if rebased
- [ ] Update `projects/translation/config`:
- [ ] run `make list_translation_updates-release` to get updated hashes
- - [ ] `steps/base-browser/git_hash` : update with `HEAD` commit of project's `base-browser` branch
- - [ ] `steps/base-browser-fluent/git_hash` : update with `HEAD` commit of project's `basebrowser-newidentityftl` branch
- - [ ] `steps/tor-browser/git_hash` : update with `HEAD` commit of project's `tor-browser` branch
- - [ ] `steps/fenix/git_hash` : update with `HEAD` commit of project's `fenix-torbrowserstringsxml` branch
+ - [ ] Update `projects/translation/config`:
+ - [ ] run `make list_translation_updates-alpha` to get updated hashes
+ - [ ] `steps/base-browser/git_hash` : update with `HEAD` commit of project's `base-browser` branch
+ - [ ] `steps/tor-browser/git_hash` : update with `HEAD` commit of project's `tor-browser` branch
+ - [ ] `steps/fenix/git_hash` : update with `HEAD` commit of project's `fenix-torbrowserstringsxml` branch
- [ ] Update Android-specific build configs
- [ ] Update `projects/geckoview/config`
- [ ] `browser_build` : update to match `tor-browser` tag
@@ -58,10 +59,9 @@ Tor Browser Stable lives in the various `maint-$(TOR_BROWSER_MAJOR).$(TOR_BROWSE
- [ ] ***(Optional)*** Update `projects/application-services/config`:
**NOTE** we don't currently have any of our own patches for this project
- [ ] `git_hash` : update to appropriate git commit associated with `$(ESR_VERSION)`
- - [ ] ***(Optional)*** Update `projects/android-components/config`:
- - [ ] `android_components_build` : update to match stable android-components tag
- - [ ] ***(Optional)*** Update `projects/fenix/config`
- - [ ] `fenix_build` : update to match fenix tag
+ - [ ] ***(Optional)*** Update `projects/firefox-android/config`:
+ - [ ] `fenix_version` : update to match alpha `firefox-android` build tag
+ - [ ] `browser_branch` : update to match alpha `firefox-android` build tag
- [ ] Update allowed_addons.json by running (from `tor-browser-build` root):
- `./tools/fetch_allowed_addons.py > projects/browser/allowed_addons.json`
- [ ] Update common build configs
@@ -79,43 +79,39 @@ Tor Browser Stable lives in the various `maint-$(TOR_BROWSER_MAJOR).$(TOR_BROWSE
- [ ] Check for tor updates here : https://gitlab.torproject.org/tpo/core/tor/-/tags
- [ ] ***(Optional)*** Update `projects/tor/config`
- [ ] `version` : update to latest non `-alpha` tag (ping dgoulet or ahf if unsure)
- - [ ] Check for go updates here : https://golang.org/dl
+ - [ ] Check for go updates here : https://go.dev/dl
- **NOTE** : Tor Browser Stable uses the latest of the *previous* Stable major series go version (apart from the transition phase from Tor Browser Alpha to Stable, in which case Tor Browser Stable may use the latest major series go version)
- [ ] ***(Optional)*** Update `projects/go/config`
- [ ] `version` : update go version
- [ ] `input_files/sha256sum` for `go` : update sha256sum of archive (sha256 sums are displayed on the go download page)
- - [ ] Check for manual updates by running (from `tor-browser-build` root): `./tools/fetch-manual.py`
- - [ ] ***(Optional)*** If new version is available:
- - [ ] Upload the downloaded `manual_$PIPELINEID.zip` file to `tb-build-02.torproject.org`
- - [ ] Deploy to `tb-builder`'s `public_html` directory:
- - `sudo -u tb-builder cp manual_$PIPELINEID.zip ~/../tb-builder/public_html/.`
- - [ ] Update `projects/manual/config`:
- - [ ] Change the `version` to `$PIPELINEID`
- - [ ] Update `sha256sum` in the `input_files` section
-- [ ] Update `ChangeLog.txt`
- - [ ] Ensure ChangeLog.txt is sync'd between alpha and stable branches
+ - [ ] Check for manual updates by running (from `tor-browser-build` root): `./tools/fetch-manual.py`
+ - [ ] ***(Optional)*** If new version is available:
+ - [ ] Upload the downloaded `manual_$PIPELINEID.zip` file to `tb-build-02.torproject.org`
+ - [ ] Deploy to `tb-builder`'s `public_html` directory:
+ - `sudo -u tb-builder cp manual_$PIPELINEID.zip ~/../tb-builder/public_html/.`
+ - [ ] Update `projects/manual/config`:
+ - [ ] Change the `version` to `$PIPELINEID`
+ - [ ] Update `sha256sum` in the `input_files` section
+- [ ] Update `ChangeLog-TBB.txt`
+ - [ ] Ensure `ChangeLog-TBB.txt` is sync'd between alpha and stable branches
- [ ] Check the linked issues: ask people to check if any are missing, remove the not fixed ones
- - [ ] Run `tools/fetch-changelogs.py $(TOR_BROWSER_VERSION)` or `tools/fetch-changelogs.py '#$(ISSUE_NUMBER)'`
+ - [ ] Run `tools/fetch-changelogs.py $(ISSUE_NUMBER) --date $date $updateArgs`
- Make sure you have `requests` installed (e.g., `apt install python3-requests`)
- The first time you run this script you will need to generate an access token; the script will guide you
- - [ ] Copy the output of the script to the beginning of `ChangeLog.txt` and adjust its output
- - **NOTE** : If you used the issue number, you will need to write the Tor Browser version manually
- - [ ] ***(Optional)*** Under `All Platforms` include any version updates for:
- - [ ] Translations
- - [ ] OpenSSL
- - [ ] NoScript
- - [ ] zlib
- - [ ] tor daemon
- - [ ] ***(Optional)*** Under `Windows + macOS + Linux` include updates for:
- - [ ] Firefox
- - [ ] ***(Optional)*** Under `Android`, include updates for:
- - [ ] Geckoview
- - [ ] ***(Optional)*** Under `Build System/All Platforms` include updates for:
- - [ ] Go
-- [ ] Open MR with above changes
+ - `$updateArgs` should be these arguments, depending on what you actually updated:
+ - [ ] `--firefox` (be sure to include esr at the end if needed, which is usually the case)
+ - [ ] `--tor`
+ - [ ] `--no-script`
+ - [ ] `--openssl`
+ - [ ] `--zlib`
+ - [ ] `--go`
+ - E.g., `tools/fetch-changelogs.py 41028 --date 'December 19 2023' --firefox 115.6.0esr --tor 0.4.8.10 --no-script 11.4.29 --zlib 1.3 --go 1.21.5 --openssl 3.0.12`
+ - `--date $date` is optional, if omitted it will be the date on which you run the command
+ - [ ] Copy the output of the script to the beginning of `ChangeLog-TBB.txt` and adjust its output
+- [ ] Open MR with above changes, using the template for release preparations
- [ ] Merge
- [ ] Sign/Tag commit: `make torbrowser-signtag-release`
-- [ ] Push tag to `origin`
+- [ ] Push tag to `upstream`
- [ ] Begin build on `$(BUILD_SERVER)` (fix any issues in subsequent MRs)
- [ ] **TODO** Submit build-tag to Mullvad build infra
- [ ] Ensure builders have matching builds
=====================================
.gitlab/merge_request_templates/default.md
=====================================
@@ -43,16 +43,16 @@
- **localization** : henry, pierov
- **macos** : clairehurst, dan
- **nightly builds** : boklm
- - **rebases/release-prep** : dan, ma1, pierov, richard
+ - **rebases/release-prep** : boklm, dan, ma1, pierov, richard
- **security** : ma1
- **signing** : boklm, richard
- **updater** : pierov
- **misc/other** : pierov, richard
-#### Change Description
+### Change Description
<!-- Whatever context the reviewer needs to effectively review the patchset; if the patch includes UX updates be sure to include screenshots/video of how any new behaviour -->
#### How Tested
-<!-- Description of steps taken to verify the change -->
\ No newline at end of file
+<!-- Description of steps taken to verify the change -->
=====================================
.gitlab/merge_request_templates/relprep.md
=====================================
@@ -0,0 +1,15 @@
+## Merge Info
+
+### Related Issues
+
+- tor-browser-build#xxxxx
+- tor-browser-build#xxxxx
+
+## Review
+
+### Request Reviewer
+
+- [ ] Request review from a release engineer: boklm, dan, ma1, pierov, richard
+
+### Change Description
+
=====================================
tools/fetch-changelogs.py
=====================================
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+import argparse
from datetime import datetime
import enum
from pathlib import Path
@@ -23,6 +24,11 @@ project_order = {
}
+class EntryType(enum.IntFlag):
+ UPDATE = 0
+ ISSUE = 1
+
+
class Platform(enum.IntFlag):
WINDOWS = 8
MACOS = 4
@@ -32,40 +38,12 @@ class Platform(enum.IntFlag):
ALL_PLATFORMS = 8 | 4 | 2 | 1
-class Issue:
- def __init__(self, j):
- self.title = j["title"]
- self.project, self.number = (
- j["references"]["full"].rsplit("/", 2)[-1].split("#")
- )
- self.number = int(self.number)
- self.platform = 0
- self.num_platforms = 0
- if "Desktop" in j["labels"]:
- self.platform = Platform.DESKTOP
- self.num_platforms += 3
- else:
- if "Windows" in j["labels"]:
- self.platform |= Platform.WINDOWS
- self.num_platforms += 1
- if "MacOS" in j["labels"]:
- self.platform |= Platform.MACOS
- self.num_platforms += 1
- if "Linux" in j["labels"]:
- self.platform |= Platform.LINUX
- self.num_platforms += 1
- if "Android" in j["labels"]:
- if is_mb and self.num_platforms == 0:
- raise Exception(
- f"Android-only issue on Mullvad Browser: {j['references']['full']}!"
- )
- elif not is_mb:
- self.platform |= Platform.ANDROID
- self.num_platforms += 1
- if not self.platform or (is_mb and self.platform == Platform.DESKTOP):
- self.platform = Platform.ALL_PLATFORMS
- self.num_platforms = 4
- self.is_build = "Build System" in j["labels"]
+class ChangelogEntry:
+ def __init__(self, type_, platform, num_platforms, is_build):
+ self.type = type_
+ self.platform = platform
+ self.num_platforms = num_platforms
+ self.is_build = is_build
def get_platforms(self):
if self.platform == Platform.ALL_PLATFORMS:
@@ -81,15 +59,78 @@ class Issue:
platforms.append("Android")
return " + ".join(platforms)
- def __str__(self):
- return f"Bug {self.number}: {self.title} [{self.project}]"
-
def __lt__(self, other):
+ if self.type != other.type:
+ return self.type < other.type
+ if self.type == EntryType.UPDATE:
+ # Rely on sorting being stable on Python
+ return False
if self.project == other.project:
return self.number < other.number
return project_order[self.project] < project_order[other.project]
+class UpdateEntry(ChangelogEntry):
+ def __init__(self, name, version):
+ if name == "Firefox" and not is_mb:
+ platform = Platform.DESKTOP
+ num_platforms = 3
+ elif name == "GeckoView":
+ platform = Platform.ANDROID
+ num_platforms = 3
+ else:
+ platform = Platform.ALL_PLATFORMS
+ num_platforms = 4
+ super().__init__(
+ EntryType.UPDATE, platform, num_platforms, name == "Go"
+ )
+ self.name = name
+ self.version = version
+
+ def __str__(self):
+ return f"Updated {self.name} to {self.version}"
+
+
+class Issue(ChangelogEntry):
+ def __init__(self, j):
+ self.title = j["title"]
+ self.project, self.number = (
+ j["references"]["full"].rsplit("/", 2)[-1].split("#")
+ )
+ self.number = int(self.number)
+ platform = 0
+ num_platforms = 0
+ if "Desktop" in j["labels"]:
+ platform = Platform.DESKTOP
+ num_platforms += 3
+ else:
+ if "Windows" in j["labels"]:
+ platform |= Platform.WINDOWS
+ num_platforms += 1
+ if "MacOS" in j["labels"]:
+ platform |= Platform.MACOS
+ num_platforms += 1
+ if "Linux" in j["labels"]:
+ platform |= Platform.LINUX
+ num_platforms += 1
+ if "Android" in j["labels"]:
+ if is_mb and num_platforms == 0:
+ raise Exception(
+ f"Android-only issue on Mullvad Browser: {j['references']['full']}!"
+ )
+ elif not is_mb:
+ platform |= Platform.ANDROID
+ num_platforms += 1
+ if not platform or (is_mb and platform == Platform.DESKTOP):
+ platform = Platform.ALL_PLATFORMS
+ num_platforms = 4
+ is_build = "Build System" in j["labels"]
+ super().__init__(EntryType.ISSUE, platform, num_platforms, is_build)
+
+ def __str__(self):
+ return f"Bug {self.number}: {self.title} [{self.project}]"
+
+
def sorted_issues(issues):
issues = [sorted(v) for v in issues.values()]
return sorted(
@@ -99,8 +140,20 @@ def sorted_issues(issues):
)
-if len(sys.argv) < 2:
- print(f"Usage: {sys.argv[0]} version-to-release or #issue-id")
+parser = argparse.ArgumentParser()
+parser.add_argument("issue_version")
+parser.add_argument("--date", help="The date of the release")
+parser.add_argument("--firefox", help="New Firefox version (if we rebased)")
+parser.add_argument("--tor", help="New Tor version (if updated)")
+parser.add_argument("--no-script", help="New NoScript version (if updated)")
+parser.add_argument("--openssl", help="New OpenSSL version (if updated)")
+parser.add_argument("--ublock", help="New uBlock version (if updated)")
+parser.add_argument("--zlib", help="New zlib version (if updated)")
+parser.add_argument("--go", help="New Go version (if updated)")
+args = parser.parse_args()
+
+if not args.issue_version:
+ parser.print_help()
sys.exit(1)
token_file = Path(__file__).parent / ".changelogs_token"
@@ -121,7 +174,7 @@ with token_file.open() as f:
token = f.read().strip()
headers = {"PRIVATE-TOKEN": token}
-version = sys.argv[1]
+version = args.issue_version
r = requests.get(
f"{API_URL}/projects/{PROJECT_ID}/issues?labels=Release Prep",
headers=headers,
@@ -132,7 +185,7 @@ if r.status_code == 401:
issue = None
issues = []
for i in r.json():
- if i["title"].find(sys.argv[1]) != -1:
+ if i["title"].find(version) != -1:
issues.append(i)
if len(issues) == 1:
issue = issues[0]
@@ -172,20 +225,44 @@ iid = issue["iid"]
linked = {}
linked_build = {}
+
+
+def add_entry(entry):
+ target = linked_build if entry.is_build else linked
+ if entry.platform not in target:
+ target[entry.platform] = []
+ target[entry.platform].append(entry)
+
+
+if args.firefox:
+ add_entry(UpdateEntry("Firefox", args.firefox))
+ if not is_mb:
+ add_entry(UpdateEntry("GeckoView", args.firefox))
+if args.tor and not is_mb:
+ add_entry(UpdateEntry("Tor", args.tor))
+if args.no_script:
+ add_entry(UpdateEntry("NoScript", args.no_script))
+if not is_mb:
+ if args.openssl:
+ add_entry(UpdateEntry("OpenSSL", args.openssl))
+ if args.zlib:
+ add_entry(UpdateEntry("zlib", args.zlib))
+ if args.go:
+ add_entry(UpdateEntry("Go", args.go))
+elif args.ublock:
+ add_entry(UpdateEntry("uBlock Origin", args.ublock))
+
r = requests.get(
f"{API_URL}/projects/{PROJECT_ID}/issues/{iid}/links", headers=headers
)
for i in r.json():
- i = Issue(i)
- target = linked_build if i.is_build else linked
- if i.platform not in target:
- target[i.platform] = []
- target[i.platform].append(i)
+ add_entry(Issue(i))
+
linked = sorted_issues(linked)
linked_build = sorted_issues(linked_build)
name = "Mullvad" if is_mb else "Tor"
-date = datetime.now().strftime("%B %d %Y")
+date = args.date if args.date else datetime.now().strftime("%B %d %Y")
print(f"{name} Browser {version} - {date}")
for issues in linked:
print(f" * {issues[0].get_platforms()}")
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.
1
0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.6.0esr-13.5-1] 18 commits: MB 38: Mullvad Browser configuration
by richard (@richard) 13 Dec '23
by richard (@richard) 13 Dec '23
13 Dec '23
richard pushed to branch mullvad-browser-115.6.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser
Commits:
ac803556 by Pier Angelo Vendrame at 2023-12-13T18:52:20+01:00
MB 38: Mullvad Browser configuration
- - - - -
d47f9791 by Pier Angelo Vendrame at 2023-12-13T18:52:22+01:00
MB 1: Mullvad Browser branding
See also:
mullvad-browser#5: Product name and directory customization
mullvad-browser#12: Create new branding directories and integrate Mullvad icons+branding
mullvad-browser#14: Remove Default Built-in bookmarks
mullvad-browser#35: Add custom PDF icons for Windows builds
mullvad-browser#48: Replace Mozilla copyright and legal trademarks in mullvadbrowser.exe metadata
mullvad-browser#51: Update trademark string
mullvad-browser#104: Update shipped dll metadata copyright/licensing info
mullvad-browser#107: Add alpha and nightly icons
- - - - -
a19a5d74 by Pier Angelo Vendrame at 2023-12-13T18:52:22+01:00
MB 20: Allow packaged-addons in PBM.
We install a few addons from the distribution directory, but they are
not automatically enabled for PBM mode.
This commit modifies the code that installs them to also add the PBM
permission to the known ones.
- - - - -
da9dd1b9 by Pier Angelo Vendrame at 2023-12-13T18:52:23+01:00
MB 63: Customize some about pages for Mullvad Browser
Also:
mullvad-browser#57: Purge unneeded about: pages
- - - - -
f4ee6733 by Pier Angelo Vendrame at 2023-12-13T18:52:23+01:00
MB 37: Customization for the about dialog
- - - - -
1979d0b1 by Henry Wilkes at 2023-12-13T18:52:23+01:00
MB 39: Add home page about:mullvad-browser
- - - - -
895b814b by hackademix at 2023-12-13T18:52:24+01:00
MB 97: Remove UI cues to install new extensions.
- - - - -
fc43b802 by hackademix at 2023-12-13T18:52:24+01:00
MB 47: uBlock Origin customization
- - - - -
2927cde3 by Pier Angelo Vendrame at 2023-12-13T18:52:25+01:00
MB 21: Disable the password manager
This commit disables the about:login page and removes the "Login and
Password" section of about:preferences.
We do not do anything to the real password manager of Firefox, that is
in toolkit: it contains C++ parts that make it difficult to actually
prevent it from being built..
Finally, we modify the the function that opens about:login to report an
error in the console so that we can quickly get a backtrace to the code
that tries to use it.
- - - - -
2f3ec998 by Pier Angelo Vendrame at 2023-12-13T18:52:25+01:00
MB 87: Disable the default browser box on Windows and Linux
Windows and Linux will be distributed only as portable apps at the
beginning, so they should not be settable as default browsers.
We will need to improve the logic once we decide to ship system-wide
installers, too.
- - - - -
128515f1 by Pier Angelo Vendrame at 2023-12-13T18:52:25+01:00
MB 112: Updater customization for Mullvad Browser
MB 71: Set the updater base URL to Mullvad domain
- - - - -
8aafa1f1 by Nicolas Vigier at 2023-12-13T18:52:26+01:00
MB 79: Add Mullvad Browser MAR signing keys
- - - - -
e773d5c2 by Pier Angelo Vendrame at 2023-12-13T18:52:26+01:00
MB 34: Hide unsafe and unwanted preferences UI
about:preferences allow to override some of our defaults, that could
be fingeprintable or have some other unwanted consequences.
- - - - -
712b5242 by Pier Angelo Vendrame at 2023-12-13T18:52:26+01:00
MB 160: Disable the cookie exceptions button
Besides disabling the "Delete on close checkbox", disable also the
"Manage Exceptions" button when always using PBM.
- - - - -
908ad1ac by hackademix at 2023-12-13T18:52:27+01:00
MB 163: prevent uBlock Origin from being uninstalled/disabled
- - - - -
b89c5f55 by Richard Pospesel at 2023-12-13T18:52:27+01:00
MB 188: Customize Gitlab Issue and Merge templates
- - - - -
8cb00edd by rui hildt at 2023-12-13T18:52:27+01:00
MB 213: Customize the search engines list
- - - - -
86608d0d by hackademix at 2023-12-13T18:52:28+01:00
MB 214: Enable cross-tab identity leak protection in "quiet" mode
- - - - -
30 changed files:
- + .gitlab/issue_templates/Rebase Browser - Alpha.md
- + .gitlab/issue_templates/Rebase Browser - Stable.md
- .gitlab/merge_request_templates/default.md
- browser/app/Makefile.in
- browser/app/macbuild/Contents/Info.plist.in
- browser/app/module.ver
- browser/app/firefox.exe.manifest → browser/app/mullvadbrowser.exe.manifest
- + browser/app/profile/000-mullvad-browser.js
- browser/app/profile/001-base-profile.js
- browser/base/content/aboutDialog.xhtml
- browser/base/content/appmenu-viewcache.inc.xhtml
- browser/base/content/browser-menubar.inc
- browser/base/content/browser-places.js
- browser/base/content/browser.js
- browser/base/content/default-bookmarks.html
- browser/base/content/nsContextMenu.js
- browser/base/content/overrides/app-license.html
- browser/base/content/pageinfo/pageInfo.xhtml
- browser/base/content/utilityOverlay.js
- browser/branding/branding-common.mozbuild
- + browser/branding/mb-alpha/VisualElements_150.png
- + browser/branding/mb-alpha/VisualElements_70.png
- + browser/branding/mb-alpha/configure.sh
- + browser/branding/mb-alpha/content/about-logo.png
- + browser/branding/mb-alpha/content/about-logo.svg
- + browser/branding/mb-alpha/content/about-logo(a)2x.png
- + browser/branding/mb-alpha/content/about-wordmark.svg
- + browser/branding/mb-alpha/content/about.png
- + browser/branding/mb-alpha/content/aboutDialog.css
- + browser/branding/mb-alpha/content/firefox-wordmark.svg
The diff was not included because it is too large.
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/ae…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/ae…
You're receiving this email because of your account on gitlab.torproject.org.
1
0