Includes rounding of DOMHighResTimeStamps and other
timers with resolution higher than 1 ms.
Behind "BraveRoundTimeStamps" feature flag, enabled by default.
Also: disable 2 linux browser tests broken by timer rounding
Create a feature flag, BraveTorWindowsHttpsOnly, that
enables HTTPS-Only Mode for Private Windows with Tor.
Enable that flag by default.
Do not enforce HTTPS-Only for .onion sites: these
are already secure when using http://.
(Users can check "Always use secure connections" to enable
HTTPS-Only Mode for other windows if they wish.)
* [Experiment] Vertical tabs
This new feature is at experimental stage for now. So it's hidden
behind flag('Vertical tabs')
Impemented:
* Expand and collapse via a button on top of tabs.
* Vertical scroll area for tabs
* TabCards
* Tab reordering via drag-and-drop
* Tab detaching and attaching via drag-and-drop
* Shape customization
TBD:
* Switching tabs layout direction on runtime
- need to plumb pref to many UI components.
* Title area in frame
- Show title or move up toolbar
- Moving up toolbar can take some time.
* Layout animation
* Bug 23170: anti-fingerprinting: hide screen size and window position
Disabled by default behind the kBraveBlockScreenFingerprinting flag.
When farbling is active, modify API behavior in 4 categories:
1. window.outer{Width,Height}, window.screen{X,Y},
window.screen.{width,height,avail{Width,Height,Left,Top}}
R = random number between 0 and 8, seeded by session+domain
window.screen{X,Y} -> R
window.outer{Width,Height} -> window.inner{Width, Height} + R
window.screen.{width, height} -> window.inner{Width, Height} + R
window.screen.avail{Width, Height} -> window.inner{Width, Height} + R
window.screen.avail{Top, Left} -> R
window.screen.isExtended -> false
2. {mouse,drag,pointer,touch}Event.screen{X,Y}
Rewrite Event screen coordinates such that
event.screen{X,Y} -> devicePixelRatio * event.client{X,Y} + R
3. device-{width,height} in media queries
When farbling is enabled, media query for device-width
matches the same value as window.screen.width (also farbled).
Same for device-height.
4: make window.open play nice with spoofed screen coords
When a web page opens a child window, the position of the child window
should be relative to the spoofed screen coordinates, not relative
to the real screen coordinates.
Also:
* Factor out brave_session_cache.{cc,h} to speed up incremental builds.
* Add browser tests of these protections.
* Suppress upstream browser tests that expected isExtended to be true sometimes.
* Set the feature flag to be disabled by default. (We will be rolling
out enabled over griffin.)
Disabled by default behind the kBraveBlockScreenFingerprinting flag.
When farbling is active, modify API behavior in 4 categories:
1. window.outer{Width,Height}, window.screen{X,Y},
window.screen.{width,height,avail{Width,Height,Left,Top}}
R = random number between 0 and 8, seeded by session+domain
window.screen{X,Y} -> R
window.outer{Width,Height} -> window.inner{Width, Height} + R
window.screen.{width, height} -> window.inner{Width, Height} + R
window.screen.avail{Width, Height} -> window.inner{Width, Height} + R
window.screen.avail{Top, Left} -> R
window.screen.isExtended -> false
2. {mouse,drag,pointer,touch}Event.screen{X,Y}
Rewrite Event screen coordinates such that
event.screen{X,Y} -> devicePixelRatio * event.client{X,Y} + R
3. device-{width,height} in media queries
When farbling is enabled, media query for device-width
matches the same value as window.screen.width (also farbled).
Same for device-height.
4: make window.open play nice with spoofed screen coords
When a web page opens a child window, the position of the child window
should be relative to the spoofed screen coordinates, not relative
to the real screen coordinates.
Also:
* Factor out brave_session_cache.{cc,h} to speed up incremental builds.
* Add browser tests of these protections.
* Suppress upstream browser tests that expected isExtended to be true sometimes.
* Set the feature flag to be disabled by default. (We will be rolling
out enabled over griffin.)
fix https://github.com/brave/brave-browser/issues/24205
Querying channel info caused crash at startup because channel info
is not set on Windows Release build for unittest.
Do filtering playlist feature via unexpire_flags.cc instead.
* Implement navigator.languages farbling
* add support for HTTP headers
* add support for farbling HTTP header
* add reduce language preference toggle in settings
* Implement font whitelist
* add sublabel to reduce-lang preference toggle
* rebase patches
* use anonymous namespace
* also add our AllowFontFamily method to TestFontSelector to avoid compile errors
* farble all non-whitelisted fonts without enumeration
* rename to MakePseudoRandomGeneratorForURL
* move session token management to singleton service
* move font whitelist to .cc file
* move prefs constants and code around
* pref names browsertest fix
* reduce patches (really)
* add web worker and service worker tests
* get URL differently, move DCHECK
* propogate reduce-language pref to renderers
* consolidate feature detection, add some comments
* lint
* gn_check
* gn_check
* refactor default locale lookup
* lint
* default session key to 12345 if command line switch is missing
https://github.com/brave/brave-browser/issues/22021
* change 12345 -> 23456 so it doesn’t match the test default
Co-authored-by: bridiver <github@brianjohnson.cc>
* De-amp feature
* Add settings UI for de_amp feature
* Add tests
* Refactor Speedreader + DeAmp throttle/loader
* Restrict De-AMPing to main frame loads
* Pref default on
* Remove Android as test target
* Off by default on Android
Co-authored-by: bridiver <github@brianjohnson.cc>