Skip to content

Commit

Permalink
Merge pull request #2997 from unoplatform/feature/shapes
Browse files Browse the repository at this point in the history
fix(shapes): [iOSmacOS] Fix shapes rendering issues
  • Loading branch information
dr1rrb authored Jun 17, 2020
2 parents 57f998d + 435e56f commit 72e3dcf
Show file tree
Hide file tree
Showing 605 changed files with 3,560 additions and 1,220 deletions.
291 changes: 165 additions & 126 deletions build/PackageDiffIgnore.xml
Original file line number Diff line number Diff line change
Expand Up @@ -976,142 +976,181 @@
</IgnoreSet>

<IgnoreSet baseVersion="2.4.4">
<Types>
<Member
fullName="Windows.Gaming.UI.GameMonitor"
reason="Removed UWP type"/>
<Member
fullName="Windows.Gaming.UI.GameMonitoringPermission"
reason="Removed UWP type"/>
<Member
fullName="Microsoft.UI.Xaml.Controls.AnimatedVisualPlayer.ILottieVisualSourceProvider"
reason="Incorrect namespace"/>

<Types>
<Member
fullName="Windows.Gaming.UI.GameMonitor"
reason="Removed UWP type"/>
<Member
fullName="Windows.Gaming.UI.GameMonitoringPermission"
reason="Removed UWP type"/>
<Member
fullName="Microsoft.UI.Xaml.Controls.AnimatedVisualPlayer.ILottieVisualSourceProvider"
reason="Incorrect namespace"/>
<Member
fullName="Windows.UI.Xaml.Shapes.ArbitraryShapeBase"
reason="iOS only, not part of the WinUI API." />
<!-- Styles overhaul -->
<Member
fullName="Uno.UI.GlobalStaticResources"
reason="Resources defined in XAML are no longer converted to public properties on GlobalStaticResources. The type itself is still present." />
<Member
fullName="Uno.UI.Toolkit.GlobalStaticResources"
reason="Resources defined in XAML are no longer converted to public properties on GlobalStaticResources. The type itself is still present." />
<Member
fullName="Windows.UI.Xaml.GenericStyles"
reason="Removed obsolete non-standard type (Styles are now all defined in XAML)." />
<Member
fullName="Windows.UI.Xaml.Style`1"
reason="Removed unused non-standard generic version of Style." />
<Member
fullName="Uno.UI.Controls.BindableSearchView"
reason="Removed unused Uno-only legacy control." />
<Member
fullName="Uno.UI.GlobalStaticResources"
reason="Resources defined in XAML are no longer converted to public properties on GlobalStaticResources. The type itself is still present." />
<Member
fullName="Uno.UI.Toolkit.GlobalStaticResources"
reason="Resources defined in XAML are no longer converted to public properties on GlobalStaticResources. The type itself is still present." />
<Member
fullName="Windows.UI.Xaml.GenericStyles"
reason="Removed obsolete non-standard type (Styles are now all defined in XAML)." />
<Member
fullName="Windows.UI.Xaml.Style`1"
reason="Removed unused non-standard generic version of Style." />
<Member
fullName="Uno.UI.Controls.BindableSearchView"
reason="Removed unused Uno-only legacy control." />
<!-- ^^ Styles overhaul -->
</Types>
<Methods>
<Member
fullName="System.Void Windows.UI.Xaml.Controls.Maps.MapTileSource..ctor()"
reason="UWP does not have this ctor"/>
<Member
fullName="System.Void Windows.UI.Xaml.Automation.AutomationAnnotation..ctor()"
reason="UWP does not have this ctor"/>
<Member
fullName="System.Void Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation..ctor()"
reason="UWP does not have this ctor"/>
<Member
fullName="System.Void Windows.Networking.Connectivity.ConnectionCost..ctor()"
reason="Not in UWP" />
<Member
fullName="System.Void Windows.Networking.Connectivity.ConnectionProfile..ctor()"
reason="Not in UWP" />
<Member
fullName="System.Void Windows.Networking.Connectivity.NetworkInformation..ctor()"
reason="Not in UWP" />
<Member
fullName="System.Void Windows.ApplicationModel.Activation.ProtocolActivatedEventArgs..ctor()"
reason="Parameter-less ctor does not exist in UWP"/>
<Member
fullName="System.Void Windows.ApplicationModel.SuspendingDeferral..ctor()"
reason="Parameter-less ctor does not exist in UWP"/>
<Member
fullName="System.Void Windows.ApplicationModel.SuspendingOperation..ctor(System.DateTimeOffset offset)"
reason="Parameter-less ctor does not exist in UWP"/>

</Types>

<Events>
</Events>

