react-native-windows 0.81.13 → 0.81.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/Common/Common.vcxproj +1 -1
  2. package/Folly/Folly.vcxproj +1 -1
  3. package/Libraries/Modal/Modal.windows.js +1 -7
  4. package/Microsoft.ReactNative/Fabric/Composition/BorderPrimitive.cpp +73 -97
  5. package/Microsoft.ReactNative/Fabric/Composition/BorderPrimitive.h +4 -1
  6. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +58 -21
  7. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +253 -58
  8. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +18 -4
  9. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +149 -27
  10. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +10 -0
  11. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +5 -0
  12. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +2 -0
  13. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +3 -1
  14. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +4 -6
  15. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +101 -44
  16. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +4 -2
  17. package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +3 -3
  18. package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.h +3 -1
  19. package/Microsoft.ReactNative/Fabric/WindowsImageManager.cpp +0 -1
  20. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +3 -0
  21. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/WindowsTextLayoutManager.cpp +2 -7
  22. package/Microsoft.ReactNative/IReactPackageBuilder.idl +5 -0
  23. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +2 -2
  24. package/Microsoft.ReactNative/Modules/Animated/AnimatedNode.cpp +3 -3
  25. package/Microsoft.ReactNative/Modules/Animated/AnimatedNode.h +3 -2
  26. package/Microsoft.ReactNative/Modules/Timing.h +2 -1
  27. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +2 -0
  28. package/Microsoft.ReactNative/ReactPackageBuilder.cpp +7 -0
  29. package/Microsoft.ReactNative/ReactPackageBuilder.h +1 -0
  30. package/Microsoft.ReactNative/TurboModulesProvider.cpp +5 -10
  31. package/Microsoft.ReactNative/TurboModulesProvider.h +2 -0
  32. package/Microsoft.ReactNative.Cxx/ModuleRegistration.cpp +8 -2
  33. package/Microsoft.ReactNative.Cxx/ModuleRegistration.h +17 -4
  34. package/Microsoft.ReactNative.Cxx/NativeModules.h +5 -0
  35. package/PropertySheets/External/Microsoft.ReactNative.Composition.CppApp.targets +2 -2
  36. package/PropertySheets/External/Microsoft.ReactNative.Composition.CppLib.targets +2 -2
  37. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.targets +1 -1
  38. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.targets +1 -1
  39. package/PropertySheets/Generated/PackageVersion.g.props +3 -3
  40. package/PropertySheets/JSEngine.props +2 -1
  41. package/PropertySheets/WinUI.props +3 -3
  42. package/ReactCommon/ReactCommon.vcxproj +1 -1
  43. package/Scripts/OfficeReact.Win32.nuspec +44 -44
  44. package/Scripts/Tfs/Invoke-WebRequestWithRetry.ps1 +40 -0
  45. package/Scripts/Tfs/Layout-Desktop-Headers.ps1 +1 -15
  46. package/Shared/Shared.vcxitems.filters +2 -2
  47. package/package.json +1 -1
  48. package/Scripts/OpenSSL.nuspec +0 -39
  49. package/Scripts/OpenSSL.targets +0 -36
@@ -6,6 +6,8 @@
6
6
 
7
7
  #include "CompositionViewComponentView.h"
8
8
 
9
+ #include <vector>
10
+
9
11
  #include <AutoDraw.h>
10
12
  #include <Fabric/AbiState.h>
11
13
  #include <Fabric/AbiViewProps.h>
@@ -38,9 +40,11 @@ constexpr float FOCUS_VISUAL_RADIUS = 3.0f;
38
40
 
39
41
  // m_outerVisual
40
42
  // |
41
- // ----- m_visual <-- Background / clip - Can be a custom visual depending on Component type
43
+ // ----- m_visual - Can be a custom visual depending on Component type
42
44
  // |
