Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osr: GetViewBounds().size() return invalid width in CefRenderWidgetHostViewOSR::OnPaint() #3856

Closed
Hethsron opened this issue Dec 10, 2024 · 1 comment
Labels
bug Bug report

Comments

@Hethsron
Copy link

Hethsron commented Dec 10, 2024

Describe the bug
When the window is resized after navigation, the view is not adapted to the window. After a debug session, the issue is caused by the ReleaseResizeHold method not being called due following condition here.

// Release the resize hold when we reach the desired size.
  if (hold_resize_) {
    DCHECK_GT(cached_scale_factor_, 0);
    gfx::Size expected_size =
        gfx::ScaleToCeiledSize(GetViewBounds().size(), cached_scale_factor_);
    if (pixel_size == expected_size) {
      ReleaseResizeHold();
    }
  }

Indeed, The culprit of all this unexpected behavior is the GetViewBounds() method defined here, which returns an invalid width.

As proof, here are the traces we've collected:

[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 1 in MyClientHandler::Resize()
[DEBUG] i_height is 1 in MyClientHandler::Resize()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 633 in MyClientHandler::Resize()
[DEBUG] i_height is 409 in MyClientHandler::Resize()
[DEBUG] call to MyRenderHandler::GetScreenInfo
[DEBUG] call to MyRenderHandler::GetViewRect
[DEBUG] i_width is 633 in MyRenderHandler::GetViewRect
[DEBUG] i_height is 409 in MyRenderHandler::GetViewRect
[DEBUG] CefScreenInfo.CefRect.x is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.y is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.width is 633 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.height is 409 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.device_scale_factor is 1 in MyRenderHandler::GetScreenInfo
[DEBUG] call to MyRenderHandler::GetViewRect
[DEBUG] i_width is 633 in MyRenderHandler::GetViewRect
[DEBUG] i_height is 409 in MyRenderHandler::GetViewRect
[DEBUG] call to CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to SetFrameRate in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] hold_resize_ is false in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] call to MyRenderHandler::GetScreenInfo
[DEBUG] call to MyRenderHandler::GetViewRect
[DEBUG] i_width is 633 in MyRenderHandler::GetViewRect
[DEBUG] i_height is 409 in MyRenderHandler::GetViewRect
[DEBUG] CefScreenInfo.CefRect.x is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.y is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.width is 633 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.height is 409 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.device_scale_factor is 1 in MyRenderHandler::GetScreenInfo
[DEBUG] call to MyRenderHandler::GetViewRect
[DEBUG] i_width is 633 in MyRenderHandler::GetViewRect
[DEBUG] i_height is 409 in MyRenderHandler::GetViewRect
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer() return false
[DEBUG] resized has been set to ResizeRootLayer() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] child_local_surface_id is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to UpdateFromChild() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] surface_id_updated is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to SetFrameRate in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] hold_resize_ is false in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] call to MyRenderHandler::GetScreenInfo
[DEBUG] call to MyRenderHandler::GetViewRect
[DEBUG] i_width is 633 in MyRenderHandler::GetViewRect
[DEBUG] i_height is 409 in MyRenderHandler::GetViewRect
[DEBUG] CefScreenInfo.CefRect.x is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.y is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.width is 633 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.height is 409 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.device_scale_factor is 1 in MyRenderHandler::GetScreenInfo
[DEBUG] call to MyRenderHandler::GetViewRect
[DEBUG] i_width is 633 in MyRenderHandler::GetViewRect
[DEBUG] i_height is 409 in MyRenderHandler::GetViewRect
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer() return false
[DEBUG] resized has been set to ResizeRootLayer() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] child_local_surface_id is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to UpdateFromChild() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] surface_id_updated is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] damage_rect (0, 0, 633, 409) in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] rect_in_pixels (0, 0, 633, 409) => (x, y, width, height) in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] call to rect_in_pixels.Intersect(damage_rect) in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] call to MyRenderHandler::OnPaint
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 633 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 633 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties succeeded in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to SetFrameRate in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] hold_resize_ is false in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] call to MyRenderHandler::GetScreenInfo
[DEBUG] call to MyRenderHandler::GetViewRect
[DEBUG] i_width is 633 in MyRenderHandler::GetViewRect
[DEBUG] i_height is 737 in MyRenderHandler::GetViewRect
[DEBUG] CefScreenInfo.CefRect.x is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.y is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.width is 633 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.height is 737 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.device_scale_factor is 1 in MyRenderHandler::GetScreenInfo
[DEBUG] call to MyRenderHandler::GetViewRect
[DEBUG] i_width is 633 in MyRenderHandler::GetViewRect
[DEBUG] i_height is 737 in MyRenderHandler::GetViewRect
[DEBUG] call to SetRootLayerSize(false /*force*/) in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] hold_resize_ has been set to true in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] cached_scale_factor_ has been set to GetDeviceScaleFactor() in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer() return true
[DEBUG] resized has been set to ResizeRootLayer() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] resized is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to AllocateLocalSurfaceId() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] surface_id_updated is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to SetFrameRate in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] pending_resize_ is false in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] pending_resize_ has been set to true in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer() return false
[DEBUG] resized has been set to ResizeRootLayer() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] child_local_surface_id is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to UpdateFromChild() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] surface_id_updated is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] damage_rect (0, 0, 633, 737) in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] rect_in_pixels (0, 0, 633, 737) => (x, y, width, height) in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] call to rect_in_pixels.Intersect(damage_rect) in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] call to MyRenderHandler::OnPaint
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] cached_scale_factor_ is 1 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] ====== RACE CONDITION =======
[DEBUG] GetViewBounds().size().width() is 633 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] GetViewBounds().size().height() is 737 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] expected_size.width() is 633 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] expected_size.height() is 737 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] pixel_size.width() is 633 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] pixel_size.height() is 737 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] pixel_size == expected_size
[DEBUG] call to ReleaseResizeHold() in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] call to CefRenderWidgetHostViewOSR::ReleaseResizeHold()
[DEBUG] hold_resize_ has been set to false in CefRenderWidgetHostViewOSR::ReleaseResizeHold()
[DEBUG] cached_scale_factor_ has been set to -1 in CefRenderWidgetHostViewOSR::ReleaseResizeHold()
[DEBUG] pending_resize_ is false in CefRenderWidgetHostViewOSR::ReleaseResizeHold()
[DEBUG] CEF_POST_TASK WasResized() in CEF_UIT through CefRenderWidgetHostViewOSR::ReleaseResizeHold()
[DEBUG] ====== RACE CONDITION =======
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties succeeded in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to SetFrameRate in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] hold_resize_ is false in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] call to MyRenderHandler::GetScreenInfo
[DEBUG] call to MyRenderHandler::GetViewRect
[DEBUG] i_width is 633 in MyRenderHandler::GetViewRect
[DEBUG] i_height is 737 in MyRenderHandler::GetViewRect
[DEBUG] CefScreenInfo.CefRect.x is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.y is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.width is 633 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.height is 737 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.device_scale_factor is 1 in MyRenderHandler::GetScreenInfo
[DEBUG] call to MyRenderHandler::GetViewRect
[DEBUG] i_width is 633 in MyRenderHandler::GetViewRect
[DEBUG] i_height is 737 in MyRenderHandler::GetViewRect
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer() return false
[DEBUG] resized has been set to ResizeRootLayer() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 643 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 643 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties succeeded in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to SetFrameRate in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] hold_resize_ is false in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] call to MyRenderHandler::GetScreenInfo
[DEBUG] call to MyRenderHandler::GetViewRect
[DEBUG] i_width is 643 in MyRenderHandler::GetViewRect
[DEBUG] i_height is 737 in MyRenderHandler::GetViewRect
[DEBUG] CefScreenInfo.CefRect.x is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.y is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.width is 643 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.height is 737 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.device_scale_factor is 1 in MyRenderHandler::GetScreenInfo
[DEBUG] call to MyRenderHandler::GetViewRect
[DEBUG] i_width is 643 in MyRenderHandler::GetViewRect
[DEBUG] i_height is 737 in MyRenderHandler::GetViewRect
[DEBUG] call to SetRootLayerSize(false /*force*/) in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] hold_resize_ has been set to true in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] cached_scale_factor_ has been set to GetDeviceScaleFactor() in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer() return true
[DEBUG] resized has been set to ResizeRootLayer() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] resized is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to AllocateLocalSurfaceId() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] surface_id_updated is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to SetFrameRate in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] pending_resize_ is false in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] pending_resize_ has been set to true in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer() return false
[DEBUG] resized has been set to ResizeRootLayer() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] child_local_surface_id is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to UpdateFromChild() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] surface_id_updated is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 648 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 648 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 654 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 654 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] damage_rect (0, 0, 633, 737) in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] rect_in_pixels (0, 0, 633, 737) => (x, y, width, height) in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] call to rect_in_pixels.Intersect(damage_rect) in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] call to MyRenderHandler::OnPaint
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] cached_scale_factor_ is 1 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] ====== RACE CONDITION =======
[DEBUG] GetViewBounds().size().width() is 643 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] GetViewBounds().size().height() is 737 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] expected_size.width() is 643 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] expected_size.height() is 737 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] pixel_size.width() is 633 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] pixel_size.height() is 737 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] pixel_size != expected_size
[DEBUG] abort call to ReleaseResizeHold() in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] ====== RACE CONDITION =======
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 664 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 664 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 667 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 667 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 670 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 670 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 672 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 672 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 673 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 673 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 675 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 675 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 676 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 676 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 678 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 678 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 679 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 679 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 682 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 682 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 684 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 684 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 685 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 685 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 686 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 686 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 688 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 688 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 689 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 689 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 690 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 690 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 691 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 691 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 692 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 692 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 693 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 693 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 694 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 694 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 695 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 695 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 696 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 696 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 697 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 697 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()

