Update to Chromium version 122.0.6261.0 (#1250580)

Frame identifiers have changed from int64_t to string type. This is due
to https://crbug.com/1502660 which removes access to frame routing IDs
in the renderer process. New cross-process frame identifiers are 160-bit
values (32-bit child process ID + 128-bit local frame token) and most
easily represented as strings. All other frame-related expectations and
behaviors remain the same.
This commit is contained in:
Marshall Greenblatt
2024-01-25 21:12:43 -05:00
parent 2a86a02bdd
commit 2f1e782f62
156 changed files with 1452 additions and 1436 deletions

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index 84105424b8682..8aa281ca9d7e2 100644
index 6b51fa563b1b7..4dfac0e609ae6 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -648,6 +648,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const {
@@ -651,6 +651,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const {
return scale_override_for_capture_;
}
@ -18,7 +18,7 @@ index 84105424b8682..8aa281ca9d7e2 100644
if (!GetMouseWheelPhaseHandler())
return;
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
index 7c84c4deec00d..3a65053deca93 100644
index cc3738cade39a..acd61e28af374 100644
--- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -71,6 +71,7 @@ class CursorManager;
@ -29,7 +29,7 @@ index 7c84c4deec00d..3a65053deca93 100644
class SyntheticGestureTarget;
class TextInputManager;
class TouchSelectionControllerClientManager;
@@ -150,6 +151,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -151,6 +152,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
const gfx::Size& max_size) override;
void DisableAutoResize(const gfx::Size& new_size) override;
float GetDeviceScaleFactor() const final;
@ -38,7 +38,7 @@ index 7c84c4deec00d..3a65053deca93 100644
TouchSelectionControllerClientManager*
GetTouchSelectionControllerClientManager() override;
ui::mojom::VirtualKeyboardMode GetVirtualKeyboardMode() override;
@@ -186,6 +189,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -190,6 +193,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
// Called when screen information or native widget bounds change.
virtual void UpdateScreenInfo();
@ -49,7 +49,7 @@ index 7c84c4deec00d..3a65053deca93 100644
// Called by the TextInputManager to notify the view about being removed from
// the list of registered views, i.e., TextInputManager is no longer tracking
// TextInputState from this view. The RWHV should reset |text_input_manager_|
@@ -450,6 +457,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -451,6 +458,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
const gfx::Rect& bounds,
const gfx::Rect& anchor_rect) = 0;
@ -62,7 +62,7 @@ index 7c84c4deec00d..3a65053deca93 100644
// Sets the cursor for this view to the one specified.
virtual void UpdateCursor(const ui::Cursor& cursor) = 0;
@@ -733,6 +746,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -734,6 +747,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
// to all displays.
gfx::Size system_cursor_size_;
@ -73,7 +73,7 @@ index 7c84c4deec00d..3a65053deca93 100644
private:
FRIEND_TEST_ALL_PREFIXES(
BrowserSideFlingBrowserTest,
@@ -754,10 +771,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -755,10 +772,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
void SynchronizeVisualProperties();
@ -85,7 +85,7 @@ index 7c84c4deec00d..3a65053deca93 100644
// renderer process changes. This method is called before notifying
// RenderWidgetHostImpl in order to allow the view to allocate a new
diff --git content/browser/renderer_host/render_widget_host_view_event_handler.cc content/browser/renderer_host/render_widget_host_view_event_handler.cc
index 9ced2dff5d5ff..7f8eba9858726 100644
index c3648f4e5158e..152f4fbcdac11 100644
--- content/browser/renderer_host/render_widget_host_view_event_handler.cc
+++ content/browser/renderer_host/render_widget_host_view_event_handler.cc
@@ -52,6 +52,10 @@ namespace {
@ -133,7 +133,7 @@ index 9ced2dff5d5ff..7f8eba9858726 100644
if (host_ && set_focus_on_mouse_down_or_key_event_) {
set_focus_on_mouse_down_or_key_event_ = false;
diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h
index 78d3cac258f65..d87bd0b564062 100644
index b3acdceb83879..7a2de7e7d0678 100644
--- content/public/browser/render_widget_host_view.h
+++ content/public/browser/render_widget_host_view.h
@@ -259,6 +259,14 @@ class CONTENT_EXPORT RenderWidgetHostView {
@ -152,19 +152,19 @@ index 78d3cac258f65..d87bd0b564062 100644
// Set the view's active state (i.e., tint state of controls).
virtual void SetActive(bool active) = 0;
diff --git ui/ozone/platform/x11/x11_window.cc ui/ozone/platform/x11/x11_window.cc
index f3a0e657041d8..e9c01e177ea1a 100644
index 449f721727fb1..ab549b482bc36 100644
--- ui/ozone/platform/x11/x11_window.cc
+++ ui/ozone/platform/x11/x11_window.cc
@@ -1868,7 +1868,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) {
@@ -1846,7 +1846,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) {
req.border_pixel = 0;
bounds_in_pixels_ = SanitizeBounds(bounds);
last_set_bounds_px_ = SanitizeBounds(bounds);
- req.parent = x_root_window_;
+ req.parent = properties.parent_widget == gfx::kNullAcceleratedWidget ?
+ x_root_window_ : static_cast<x11::Window>(properties.parent_widget);
req.x = bounds_in_pixels_.x();
req.y = bounds_in_pixels_.y();
req.width = bounds_in_pixels_.width();
req.x = last_set_bounds_px_.x();
req.y = last_set_bounds_px_.y();
req.width = last_set_bounds_px_.width();
diff --git ui/views/widget/desktop_aura/desktop_screen_win.cc ui/views/widget/desktop_aura/desktop_screen_win.cc
index e4e6d3104da9e..bb372b0cd2960 100644
--- ui/views/widget/desktop_aura/desktop_screen_win.cc
@ -179,7 +179,7 @@ index e4e6d3104da9e..bb372b0cd2960 100644
return host ? host->GetAcceleratedWidget() : nullptr;
}
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
index 237f041a3a350..af978b38eb7e4 100644
index cb1601bffadd2..072ad958cc90c 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
@@ -175,6 +175,18 @@ Widget::MoveLoopResult DesktopWindowTreeHostLinux::RunMoveLoop(
@ -211,10 +211,10 @@ index 237f041a3a350..af978b38eb7e4 100644
properties->x11_extension_delegate = this;
}
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h
index ee09e16753ff0..256a24a0c6ebd 100644
index 3151a2c872f4e..e14caeb1e6645 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h
@@ -59,6 +59,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
@@ -58,6 +58,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
// Disables event listening to make |dialog| modal.
base::OnceClosure DisableEventListening();
@ -223,7 +223,7 @@ index ee09e16753ff0..256a24a0c6ebd 100644
protected:
// Overridden from DesktopWindowTreeHost:
void Init(const Widget::InitParams& params) override;
@@ -68,6 +70,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
@@ -67,6 +69,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source,
Widget::MoveLoopEscapeBehavior escape_behavior) override;
@ -232,7 +232,7 @@ index ee09e16753ff0..256a24a0c6ebd 100644
// PlatformWindowDelegate:
void DispatchEvent(ui::Event* event) override;
@@ -116,6 +120,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
@@ -115,6 +119,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
uint32_t modal_dialog_counter_ = 0;
@ -243,10 +243,10 @@ index ee09e16753ff0..256a24a0c6ebd 100644
base::WeakPtrFactory<DesktopWindowTreeHostLinux> weak_factory_{this};
};
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
index 23e321bf8ae39..2611612b2d3ed 100644
index f841bc5750537..aa2d4720c8152 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
@@ -286,8 +286,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) {
@@ -287,8 +287,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) {
if (properties.parent_widget) {
window_parent_ = DesktopWindowTreeHostPlatform::GetHostForWidget(
properties.parent_widget);
@ -258,7 +258,7 @@ index 23e321bf8ae39..2611612b2d3ed 100644
// Calculate initial bounds.
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index e4ab78b55cf4a..246f34a3fb471 100644
index d877d237b2c16..95ee3dd3253fd 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -181,16 +181,29 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) {
@ -345,10 +345,10 @@ index e4ab78b55cf4a..246f34a3fb471 100644
}
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index 013f571b52168..508054726fb7d 100644
index e963c861f7099..6bc0ac23db5e9 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -323,6 +323,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
@@ -322,6 +322,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
// True if the window should have the frame removed.
bool remove_standard_frame_;
@ -360,10 +360,10 @@ index 013f571b52168..508054726fb7d 100644
// the implementation of ::ShowCursor() is based on a counter, so making this
// member static ensures that ::ShowCursor() is always called exactly once
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index 93b17a67f9541..320f7452d3567 100644
index 5093dee22b9da..3f29234369599 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -384,7 +384,8 @@ void Widget::Init(InitParams params) {
@@ -399,7 +399,8 @@ void Widget::Init(InitParams params) {
}
params.child |= (params.type == InitParams::TYPE_CONTROL);
@ -373,7 +373,7 @@ index 93b17a67f9541..320f7452d3567 100644
is_headless_ = params.ShouldInitAsHeadless();
if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred &&
@@ -494,14 +495,22 @@ void Widget::Init(InitParams params) {
@@ -497,14 +498,22 @@ void Widget::Init(InitParams params) {
if (show_state == ui::SHOW_STATE_MAXIMIZED) {
Maximize();
@ -397,7 +397,7 @@ index 93b17a67f9541..320f7452d3567 100644
}
}
@@ -1656,10 +1665,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) {
@@ -1646,10 +1655,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) {
}
gfx::Size Widget::GetMinimumSize() const {
@ -415,10 +415,10 @@ index 93b17a67f9541..320f7452d3567 100644
}
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index c7ba1a40a7e46..81a37e6ab2a87 100644
index 1939476d29da5..895df61324a2e 100644
--- ui/views/widget/widget.h
+++ ui/views/widget/widget.h
@@ -357,6 +357,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -356,6 +356,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// the concept with bubble anchoring a la BubbleDialogDelegateView.
gfx::NativeView parent = gfx::NativeView();
@ -427,7 +427,7 @@ index c7ba1a40a7e46..81a37e6ab2a87 100644
// Specifies the initial bounds of the Widget. Default is empty, which means
// the NativeWidget may specify a default size. If the parent is specified,
// |bounds| is in the parent's coordinate system. If the parent is not
@@ -751,7 +753,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -752,7 +754,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
void ShowInactive();
// Activates the widget, assuming it already exists and is visible.
@ -437,10 +437,10 @@ index c7ba1a40a7e46..81a37e6ab2a87 100644
// Deactivates the widget, making the next window in the Z order the active
// window.
diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h
index 5fa4c9c0d4635..eadf9808c90ed 100644
index 30dfd721cceef..30831b22580a4 100644
--- ui/views/widget/widget_delegate.h
+++ ui/views/widget/widget_delegate.h
@@ -380,6 +380,10 @@ class VIEWS_EXPORT WidgetDelegate
@@ -375,6 +375,10 @@ class VIEWS_EXPORT WidgetDelegate
// Returns true if the title text should be centered.
bool ShouldCenterWindowTitleText() const;
@ -466,7 +466,7 @@ index 3b9b00b7d79ae..e759e3c1a9f34 100644
if (native_widget_delegate->IsDialogBox()) {
*style |= DS_MODALFRAME;
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index 8044dca7ed9de..8db07e39c6822 100644
index 36a6e980495ea..24d75fb85a65f 100644
--- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc
@@ -767,7 +767,11 @@ bool HWNDMessageHandler::IsVisible() const {