<Methods>
<Member
fullName="System.Void Windows.UI.Xaml.Controls.Maps.MapTileSource..ctor()"
reason="UWP does not have this ctor"/>
<Member
fullName="System.Void Windows.UI.Xaml.Automation.AutomationAnnotation..ctor()"
reason="UWP does not have this ctor"/>
<Member
fullName="System.Void Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation..ctor()"
reason="UWP does not have this ctor"/>
<Member
fullName="System.Void Windows.Networking.Connectivity.ConnectionCost..ctor()"
reason="Not in UWP" />
<Member
fullName="System.Void Windows.Networking.Connectivity.ConnectionProfile..ctor()"
reason="Not in UWP" />
<Member
fullName="System.Void Windows.Networking.Connectivity.NetworkInformation..ctor()"
reason="Not in UWP" />
<Member
fullName="System.Void Windows.ApplicationModel.Activation.ProtocolActivatedEventArgs..ctor()"
reason="Parameter-less ctor does not exist in UWP"/>
<Member
fullName="System.Void Windows.ApplicationModel.SuspendingDeferral..ctor()"
reason="Parameter-less ctor does not exist in UWP"/>
<Member
fullName="System.Void Windows.ApplicationModel.SuspendingOperation..ctor(System.DateTimeOffset offset)"
reason="Parameter-less ctor does not exist in UWP"/>
<Member
fullName="System.Void Windows.UI.Xaml.Shapes.Shape.OnFillChanged(Windows.UI.Xaml.Media.Brush newValue)"
reason="Not part of the WinUI API." />
<Member
fullName="System.Void Windows.UI.Xaml.Shapes.Shape.OnFillUpdated(Windows.UI.Xaml.Media.Brush newValue)"
reason="Not part of the WinUI API." />
<Member
fullName="System.Void Windows.UI.Xaml.Shapes.Shape.OnStrokeUpdated(Windows.UI.Xaml.Media.Brush newValue)"
reason="Not part of the WinUI API." />
<Member
fullName="System.Void Windows.UI.Xaml.Shapes.Shape.OnStretchUpdated(Windows.UI.Xaml.Media.Stretch newValue)"
reason="Not part of the WinUI API." />
<Member
fullName="System.Void Windows.UI.Xaml.Shapes.Shape.OnStrokeThicknessUpdated(System.Double newValue)"
reason="Not part of the WinUI API." />
<Member
fullName="System.Void Windows.UI.Xaml.Shapes.Shape.OnStrokeDashArrayUpdated(Windows.UI.Xaml.Media.DoubleCollection newValue)"
reason="Not part of the WinUI API." />
<Member
fullName="System.Void Windows.UI.Xaml.Shapes.Shape.RefreshShape(System.Boolean forceRefresh)"
reason="Not part of the WinUI API." />
<!-- Styles overhaul -->
<Member
fullName="System.Void Windows.UI.Xaml.FrameworkElement.OnStyleChanged(Windows.UI.Xaml.Style oldStyle, Windows.UI.Xaml.Style newStyle)"
reason="Removed non-standard protected method"/>
<Member
fullName="System.Func`2&lt;System.String,System.Object&gt; Windows.UI.Xaml.ResourceDictionary.get_DefaultResolver()"
reason="Removed non-standard property that's no longer used by Xaml-generated code with new resources handling"/>
<Member
fullName="System.Void Windows.UI.Xaml.ResourceDictionary.set_DefaultResolver(System.Func`2&lt;System.String,System.Object&gt; value)"
reason="Removed non-standard property that's no longer used by Xaml-generated code with new resources handling"/>
<Member
fullName="System.Void Windows.UI.Xaml.Style..ctor(System.Type targetType, Windows.UI.Xaml.Style basedOn)"
reason="Removed non-standard Style constructor"/>
<Member
fullName="System.Void Windows.UI.Xaml.Style.ApplyTo(Windows.UI.Xaml.DependencyObject o)"
reason="Made non-standard method internal, shouldn't normally be called from consumer code"/>
<Member
fullName="System.Void Windows.UI.Xaml.Style.RegisterDefaultStyleForType(System.Type type, Windows.UI.Xaml.Style style)"
reason="Removed unused overload. This is public to be callable from Xaml-generated code, but should never be called by consumer code."/>
<Member
fullName="Windows.UI.Xaml.Style Windows.UI.Xaml.Style.DefaultStyleForType(System.Type type)"
reason="Made non-standard method internal"/>
<Member
fullName="Windows.UI.Xaml.Style Windows.UI.Xaml.Documents.TextElement.get_Style()"
reason="Removed unused non-standard property"/>
<Member
fullName="System.Void Windows.UI.Xaml.Documents.TextElement.set_Style(Windows.UI.Xaml.Style value)"
reason="Removed unused non-standard property"/>
<Member
fullName="System.Void Windows.UI.Xaml.Documents.TextElement.OnStyleChanged()"
reason="Removed unused non-standard property"/>
<Member
fullName="Windows.UI.Xaml.Style Windows.UI.Xaml.Controls.NativePage.get_Style()"
reason="Removed unused non-standard property"/>
<Member
fullName="System.Void Windows.UI.Xaml.Controls.NativePage.set_Style(Windows.UI.Xaml.Style value)"
reason="Removed unused non-standard property"/>
<Member
fullName="System.Void Windows.UI.Xaml.NativeApplication..ctor(Windows.UI.Xaml.Application app, System.IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer)"
reason="This ctor is superceded by the version that takes a function. It's removed because it causes a crash with the new theme handling."/>
<Member
fullName="System.Object Windows.UI.Xaml.ResourceDictionary.Lookup(System.Object key)"
reason="Not a public WinUI method (in the .NET projection)"/>
<Member
fullName="System.Void Windows.UI.Xaml.FrameworkElement.OnStyleChanged(Windows.UI.Xaml.Style oldStyle, Windows.UI.Xaml.Style newStyle)"
reason="Removed non-standard protected method"/>
<Member
fullName="System.Func`2&lt;System.String,System.Object&gt; Windows.UI.Xaml.ResourceDictionary.get_DefaultResolver()"
reason="Removed non-standard property that's no longer used by Xaml-generated code with new resources handling"/>
<Member
fullName="System.Void Windows.UI.Xaml.ResourceDictionary.set_DefaultResolver(System.Func`2&lt;System.String,System.Object&gt; value)"
reason="Removed non-standard property that's no longer used by Xaml-generated code with new resources handling"/>
<Member
fullName="System.Void Windows.UI.Xaml.Style..ctor(System.Type targetType, Windows.UI.Xaml.Style basedOn)"
reason="Removed non-standard Style constructor"/>
<Member
fullName="System.Void Windows.UI.Xaml.Style.ApplyTo(Windows.UI.Xaml.DependencyObject o)"
reason="Made non-standard method internal, shouldn't normally be called from consumer code"/>
<Member
fullName="System.Void Windows.UI.Xaml.Style.RegisterDefaultStyleForType(System.Type type, Windows.UI.Xaml.Style style)"
reason="Removed unused overload. This is public to be callable from Xaml-generated code, but should never be called by consumer code."/>
<Member
fullName="Windows.UI.Xaml.Style Windows.UI.Xaml.Style.DefaultStyleForType(System.Type type)"
reason="Made non-standard method internal"/>
<Member
fullName="Windows.UI.Xaml.Style Windows.UI.Xaml.Documents.TextElement.get_Style()"
reason="Removed unused non-standard property"/>
<Member
fullName="System.Void Windows.UI.Xaml.Documents.TextElement.set_Style(Windows.UI.Xaml.Style value)"
reason="Removed unused non-standard property"/>
<Member
fullName="System.Void Windows.UI.Xaml.Documents.TextElement.OnStyleChanged()"
reason="Removed unused non-standard property"/>
<Member
fullName="Windows.UI.Xaml.Style Windows.UI.Xaml.Controls.NativePage.get_Style()"
reason="Removed unused non-standard property"/>
<Member
fullName="System.Void Windows.UI.Xaml.Controls.NativePage.set_Style(Windows.UI.Xaml.Style value)"
reason="Removed unused non-standard property"/>
<Member
fullName="System.Void Windows.UI.Xaml.NativeApplication..ctor(Windows.UI.Xaml.Application app, System.IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer)"
reason="This ctor is superceded by the version that takes a function. It's removed because it causes a crash with the new theme handling."/>
<Member
fullName="System.Object Windows.UI.Xaml.ResourceDictionary.Lookup(System.Object key)"
reason="Not a public WinUI method (in the .NET projection)"/>
<!-- ^^ Styles overhaul -->
<Member
fullName="System.Void Windows.UI.Text.FontWeight..ctor(System.Int32 weight)"
reason="Changed from int to ushort to replicate uwp definition"/>
<Member
fullName="System.Int32 Windows.UI.Text.FontWeight.get_Weight()"
reason="Changed from int to ushort to replicate uwp definition"/>
</Methods>