43
- // ----- Border Visuals x N (BorderPrimitive attached to m_visual)
45
+ // ----- m_backgroundVisual <-- Background / clip (ComponentViewFeatures::Background)
46
+ // ----- Border Visuals x N (BorderPrimitive attached to m_visual) (ComponentViewFeatures::NativeBorder)
47
+ // ----- Outline Visuals x N(BorderPrimitive) (ComponentViewFeatures::NativeBorder)
44
48
  // ----- <children> (default: directly in m_visual after border visuals)
45
49
  // ----- m_childrenContainer (created on demand when overflow:hidden, children moved here)
46
50
  // ------Focus Visual Container (created when hosting focus visuals)
@@ -79,18 +83,16 @@ facebook::react::Props::Shared ComponentView::props() noexcept {
79
83
  }
80
84
 
81
85
  void ComponentView::onThemeChanged() noexcept {
82
- if ((m_flags & ComponentViewFeatures::Background) == ComponentViewFeatures::Background) {
83
- if (viewProps()->backgroundColor) {
84
- Visual().as<Experimental::ISpriteVisual>().Brush(theme()->Brush(*viewProps()->backgroundColor));
85
- } else {
86
- Visual().as<Experimental::ISpriteVisual>().Brush(nullptr);
87
- }
88
- }
86
+ if (m_backgroundVisual)
87
+ m_backgroundVisual.Brush(theme()->Brush(*viewProps()->backgroundColor));
89
88
 
90
89
  if (m_borderPrimitive) {
91
90
  m_borderPrimitive->onThemeChanged(
92
91
  m_layoutMetrics, BorderPrimitive::resolveAndAlignBorderMetrics(m_layoutMetrics, *viewProps()));
93
92
  }
93
+ if (m_outlinePrimitive) {
94
+ m_outlinePrimitive->onThemeChanged(outlineLayoutMetrics(), outlineBorderMetrics());
95
+ }
94
96
  if (m_componentHostingFocusVisual) {
95
97
  if (m_componentHostingFocusVisual->m_focusPrimitive->m_focusInnerPrimitive) {
96
98
  auto innerFocusMetrics = focusLayoutMetrics(true /*inner*/);
@@ -154,10 +156,18 @@ void ComponentView::updateProps(
154
156
 
155
157
  if ((m_flags & ComponentViewFeatures::Background) == ComponentViewFeatures::Background) {
156
158
  if (oldViewProps.backgroundColor != newViewProps.backgroundColor) {
157
- if (newViewProps.backgroundColor) {
158
- Visual().as<Experimental::ISpriteVisual>().Brush(theme()->Brush(*newViewProps.backgroundColor));
159
+ if (facebook::react::isColorMeaningful(newViewProps.backgroundColor)) {
160
+ if (!m_backgroundVisual) {
161
+ m_backgroundVisual = m_compContext.CreateSpriteVisual();
162
+ m_backgroundVisual.RelativeSizeWithOffset({0, 0}, {1.0f, 1.0f});
163
+ Visual().InsertAt(m_backgroundVisual, 0);
164
+ }
165
+ m_backgroundVisual.Brush(theme()->Brush(*newViewProps.backgroundColor));
166
+ updateClippingPath(m_layoutMetrics, *viewProps());
159
167
  } else {
160
- Visual().as<Experimental::ISpriteVisual>().Brush(nullptr);
168
+ if (m_backgroundVisual) {
169
+ m_backgroundVisual.Brush(nullptr);
170
+ }
161
171
  }
162
172
  }
163
173
  }
@@ -166,6 +176,16 @@ void ComponentView::updateProps(
166
176
  m_borderPrimitive->updateProps(oldViewProps, newViewProps);
167
177
  }
168
178
 
179
+ if (m_outlinePrimitive) {
180
+ if (oldViewProps.outlineOffset != newViewProps.outlineOffset ||
181
+ oldViewProps.outlineWidth != newViewProps.outlineWidth ||
182
+ oldViewProps.borderRadii != newViewProps.borderRadii ||
183
+ oldViewProps.outlineColor != newViewProps.outlineColor ||
184
+ oldViewProps.outlineStyle != newViewProps.outlineStyle) {
185
+ m_outlinePrimitive->markNeedsUpdate();
186
+ }
187
+ }
188
+
169
189
  if (m_componentHostingFocusVisual) {
170
190
  if (!newViewProps.enableFocusRing) {
171
191
  m_componentHostingFocusVisual->hostFocusVisual(false, get_strong());
@@ -200,8 +220,9 @@ void ComponentView::updateProps(
200
220
  void ComponentView::updateLayoutMetrics(
201
221
  facebook::react::LayoutMetrics const &layoutMetrics,
202
222
  facebook::react::LayoutMetrics const &oldLayoutMetrics) noexcept {
223
+ updateClippingPath(layoutMetrics, *viewProps());
224
+
203
225
  if ((m_flags & ComponentViewFeatures::NativeBorder) == ComponentViewFeatures::NativeBorder) {
204
- updateClippingPath(layoutMetrics, *viewProps());
205
226
  OuterVisual().Size(
206
227
  {layoutMetrics.frame.size.width * layoutMetrics.pointScaleFactor,
207
228
  layoutMetrics.frame.size.height * layoutMetrics.pointScaleFactor});
@@ -218,6 +239,9 @@ void ComponentView::updateLayoutMetrics(
218
239
  if (m_borderPrimitive) {
219
240
  m_borderPrimitive->markNeedsUpdate();
220
241
  }
242
+ if (m_outlinePrimitive) {
243
+ m_outlinePrimitive->markNeedsUpdate();
244
+ }
221
245
 
222
246
  if (m_componentHostingFocusVisual) {
223
247
  m_componentHostingFocusVisual->updateFocusLayoutMetrics();
@@ -301,6 +325,23 @@ void ComponentView::FinalizeUpdates(winrt::Microsoft::ReactNative::ComponentView
301
325
  if (m_borderPrimitive) {
302
326
  m_borderPrimitive->finalize(m_layoutMetrics, borderMetrics);
303
327
  }
328
+
329
+ auto outlineMetrics = outlineBorderMetrics();
330
+ if (!m_outlinePrimitive && BorderPrimitive::requiresBorder(outlineMetrics, theme())) {
331
+ m_outlinePrimitive = std::make_shared<BorderPrimitive>(*this);
332
+ Visual().InsertAt(
333
+ m_outlinePrimitive->RootVisual(),
334
+ (m_backgroundVisual ? 1 : 0) + (m_borderPrimitive ? m_borderPrimitive->numberOfVisuals() : 0));
335
+ }
336
+
337
+ if (m_outlinePrimitive) {
338
+ auto offset = pixelRoundAndScaleBorderWidth(viewProps()->outlineWidth, m_layoutMetrics.pointScaleFactor) +
339
+ std::round(viewProps()->outlineOffset * m_layoutMetrics.pointScaleFactor);
340
+ m_outlinePrimitive->RootVisual().Offset({-offset, -offset, 0.0f});
341
+ m_outlinePrimitive->RootVisual().RelativeSizeWithOffset({offset * 2, offset * 2}, {1.0f, 1.0f});
342
+
343
+ m_outlinePrimitive->finalize(outlineLayoutMetrics(), outlineMetrics);
344
+ }
304
345
  }
305
346
 
306
347
  if (m_componentHostingFocusVisual) {
@@ -581,6 +622,67 @@ facebook::react::LayoutMetrics ComponentView::focusLayoutMetrics(bool inner) con
581
622
  return layoutMetrics;
582
623
  }
583
624
 
625
+ facebook::react::LayoutMetrics ComponentView::outlineLayoutMetrics() const noexcept {
626
+ auto &props = *viewProps();
627
+ auto offset = (pixelRoundAndScaleBorderWidth(viewProps()->outlineWidth, m_layoutMetrics.pointScaleFactor) +
628
+ std::round(viewProps()->outlineOffset * m_layoutMetrics.pointScaleFactor)) /
629
+ m_layoutMetrics.pointScaleFactor;
630
+ facebook::react::LayoutMetrics layoutMetrics = m_layoutMetrics;
631
+ layoutMetrics.frame.origin.x -= offset;
632
+ layoutMetrics.frame.origin.y -= offset;
633
+ layoutMetrics.frame.size.height += offset * 2;
634
+ layoutMetrics.frame.size.width += offset * 2;
635
+ return layoutMetrics;
636
+ }
637
+
638
+ facebook::react::BorderMetrics ComponentView::outlineBorderMetrics() const noexcept {
639
+ auto &props = *viewProps();
640
+
641
+ facebook::react::BorderMetrics metrics = BorderPrimitive::resolveAndAlignBorderMetrics(m_layoutMetrics, props);
642
+ metrics.borderColors.bottom = metrics.borderColors.left = metrics.borderColors.right = metrics.borderColors.top =
643
+ props.outlineColor;
644
+
645
+ auto offset = pixelRoundAndScaleBorderWidth(viewProps()->outlineWidth, m_layoutMetrics.pointScaleFactor) +
646
+ std::round(viewProps()->outlineOffset * m_layoutMetrics.pointScaleFactor);
647
+
648
+ if (metrics.borderRadii.bottomLeft.horizontal)
649
+ metrics.borderRadii.bottomLeft.horizontal = std::max(0.0f, metrics.borderRadii.bottomLeft.horizontal + offset);
650
+ if (metrics.borderRadii.bottomLeft.vertical)
651
+ metrics.borderRadii.bottomLeft.vertical = std::max(0.0f, metrics.borderRadii.bottomLeft.vertical + offset);
652
+ if (metrics.borderRadii.bottomRight.horizontal)
653
+ metrics.borderRadii.bottomRight.horizontal = std::max(0.0f, metrics.borderRadii.bottomRight.horizontal + offset);
654
+ if (metrics.borderRadii.bottomRight.vertical)
655
+ metrics.borderRadii.bottomRight.vertical = std::max(0.0f, metrics.borderRadii.bottomRight.vertical + offset);
656
+ if (metrics.borderRadii.topLeft.horizontal)
657
+ metrics.borderRadii.topLeft.horizontal = std::max(0.0f, metrics.borderRadii.topLeft.horizontal + offset);
658
+ if (metrics.borderRadii.topLeft.vertical)
659
+ metrics.borderRadii.topLeft.vertical = std::max(0.0f, metrics.borderRadii.topLeft.vertical + offset);
660
+ if (metrics.borderRadii.topRight.horizontal)
661
+ metrics.borderRadii.topRight.horizontal = std::max(0.0f, metrics.borderRadii.topRight.horizontal + offset);
662
+ if (metrics.borderRadii.topRight.vertical)
663
+ metrics.borderRadii.topRight.vertical = std::max(0.0f, metrics.borderRadii.topRight.vertical + offset);
664
+
665
+ static_assert(
666
+ facebook::react::BorderStyle::Solid ==
667
+ static_cast<facebook::react::BorderStyle>(facebook::react::OutlineStyle::Solid));
668
+ static_assert(
669
+ facebook::react::BorderStyle::Dotted ==
670
+ static_cast<facebook::react::BorderStyle>(facebook::react::OutlineStyle::Dotted));
671
+ static_assert(
672
+ facebook::react::BorderStyle::Dashed ==
673
+ static_cast<facebook::react::BorderStyle>(facebook::react::OutlineStyle::Dashed));
674
+ assert(
675
+ props.outlineStyle == facebook::react::OutlineStyle::Solid ||
676
+ props.outlineStyle == facebook::react::OutlineStyle::Dotted ||
677
+ props.outlineStyle == facebook::react::OutlineStyle::Dashed);
678
+ metrics.borderStyles.bottom = metrics.borderStyles.left = metrics.borderStyles.right = metrics.borderStyles.top =
679
+ static_cast<facebook::react::BorderStyle>(props.outlineStyle);
680
+
681
+ metrics.borderWidths.bottom = metrics.borderWidths.left = metrics.borderWidths.right = metrics.borderWidths.top =
682
+ pixelRoundAndScaleBorderWidth(viewProps()->outlineWidth, m_layoutMetrics.pointScaleFactor);
683
+ return metrics;
684
+ }
685
+
584
686
  facebook::react::BorderMetrics ComponentView::focusBorderMetrics(
585
687
  bool inner,
586
688
  const facebook::react::LayoutMetrics &layoutMetrics) const noexcept {
@@ -654,7 +756,7 @@ void ComponentView::hostFocusVisual(bool show, winrt::com_ptr<ComponentView> vie
654
756
  assert(
655
757
  view.get() ==
656
758
  this); // When not using lifted comp, focus visuals should always host within their own component
657
- OuterVisual().InsertAt(m_focusPrimitive->m_focusVisual, 1);
759
+ OuterVisual().InsertAt(m_focusPrimitive->m_focusVisual, (m_backgroundVisual ? 2 : 1));
658
760
  }
659
761
  }
660
762
 
@@ -898,9 +1000,23 @@ void ComponentView::Toggle() noexcept {
898
1000
  // no-op
899
1001
  }
900
1002
 
1003
+ // This offset ensures that the m_borderPrimitive inserts its layers above the background
1004
+ int32_t ComponentView::borderInsertAtIndex() const noexcept {
1005
+ return m_backgroundVisual ? 1 : 0;
1006
+ }
1007
+
1008
+ winrt::Microsoft::ReactNative::Composition::Experimental::IVisual ComponentView::VisualToApplyBackgroundClipTo()
1009
+ const noexcept {
1010
+ return m_backgroundVisual;
1011
+ }
1012
+
901
1013
  void ComponentView::updateClippingPath(
902
1014
  facebook::react::LayoutMetrics const &layoutMetrics,
903
1015
  const facebook::react::ViewProps &viewProps) noexcept {
1016
+ auto clipTarget = VisualToApplyBackgroundClipTo();
1017
+ if (!clipTarget)
1018
+ return;
1019
+
904
1020
  auto borderMetrics = BorderPrimitive::resolveAndAlignBorderMetrics(layoutMetrics, viewProps);
905
1021
 
906
1022
  bool hasRoundedCorners = borderMetrics.borderRadii.topLeft.horizontal != 0 ||
@@ -919,10 +1035,10 @@ void ComponentView::updateClippingPath(
919
1035
  winrt::com_ptr<ID2D1PathGeometry> pathGeometry = BorderPrimitive::GenerateRoundedRectPathGeometry(
920
1036
  m_compContext, borderMetrics.borderRadii, {0, 0, 0, 0}, {0, 0, viewWidth, viewHeight});
921
1037
 
922
- Visual().as<::Microsoft::ReactNative::Composition::Experimental::IVisualInterop>()->SetClippingPath(
1038
+ clipTarget.as<::Microsoft::ReactNative::Composition::Experimental::IVisualInterop>()->SetClippingPath(
923
1039
  pathGeometry.get());
924
1040
  } else {
925
- Visual().as<::Microsoft::ReactNative::Composition::Experimental::IVisualInterop>()->SetClippingPath(nullptr);
1041
+ clipTarget.as<::Microsoft::ReactNative::Composition::Experimental::IVisualInterop>()->SetClippingPath(nullptr);
926
1042
  }
927
1043
  }
928
1044
 
@@ -934,6 +1050,9 @@ void ComponentView::indexOffsetForBorder(uint32_t &index) const noexcept {
934
1050
  if (m_borderPrimitive) {
935
1051
  index += m_borderPrimitive->numberOfVisuals();
936
1052
  }
1053
+ if (m_outlinePrimitive) {
1054
+ index += 1;
1055
+ }
937
1056
  }
938
1057
 
939
1058
  void ComponentView::OnRenderingDeviceLost() noexcept {}
@@ -1015,15 +1134,18 @@ bool ComponentView::anyHitTestHelper(
1015
1134
  facebook::react::Tag &targetTag,
1016
1135
  facebook::react::Point &ptContent,
1017
1136
  facebook::react::Point &localPt) const noexcept {
1018
- if (auto index = m_children.Size()) {
1019
- do {
1020
- index--;
1021
- targetTag = winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(m_children.GetAt(index))
1022
- ->hitTest(ptContent, localPt);
1023
- if (targetTag != -1) {
1024
- return true;
1025
- }
1026
- } while (index != 0);
1137
+ auto size = m_children.Size();
1138
+ if (size == 0) {
1139
+ return false;
1140
+ }
1141
+
1142
+ // m_children is backed by single_threaded_vector (std::vector), so GetAt is O(1)
1143
+ for (uint32_t i = size; i > 0; --i) {
1144
+ targetTag = winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(m_children.GetAt(i - 1))
1145
+ ->hitTest(ptContent, localPt);
1146
+ if (targetTag != -1) {
1147
+ return true;
1148
+ }
1027
1149
  }
1028
1150
 
1029
1151
  return false;
@@ -1081,7 +1203,7 @@ void ViewComponentView::ensureVisual() noexcept {
1081
1203
  } else {
1082
1204
  m_visual = createVisual();
1083
1205
  }
1084
- OuterVisual().InsertAt(m_visual, 0);
1206
+ OuterVisual().InsertAt(m_visual, m_backgroundVisual ? 1 : 0);
1085
1207
  }
1086
1208
  }
1087
1209
 
@@ -1379,7 +1501,7 @@ void ViewComponentView::updateChildrenClippingPath(
1379
1501
  }
1380
1502
 
1381
1503
  // Insert m_childrenContainer after border visuals in m_visual
1382
- Visual().InsertAt(m_childrenContainer, borderCount);
1504
+ Visual().InsertAt(m_childrenContainer, (m_backgroundVisual ? 1 : 0) + borderCount);
1383
1505
 
1384
1506
  // Use relative sizing so container automatically tracks parent's size
1385
1507
  m_childrenContainer.RelativeSizeWithOffset({0, 0}, {1, 1});
@@ -111,6 +111,9 @@ struct ComponentView : public ComponentViewT<
111
111
  bool getAcccessiblityIsReadOnly() noexcept override;
112
112
  ToggleState getToggleState() noexcept override;
113
113
  void Toggle() noexcept override;
114
+
115
+ int32_t borderInsertAtIndex() const noexcept;
116
+
114
117
  virtual winrt::Microsoft::ReactNative::implementation::ClipState getClipState() noexcept;
115
118
 
116
119
  virtual std::pair<facebook::react::Cursor, HCURSOR> cursor() const noexcept;
@@ -130,6 +133,8 @@ struct ComponentView : public ComponentViewT<
130
133
  void ThemeChanged(winrt::event_token const &token) noexcept;
131
134
 
132
135
  protected:
136
+ virtual winrt::Microsoft::ReactNative::Composition::Experimental::IVisual VisualToApplyBackgroundClipTo()
137
+ const noexcept;
133
138
  bool anyHitTestHelper(
134
139
  facebook::react::Tag &targetTag,
135
140
  facebook::react::Point &ptContent,
@@ -141,6 +146,7 @@ struct ComponentView : public ComponentViewT<
141
146
  winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext m_compContext;
142
147
  comp::CompositionPropertySet m_centerPropSet{nullptr};
143
148
  facebook::react::SharedViewEventEmitter m_eventEmitter;
149
+ winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual m_backgroundVisual{nullptr};
144
150
 
145
151
  private:
146
152
  void updateFocusLayoutMetrics() noexcept;
@@ -157,6 +163,9 @@ struct ComponentView : public ComponentViewT<
157
163
  facebook::react::BorderMetrics focusBorderMetrics(bool inner, const facebook::react::LayoutMetrics &layoutMetrics)
158
164
  const noexcept;
159
165
 
166
+ facebook::react::LayoutMetrics outlineLayoutMetrics() const noexcept;
167
+ facebook::react::BorderMetrics outlineBorderMetrics() const noexcept;
168
+
160
169
  virtual winrt::Microsoft::ReactNative::Composition::Experimental::IVisual visualToHostFocus() noexcept;
161
170
  virtual winrt::com_ptr<ComponentView> focusVisualRoot(const facebook::react::Rect &focusRect) noexcept;
162
171
 
@@ -168,6 +177,7 @@ struct ComponentView : public ComponentViewT<
168
177
  winrt::com_ptr<ComponentView>
169
178
  m_componentHostingFocusVisual; // The component that we are showing our focus visuals within
170
179
  std::shared_ptr<BorderPrimitive> m_borderPrimitive;
180
+ std::shared_ptr<BorderPrimitive> m_outlinePrimitive;
171
181
  std::unique_ptr<FocusPrimitive> m_focusPrimitive{nullptr};
172
182
  winrt::Microsoft::ReactNative::Composition::Experimental::IVisual m_outerVisual{nullptr};
173
183
  winrt::event<winrt::Windows::Foundation::EventHandler<winrt::IInspectable>> m_themeChangedEvent;
@@ -237,6 +237,11 @@ void ImageComponentView::onThemeChanged() noexcept {
237
237
  Super::onThemeChanged();
238
238
  }
239
239
 
240
+ winrt::Microsoft::ReactNative::Composition::Experimental::IVisual ImageComponentView::VisualToApplyBackgroundClipTo()
241
+ const noexcept {
242
+ return Visual();
243
+ }
244
+
240
245
  void ImageComponentView::ensureDrawingSurface() noexcept {
241
246
  assert(m_reactContext.UIDispatcher().HasThreadAccess());
242
247
 
@@ -53,6 +53,8 @@ struct ImageComponentView : ImageComponentViewT<ImageComponentView, ViewComponen
53
53
 
54
54
  virtual std::string DefaultControlType() const noexcept;
55
55
  static facebook::react::SharedViewProps defaultProps() noexcept;
56
+ winrt::Microsoft::ReactNative::Composition::Experimental::IVisual VisualToApplyBackgroundClipTo()
57
+ const noexcept override;
56
58
 
57
59
  ImageComponentView(
58
60
  const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
@@ -334,7 +334,9 @@ void ParagraphComponentView::updateVisualBrush() noexcept {
334
334
  break;
335
335
  }
336
336
  }
337
- winrt::check_hresult(m_textLayout->SetTextAlignment(alignment));
337
+
338
+ if (alignment != m_textLayout->GetTextAlignment())
339
+ winrt::check_hresult(m_textLayout->SetTextAlignment(alignment));
338
340
  }
339
341
 
340
342
  requireNewBrush = true;
@@ -981,8 +981,6 @@ void ScrollViewComponentView::OnPointerPressed(
981
981
  Super::OnPointerPressed(args);
982
982
 
983
983
  if (!args.Handled()) {
984
- auto f = args.Pointer();
985
- auto g = f.PointerDeviceType();
986
984
  m_scrollVisual.OnPointerPressed(args);
987
985
  }
988
986
  }
@@ -1023,16 +1021,16 @@ void ScrollViewComponentView::OnKeyDown(
1023
1021
  args.Handled(pageUp(true));
1024
1022
  break;
1025
1023
  case winrt::Windows::System::VirtualKey::Up:
1026
- args.Handled(lineUp(true));
1024
+ args.Handled(lineUp(false));
1027
1025
  break;
1028
1026
  case winrt::Windows::System::VirtualKey::Down:
1029
- args.Handled(lineDown(true));
1027
+ args.Handled(lineDown(false));
1030
1028
  break;
1031
1029
  case winrt::Windows::System::VirtualKey::Left:
1032
- args.Handled(lineLeft(true));
1030
+ args.Handled(lineLeft(false));
1033
1031
  break;
1034
1032
  case winrt::Windows::System::VirtualKey::Right:
1035
- args.Handled(lineRight(true));
1033
+ args.Handled(lineRight(false));
1036
1034
  break;
1037
1035
  }
1038
1036