* Force context menu on Shift + Right Click on elements in pages
This PR introduces a feature that allows users to open the context menu
even if `event.preventDefault()` is called on the `contextmenu` event
when the Shift key is pressed.
This is particularly useful for users who want to access the context
menu on web pages that disable it through JavaScript.
This is achieved by bypassing the `preventDefault` check for
`contextmenu` events when the Shift key is detected as being pressed in
the "EventDispatcher" so that Node's `DefaultEventHandler` is called.
* Exclude rewrite from license checks
extends the transpile_web_ui.py to assert that the source roots provided via imports_from are complete.
The purpose of this is to improve the gn analyze functionality to be able to infer which tests need to run based on filechanges alone.
This happened when the drive letter was lower- instead of upper-case:
Traceback (most recent call last):
File "C:\src\tools\grit\grit.py", line 17, in <module>
sys.exit(grit.grit_runner.Main(sys.argv[1:]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\src\tools\grit\grit\grit_runner.py", line 307, in Main
toolobject = _GetToolInfo(tool)[_FACTORY]()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\src\tools\grit\grit\grit_runner.py", line 25, in ToolFactoryBuild
import grit.tool.build
File "C:\src\tools\grit\grit\tool\build.py", line 21, in <module>
from grit import grd_reader
File "C:\src\tools\grit\grit\grd_reader.py", line 17, in <module>
from grit.node import mapping
File "C:\src\tools\grit\grit\node\mapping.py", line 12, in <module>
from grit.node import empty
File "C:\src\tools\grit\grit\node\empty.py", line 10, in <module>
from grit.node import include
File "C:\src\tools\grit\grit\node\include.py", line 12, in <module>
import grit.format.html_inline
File "C:\src\tools\grit\grit\format\html_inline.py", line 22, in <module>
from grit.format import minifier
File "C:\src\tools\grit\grit\format\minifier.py", line 35, in <module>
from brave_chromium_utils import inline_chromium_src_override; inline_chromium_src_override(globals(), locals())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\src\brave\script\brave_chromium_utils.py", line 111, in inline_chromium_src_override
chromium_src_override = get_chromium_src_override(orig_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\src\brave\script\brave_chromium_utils.py", line 64, in get_chromium_src_override
assert path.startswith(src_dir), (path, src_dir)
^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: ('C:\\src\\tools\\grit\\grit\\format\\minifier.py', 'c:\\src')
We no longer have any OS-dependent excluded paths any longer (confirmed with
security team), so we can drop the checks that relied on `target_os` completely.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/2b748c6b6a27f01282f16dd87b30850f86987fa9
commit 2b748c6b6a27f01282f16dd87b30850f86987fa9
Author: David Song <wintermelons@google.com>
Date: Wed Sep 24 09:21:26 2025 -0700
[Fuchsia] Remove SwiftShader from the LICENSE file
WebEngine is built with swiftshader enabled since some tests depend on
it, but swiftshader artifacts are excluded from the packages uploaded
to CIPD, so it should be excluded from the LICENSE file as well.
Updated the licenses.py script to add support for --exclude-dir
argument which is used now to exclude SwiftShader license.
Bug: 444526998
Change-Id: Ib38133c6760a4c477f7b0a80aab92dca58b72c8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6946765
Reviewed-by: Zijie He <zijiehe@google.com>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: David Song <wintermelons@google.com>
Cr-Commit-Position: refs/heads/main@{#1520039}
This change moves `third_party/ios_deps` to `ios/third_party` which matches Chromium and adds `third_party` entries for each dependency added in `brave-ios/Package.swift` so that they are correctly added to the licenses file
* add an option to declare if an iife is desired or not
* bundle distiller scripts directly, opt-out of an iife
* provide default distillation level value
* fixes distiller execution
With distiller scripts no longer being wrapped in IIFE's (by Webpack), we have a simpler execution pattern (i.e., { %s distill() }). This means we no longer need to combine scripts, or wait for promises to resolve. Lastly, the map of host names to distillation preferences has been moved to the header, which seems to be a more appropriate location.
* sets default distillation level to FULL
* switches distiller scripts to enabled-by-default
* Allow additional UI locales.
Remove the following locales from Chromium's exclusion list:
sq (Albanian)
az (Azeri)
my (Burmese)
ka (Georgian)
km (Khmer)
mk (Macedonian)
mn (Mongolian)
si (Sinhala)
sr-Latn (Serbian Latin)
uz (Uzbek)
* Adds locale_settings_*.grd files to l10n rebase scripts.
These files on Linux/Win/Mac are missing <output> elements for languages
we now support (az', 'ka', 'km', 'mk', 'mn', 'my', 'si', 'sq',
'sr-Latn', 'uz'). We use rebase scripts to insert them and add the
resulting .grd files under brave.
* Updates Brave .grd and .xtb files for added languages.