chore: bump chromium to 117.0.5938.0 (main) (#39375)
* chore: bump chromium in DEPS to 117.0.5929.0 * chore: bump chromium in DEPS to 117.0.5931.0 * chore: bump chromium in DEPS to 117.0.5932.0 * chore: update patches * 4728317: Prevent PrintRenderFrameHelper from printing when already printing |4728317
* 4739501: Use base::SequenceBound to manage SerialPortManagerImpl |4739501
* 4702051: Allow overriding source in install-sysroot.py |4702051
* chore: update filenames.libcxx.gni * 4727002: Rename "enable_arc2" to "enable_arc" |4727002
* chore: bump chromium in DEPS to 117.0.5934.0 * 4736873: Rename ColorSpaces methods on display::Display |4736873
* 4727203: Replace bool with an enum in as suggested in DevtoolsManagerDelegate. |4727203
* 4744479: [DevTools] Add 'generateTaggedPDF' option to DevTools Page.printToPDF |4744479
* 4735893: Don't share WebUSB permissions with webviews |4735893
* revert: update filenames.libcxx.gni * chore: bump chromium in DEPS to 117.0.5936.0 * chore: update patches * 4746465: SAA: Query for embargoed StorageAccess permissions |4746465
* 4666325: Move buildtools/third_party/lib*/trunk source paths to third_party/lib*/src. |4666325
* chore: bump chromium in DEPS to 117.0.5938.0 * chore: bump chromium in DEPS to 118.0.5939.0 * chore: update patches * Send line bounds through CursorAnchorInfo on requestCursorUpdate4394588
* Fixup lint for Move buildtools/third_party/lib*/trunk source paths to third_party/lib*/src * 4700305: [mac] Fix override of CHILD_PROCESS_EXE4700305
Needed because of 4729689: Reland "Remove redundant existence check in PathService" |4729689
* 4753759: More consistent icon handling for menus.4753759
* chore: bump chromium in DEPS to 118.0.5941.0 * chore: update patches * chore: bump chromium in DEPS to 117.0.5938.0 * test: update nan-spec-runner cflags * build: fix isystem include path in nan-spec-runner * fixup! 4666325: Move buildtools/third_party/lib*/trunk source paths to third_party/lib*/src. |4666325
fix a few more instances of the old path libc++.a and libc++abi.a are still in buildtools/ --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: VerteDinde <vertedinde@electronjs.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
bee5d94886
commit
c3036d4557
94 changed files with 1513 additions and 1600 deletions
|
@ -3075,6 +3075,8 @@ v8::Local<v8::Promise> WebContents::PrintToPDF(const base::Value& settings) {
|
|||
auto header_template = *settings.GetDict().FindString("headerTemplate");
|
||||
auto footer_template = *settings.GetDict().FindString("footerTemplate");
|
||||
auto prefer_css_page_size = settings.GetDict().FindBool("preferCSSPageSize");
|
||||
auto generate_tagged_pdf =
|
||||
settings.GetDict().FindBool("shouldGenerateTaggedPDF");
|
||||
|
||||
absl::variant<printing::mojom::PrintPagesParamsPtr, std::string>
|
||||
print_pages_params = print_to_pdf::GetPrintPagesParams(
|
||||
|
@ -3082,7 +3084,8 @@ v8::Local<v8::Promise> WebContents::PrintToPDF(const base::Value& settings) {
|
|||
landscape, display_header_footer, print_background, scale,
|
||||
paper_width, paper_height, margin_top, margin_bottom, margin_left,
|
||||
margin_right, absl::make_optional(header_template),
|
||||
absl::make_optional(footer_template), prefer_css_page_size);
|
||||
absl::make_optional(footer_template), prefer_css_page_size,
|
||||
generate_tagged_pdf);
|
||||
|
||||
if (absl::holds_alternative<std::string>(print_pages_params)) {
|
||||
auto error = absl::get<std::string>(print_pages_params);
|
||||
|
|
|
@ -95,7 +95,6 @@
|
|||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include "ui/base/l10n/l10n_util_win.h"
|
||||
#include "ui/display/win/dpi.h"
|
||||
#include "ui/gfx/system_fonts_win.h"
|
||||
#include "ui/strings/grit/app_locale_settings.h"
|
||||
#endif
|
||||
|
@ -149,13 +148,6 @@ void Erase(T* container, typename T::iterator iter) {
|
|||
}
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// gfx::Font callbacks
|
||||
void AdjustUIFont(gfx::win::FontAdjustment* font_adjustment) {
|
||||
l10n_util::NeedOverrideDefaultUIFont(&font_adjustment->font_family_override,
|
||||
&font_adjustment->font_scale);
|
||||
font_adjustment->font_scale *= display::win::GetAccessibilityFontScale();
|
||||
}
|
||||
|
||||
int GetMinimumFontSize() {
|
||||
int min_font_size;
|
||||
base::StringToInt(l10n_util::GetStringUTF16(IDS_MINIMUM_UI_FONT_SIZE),
|
||||
|
@ -464,7 +456,7 @@ void ElectronBrowserMainParts::ToolkitInitialized() {
|
|||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
gfx::win::SetAdjustFontCallback(&AdjustUIFont);
|
||||
gfx::win::SetAdjustFontCallback(&l10n_util::AdjustUiFont);
|
||||
gfx::win::SetGetMinimumFontSizeCallback(&GetMinimumFontSize);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -282,9 +282,10 @@ blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatus(
|
|||
content::PermissionResult
|
||||
ElectronPermissionManager::GetPermissionResultForOriginWithoutContext(
|
||||
blink::PermissionType permission,
|
||||
const url::Origin& origin) {
|
||||
blink::mojom::PermissionStatus status =
|
||||
GetPermissionStatus(permission, origin.GetURL(), origin.GetURL());
|
||||
const url::Origin& requesting_origin,
|
||||
const url::Origin& embedding_origin) {
|
||||
blink::mojom::PermissionStatus status = GetPermissionStatus(
|
||||
permission, requesting_origin.GetURL(), embedding_origin.GetURL());
|
||||
return content::PermissionResult(
|
||||
status, content::PermissionStatusSource::UNSPECIFIED);
|
||||
}
|
||||
|
|
|
@ -141,7 +141,8 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate {
|
|||
override;
|
||||
content::PermissionResult GetPermissionResultForOriginWithoutContext(
|
||||
blink::PermissionType permission,
|
||||
const url::Origin& origin) override;
|
||||
const url::Origin& requesting_origin,
|
||||
const url::Origin& embedding_origin) override;
|
||||
blink::mojom::PermissionStatus GetPermissionStatusForCurrentDocument(
|
||||
blink::PermissionType permission,
|
||||
content::RenderFrameHost* render_frame_host) override;
|
||||
|
|
|
@ -520,7 +520,8 @@ OffScreenRenderWidgetHostView::CreateSyntheticGestureTarget() {
|
|||
|
||||
void OffScreenRenderWidgetHostView::ImeCompositionRangeChanged(
|
||||
const gfx::Range&,
|
||||
const std::vector<gfx::Rect>&) {}
|
||||
const absl::optional<std::vector<gfx::Rect>>& character_bounds,
|
||||
const absl::optional<std::vector<gfx::Rect>>& line_bounds) {}
|
||||
|
||||
gfx::Size OffScreenRenderWidgetHostView::GetCompositorViewportPixelSize() {
|
||||
return gfx::ScaleToCeiledSize(GetRequestedRendererSize(),
|
||||
|
|
|
@ -150,8 +150,10 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
|
|||
viz::SurfaceId GetCurrentSurfaceId() const override;
|
||||
std::unique_ptr<content::SyntheticGestureTarget>
|
||||
CreateSyntheticGestureTarget() override;
|
||||
void ImeCompositionRangeChanged(const gfx::Range&,
|
||||
const std::vector<gfx::Rect>&) override;
|
||||
void ImeCompositionRangeChanged(
|
||||
const gfx::Range&,
|
||||
const absl::optional<std::vector<gfx::Rect>>& character_bounds,
|
||||
const absl::optional<std::vector<gfx::Rect>>& line_bounds) override;
|
||||
gfx::Size GetCompositorViewportPixelSize() override;
|
||||
ui::Compositor* GetCompositor() override;
|
||||
|
||||
|
|
|
@ -125,7 +125,8 @@ void DevToolsManagerDelegate::HandleCommand(
|
|||
}
|
||||
|
||||
scoped_refptr<content::DevToolsAgentHost>
|
||||
DevToolsManagerDelegate::CreateNewTarget(const GURL& url, bool for_tab) {
|
||||
DevToolsManagerDelegate::CreateNewTarget(const GURL& url,
|
||||
TargetType target_type) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ class DevToolsManagerDelegate : public content::DevToolsManagerDelegate {
|
|||
NotHandledCallback callback) override;
|
||||
scoped_refptr<content::DevToolsAgentHost> CreateNewTarget(
|
||||
const GURL& url,
|
||||
bool for_tab) override;
|
||||
TargetType target_type) override;
|
||||
std::string GetDiscoveryPageHTML() override;
|
||||
bool HasBundledFrontendResources() override;
|
||||
};
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "base/containers/fixed_flat_set.h"
|
||||
#include "chrome/common/chrome_features.h"
|
||||
#include "extensions/browser/extension_registry.h"
|
||||
#include "extensions/browser/guest_view/web_view/web_view_guest.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "extensions/common/extension.h"
|
||||
#include "services/device/public/mojom/usb_device.mojom.h"
|
||||
|
@ -286,4 +287,33 @@ void ElectronUsbDelegate::DeleteControllerForFrame(
|
|||
controller_map_.erase(render_frame_host);
|
||||
}
|
||||
|
||||
bool ElectronUsbDelegate::PageMayUseUsb(content::Page& page) {
|
||||
content::RenderFrameHost& main_rfh = page.GetMainDocument();
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
// WebViewGuests have no mechanism to show permission prompts and their
|
||||
// embedder can't grant USB access through its permissionrequest API. Also
|
||||
// since webviews use a separate StoragePartition, they must not gain access
|
||||
// through permissions granted in non-webview contexts.
|
||||
if (extensions::WebViewGuest::FromRenderFrameHost(&main_rfh)) {
|
||||
return false;
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
|
||||
// USB permissions are scoped to a BrowserContext instead of a
|
||||
// StoragePartition, so we need to be careful about usage across
|
||||
// StoragePartitions. Until this is scoped correctly, we'll try to avoid
|
||||
// inappropriate sharing by restricting access to the API. We can't be as
|
||||
// strict as we'd like, as cases like extensions and Isolated Web Apps still
|
||||
// need USB access in non-default partitions, so we'll just guard against
|
||||
// HTTP(S) as that presents a clear risk for inappropriate sharing.
|
||||
// TODO(crbug.com/1469672): USB permissions should be explicitly scoped to
|
||||
// StoragePartitions.
|
||||
if (main_rfh.GetStoragePartition() !=
|
||||
main_rfh.GetBrowserContext()->GetDefaultStoragePartition()) {
|
||||
return !main_rfh.GetLastCommittedURL().SchemeIsHTTPOrHTTPS();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -85,6 +85,8 @@ class ElectronUsbDelegate : public content::UsbDelegate {
|
|||
|
||||
void DeleteControllerForFrame(content::RenderFrameHost* render_frame_host);
|
||||
|
||||
bool PageMayUseUsb(content::Page& page) override;
|
||||
|
||||
private:
|
||||
UsbChooserController* ControllerForFrame(
|
||||
content::RenderFrameHost* render_frame_host);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue