Skip to content

Commit 9930278

Browse files
author
reunion-maestro-bot
committed
Syncing content from committish 2181dd943fabedb27bbc68555348b87b2de68e1e
1 parent 4387af8 commit 9930278

File tree

82 files changed

+4064
-280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+4064
-280
lines changed

src/Packages.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<PackageReference Update="Microsoft.Windows.SDK.BuildTools" Version="$(MicrosoftWindowsSDKBuildToolsNugetPackageVersion)" />
2121
<PackageReference Update="Microsoft.FrameworkUdk" Version="$(FrameworkUdkPackageVersion)" />
2222
<PackageReference Update="Microsoft.Internal.WinUIDetails" Version="$(WinUIDetailsNugetVersion)" GeneratePathProperty="true"/>
23-
<PackageReference Update="Microsoft.Internal.InteractiveExperiences" Version="$(IxpInternalPackageVersion)"/>
2423
<PackageReference Update="Microsoft.ProjectReunion.InteractiveExperiences.TransportPackage" Version="$(IxpTransportPackageVersion)"/>
2524
<PackageReference Update="Microsoft.Web.WebView2" Version="$(WebView2Version)" GeneratePathProperty="true" />
2625
<PackageReference Update="Microsoft.SourceLink.AzureRepos.Git" Version="$(MicrosoftSourceLinkAzureReposVersion)" GeneratePathProperty="true"/>

src/controls/dev/CommonStyles/MenuFlyout_themeresources.xaml

Lines changed: 145 additions & 0 deletions
Large diffs are not rendered by default.

