From fe46d92a7b07cf68253fc73ce5cf598c6024e705 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 26 Apr 2023 08:20:59 -0400 Subject: [PATCH] chore: Fix typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Agnès ZITTE <16295702+agneszitte@users.noreply.github.com> --- .../Extensibility/ApiExtensibility.cs | 2 +- src/Uno.UI.RuntimeTests/Helpers/UITestHelper.cs | 2 +- .../Internal/InputManager.Pointers.Managed.cs | 6 +++--- src/Uno.UI/UI/Xaml/Internal/PointerCapture.cs | 14 +++++++------- .../UI/Xaml/Internal/PointerCaptureTarget.cs | 16 ++++++++-------- src/Uno.UI/UI/Xaml/Internal/RootVisual.cs | 2 +- src/Uno.UI/UI/Xaml/UIElement.Pointers.cs | 12 ++++++------ src/Uno.UI/UI/Xaml/UIElement.cs | 12 ++++++------ 8 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/Uno.Foundation/Extensibility/ApiExtensibility.cs b/src/Uno.Foundation/Extensibility/ApiExtensibility.cs index 5eb89516df..a96c2d12a6 100644 --- a/src/Uno.Foundation/Extensibility/ApiExtensibility.cs +++ b/src/Uno.Foundation/Extensibility/ApiExtensibility.cs @@ -64,7 +64,7 @@ public static class ApiExtensibility /// A registered type /// An optional owner to be passed to the extension constructor /// The instance if the creation was successful - /// True if the creation suceeded, otherwise False. + /// True if the creation succeeded, otherwise False. public static bool CreateInstance(object owner, [NotNullWhen(true)] out T? instance) where T : class { diff --git a/src/Uno.UI.RuntimeTests/Helpers/UITestHelper.cs b/src/Uno.UI.RuntimeTests/Helpers/UITestHelper.cs index 922f8494ee..18827a55af 100644 --- a/src/Uno.UI.RuntimeTests/Helpers/UITestHelper.cs +++ b/src/Uno.UI.RuntimeTests/Helpers/UITestHelper.cs @@ -11,7 +11,7 @@ using Private.Infrastructure; namespace Uno.UI.RuntimeTests.Tests.Uno_UI_Xaml_Core; -// Note: This files contains bunch of helpers that are expected to be moved to the test engine among the pointer injection work +// Note: This file contains a bunch of helpers that are expected to be moved to the test engine among the pointer injection work public static class UITestHelper { diff --git a/src/Uno.UI/UI/Xaml/Internal/InputManager.Pointers.Managed.cs b/src/Uno.UI/UI/Xaml/Internal/InputManager.Pointers.Managed.cs index 15f1f4d7b3..63beb65420 100644 --- a/src/Uno.UI/UI/Xaml/Internal/InputManager.Pointers.Managed.cs +++ b/src/Uno.UI/UI/Xaml/Internal/InputManager.Pointers.Managed.cs @@ -152,7 +152,7 @@ internal partial class InputManager internal void OnPointerExited(Windows.UI.Core.PointerEventArgs args) { - // This is how UWP behaves: when out of the bounds of the Window, the root element is use. + // This is how UWP behaves: when out of the bounds of the Window, the root element is used. var originalSource = Windows.UI.Xaml.Window.Current.Content; if (originalSource is null) { @@ -289,7 +289,7 @@ internal partial class InputManager { if (Raise(Leave, staleBranch.Value, routedArgs) is { VisualTreeAltered: true }) { - // The visual tree have been modified in a way that requires to perform a new hit test. + // The visual tree has been modified in a way that requires performing a new hit test. originalSource = HitTest(args).element ?? Windows.UI.Xaml.Window.Current.Content; } } @@ -298,7 +298,7 @@ internal partial class InputManager // Note: This won't do anything if already over. if (Raise(Enter, originalSource, routedArgs) is { VisualTreeAltered: true }) { - // The visual tree have been modified in a way that requires to perform a new hit test. + // The visual tree has been modified in a way that requires performing a new hit test. originalSource = HitTest(args).element ?? Windows.UI.Xaml.Window.Current.Content; } diff --git a/src/Uno.UI/UI/Xaml/Internal/PointerCapture.cs b/src/Uno.UI/UI/Xaml/Internal/PointerCapture.cs index b15d3ca81b..f3a182dda0 100644 --- a/src/Uno.UI/UI/Xaml/Internal/PointerCapture.cs +++ b/src/Uno.UI/UI/Xaml/Internal/PointerCapture.cs @@ -22,7 +22,7 @@ namespace Uno.UI.Xaml.Core; */ /// -/// This is an helper class that use to manage the captures for a given pointer. +/// This is a helper class that uses to manage the captures for a given pointer. /// internal partial class PointerCapture { @@ -71,13 +71,13 @@ internal partial class PointerCapture public Pointer Pointer { get; } /// - /// Gets the of the last args that has been handled by this capture + /// Gets the of the last args that have been handled by this capture /// public long MostRecentDispatchedEventFrameId { get; private set; } /// - /// Determines if this capture was made only for implicit kind - /// (So we should not use it to filter out some event on other controls) + /// Determines if this capture was made only for an implicit kind + /// (So we should not use it to filter out some events on other controls) /// public bool IsImplicitOnly { get; private set; } = true; @@ -216,7 +216,7 @@ internal partial class PointerCapture /// /// The target element for which the args are validated /// The pending pointer event args that is under test - /// A flag that allows to automatically release any pending out-dated capture (for PointerDown only) + /// A flag that allows releasing automatically any pending outdated capture (for PointerDown only) /// A boolean which indicates if the args are valid or not for the given element public bool ValidateAndUpdate(UIElement element, PointerRoutedEventArgs args, bool autoRelease) { @@ -247,8 +247,8 @@ internal partial class PointerCapture { // We should dispatch the event only if the control which has captured the pointer has already dispatched the event // (Which actually means that the current control is a parent of the control which has captured the pointer) - // Remarks: This is not enough to determine parent-child relationship when we dispatch multiple events base on the same native event, - // (as they will all have the same FrameId), however in that case we dispatch events layer per layer + // Remarks: This is not enough to determine the parent-child relationship when we dispatch multiple events based on the same native event, + // (as they will all have the same FrameId), however, in that case, we dispatch events layer per layer // instead of bubbling a single event before raising the next one, so we are safe. // The only limitation would be when mixing native vs. managed bubbling, but this check only prevents // the leaf of the tree to raise the event, so we cannot mix bubbling mode in that case. diff --git a/src/Uno.UI/UI/Xaml/Internal/PointerCaptureTarget.cs b/src/Uno.UI/UI/Xaml/Internal/PointerCaptureTarget.cs index ba67652316..9c2a0d906d 100644 --- a/src/Uno.UI/UI/Xaml/Internal/PointerCaptureTarget.cs +++ b/src/Uno.UI/UI/Xaml/Internal/PointerCaptureTarget.cs @@ -21,19 +21,19 @@ internal class PointerCaptureTarget public UIElement Element { get; } /// - /// The element to used for the native capture + /// The element to be used for the native capture /// /// /// On WASM this might be different than the : - /// In case of implicit capture, the element used for the capture will prevent any pointer event on sub element - /// (sub element will actually get a pointer 'leave' on capture, and a 'enter' on capture release). + /// In the case of implicit capture, the element used for the capture will prevent any pointer event on the sub-element + /// (sub-element will actually get a pointer 'leave' on capture, and an 'enter' on capture release). /// So instead of capturing using the actual element, we use the 'OriginalSource' of the 'relatedArgs', - /// so event will still be sent to sub elements and we will then filter them out if needed. + /// so an event will still be sent to sub-elements and we will then filter them out if needed. /// public UIElement NativeCaptureElement { get; set; } /// - /// Gets the current capture kinds that was enabled on the target + /// Gets the current capture kinds that were enabled on the target /// internal PointerCaptureKind Kind { get; set; } @@ -42,9 +42,9 @@ internal class PointerCaptureTarget /// If so we could rely on standard events bubbling to reach it. /// Otherwise this means that we have to bubble the event in managed only. /// - /// This makes sense only for platform that has "implicit capture" + /// This makes sense only for a platform that has "implicit capture" /// (i.e. all pointers events are sent to the element on which the pointer pressed - /// occured at the beginning of the gesture). This is the case on iOS and Android. + /// occurred at the beginning of the gesture). This is the case on iOS and Android. /// public bool? IsInNativeBubblingTree { get; set; } @@ -52,7 +52,7 @@ internal class PointerCaptureTarget /// Gets the last event dispatched by the . /// In case of native bubbling (cf. ), /// this helps to determine that an event was already dispatched by the Owner: - /// if a UIElement is receiving and event with the same timestamp, it means that the element + /// if a UIElement is receiving an event with the same timestamp, it means that the element /// is a parent of the Owner and we are only bubbling the routed event, so this element can /// raise the event (if the opposite, it means that the element is a child, so it has to mute the event). /// diff --git a/src/Uno.UI/UI/Xaml/Internal/RootVisual.cs b/src/Uno.UI/UI/Xaml/Internal/RootVisual.cs index b5d3b64165..7ffc1ade61 100644 --- a/src/Uno.UI/UI/Xaml/Internal/RootVisual.cs +++ b/src/Uno.UI/UI/Xaml/Internal/RootVisual.cs @@ -167,7 +167,7 @@ namespace Uno.UI.Xaml.Core } #if __ANDROID__ || __IOS__ // Not needed on WASM as we do have native support of the exit event - // On iOS we use the RootVisual to raise the UWP only exit event (in managed only) + // On iOS we use the RootVisual to raise the UWP-only exit event (in managed only) // Note: This is useless for managed pointers where the Exit is raised properly if (args.Pointer.PointerDeviceType is PointerDeviceType.Touch diff --git a/src/Uno.UI/UI/Xaml/UIElement.Pointers.cs b/src/Uno.UI/UI/Xaml/UIElement.Pointers.cs index b96caeb7f5..659d6d3cd7 100644 --- a/src/Uno.UI/UI/Xaml/UIElement.Pointers.cs +++ b/src/Uno.UI/UI/Xaml/UIElement.Pointers.cs @@ -254,21 +254,21 @@ namespace Windows.UI.Xaml internal struct PointerEventDispatchResult { /// - /// Indicates that the visual tree has been modified in a way that the input manager must perform a complete hit testing sequence before dispatching a new event. + /// Indicates that the visual tree has been modified in a way that the input manager must perform a complete hit-testing sequence before dispatching a new event. /// /// /// This is designed for the case where for a single native pointer event, we are dispatching multiple managed events (e.g. managed Enter/Exit when we get only a native Move) - /// for all other cases **a full hit test must be perform**. - /// This means that we must not "capture"/cache the current top-most-element (a.k.a. OriginalSource) and try to update it on next event - /// as this flag does not take in consideration RenderTransform and other layout modification that does not alter the state of the pointer. + /// for all other cases **a full hit test must be performed**. + /// This means that we must not "capture"/cache the current top-most-element (a.k.a. OriginalSource) and try to update it on the next event + /// as this flag does not take into consideration RenderTransform and other layout modification that does not alter the state of the pointer. /// /// This is used only for managed dispatch. public bool VisualTreeAltered { get; set; } } /// - /// Indicates if this element or one of its child might be target pointer pointer events. - /// Be aware this doesn't means that the element itself can be actually touched by user, + /// Indicates if this element or one of its children might be target pointer events. + /// Be aware this doesn't means that the element itself can be actually touched by the user, /// but only that pointer events can be raised on this element. /// I.e. this element is NOT . /// diff --git a/src/Uno.UI/UI/Xaml/UIElement.cs b/src/Uno.UI/UI/Xaml/UIElement.cs index c65c27c883..894dc02bc3 100644 --- a/src/Uno.UI/UI/Xaml/UIElement.cs +++ b/src/Uno.UI/UI/Xaml/UIElement.cs @@ -911,9 +911,9 @@ namespace Windows.UI.Xaml #endif /// - /// This method has to be invoked for element that are going to be recycled WITHOUT necessarily being unloaded / loaded. - /// For instance, this is is not expected to be invoked for elements recycled by the the template pool as they are always unloaded. - /// The main use case is for ListView and is expected to be invoked by the ListView.CleanUpContainer. + /// This method has to be invoked for elements that are going to be recycled WITHOUT necessarily being unloaded / loaded. + /// For instance, this is not expected to be invoked for elements recycled by the template pool as they are always unloaded. + /// The main use case is for ListView and is expected to be invoked by ListView.CleanUpContainer. /// /// This will walk the tree down to invoke this on all children! internal static void PrepareForRecycle(object view) @@ -932,9 +932,9 @@ namespace Windows.UI.Xaml } /// - /// This method has to be invoked on element that are going to be recycled WITHOUT necessarily being unloaded / loaded. - /// For instance, this is is not expected to be invoked for elements recycled by the the template pool as they are always unloaded. - /// The main use case is for ListView and is expected to be invoked by the ListView.CleanUpContainer. + /// This method has to be invoked on elements that are going to be recycled WITHOUT necessarily being unloaded / loaded. + /// For instance, this is not expected to be invoked for elements recycled by the template pool as they are always unloaded. + /// The main use case is for ListView and is expected to be invoked by ListView.CleanUpContainer. /// /// This will walk the tree down to invoke this on all children! internal virtual void PrepareForRecycle() -- GitLab