Note that the first time, the right values are taken into account:

[DEBUG] CefScreenInfo.CefRect.x is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.y is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.width is 633 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.height is 737 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.device_scale_factor is 1 in MyRenderHandler::GetScreenInfo
[DEBUG] call to MyRenderHandler::GetViewRect
[DEBUG] i_width is 633 in MyRenderHandler::GetViewRect
[DEBUG] i_height is 737 in MyRenderHandler::GetViewRect
[DEBUG] call to SetRootLayerSize(false /*force*/) in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] hold_resize_ has been set to true in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] cached_scale_factor_ has been set to GetDeviceScaleFactor() in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer() return true
[DEBUG] resized has been set to ResizeRootLayer() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] resized is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to AllocateLocalSurfaceId() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] surface_id_updated is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to SetFrameRate in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] pending_resize_ is false in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] pending_resize_ has been set to true in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer() return false
[DEBUG] resized has been set to ResizeRootLayer() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] child_local_surface_id is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to UpdateFromChild() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] surface_id_updated is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] damage_rect (0, 0, 633, 737) in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] rect_in_pixels (0, 0, 633, 737) => (x, y, width, height) in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] call to rect_in_pixels.Intersect(damage_rect) in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] call to MyRenderHandler::OnPaint
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] cached_scale_factor_ is 1 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] ====== RACE CONDITION =======
[DEBUG] GetViewBounds().size().width() is 633 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] GetViewBounds().size().height() is 737 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] expected_size.width() is 633 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] expected_size.height() is 737 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] pixel_size.width() is 633 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] pixel_size.height() is 737 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] pixel_size == expected_size
[DEBUG] call to ReleaseResizeHold() in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] call to CefRenderWidgetHostViewOSR::ReleaseResizeHold()
[DEBUG] hold_resize_ has been set to false in CefRenderWidgetHostViewOSR::ReleaseResizeHold()
[DEBUG] cached_scale_factor_ has been set to -1 in CefRenderWidgetHostViewOSR::ReleaseResizeHold()
[DEBUG] pending_resize_ is false in CefRenderWidgetHostViewOSR::ReleaseResizeHold()
[DEBUG] CEF_POST_TASK WasResized() in CEF_UIT through CefRenderWidgetHostViewOSR::ReleaseResizeHold()
[DEBUG] ====== RACE CONDITION =======

