From 4227b13058c0d485a562bce3797161dbac59f088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Fri, 11 Nov 2022 19:41:13 +0100 Subject: Fix building with XCode 14.1 The previously implicit conversion from blink::FloatRect to gfx::RectF is no longer available when building with newer XCode. Make those explicit where needed. Task-number: QTBUG-108207 Change-Id: Ib195f4e423480557d9ff86571254deafb05de8a2 Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/443042 Reviewed-by: Allan Sandfeld Jensen Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/444719 --- .../third_party/blink/renderer/core/editing/finder/text_finder.cc | 6 ++++-- chromium/third_party/blink/renderer/core/frame/frame_view.cc | 2 +- .../third_party/blink/renderer/core/paint/paint_timing_detector.cc | 4 +++- .../third_party/blink/renderer/modules/exported/web_ax_object.cc | 2 +- .../platform/graphics/compositing/paint_chunks_to_cc_layer.cc | 3 ++- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/chromium/third_party/blink/renderer/core/editing/finder/text_finder.cc b/chromium/third_party/blink/renderer/core/editing/finder/text_finder.cc index cb8e8e22354..392d0956b64 100644 --- a/chromium/third_party/blink/renderer/core/editing/finder/text_finder.cc +++ b/chromium/third_party/blink/renderer/core/editing/finder/text_finder.cc @@ -694,7 +694,8 @@ gfx::RectF TextFinder::ActiveFindMatchRect() { if (!current_active_match_frame_ || !active_match_) return gfx::RectF(); - return gfx::RectF(FindInPageRectFromRange(EphemeralRange(ActiveMatch()))); + FloatRect temp = FindInPageRectFromRange(EphemeralRange(ActiveMatch())); + return gfx::RectF(temp.X(), temp.Y(), temp.Width(), temp.Height()); } Vector TextFinder::FindMatchRects() { @@ -704,7 +705,8 @@ Vector TextFinder::FindMatchRects() { match_rects.ReserveCapacity(match_rects.size() + find_matches_cache_.size()); for (const FindMatch& match : find_matches_cache_) { DCHECK(!match.rect_.IsEmpty()); - match_rects.push_back(match.rect_); + gfx::RectF temp = gfx::RectF(match.rect_.X(), match.rect_.Y(), match.rect_.Width(), match.rect_.Height()); + match_rects.push_back(std::move(temp)); } return match_rects; diff --git a/chromium/third_party/blink/renderer/core/frame/frame_view.cc b/chromium/third_party/blink/renderer/core/frame/frame_view.cc index 427942a4461..b73a8f2c197 100644 --- a/chromium/third_party/blink/renderer/core/frame/frame_view.cc +++ b/chromium/third_party/blink/renderer/core/frame/frame_view.cc @@ -193,7 +193,7 @@ void FrameView::UpdateViewportIntersection(unsigned flags, SetViewportIntersection(mojom::blink::ViewportIntersectionState( viewport_intersection, mainframe_intersection, gfx::Rect(), occlusion_state, gfx::Size(frame.GetMainFrameViewportSize()), - gfx::Point(frame.GetMainFrameScrollOffset()), main_frame_gfx_transform)); + gfx::Point(frame.GetMainFrameScrollOffset().X(), frame.GetMainFrameScrollOffset().Y()), main_frame_gfx_transform)); UpdateFrameVisibility(!viewport_intersection.IsEmpty()); diff --git a/chromium/third_party/blink/renderer/core/paint/paint_timing_detector.cc b/chromium/third_party/blink/renderer/core/paint/paint_timing_detector.cc index 9a795855075..3ffa7fd8c7a 100644 --- a/chromium/third_party/blink/renderer/core/paint/paint_timing_detector.cc +++ b/chromium/third_party/blink/renderer/core/paint/paint_timing_detector.cc @@ -326,7 +326,9 @@ FloatRect PaintTimingDetector::BlinkSpaceToDIPs( // May be nullptr in tests. if (!widget) return float_rect; - return FloatRect(widget->BlinkSpaceToDIPs(gfx::RectF(float_rect))); + gfx::RectF rectF(float_rect.X(), float_rect.Y(), + float_rect.Width(), float_rect.Height()); + return FloatRect(widget->BlinkSpaceToDIPs(rectF)); } FloatRect PaintTimingDetector::CalculateVisualRect( diff --git a/chromium/third_party/blink/renderer/modules/exported/web_ax_object.cc b/chromium/third_party/blink/renderer/modules/exported/web_ax_object.cc index 6805777bbe3..4c7ce241fc2 100644 --- a/chromium/third_party/blink/renderer/modules/exported/web_ax_object.cc +++ b/chromium/third_party/blink/renderer/modules/exported/web_ax_object.cc @@ -1193,7 +1193,7 @@ void WebAXObject::GetRelativeBounds(WebAXObject& offset_container, private_->GetRelativeBounds(&container, bounds, container_transform, clips_children); offset_container = WebAXObject(container); - bounds_in_container = gfx::RectF(bounds); + bounds_in_container = gfx::RectF(bounds.X(), bounds.Y(), bounds.Width(), bounds.Height()); } void WebAXObject::GetAllObjectsWithChangedBounds( diff --git a/chromium/third_party/blink/renderer/platform/graphics/compositing/paint_chunks_to_cc_layer.cc b/chromium/third_party/blink/renderer/platform/graphics/compositing/paint_chunks_to_cc_layer.cc index 91166a2dc78..2d5b100bf31 100644 --- a/chromium/third_party/blink/renderer/platform/graphics/compositing/paint_chunks_to_cc_layer.cc +++ b/chromium/third_party/blink/renderer/platform/graphics/compositing/paint_chunks_to_cc_layer.cc @@ -988,7 +988,8 @@ static gfx::Point MapSelectionBoundPoint(const IntPoint& point, .MapPoint(FloatPoint(point)); mapped_point.MoveBy(-layer_offset); - gfx::Point out_point(RoundedIntPoint(mapped_point)); + IntPoint tmpOutPoint = RoundedIntPoint(mapped_point); + gfx::Point out_point(tmpOutPoint.X(), tmpOutPoint.Y()); return out_point; } -- cgit v1.2.1