提交 fe46d92a 编写于 作者: D David

chore: Fix typos

Co-authored-by: NAgnès ZITTE <16295702+agneszitte@users.noreply.github.com>
上级 f5d1a2e6
......@@ -64,7 +64,7 @@ public static class ApiExtensibility
/// <typeparam name="T">A registered type</typeparam>
/// <param name="owner">An optional owner to be passed to the extension constructor</param>
/// <param name="instance">The instance if the creation was successful</param>
/// <returns>True if the creation suceeded, otherwise False.</returns>
/// <returns>True if the creation succeeded, otherwise False.</returns>
public static bool CreateInstance<T>(object owner, [NotNullWhen(true)] out T? instance)
where T : class
{
......
......@@ -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
{
......
......@@ -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;
}
......
......@@ -22,7 +22,7 @@ namespace Uno.UI.Xaml.Core;
*/
/// <summary>
/// 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.
/// </summary>
internal partial class PointerCapture
{
......@@ -71,13 +71,13 @@ internal partial class PointerCapture
public Pointer Pointer { get; }
/// <summary>
/// Gets the <see cref="PointerRoutedEventArgs.FrameId"/> of the last args that has been handled by this capture
/// Gets the <see cref="PointerRoutedEventArgs.FrameId"/> of the last args that have been handled by this capture
/// </summary>
public long MostRecentDispatchedEventFrameId { get; private set; }
/// <summary>
/// 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)
/// </summary>
public bool IsImplicitOnly { get; private set; } = true;
......@@ -216,7 +216,7 @@ internal partial class PointerCapture
/// </summary>
/// <param name="element">The target element for which the args are validated</param>
/// <param name="args">The pending pointer event args that is under test</param>
/// <param name="autoRelease">A flag that allows to automatically release any pending out-dated capture (for PointerDown only)</param>
/// <param name="autoRelease">A flag that allows releasing automatically any pending outdated capture (for PointerDown only)</param>
/// <returns>A boolean which indicates if the args are valid or not for the given element</returns>
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.
......
......@@ -21,19 +21,19 @@ internal class PointerCaptureTarget
public UIElement Element { get; }
/// <summary>
/// The element to used for the native capture
/// The element to be used for the native capture
/// </summary>
/// <remarks>
/// On WASM this might be different than the <see cref="Element"/>:
/// 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.
/// </remarks>
public UIElement NativeCaptureElement { get; set; }
/// <summary>
/// Gets the current capture kinds that was enabled on the target
/// Gets the current capture kinds that were enabled on the target
/// </summary>
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.
/// </summary>
public bool? IsInNativeBubblingTree { get; set; }
......@@ -52,7 +52,7 @@ internal class PointerCaptureTarget
/// Gets the last event dispatched by the <see cref="Element"/>.
/// In case of native bubbling (cf. <see cref="IsInNativeBubblingTree"/>),
/// 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).
/// </summary>
......
......@@ -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
......
......@@ -254,21 +254,21 @@ namespace Windows.UI.Xaml
internal struct PointerEventDispatchResult
{
/// <summary>
/// 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.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
/// <remarks>This is used only for managed dispatch.</remarks>
public bool VisualTreeAltered { get; set; }
}
/// <summary>
/// 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 <see cref="HitTestability.Collapsed"/>.
/// </summary>
......
......@@ -911,9 +911,9 @@ namespace Windows.UI.Xaml
#endif
/// <summary>
/// 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.
/// </summary>
/// <remarks>This will walk the tree down to invoke this on all children!</remarks>
internal static void PrepareForRecycle(object view)
......@@ -932,9 +932,9 @@ namespace Windows.UI.Xaml
}
/// <summary>
/// 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.
/// </summary>
/// <remarks>This will walk the tree down to invoke this on all children!</remarks>
internal virtual void PrepareForRecycle()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册