<Member
fullName="System.Void Windows.UI.Text.FontWeight..ctor(System.Int32 weight)"
reason="Changed from int to ushort to replicate uwp definition"/>
<Member
fullName="System.Int32 Windows.UI.Text.FontWeight.get_Weight()"
reason="Changed from int to ushort to replicate uwp definition"/>
</Methods>
<Properties>

<Properties>
<!-- Styles overhaul -->
<Member
fullName="System.Func`2&lt;System.String,System.Object&gt; Windows.UI.Xaml.ResourceDictionary::DefaultResolver()"
reason="Removed non-standard property that's no longer used by Xaml-generated code with new resources handling"/>
<Member
fullName="Windows.UI.Xaml.Style Windows.UI.Xaml.Documents.TextElement::Style()"
reason="Removed unused non-standard property"/>
<Member
fullName="Windows.UI.Xaml.Style Windows.UI.Xaml.Controls.NativePage::Style()"
reason="Removed unused non-standard property"/>
<Member
fullName="System.Func`2&lt;System.String,System.Object&gt; Windows.UI.Xaml.ResourceDictionary::DefaultResolver()"
reason="Removed non-standard property that's no longer used by Xaml-generated code with new resources handling"/>
<Member
fullName="Windows.UI.Xaml.Style Windows.UI.Xaml.Documents.TextElement::Style()"
reason="Removed unused non-standard property"/>
<Member
fullName="Windows.UI.Xaml.Style Windows.UI.Xaml.Controls.NativePage::Style()"
reason="Removed unused non-standard property"/>
<!-- ^^ Styles overhaul -->
<Member
fullName="System.Int32 Windows.UI.Text.FontWeight::Weight()"
reason="Changed from int to ushort to replicate uwp definition"/>
</Properties>

