Update to Chromium version 117.0.5938.0 (#1181205)

This commit is contained in:
Marshall Greenblatt
2023-08-09 17:17:17 -04:00
parent 52cb08b973
commit a4b27a7248
93 changed files with 496 additions and 481 deletions

View File

@@ -736,6 +736,7 @@ void AlloyContentBrowserClient::AllowCertificateError(
}
base::OnceClosure AlloyContentBrowserClient::SelectClientCertificate(
content::BrowserContext* browser_context,
content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
net::ClientCertIdentityList client_certs,
@@ -1352,7 +1353,7 @@ void AlloyContentBrowserClient::GetMediaDeviceIDSalt(
bool allowed = cookie_settings->IsFullCookieAccessAllowed(
url, site_for_cookies, top_frame_origin,
cookie_settings->SettingOverridesForStorage());
auto* salt_service =
media_device_salt::MediaDeviceSaltService* salt_service =
MediaDeviceSaltServiceFactory::GetInstance()->GetForBrowserContext(
browser_context);
if (!salt_service) {
@@ -1360,7 +1361,8 @@ void AlloyContentBrowserClient::GetMediaDeviceIDSalt(
return;
}
salt_service->GetSalt(base::BindOnce(std::move(callback), allowed));
salt_service->GetSalt(rfh->GetStorageKey(),
base::BindOnce(std::move(callback), allowed));
}
void AlloyContentBrowserClient::OnWebContentsCreated(

View File

@@ -89,6 +89,7 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
base::OnceCallback<void(content::CertificateRequestResultType)> callback)
override;
base::OnceClosure SelectClientCertificate(
content::BrowserContext* browser_context,
content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
net::ClientCertIdentityList client_certs,

View File

@@ -128,7 +128,9 @@ CefDevToolsManagerDelegate::CefDevToolsManagerDelegate() {}
CefDevToolsManagerDelegate::~CefDevToolsManagerDelegate() {}
scoped_refptr<content::DevToolsAgentHost>
CefDevToolsManagerDelegate::CreateNewTarget(const GURL& url, bool for_tab) {
CefDevToolsManagerDelegate::CreateNewTarget(
const GURL& url,
content::DevToolsManagerDelegate::TargetType target_type) {
// This is reached when the user selects "Open link in new tab" from the
// DevTools interface.
// TODO(cef): Consider exposing new API to support this.

View File

@@ -27,7 +27,7 @@ class CefDevToolsManagerDelegate : public content::DevToolsManagerDelegate {
// DevToolsManagerDelegate implementation.
scoped_refptr<content::DevToolsAgentHost> CreateNewTarget(
const GURL& url,
bool for_tab) override;
content::DevToolsManagerDelegate::TargetType target_type) override;
std::string GetDiscoveryPageHTML() override;
bool HasBundledFrontendResources() override;
};

View File

@@ -205,13 +205,6 @@ bool TabsUpdateFunction::UpdateURL(const std::string& url_string,
return false;
}
const bool is_javascript_scheme = url.SchemeIs(url::kJavaScriptScheme);
// JavaScript URLs are forbidden in chrome.tabs.update().
if (is_javascript_scheme) {
*error = tabs_constants::kJavaScriptUrlsNotAllowedInTabsUpdate;
return false;
}
content::NavigationController::LoadURLParams load_params(url);
// Treat extension-initiated navigations as renderer-initiated so that the URL

View File

@@ -168,6 +168,11 @@ content::BrowserContext* CefExtensionsBrowserClient::GetContextForOriginalOnly(
return context;
}
bool CefExtensionsBrowserClient::AreExtensionsDisabledForContext(
content::BrowserContext* context) {
return false;
}
bool CefExtensionsBrowserClient::IsGuestSession(BrowserContext* context) const {
return false;
}

View File

@@ -48,6 +48,8 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
content::BrowserContext* GetContextForOriginalOnly(
content::BrowserContext* context,
bool force_guest_profile) override;
bool AreExtensionsDisabledForContext(
content::BrowserContext* context) override;
bool IsGuestSession(content::BrowserContext* context) const override;
bool IsExtensionIncognitoEnabled(
const std::string& extension_id,

View File

@@ -37,8 +37,6 @@ class CefSimpleMenuModel : public ui::MenuModel {
CefSimpleMenuModel& operator=(const CefSimpleMenuModel&) = delete;
// MenuModel methods.
bool HasIcons() const override { return false; }
size_t GetItemCount() const override { return impl_->GetCount(); }
ItemType GetTypeAt(size_t index) const override {

View File

@@ -260,7 +260,8 @@ ui::KeyEvent CefBrowserPlatformDelegateNativeLinux::TranslateUiKeyEvent(
base::TimeTicks time_stamp = GetEventTimeStamp();
if (key_event.type == KEYEVENT_CHAR) {
return ui::KeyEvent(character, key_code, dom_code, flags, time_stamp);
return ui::KeyEvent::FromCharacter(character, key_code, dom_code, flags,
time_stamp);
}
ui::EventType type = ui::ET_UNKNOWN;

View File

@@ -30,10 +30,6 @@
#include "ui/events/keycodes/keyboard_codes_posix.h"
#include "ui/gfx/geometry/rect.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
// Wrapper NSView for the native view. Necessary to destroy the browser when
// the view is deleted.
@interface CefBrowserHostView : NSView {

View File

@@ -437,8 +437,8 @@ ui::KeyEvent CefBrowserPlatformDelegateNativeWin::TranslateUiKeyEvent(
base::TimeTicks time_stamp = GetEventTimeStamp();
if (key_event.type == KEYEVENT_CHAR) {
return ui::KeyEvent(key_event.windows_key_code /* character */, key_code,
dom_code, flags, time_stamp);
return ui::KeyEvent::FromCharacter(/*character=*/key_event.windows_key_code,
key_code, dom_code, flags, time_stamp);
}
ui::EventType type = ui::ET_UNKNOWN;

View File

@@ -7,10 +7,6 @@
#import "ui/base/cocoa/cursor_utils.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace cursor_util {
namespace {

View File

@@ -12,10 +12,6 @@
#include "base/strings/utf_string_conversions.h"
#include "components/url_formatter/elide_url.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
// Helper object that receives the notification that the dialog/sheet is
// going away. Is responsible for cleaning itself up.
@interface CefJavaScriptDialogHelper : NSObject <NSAlertDelegate> {

View File

@@ -11,10 +11,6 @@
#import "ui/base/cocoa/menu_controller.h"
#include "ui/gfx/geometry/point.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
CefMenuRunnerMac::CefMenuRunnerMac() {}
CefMenuRunnerMac::~CefMenuRunnerMac() {}

View File

@@ -106,7 +106,7 @@ struct PopulateAxNodeAttributes {
case ax::mojom::IntAttribute::kTableRowIndex:
case ax::mojom::IntAttribute::kActivedescendantId:
case ax::mojom::IntAttribute::kInPageLinkTargetId:
case ax::mojom::IntAttribute::kErrormessageId:
case ax::mojom::IntAttribute::kErrormessageIdDeprecated:
case ax::mojom::IntAttribute::kDOMNodeId:
case ax::mojom::IntAttribute::kDropeffect:
case ax::mojom::IntAttribute::kMemberOfId:

View File

@@ -1796,15 +1796,17 @@ void CefRenderWidgetHostViewOSR::RequestImeCompositionUpdate(
void CefRenderWidgetHostViewOSR::ImeCompositionRangeChanged(
const gfx::Range& range,
const std::vector<gfx::Rect>& character_bounds) {
const absl::optional<std::vector<gfx::Rect>>& character_bounds,
const absl::optional<std::vector<gfx::Rect>>& line_bounds) {
if (browser_impl_.get()) {
CefRange cef_range(range.start(), range.end());
CefRenderHandler::RectList rcList;
for (size_t i = 0; i < character_bounds.size(); ++i) {
rcList.push_back(CefRect(character_bounds[i].x(), character_bounds[i].y(),
character_bounds[i].width(),
character_bounds[i].height()));
if (character_bounds.has_value()) {
for (auto& rect : character_bounds.value()) {
rcList.push_back(
CefRect(rect.x(), rect.y(), rect.width(), rect.height()));
}
}
CefRefPtr<CefRenderHandler> handler =

View File

@@ -181,7 +181,8 @@ class CefRenderWidgetHostViewOSR
viz::SurfaceId GetCurrentSurfaceId() const override;
void ImeCompositionRangeChanged(
const gfx::Range& range,
const std::vector<gfx::Rect>& character_bounds) override;
const absl::optional<std::vector<gfx::Rect>>& character_bounds,
const absl::optional<std::vector<gfx::Rect>>& line_bounds) override;
std::unique_ptr<content::SyntheticGestureTarget>
CreateSyntheticGestureTarget() override;
bool TransformPointToCoordSpaceForView(

View File

@@ -181,6 +181,17 @@ void CefTouchSelectionControllerClientOSR::OnSwipeToMoveCursorEnd() {
OnSelectionEvent(ui::INSERTION_HANDLE_DRAG_STOPPED);
}
void CefTouchSelectionControllerClientOSR::OnClientHitTestRegionUpdated(
ui::TouchSelectionControllerClient* client) {
if (client != active_client_ || !rwhv_->selection_controller() ||
rwhv_->selection_controller()->active_status() ==
ui::TouchSelectionController::INACTIVE) {
return;
}
active_client_->DidScroll();
}
void CefTouchSelectionControllerClientOSR::UpdateClientSelectionBounds(
const gfx::SelectionBound& start,
const gfx::SelectionBound& end) {

View File

@@ -72,6 +72,8 @@ class CefTouchSelectionControllerClientOSR
void DidStopFlinging() override;
void OnSwipeToMoveCursorBegin() override;
void OnSwipeToMoveCursorEnd() override;
void OnClientHitTestRegionUpdated(
ui::TouchSelectionControllerClient* client) override;
void UpdateClientSelectionBounds(
const gfx::SelectionBound& start,
const gfx::SelectionBound& end,

View File

@@ -125,6 +125,9 @@ class CefPermissionPrompt : public permissions::PermissionPrompt {
const override {
return permissions::PermissionPromptDisposition::CUSTOM_MODAL_DIALOG;
}
absl::optional<gfx::Rect> GetViewBoundsInScreen() const override {
return absl::nullopt;
}
private:
// We don't expose AcceptThisTime() because it's a special case for

View File

@@ -117,8 +117,8 @@ void PrintToPDF(content::WebContents* web_contents,
!!settings.print_background, scale, paper_width, paper_height,
margin_top, margin_bottom, margin_left, margin_right,
CefString(&settings.header_template),
CefString(&settings.footer_template),
!!settings.prefer_css_page_size);
CefString(&settings.footer_template), !!settings.prefer_css_page_size,
!!settings.generate_tagged_pdf);
if (absl::holds_alternative<std::string>(print_pages_params)) {
LOG(ERROR) << "PrintToPDF failed with error: "

View File

@@ -17,10 +17,6 @@
#import "components/remote_cocoa/app_shim/native_widget_ns_window_bridge.h"
#import "ui/views/cocoa/native_widget_mac_ns_window_host.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace {
AppShimHost* GetHostForBrowser(Browser* browser) {