* perf: use an absl::flat_hash_set for UsbChooserContext::ephemeral_devices_
* perf: use an absl::flat_hash_set for GlobalMenuBarRegistrarX11::live_windows_
* perf: use an absl::flat_hash_set for NativeWindowViews::forwarding_windows_
* perf: use an absl::flat_hash_set for OffScreenRenderWidgetHostView::guest_host_views_
perf: use an absl::flat_hash_set for OffScreenRenderWidgetHostView::proxy_views_
* perf: use an absl::flat_hash_set for NativeWindow::injected_frames_
* perf: use an absl::flat_hash_set for NativeWindow::background_throttling_sources_
perf: have ErrorThrower lazy-lookup the current isolate
ErrorThrower's default constructor is marked as "should rarely if ever
be used" because it's expensive to call.
Unfortunately, nearly every instance of ErrorThrower comes as an argument
in gin_helper's JS-->C++ function marshalling where a thrower is
default-constructed and then populated in gin_helper::GetNextArgument()
with an assignment operator to a temporary ErrorThrower constructed
with the gin::Arguments' isolate.
tldr: most of the time we use the slow constructor first, then throw
that work away unused by overwriting with a fast-constructed one.
This refactor avoids that cost by deferring the expensive work to
`ErrorThrower::isolate()`, where it happens only as a fallback iff
isolate_ hasn't been set.
* perf: avoid redundant call to popup_bounds_in_view()
* refactor: use a std::optional<> for paint_canvas local
* fix: fix leaked gfx::Canvas in AutofillPopupView::OnPaint()
* refactor: remove redundant get() call when testing smart pointer for nonempty
* refactor: remove unnecessary draw_canvas variable
* refactor: rename bitmap to offscreen_bitmap for symmetry
* refactor: avoid another redundant call to popup_bounds_in_view()
* perf: avoid making an unnecessary copy of the vector
MimeTypesHandler::GetMIMETypeAllowlist() returns a const&, so we can
iterate that directly instead of making a temporary copy of it.
* perf: move the call to ExtensionRegistry::Get() outside of the loop
Also, keep the previous behavior of not calling it at all if there
aren't any whitelisted extensions.
* perf: avoid redundant map lookup
* refactor: const correctness
* refactor: cleanup
* feat: Corner Smoothing CSS rule (Reland)
Reland of #45185
* Fix patch conflicts
* fixup! Fix patch conflicts
* Update expected image
The dashed border is subtly different. The new version is correct and the old one was incorrect.
refactor: small refactor to WebWorkerObserver::WorkerScriptReadyForEvaluation()
- replace a std::vector<std::string> local with a compile-time array
of std::string_view
- remove .c_str() pessimization when making v8 Strings from string_views
* feat: add support for associating a Menu with a WebFrameMain
This allows certain OS level features to activate such as Writing Tools, Autofill.. and Services.
There appears to be a bug in macOS where the responder chain isn't traversed if the menu is not popped up using an event, as such we spoof a fake mouse event at the write coordinates in the right window and use that to open the menu.
* build: fix build on non-mac
* build: oops missed a header
* fix: safely handle optional T* by checking nullptr too
* build: fix gn check and build errors
* docs: suggested changes
* feat: default `frame` to `window.webContents.mainFrame` when possible
* fix: avoid deref nullptr view
* Revert "feat: default `frame` to `window.webContents.mainFrame` when possible"
This reverts commit 2e888368199317d67f6ad931a7e9eff0295c4b1b.
* fix: lint
* Remove redundant scoped objects
This code, including the comments, matches almost exactly the behavior of this argument to the function.
* Add ScopedPumpMessagesInPrivateModes patch
* More null pointer safety
---------
Co-authored-by: clavin <clavin@electronjs.org>
* refactor: migrate AsarFileValidator to crypto::hash
This change migrates AsarFileValidator's uses of crypto::secure_hash
to the new crypto::hash API, which has more memory safety and less
heap allocations.
Xref: 6287609
* refactor: migrate ValidateIntegrityOrDie to crypto::hash
This change migrates ValidateIntegrityOrDie's use of crypto::SHA256Hash
to the new crypto::hash API, which has more memory safety and less heap
allocations.
Xref: 6287609
* build: fixup windows source cache for release
* build: fixup ffmpeg gn gen
* build: add build-tools depot_tools to PATH
There are some cases where it is still expected that depot_tools be in the path
* put back regular gn gen for ffmpeg
* build: add retry to moving source cache
This resolves the error: `Move-Item : The process cannot access the file because it is being used by another process.`
* refactor: extract-method GetAddedFileSystems()
* refactor: use GetAddedFileSystems() in GetAddedFileSystemPaths()
* refactor: use GetAddedFileSystems() in IsDevToolsFileSystemAdded()
When using the SCK thumbnail capturer, the first refresh has the list of
sources, and the second refresh has the thumbnails. If thumbnails are
not needed, only wait for the first refresh.