Skip to content

refactor: reuse upstream //shell_dialogs - #30663

Merged
codebytere merged 3 commits into
mainfrom
reuse-shell-dialogs
Sep 14, 2021
Merged

codebytere merged 3 commits into
mainfrom
reuse-shell-dialogs

Conversation

@codebytere

@codebytere codebytere commented Aug 23, 2021 •

Copy link
Copy Markdown
Member

Description of Change

Closes #30858.

Longstanding follow-up to #25030 (review). This PR refactors our usage of FileSelectHelper to remove dependence on our own file dialog APIs, which uncessarily pass V8 data structures around.

  • Removes WebDialogHelper in favor of FileSelectHelper
  • Removes usage of our file_dialog apis in favor of upstream //shell_dialogs
  • More directly copies upstream chrome/browser/file_select_helper.{h|cc|mm} logic with the following adaptations:
    • Removal of code requiring FULL_SAFE_BROWSING, IS_CHROMEOS_ASH, and OS_ANDROID, as it is not necessary for Electron's purpose
    • Switching out Profile for ElectronBrowserContext

Checklist

Release Notes

Notes: none.

@codebytere codebytere added the semver/patch backwards-compatible bug fixes label Aug 23, 2021
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Aug 23, 2021
@codebytere
codebytere force-pushed the reuse-shell-dialogs branch 2 times, most recently from 1052ae1 to 38983eb Compare August 23, 2021 13:00
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Aug 24, 2021
@codebytere
codebytere requested a review from a team as a code owner August 24, 2021 20:01
@codebytere
codebytere force-pushed the reuse-shell-dialogs branch from b9c6543 to 811e2e9 Compare August 24, 2021 20:03
@codebytere
codebytere requested a review from zcbenz August 25, 2021 07:07

@VerteDinde VerteDinde left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just pulled down the branch and tested locally on Windows - this PR does fix an open issue with Windows and Linux file selection, #30858, that affects both 15-x-y and main.

Smoke tested general file selection, and it seems to be working well! 👍

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codebytere
codebytere merged commit 00d0265 into main Sep 14, 2021
@codebytere
codebytere deleted the reuse-shell-dialogs branch September 14, 2021 10:16
@release-clerk

release-clerk Bot commented Sep 14, 2021

Copy link
Copy Markdown

No Release Notes

@trop

trop Bot commented Sep 14, 2021

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "15-x-y" cleanly;
you will need to perform this backport manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Crash on attaching the file using generic input type="file" form control

3 participants