src/controls/dev/SystemBackdropHost/SystemBackdropHost.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ void SystemBackdropHost::OnPropertyChanged(const winrt::DependencyPropertyChange
4545

4646
if (oldSystemBackdrop)
4747
{
48-
oldSystemBackdrop.OnTargetDisconnected(m_backdropLink);
48+
if (m_backdropLink)
49+
{
50+
oldSystemBackdrop.OnTargetDisconnected(m_backdropLink);
51+
}
4952
m_registeredWithSystemBackdrop = false;
5053
}
5154

@@ -57,6 +60,7 @@ void SystemBackdropHost::OnPropertyChanged(const winrt::DependencyPropertyChange
5760
}
5861
else
5962
{
63+
// Clean up composition resources when backdrop is set to null
6064
if (m_backdropLink)
6165
{
6266
winrt::Microsoft::UI::Xaml::Hosting::ElementCompositionPreview::SetElementChildVisual(*this, nullptr);
@@ -197,7 +201,7 @@ void SystemBackdropHost::TryConnectSystemBackdrop()
197201

198202
void SystemBackdropHost::ReleaseCompositionResources()
199203
{
200-
if (m_systemBackdrop)
204+
if (m_systemBackdrop && m_backdropLink)
201205
{
202206
m_systemBackdrop.OnTargetDisconnected(m_backdropLink);
203207
}

src/controls/dev/WebView2/InteractionTests/WebView2Tests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ public void MouseXButton2ClickTest()
576576

577577
[TestMethod]
578578
[TestProperty("TestSuite", "A")]
579+
[TestProperty("Ignore", "True")] // Task 59972452: [WinUI] Reenable - WebView2Tests.MouseWheelScrollTest Test in pipeline
579580
public void MouseWheelScrollTest()
580581
{
581582
using (var setup = new WebView2TestSetupHelper(new[] { "WebView2 Tests", "navigateToBasicWebView2" }))

src/dxaml/xcp/components/comptree/DCompPropertyChangedListener.cpp

Lines changed: 81 additions & 56 deletions
Large diffs are not rendered by default.

src/dxaml/xcp/components/comptree/DCompTreeHost.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include "precomp.h"
55
#include "DCompTreeHost.h"
6-
#include <touchtelemetry.h>
76
#include <RuntimeEnabledFeatures.h>
87
#include <DependencyLocator.h>
98
#include <windows.applicationmodel.core.h>

src/dxaml/xcp/components/comptree/inc/DCompPropertyChangedListener.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55

66
#include <NamespaceAliases.h>
77
#include <microsoft.ui.composition.h>
8-
#include <microsoft.ui.composition.experimental.h>
8+
#include "ExpCompositionPropertyChanged.h"
99

1010
class CUIElement;
1111

1212
// Listens to a UIElement HandOff visual's DComp property changes. When the app changes the
1313
// the DComp properties using WUComp::IVisual, the corresponding hit-test
1414
// transforms are changed.
1515
class DCompPropertyChangedListener :
16-
public wrl::RuntimeClass<ixp::IExpCompositionPropertyChangedListener>
16+
public wrl::RuntimeClass<ExpComp::IExpCompositionPropertyChangedListener>
1717
{
1818
InspectableClass(nullptr /* this class is internal */, BaseTrust);
1919

@@ -31,46 +31,46 @@ class DCompPropertyChangedListener :
3131
// IExpCompositionPropertyChangedListener
3232
IFACEMETHOD(NotifyColorPropertyChanged)(
3333
ixp::ICompositionObject* pTarget,
34-
ixp::ExpExpressionNotificationProperty propertyId,
34+
ExpComp::ExpExpressionNotificationProperty propertyId,
3535
wu::Color value);
3636

3737
IFACEMETHOD(NotifyMatrix3x2PropertyChanged)(
3838
ixp::ICompositionObject* pTarget,
39-
ixp::ExpExpressionNotificationProperty propertyId,
39+
ExpComp::ExpExpressionNotificationProperty propertyId,
4040
wfn::Matrix3x2 value);
4141

4242
IFACEMETHOD(NotifyMatrix4x4PropertyChanged)(
4343
ixp::ICompositionObject* pTarget,
44-
ixp::ExpExpressionNotificationProperty propertyId,
44+
ExpComp::ExpExpressionNotificationProperty propertyId,
4545
wfn::Matrix4x4 value);
4646

4747
IFACEMETHOD(NotifyReferencePropertyChanged)(
4848
ixp::ICompositionObject* pTarget,
49-
ixp::ExpExpressionNotificationProperty propertyId);
49+
ExpComp::ExpExpressionNotificationProperty propertyId);
5050

5151
IFACEMETHOD(NotifySinglePropertyChanged)(
5252
ixp::ICompositionObject* pTarget,
53-
ixp::ExpExpressionNotificationProperty propertyId,
53+
ExpComp::ExpExpressionNotificationProperty propertyId,
5454
float value);
5555

5656
IFACEMETHOD(NotifyVector2PropertyChanged)(
5757
ixp::ICompositionObject* pTarget,
58-
ixp::ExpExpressionNotificationProperty propertyId,
58+
ExpComp::ExpExpressionNotificationProperty propertyId,
5959
wfn::Vector2 value);
6060

6161
IFACEMETHOD(NotifyVector3PropertyChanged)(
6262
ixp::ICompositionObject* pTarget,
63-
ixp::ExpExpressionNotificationProperty propertyId,
63+
ExpComp::ExpExpressionNotificationProperty propertyId,
6464
wfn::Vector3 value);
6565

6666
IFACEMETHOD(NotifyVector4PropertyChanged)(
6767
ixp::ICompositionObject* pTarget,
68-
ixp::ExpExpressionNotificationProperty propertyId,
68+
ExpComp::ExpExpressionNotificationProperty propertyId,
6969
wfn::Vector4 value);
7070

7171
IFACEMETHOD(NotifyBooleanPropertyChanged)(
7272
ixp::ICompositionObject* pTarget,
73-
ixp::ExpExpressionNotificationProperty propertyId,
73+
ExpComp::ExpExpressionNotificationProperty propertyId,
7474
boolean value);
7575

7676
void ForceUpdateFromLayoutOffset();
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See LICENSE in the project root for license information.
3+
4+
#pragma once
5+
6+
#include <NamespaceAliases.h>
7+
#include <microsoft.ui.composition.h>
8+
9+
namespace ExpComp
10+
{
11+
// The enum and interfaces below are exact copies of the same enum/interfaces from the
12+
// Microsoft::UI::Composition::Experimental namespace. Ideally WinUI wouldn't depend
13+
// on experimental APIs, but some functionality depends on these APIs and these APIs
14+
// are not on a path to become stable/non-experimental APIs (because the API shape is
15+
// very undesirable and doesn't have a clear alternative which is both better and still
16+
// good for runtime performance).
17+
//
18+
// To ensure WinUI can build even on non-experimental builds, copy in these required
19+
// definitions. DCompPropertyChangedListener.cpp has some static_assert checks to catch
20+
// if the interfaces ever change (which is not anticpated).
21+
22+
// Copied from "microsoft.ui.composition.experimental.h":
23+
24+
enum ExpExpressionNotificationProperty : int
25+
{
26+
ExpExpressionNotificationProperty_Undefined = 0,
27+
ExpExpressionNotificationProperty_Clip = 1,
28+
ExpExpressionNotificationProperty_Offset = 2,
29+
ExpExpressionNotificationProperty_Opacity = 3,
30+
ExpExpressionNotificationProperty_Size = 4,
31+
ExpExpressionNotificationProperty_RelativeOffset = 5,
32+
ExpExpressionNotificationProperty_RelativeSize = 6,
33+
ExpExpressionNotificationProperty_AnchorPoint = 7,
34+
ExpExpressionNotificationProperty_CenterPoint = 8,
35+
ExpExpressionNotificationProperty_Orientation = 9,
36+
ExpExpressionNotificationProperty_RotationAngle = 10,
37+
ExpExpressionNotificationProperty_RotationAxis = 11,
38+
ExpExpressionNotificationProperty_Scale = 12,
39+
ExpExpressionNotificationProperty_TransformMatrix = 13,
40+
ExpExpressionNotificationProperty_BottomInset = 14,
41+
ExpExpressionNotificationProperty_LeftInset = 15,
42+
ExpExpressionNotificationProperty_RightInset = 16,
43+
ExpExpressionNotificationProperty_TopInset = 17,
44+
ExpExpressionNotificationProperty_LeftRadiusX = 18,
45+
ExpExpressionNotificationProperty_LeftRadiusY = 19,
46+
ExpExpressionNotificationProperty_BottomRightRadiusX = 20,
47+
ExpExpressionNotificationProperty_BottomRightRadiusY = 21,
48+
ExpExpressionNotificationProperty_TopLeftRadiusX = 22,
49+
ExpExpressionNotificationProperty_TopLeftRadiusY = 23,
50+
ExpExpressionNotificationProperty_TopRightRadiusX = 24,
51+
ExpExpressionNotificationProperty_TopRightRadiusY = 25,
52+
};
53+
54+
MIDL_INTERFACE("5f9c3d96-1e77-5980-8b28-7a9b8614a863")
55+
IExpCompositionPropertyChangedListener : public IInspectable
56+
{
57+
public:
58+
virtual HRESULT STDMETHODCALLTYPE NotifyBooleanPropertyChanged(
59+
ABI::Microsoft::UI::Composition::ICompositionObject* target,
60+
ExpComp::ExpExpressionNotificationProperty property,
61+
boolean value
62+
) = 0;
63+
virtual HRESULT STDMETHODCALLTYPE NotifyColorPropertyChanged(
64+
ABI::Microsoft::UI::Composition::ICompositionObject* target,
65+
ExpComp::ExpExpressionNotificationProperty property,
66+
ABI::Windows::UI::Color value
67+
) = 0;
68+
virtual HRESULT STDMETHODCALLTYPE NotifyMatrix3x2PropertyChanged(
69+
ABI::Microsoft::UI::Composition::ICompositionObject* target,
70+
ExpComp::ExpExpressionNotificationProperty property,
71+
ABI::Windows::Foundation::Numerics::Matrix3x2 value
72+
) = 0;
73+
virtual HRESULT STDMETHODCALLTYPE NotifyMatrix4x4PropertyChanged(
74+
ABI::Microsoft::UI::Composition::ICompositionObject* target,
75+
ExpComp::ExpExpressionNotificationProperty property,
76+
ABI::Windows::Foundation::Numerics::Matrix4x4 value
77+
) = 0;
78+
virtual HRESULT STDMETHODCALLTYPE NotifyReferencePropertyChanged(
79+
ABI::Microsoft::UI::Composition::ICompositionObject* target,
80+
ExpComp::ExpExpressionNotificationProperty property
81+
) = 0;
82+
virtual HRESULT STDMETHODCALLTYPE NotifySinglePropertyChanged(
83+
ABI::Microsoft::UI::Composition::ICompositionObject* target,
84+
ExpComp::ExpExpressionNotificationProperty property,
85+
FLOAT value
86+
) = 0;
87+
virtual HRESULT STDMETHODCALLTYPE NotifyVector2PropertyChanged(
88+
ABI::Microsoft::UI::Composition::ICompositionObject* target,
89+
ExpComp::ExpExpressionNotificationProperty property,
90+
ABI::Windows::Foundation::Numerics::Vector2 value
91+
) = 0;
92+
virtual HRESULT STDMETHODCALLTYPE NotifyVector3PropertyChanged(
93+
ABI::Microsoft::UI::Composition::ICompositionObject* target,
94+
ExpComp::ExpExpressionNotificationProperty property,
95+
ABI::Windows::Foundation::Numerics::Vector3 value
96+
) = 0;
97+
virtual HRESULT STDMETHODCALLTYPE NotifyVector4PropertyChanged(
98+
ABI::Microsoft::UI::Composition::ICompositionObject* target,
99+
ExpComp::ExpExpressionNotificationProperty property,
100+
ABI::Windows::Foundation::Numerics::Vector4 value
101+
) = 0;
102+
};
103+
104+
MIDL_INTERFACE("12b579a9-6a27-5cde-a2a1-c557bb7dfdb3")
105+
IExpCompositionPropertyChanged : public IInspectable
106+
{
107+
public:
108+
virtual HRESULT STDMETHODCALLTYPE SetPropertyChangedListener(
109+
ExpComp::ExpExpressionNotificationProperty property,
110+
ExpComp::IExpCompositionPropertyChangedListener* listener
111+
) = 0;
112+
};
113+
}

src/dxaml/xcp/components/elements/PropertySetListener.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ bool FacadePropertyMapper::EstablishMappingForFacadeID(KnownPropertyIndex facade
3131
}
3232

3333
// Maps a DComp propertyID to a facadeID
34-
KnownPropertyIndex FacadePropertyMapper::GetFacadeID(ixp::ExpExpressionNotificationProperty propertyID) const
34+
KnownPropertyIndex FacadePropertyMapper::GetFacadeID(ExpComp::ExpExpressionNotificationProperty propertyID) const
3535
{
3636
ASSERT(propertyID < static_cast<int>(m_facadeIDs.size()));
3737

@@ -88,9 +88,9 @@ void PropertySetListener::OnAnimationStarted(
8888
// There is a delay before we hear back about the initial value. Pre-populate our shadow property with current value now.
8989
PopulateAnimatedPropertyWithCurrentValue(facadeID);
9090

91-
wrl::ComPtr<ixp::IExpCompositionPropertyChanged> notifier;
91+
wrl::ComPtr<ExpComp::IExpCompositionPropertyChanged> notifier;
9292
VERIFYHR(backingPropertySet->QueryInterface(IID_PPV_ARGS(&notifier)));
93-
IFCFAILFAST(notifier->SetPropertyChangedListener(static_cast<ixp::ExpExpressionNotificationProperty>(m_propertyMapper.GetPropertyID(facadeID)), this));
93+
IFCFAILFAST(notifier->SetPropertyChangedListener(static_cast<ExpComp::ExpExpressionNotificationProperty>(m_propertyMapper.GetPropertyID(facadeID)), this));
9494
}
9595
}
9696

@@ -101,9 +101,9 @@ void PropertySetListener::OnAnimationCompleted(
101101
{
102102
if (ShouldTrackFacadeProperty(facadeID))
103103
{
104-
wrl::ComPtr<ixp::IExpCompositionPropertyChanged> notifier;
104+
wrl::ComPtr<ExpComp::IExpCompositionPropertyChanged> notifier;
105105
VERIFYHR(backingPropertySet->QueryInterface(IID_PPV_ARGS(&notifier)));
106-
IFCFAILFAST(notifier->SetPropertyChangedListener(static_cast<ixp::ExpExpressionNotificationProperty>(m_propertyMapper.GetPropertyID(facadeID)), nullptr));
106+
IFCFAILFAST(notifier->SetPropertyChangedListener(static_cast<ExpComp::ExpExpressionNotificationProperty>(m_propertyMapper.GetPropertyID(facadeID)), nullptr));
107107
}
108108
}
109109

@@ -147,7 +147,7 @@ void PropertySetListener::PopulateAnimatedPropertyWithCurrentValue(KnownProperty
147147

148148
IFACEMETHODIMP PropertySetListener::NotifySinglePropertyChanged(
149149
ixp::ICompositionObject* target,
150-
ixp::ExpExpressionNotificationProperty propertyId,
150+
ExpComp::ExpExpressionNotificationProperty propertyId,
151151
float value)
152152
{
153153
KnownPropertyIndex facadeID = m_propertyMapper.GetFacadeID(propertyId);
@@ -169,15 +169,15 @@ IFACEMETHODIMP PropertySetListener::NotifySinglePropertyChanged(
169169

170170
IFACEMETHODIMP PropertySetListener::NotifyVector2PropertyChanged(
171171
ixp::ICompositionObject* pTarget,
172-
ixp::ExpExpressionNotificationProperty propertyId,
172+
ExpComp::ExpExpressionNotificationProperty propertyId,
173173
wfn::Vector2 value)
174174
{
175175
return S_OK;
176176
}
177177

178178
IFACEMETHODIMP PropertySetListener::NotifyVector3PropertyChanged(
179179
ixp::ICompositionObject* pTarget,
180-
ixp::ExpExpressionNotificationProperty propertyId,
180+
ExpComp::ExpExpressionNotificationProperty propertyId,
181181
wfn::Vector3 value)
182182
{
183183
KnownPropertyIndex facadeID = m_propertyMapper.GetFacadeID(propertyId);
@@ -208,31 +208,31 @@ IFACEMETHODIMP PropertySetListener::NotifyVector3PropertyChanged(
208208

209209
IFACEMETHODIMP PropertySetListener::NotifyVector4PropertyChanged(
210210
ixp::ICompositionObject* pTarget,
211-
ixp::ExpExpressionNotificationProperty propertyId,
211+
ExpComp::ExpExpressionNotificationProperty propertyId,
212212
wfn::Vector4 value)
213213
{
214214
return S_OK;
215215
}
216216

217217
IFACEMETHODIMP PropertySetListener::NotifyColorPropertyChanged(
218218
ixp::ICompositionObject* pTarget,
219-
ixp::ExpExpressionNotificationProperty propertyId,
219+
ExpComp::ExpExpressionNotificationProperty propertyId,
220220
wu::Color value)
221221
{
222222
return S_OK;
223223
}
224224

225225
IFACEMETHODIMP PropertySetListener::NotifyMatrix3x2PropertyChanged(
226226
ixp::ICompositionObject* target,
227-
ixp::ExpExpressionNotificationProperty propertyId,
227+
ExpComp::ExpExpressionNotificationProperty propertyId,
228228
wfn::Matrix3x2 value)
229229
{
230230
return S_OK;
231231
}
232232

233233
IFACEMETHODIMP PropertySetListener::NotifyMatrix4x4PropertyChanged(
234234
ixp::ICompositionObject *pTarget,
235-
ixp::ExpExpressionNotificationProperty propertyId,
235+
ExpComp::ExpExpressionNotificationProperty propertyId,
236236
wfn::Matrix4x4 value)
237237
{
238238
wfn::Matrix4x4 valueMatrix4x4 = *reinterpret_cast<wfn::Matrix4x4*>(&value);
@@ -256,15 +256,15 @@ IFACEMETHODIMP PropertySetListener::NotifyMatrix4x4PropertyChanged(
256256

257257
IFACEMETHODIMP PropertySetListener::NotifyBooleanPropertyChanged(
258258
ixp::ICompositionObject* target,
259-
ixp::ExpExpressionNotificationProperty propertyId,
259+
ExpComp::ExpExpressionNotificationProperty propertyId,
260260
boolean value)
261261
{
262262
return S_OK;
263263
}
264264

265265
IFACEMETHODIMP PropertySetListener::NotifyReferencePropertyChanged(
266266
ixp::ICompositionObject* pTarget,
267-
ixp::ExpExpressionNotificationProperty propertyId)
267+
ExpComp::ExpExpressionNotificationProperty propertyId)
268268
{
269269
return S_OK;
270270
}

0 commit comments

Comments
 (0)