We then change the width of the window, and this is what we see:

[DEBUG] i_width is 643 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 643 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties succeeded in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to SetFrameRate in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] hold_resize_ is false in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] call to MyRenderHandler::GetScreenInfo
[DEBUG] call to MyRenderHandler::GetViewRect
[DEBUG] i_width is 643 in MyRenderHandler::GetViewRect
[DEBUG] i_height is 737 in MyRenderHandler::GetViewRect
[DEBUG] CefScreenInfo.CefRect.x is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.y is 0 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.width is 643 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.CefRect.height is 737 in MyRenderHandler::GetScreenInfo
[DEBUG] CefScreenInfo.device_scale_factor is 1 in MyRenderHandler::GetScreenInfo
[DEBUG] call to MyRenderHandler::GetViewRect
[DEBUG] i_width is 643 in MyRenderHandler::GetViewRect
[DEBUG] i_height is 737 in MyRenderHandler::GetViewRect
[DEBUG] call to SetRootLayerSize(false /*force*/) in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] hold_resize_ has been set to true in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] cached_scale_factor_ has been set to GetDeviceScaleFactor() in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer() return true
[DEBUG] resized has been set to ResizeRootLayer() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] resized is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to AllocateLocalSurfaceId() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] surface_id_updated is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to SetFrameRate in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] pending_resize_ is false in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] pending_resize_ has been set to true in CefRenderWidgetHostViewOSR::ResizeRootLayer()
[DEBUG] call to CefRenderWidgetHostViewOSR::ResizeRootLayer() return false
[DEBUG] resized has been set to ResizeRootLayer() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] child_local_surface_id is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to UpdateFromChild() in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] surface_id_updated is true in CefRenderWidgetHostViewOSR::SynchronizeVisualProperties()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 648 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 648 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to MyClientHandler::Resize()
[DEBUG] i_width is 654 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] i_width is 654 in MyClientHandler::Resize()
[DEBUG] i_height is 737 in MyClientHandler::Resize()
[DEBUG] call to WasResize() in MyClientHandler::Resize()
[DEBUG] call to CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to SynchronizeVisualProperties aborted in CefRenderWidgetHostViewOSR::WasResized()
[DEBUG] call to CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] damage_rect (0, 0, 633, 737) in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] rect_in_pixels (0, 0, 633, 737) => (x, y, width, height) in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] call to rect_in_pixels.Intersect(damage_rect) in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] call to MyRenderHandler::OnPaint
[DEBUG] hold_resize_ is true in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] cached_scale_factor_ is 1 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] ====== RACE CONDITION =======
[DEBUG] GetViewBounds().size().width() is 643 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] GetViewBounds().size().height() is 737 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] expected_size.width() is 643 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] expected_size.height() is 737 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] pixel_size.width() is 633 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] pixel_size.height() is 737 in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] pixel_size != expected_size
[DEBUG] abort call to ReleaseResizeHold() in CefRenderWidgetHostViewOSR::OnPaint()
[DEBUG] ====== RACE CONDITION =======

the current_view_bounds_ variable is stuck on the first value.

Screenshot:
image

Workaround:
The workaround we've been forced to use is to call the Invalidate method just after WasResized. However, it's not perfect.

Expected behavior:
That the GetViewBounds().size() method returns the correct values and no longer points to past values.

Impacted Versions:

  • OS: Windows11 24H2 / Linux
  • CEF Version : from 126 to current (actually 132.2.2+gfd43a8b+chromium-132.0.6834.32)

Questions

  • What could explain GetViewBounds() returning incorrect values when we're passing the right values?
@Hethsron Hethsron added the bug Bug report label Dec 10, 2024
@magreenblatt
Copy link
Collaborator

Duplicate of #3826

@magreenblatt magreenblatt marked this as a duplicate of #3826 Dec 10, 2024
@magreenblatt magreenblatt closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
Development

No branches or pull requests

2 participants