mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Merge remote-tracking branch 'origin/main' into replace-browserview
This commit is contained in:
@@ -1203,7 +1203,7 @@ For `infoType` equal to `basic`:
|
||||
}
|
||||
```
|
||||
|
||||
Using `basic` should be preferred if only basic information like `vendorId` or `driverId` is needed.
|
||||
Using `basic` should be preferred if only basic information like `vendorId` or `deviceId` is needed.
|
||||
|
||||
### `app.setBadgeCount([count])` _Linux_ _macOS_
|
||||
|
||||
|
||||
@@ -64,9 +64,9 @@ auto_filenames = {
|
||||
"docs/api/touch-bar-spacer.md",
|
||||
"docs/api/touch-bar.md",
|
||||
"docs/api/tray.md",
|
||||
"docs/api/utility-process.md",
|
||||
"docs/api/view.md",
|
||||
"docs/api/web-contents-view.md",
|
||||
"docs/api/utility-process.md",
|
||||
"docs/api/web-contents.md",
|
||||
"docs/api/web-frame-main.md",
|
||||
"docs/api/web-frame.md",
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
{
|
||||
"bullseye_amd64": {
|
||||
"Key": "20220331T153654Z-0",
|
||||
"Sha1Sum": "f515568ba23311d4ae5cb40354d012d4e52f756f",
|
||||
"Sha1Sum": "f631cf53b56adcf0d6231c9dfe72affb25516e85",
|
||||
"SysrootDir": "debian_bullseye_amd64-sysroot",
|
||||
"Tarball": "debian_bullseye_amd64_sysroot.tar.xz"
|
||||
},
|
||||
"bullseye_arm": {
|
||||
"Key": "20220331T153654Z-0",
|
||||
"Sha1Sum": "19d5f186b437c9445feb69aee1bdd74635373c83",
|
||||
"Sha1Sum": "0820cf8eadc2a2e396bacce35c27a7024ace62b1",
|
||||
"SysrootDir": "debian_bullseye_arm-sysroot",
|
||||
"Tarball": "debian_bullseye_arm_sysroot.tar.xz"
|
||||
},
|
||||
"bullseye_arm64": {
|
||||
"Key": "20220331T153654Z-0",
|
||||
"Sha1Sum": "ff12c709d8ac2687651479b6bd616893e21457f1",
|
||||
"Sha1Sum": "315c3a474cfcd020bc80fc8fb12bac828b542789",
|
||||
"SysrootDir": "debian_bullseye_arm64-sysroot",
|
||||
"Tarball": "debian_bullseye_arm64_sysroot.tar.xz"
|
||||
},
|
||||
"bullseye_armel": {
|
||||
"Key": "20220331T153654Z-0",
|
||||
"Sha1Sum": "bd4c83f4f6912ddf95d389c339e2a6700e4d7daa",
|
||||
"Sha1Sum": "55a8d4d9edafdbf9dd0d458665c3c287dd3559dc",
|
||||
"SysrootDir": "debian_bullseye_armel-sysroot",
|
||||
"Tarball": "debian_bullseye_armel_sysroot.tar.xz"
|
||||
},
|
||||
"bullseye_i386": {
|
||||
"Key": "20220331T153654Z-0",
|
||||
"Sha1Sum": "154f0bcaa42e0eafbaa50d6963dc48ea5f239d3c",
|
||||
"Sha1Sum": "e26ddcc685b44db49c6fa5ed700961c539cf7e40",
|
||||
"SysrootDir": "debian_bullseye_i386-sysroot",
|
||||
"Tarball": "debian_bullseye_i386_sysroot.tar.xz"
|
||||
},
|
||||
"bullseye_mips": {
|
||||
"Key": "20220331T153654Z-0",
|
||||
"Sha1Sum": "dff1c425913276099a08e57878297f4b21b0f9fc",
|
||||
"Sha1Sum": "fc007fd293519d5c31d1dbf9961f32559603bde7",
|
||||
"SysrootDir": "debian_bullseye_mips-sysroot",
|
||||
"Tarball": "debian_bullseye_mips_sysroot.tar.xz"
|
||||
},
|
||||
"bullseye_mips64el": {
|
||||
"Key": "20220331T153654Z-0",
|
||||
"Sha1Sum": "09f5f77d6a2ed6843ffbc66c7eafcaa417964d8a",
|
||||
"Sha1Sum": "d73dcddfc3cc7b0c5aa1a24ccda54809ba13983b",
|
||||
"SysrootDir": "debian_bullseye_mips64el-sysroot",
|
||||
"Tarball": "debian_bullseye_mips64el_sysroot.tar.xz"
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ BrowserWindow::BrowserWindow(gin::Arguments* args,
|
||||
gin::Handle<WebContentsView> web_contents_view =
|
||||
WebContentsView::Create(isolate, web_preferences);
|
||||
DCHECK(web_contents_view.get());
|
||||
window_->AddDraggableRegionProvider(web_contents_view.get());
|
||||
|
||||
// Save a reference of the WebContents.
|
||||
gin::Handle<WebContents> web_contents =
|
||||
|
||||
@@ -87,6 +87,15 @@ int WebContentsView::NonClientHitTest(const gfx::Point& point) {
|
||||
return HTNOWHERE;
|
||||
}
|
||||
|
||||
int WebContentsView::NonClientHitTest(const gfx::Point& point) {
|
||||
gfx::Point local_point(point);
|
||||
views::View::ConvertPointFromWidget(view(), &local_point);
|
||||
SkRegion* region = api_web_contents_->draggable_region();
|
||||
if (region && region->contains(local_point.x(), local_point.y()))
|
||||
return HTCAPTION;
|
||||
return HTNOWHERE;
|
||||
}
|
||||
|
||||
void WebContentsView::WebContentsDestroyed() {
|
||||
api_web_contents_ = nullptr;
|
||||
web_contents_.Reset();
|
||||
|
||||
@@ -39,6 +39,8 @@ class WebContentsView : public View,
|
||||
|
||||
int NonClientHitTest(const gfx::Point& point) override;
|
||||
|
||||
int NonClientHitTest(const gfx::Point& point) override;
|
||||
|
||||
protected:
|
||||
// Takes an existing WebContents.
|
||||
WebContentsView(v8::Isolate* isolate, gin::Handle<WebContents> web_contents);
|
||||
|
||||
Reference in New Issue
Block a user