<Member
fullName="System.Int32 Windows.UI.Text.FontWeight::Weight()"
reason="Changed from int to ushort to replicate uwp definition"/>
</Properties>
<Fields>

<Fields>
<Member
fullName="Windows.UI.Xaml.DependencyProperty Windows.UI.Xaml.Shapes.Shape::FillProperty"
reason="Converted as property, as WinUI." />
<Member
fullName="Windows.UI.Xaml.DependencyProperty Windows.UI.Xaml.Shapes.Shape::StrokeProperty"
reason="Converted as property, as WinUI." />
<Member
fullName="Windows.UI.Xaml.DependencyProperty Windows.UI.Xaml.Shapes.Shape::StrokeThicknessProperty"
reason="Converted as property, as WinUI." />
<Member
fullName="Windows.UI.Xaml.DependencyProperty Windows.UI.Xaml.Shapes.Shape::StretchProperty"
reason="Converted as property, as WinUI." />
<Member
fullName="Windows.UI.Xaml.DependencyProperty Windows.UI.Xaml.Shapes.Shape::StrokeDashArrayProperty"
reason="Converted as property, as WinUI." />
<!-- Styles overhaul -->
<Member
fullName="Windows.UI.Xaml.DependencyProperty Windows.UI.Xaml.Documents.TextElement::StyleProperty"
reason="Removed unused non-standard DependencyProperty"/>
<Member
fullName="Windows.UI.Xaml.DependencyProperty Windows.UI.Xaml.Documents.TextElement::StyleProperty"
reason="Removed unused non-standard DependencyProperty"/>
<!-- ^^ Styles overhaul -->
</Fields>
</Fields>
</IgnoreSet>
</IgnoreSets>
</DiffIgnore>
3 changes: 2 additions & 1 deletion build/ios-uitest-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ else
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.CommandBarTests' or \
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.ComboBoxTests' or \
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Media_Animation' or \
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.BorderTests'
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.BorderTests' or \
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Shapes.Basics_Shapes_Tests'
"
fi

Expand Down
15 changes: 10 additions & 5 deletions src/SamplesApp/SamplesApp.UITests/SampleControlUITestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,21 @@ public FileInfo TakeScreenshot(string stepName, ScreenshotOptions options)

if(options != null)
{
var fileName = Path
.Combine(fileInfo.DirectoryName, Path.GetFileNameWithoutExtension(fileInfo.FullName) + ".metadata")
.GetNormalizedLongPath();

File.WriteAllText(fileName, $"IgnoreInSnapshotCompare={options.IgnoreInSnapshotCompare}");
SetOptions(fileInfo, options);
}

return fileInfo;
}

public void SetOptions(FileInfo screenshot, ScreenshotOptions options)
{
var fileName = Path
.Combine(screenshot.DirectoryName, Path.GetFileNameWithoutExtension(screenshot.FullName) + ".metadata")
.GetNormalizedLongPath();

File.WriteAllText(fileName, $"IgnoreInSnapshotCompare={options.IgnoreInSnapshotCompare}");
}

private static void ValidateAutoRetry()
{
if (GetCurrentTestAttributes<AutoRetryAttribute>().Length == 0)
Expand Down
10 changes: 10 additions & 0 deletions src/SamplesApp/SamplesApp.UITests/SamplesApp.UITests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,14 @@
</ProjectReference>
</ItemGroup>

<ItemGroup>
<Folder Include="Windows_UI_Xaml_Shapes\Basics_Shapes_Tests_EpectedResults\" />
</ItemGroup>

<ItemGroup>
<None Update="Windows_UI_Xaml_Shapes\Basics_Shapes_Tests_EpectedResults\*.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Loading

0 comments on commit 72e3dcf

Please sign in to comment.