diff --git a/lib/ui/pointer.dart b/lib/ui/pointer.dart index cff2ec7fdf244..fe99de4b90ed2 100644 --- a/lib/ui/pointer.dart +++ b/lib/ui/pointer.dart @@ -381,7 +381,7 @@ class PointerData { final double rotation; @override - String toString() => 'PointerData(x: $physicalX, y: $physicalY)'; + String toString() => 'PointerData(viewId: $viewId, x: $physicalX, y: $physicalY)'; /// Returns a complete textual description of the information in this object. String toStringFull() { diff --git a/lib/ui/window/platform_configuration.h b/lib/ui/window/platform_configuration.h index c9162a26873b8..a8b54a80b8cee 100644 --- a/lib/ui/window/platform_configuration.h +++ b/lib/ui/window/platform_configuration.h @@ -481,13 +481,13 @@ class PlatformConfiguration final { void ReportTimings(std::vector timings); //---------------------------------------------------------------------------- - /// @brief Retrieves the Window with the given ID managed by the - /// `PlatformConfiguration`. + /// @brief Retrieves the viewport metrics with the given ID managed by + /// the `PlatformConfiguration`. /// - /// @param[in] window_id The id of the window to find and return. + /// @param[in] view_id The id of the view's viewport metrics to return. /// - /// @return a pointer to the Window. Returns nullptr if the ID is not - /// found. + /// @return a pointer to the ViewportMetrics. Returns nullptr if the ID is + /// not found. /// const ViewportMetrics* GetMetrics(int view_id); diff --git a/lib/web_ui/lib/pointer.dart b/lib/web_ui/lib/pointer.dart index a14455712c4c1..cd69ee6350d04 100644 --- a/lib/web_ui/lib/pointer.dart +++ b/lib/web_ui/lib/pointer.dart @@ -111,7 +111,7 @@ class PointerData { final double rotation; @override - String toString() => 'PointerData(x: $physicalX, y: $physicalY)'; + String toString() => 'PointerData(viewId: $viewId, x: $physicalX, y: $physicalY)'; String toStringFull() { return '$runtimeType(' 'embedderId: $embedderId, ' diff --git a/shell/platform/embedder/tests/embedder_unittests.cc b/shell/platform/embedder/tests/embedder_unittests.cc index da76770763d34..44c7426fd70fd 100644 --- a/shell/platform/embedder/tests/embedder_unittests.cc +++ b/shell/platform/embedder/tests/embedder_unittests.cc @@ -2700,7 +2700,7 @@ TEST_F(EmbedderTest, CanSendPointer) { CREATE_NATIVE_ENTRY([&message_latch](Dart_NativeArguments args) { auto message = tonic::DartConverter::FromDart( Dart_GetNativeArgument(args, 0)); - ASSERT_EQ("PointerData(x: 123.0, y: 456.0)", message); + ASSERT_EQ("PointerData(viewId: 0, x: 123.0, y: 456.0)", message); message_latch.Signal(); })); @@ -2715,6 +2715,7 @@ TEST_F(EmbedderTest, CanSendPointer) { pointer_event.x = 123; pointer_event.y = 456; pointer_event.timestamp = static_cast(1234567890); + pointer_event.view_id = 0; FlutterEngineResult result = FlutterEngineSendPointerEvent(engine.get(), &pointer_event, 1);