Skip to content

Commit

Permalink
Merged PR 9180508: Fixes for 2.8.5
Browse files Browse the repository at this point in the history
Includes these fixes:
* [Fix Deprecated icons ](#8576)
* [Fix Voice Access 'Show Bubbles' annotation of WebView2 Content](#8551)
* [Add const keyword to resolve warnings (treated as errors) C26462 and C26496](#8567)
* [[WebView2] Apply text scale factor to CoreWebView2 content](#8540)
* [Fix horizontal scrolling on trackpad](#8403)
  • Loading branch information
kmahone committed Jun 22, 2023
2 parents 4aa80ad + ba7dc25 commit 8027ff4
Show file tree
Hide file tree
Showing 91 changed files with 280 additions and 208 deletions.
2 changes: 1 addition & 1 deletion dev/AnimatedIcon/TestUI/AnimatedIconPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@
<StackPanel.Resources>
<controls:FontIconSource x:Name="MyFontIconSource" Glyph="{Binding ElementName=boundFallback, Path=FallbackGlyph}"/>
</StackPanel.Resources>
<local:AnimatedIconHost Foreground="{StaticResource TestIconForeground}" x:Name="boundFallback" Title="AnimatedFindVisualSource" Background="DarkSlateGray" FallbackGlyph="&#xE001;">
<local:AnimatedIconHost Foreground="{StaticResource TestIconForeground}" x:Name="boundFallback" Title="AnimatedFindVisualSource" Background="DarkSlateGray" FallbackGlyph="&#xE73E;">
<local:AnimatedIconHost.IconSource>
<controls:AnimatedIconSource FallbackIconSource="{StaticResource MyFontIconSource}"/>
</local:AnimatedIconHost.IconSource>
Expand Down
2 changes: 1 addition & 1 deletion dev/AutoSuggestBox/AutoSuggestBoxHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void AutoSuggestBoxHelper::OnKeepInteriorCornersSquarePropertyChanged(
{
if (auto autoSuggestBox = sender.try_as<winrt::AutoSuggestBox>())
{
bool shouldMonitorAutoSuggestEvents = unbox_value<bool>(args.NewValue());
const bool shouldMonitorAutoSuggestEvents = unbox_value<bool>(args.NewValue());
if (shouldMonitorAutoSuggestEvents)
{
auto revokersInspectable = winrt::make<AutoSuggestEventRevokers>();
Expand Down
2 changes: 1 addition & 1 deletion dev/AutoSuggestBox/AutoSuggestBox_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
HorizontalAlignment="Center"
FontStyle="Normal"
FontSize="{ThemeResource AutoSuggestBoxIconFontSize}"
Text="&#xE10A;"
Text="&#xE894;"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
AutomationProperties.AccessibilityView="Raw" />
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion dev/AutoSuggestBox/AutoSuggestBox_themeresources_v1.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontStyle="Normal"
Text="&#xE10A;"
Text="&#xE894;"
FontSize="{ThemeResource AutoSuggestBoxIconFontSize}"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
AutomationProperties.AccessibilityView="Raw" />
Expand Down
2 changes: 1 addition & 1 deletion dev/AutoSuggestBox/TestUI/AutoSuggestBoxPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<controls:AnimatedIcon>
<animatedvisuals:AnimatedFindVisualSource/>
<controls:AnimatedIcon.FallbackIconSource>
<controls:FontIconSource Glyph="&#xE11A;" FontSize="12" FontFamily="{ThemeResource SymbolThemeFontFamily}"/>
<controls:FontIconSource Glyph="&#xE721;" FontSize="12" FontFamily="{ThemeResource SymbolThemeFontFamily}"/>
</controls:AnimatedIcon.FallbackIconSource>
</controls:AnimatedIcon>
</AutoSuggestBox.QueryIcon>
Expand Down
2 changes: 1 addition & 1 deletion dev/Breadcrumb/BreadcrumbBarItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ bool BreadcrumbBarItem::IgnorePointerId(const winrt::PointerRoutedEventArgs& arg
{
MUX_ASSERT(m_isEllipsisDropDownItem);

uint32_t pointerId = args.Pointer().PointerId();
const uint32_t pointerId = args.Pointer().PointerId();

if (m_trackedPointerId == 0)
{
Expand Down
2 changes: 1 addition & 1 deletion dev/Breadcrumb/BreadcrumbLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ int BreadcrumbLayout::GetFirstBreadcrumbBarItemToArrange(winrt::NonVirtualizingL

for (int i = itemCount - 2; i >= 0; --i)
{
float newAccumLength = accumLength + GetElementAt(context, i).DesiredSize().Width;
const float newAccumLength = accumLength + GetElementAt(context, i).DesiredSize().Width;
if (newAccumLength > m_availableSize.Width)
{
return i + 1;
Expand Down
4 changes: 2 additions & 2 deletions dev/ColorPicker/ColorPicker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ void ColorPicker::OnColorChanged(winrt::DependencyPropertyChangedEventArgs const
UpdateColorControls(ColorUpdateReason::ColorPropertyChanged);
}

winrt::Color oldColor = unbox_value<winrt::Color>(args.OldValue());
winrt::Color newColor = unbox_value<winrt::Color>(args.NewValue());
const winrt::Color oldColor = unbox_value<winrt::Color>(args.OldValue());
const winrt::Color newColor = unbox_value<winrt::Color>(args.NewValue());

if (oldColor.A != newColor.A ||
oldColor.R != newColor.R ||
Expand Down
2 changes: 1 addition & 1 deletion dev/ColorPicker/ColorPickerSlider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void ColorPickerSlider::OnKeyDown(winrt::KeyRoutedEventArgs const& args)
return;
}

bool isControlDown = (winrt::Window::Current().CoreWindow().GetKeyState(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
const bool isControlDown = (winrt::Window::Current().CoreWindow().GetKeyState(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;

double minBound = 0;
double maxBound = 0;
Expand Down
2 changes: 1 addition & 1 deletion dev/ColorPicker/ColorSpectrum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void ColorSpectrum::OnKeyDown(winrt::KeyRoutedEventArgs const& args)
return;
}

bool isControlDown = (winrt::Window::Current().CoreWindow().GetKeyState(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;
const bool isControlDown = (winrt::Window::Current().CoreWindow().GetKeyState(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down;

winrt::ColorPickerHsvChannel incrementChannel = winrt::ColorPickerHsvChannel::Hue;

Expand Down
2 changes: 1 addition & 1 deletion dev/ColorPicker/ColorSpectrumAutomationPeer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ winrt::hstring ColorSpectrumAutomationPeer::Value()
void ColorSpectrumAutomationPeer::SetValue(winrt::hstring const& value)
{
winrt::ColorSpectrum colorSpectrumOwner = Owner().as<winrt::ColorSpectrum>();
winrt::Color color = unbox_value<winrt::Color>(winrt::XamlBindingHelper::ConvertValue({ winrt::hstring_name_of<winrt::Color>(), winrt::TypeKind::Metadata }, box_value(value)));
const winrt::Color color = unbox_value<winrt::Color>(winrt::XamlBindingHelper::ConvertValue({ winrt::hstring_name_of<winrt::Color>(), winrt::TypeKind::Metadata }, box_value(value)));

colorSpectrumOwner.Color(color);

Expand Down
2 changes: 1 addition & 1 deletion dev/ComboBox/ComboBoxHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void ComboBoxHelper::OnKeepInteriorCornersSquarePropertyChanged(
{
if (auto comboBox = sender.try_as<winrt::ComboBox>())
{
bool shouldMonitorDropDownState = unbox_value<bool>(args.NewValue());
const bool shouldMonitorDropDownState = unbox_value<bool>(args.NewValue());
if (shouldMonitorDropDownState)
{
auto revokersInspectable = winrt::make<ComboBoxDropDownEventRevokers>();
Expand Down
2 changes: 1 addition & 1 deletion dev/ComboBox/ComboBox_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@
Foreground="{ThemeResource ComboBoxDropDownGlyphForeground}"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
FontSize="12"
Glyph="&#xE0E5;"/>
Glyph="&#xE70D;"/>
</controls:AnimatedIcon.FallbackIconSource>
</controls:AnimatedIcon>
<contract7Present:ContentPresenter x:Name="DescriptionPresenter"
Expand Down
2 changes: 1 addition & 1 deletion dev/ComboBox/ComboBox_themeresources_v1.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@
Foreground="{ThemeResource ComboBoxDropDownGlyphForeground}"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
FontSize="12"
Glyph="&#xE0E5;"
Glyph="&#xE70D;"
HorizontalAlignment="Right"
VerticalAlignment="Center"
AutomationProperties.AccessibilityView="Raw" />
Expand Down
4 changes: 2 additions & 2 deletions dev/CommandBarFlyout/CommandBarFlyoutCommandBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ void CommandBarFlyoutCommandBar::UpdateVisualState(

// If there isn't enough space to display the overflow below the command bar,
// and if there is enough space above, then we'll display it above instead.
if (auto window = winrt::Window::Current() && !hadActualPlacement && m_secondaryItemsRoot)
if (const auto window = winrt::Window::Current() && !hadActualPlacement && m_secondaryItemsRoot)
{
double availableHeight = -1;
const auto controlBounds = TransformToVisual(nullptr).TransformBounds({ 0, 0, static_cast<float>(ActualWidth()), static_cast<float>(ActualHeight()) });
Expand Down Expand Up @@ -595,7 +595,7 @@ void CommandBarFlyoutCommandBar::UpdateVisualState(
winrt::VisualStateManager::GoToState(*this, shouldExpandUp ? L"ExpandedUp" : L"ExpandedDown", useTransitions && !isForSizeChange);

// Union of AvailableCommandsStates and ExpansionStates
bool hasPrimaryCommands = (PrimaryCommands().Size() != 0);
const bool hasPrimaryCommands = (PrimaryCommands().Size() != 0);
if (hasPrimaryCommands)
{
if (shouldExpandUp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
VerticalAlignment="Center"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
FontSize="16"
Glyph="&#xE10C;" />
Glyph="&#xE712;" />
</Button>
</Grid>
<Popup x:Name="OverflowPopup">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@
VerticalAlignment="Center"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
FontSize="16"
Glyph="&#xE10C;" />
Glyph="&#xE712;" />
</Button>
</Grid>
<Popup x:Name="OverflowPopup">
Expand Down
4 changes: 2 additions & 2 deletions dev/CommandBarFlyout/CommandBarFlyout_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock x:Name="OverflowCheckGlyph"
Text="&#xE0E7;"
Text="&#xE73E;"
Foreground="{ThemeResource CommandBarFlyoutAppBarButtonForeground}"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
FontSize="12"
Expand Down Expand Up @@ -1302,7 +1302,7 @@
VerticalAlignment="Center"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
FontSize="16"
Glyph="&#xE10C;" />
Glyph="&#xE712;" />
</Button>
</Grid>
<Popup x:Name="OverflowPopup" contract8Present:ShouldConstrainToRootBounds="False">
Expand Down
4 changes: 2 additions & 2 deletions dev/CommandBarFlyout/CommandBarFlyout_themeresources_v1.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock x:Name="OverflowCheckGlyph"
Text="&#xE0E7;"
Text="&#xE73E;"
Foreground="{ThemeResource SystemControlForegroundBaseHighBrush}"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
FontSize="16"
Expand Down Expand Up @@ -1107,7 +1107,7 @@
VerticalAlignment="Center"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
FontSize="16"
Glyph="&#xE10C;" />
Glyph="&#xE712;" />
</Button>
</Grid>
<Popup x:Name="OverflowPopup" contract8Present:ShouldConstrainToRootBounds="False">
Expand Down
6 changes: 3 additions & 3 deletions dev/CommandBarFlyout/TextCommandBarFlyout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void TextCommandBarFlyout::UpdateButtons()

winrt::MenuFlyout proofingMenuFlyout = proofingFlyout.try_as<winrt::MenuFlyout>();

bool shouldIncludeProofingMenu =
const bool shouldIncludeProofingMenu =
static_cast<bool>(proofingFlyout) &&
(!proofingMenuFlyout || proofingMenuFlyout.Items().Size() > 0);

Expand Down Expand Up @@ -323,7 +323,7 @@ void TextCommandBarFlyout::UpdateButtons()
addRichEditButtonToCommandsIfPresent(TextControlButtons::Underline, PrimaryCommands(),
[](winrt::ITextSelection textSelection)
{
auto underline = textSelection.CharacterFormat().Underline();
const auto underline = textSelection.CharacterFormat().Underline();
return (underline != winrt::UnderlineType::None) && (underline != winrt::UnderlineType::Undefined);
});

Expand Down Expand Up @@ -554,7 +554,7 @@ TextControlButtons TextCommandBarFlyout::GetPasswordBoxButtonsToAdd(winrt::Passw
bool TextCommandBarFlyout::IsButtonInPrimaryCommands(TextControlButtons button)
{
uint32_t buttonIndex = 0;
bool wasFound = PrimaryCommands().IndexOf(GetButton(button), buttonIndex);
const bool wasFound = PrimaryCommands().IndexOf(GetButton(button), buttonIndex);
return wasFound;
}

Expand Down
2 changes: 1 addition & 1 deletion dev/CommonStyles/AppBarButton_themeresources_v1.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@
AutomationProperties.AccessibilityView="Raw" />
<FontIcon x:Name="SubItemChevron"
Grid.Column="2"
Glyph="&#xE0E3;"
Glyph="&#xE76C;"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
FontSize="12"
AutomationProperties.AccessibilityView="Raw"
Expand Down
4 changes: 2 additions & 2 deletions dev/CommonStyles/CalendarView_themeresources_v1.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,8 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button x:Name="HeaderButton" Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.HeaderText}" IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.HasMoreViews}" Style="{StaticResource NavigationButtonStyle}" Foreground="{TemplateBinding Foreground}" Padding="12,0,0,0" HorizontalContentAlignment="Left" />
<Button x:Name="PreviousButton" Grid.Column="1" Content="&#xE0E4;" FontFamily="{ThemeResource SymbolThemeFontFamily}" IsTabStop="True" Padding="1" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="Center" IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.HasMoreContentBefore}" Style="{StaticResource NavigationButtonStyle}" />
<Button x:Name="NextButton" Grid.Column="2" Content="&#xE0E5;" FontFamily="{ThemeResource SymbolThemeFontFamily}" IsTabStop="True" Padding="1" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="Center" IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.HasMoreContentAfter}" Style="{StaticResource NavigationButtonStyle}" />
<Button x:Name="PreviousButton" Grid.Column="1" Content="&#xE70E;" FontFamily="{ThemeResource SymbolThemeFontFamily}" IsTabStop="True" Padding="1" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="Center" IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.HasMoreContentBefore}" Style="{StaticResource NavigationButtonStyle}" />
<Button x:Name="NextButton" Grid.Column="2" Content="&#xE70D;" FontFamily="{ThemeResource SymbolThemeFontFamily}" IsTabStop="True" Padding="1" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="Center" IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.HasMoreContentAfter}" Style="{StaticResource NavigationButtonStyle}" />
</Grid>
<Grid x:Name="Views" Grid.Row="1">
<Grid.Clip>
Expand Down
2 changes: 1 addition & 1 deletion dev/CommonStyles/CheckBox_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@
<x:Double x:Key="CheckBoxMinWidth">120</x:Double>
<Thickness x:Key="CheckBoxPadding">8,5,0,0</Thickness>
<Thickness x:Key="CheckBoxFocusVisualMargin">-7,-3,-7,-3</Thickness>
<x:String x:Key="CheckBoxCheckedGlyph">&#xE001;</x:String>
<x:String x:Key="CheckBoxCheckedGlyph">&#xE73E;</x:String>
<x:String x:Key="CheckBoxIndeterminateGlyph">&#xE9AE;</x:String>

<Style TargetType="CheckBox" BasedOn="{StaticResource DefaultCheckBoxStyle}" />
Expand Down
2 changes: 1 addition & 1 deletion dev/CommonStyles/CheckBox_themeresources_v1.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@
contract7NotPresent:RadiusY="{Binding Source={ThemeResource ControlCornerRadius}, Converter={StaticResource BottomRightCornerRadiusDoubleValueConverter}}"/>
<FontIcon x:Name="CheckGlyph"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
Glyph="&#xE001;"
Glyph="&#xE73E;"
FontSize="16"
Foreground="{ThemeResource CheckBoxCheckGlyphForegroundUnchecked}"
Opacity="0" />
Expand Down
2 changes: 1 addition & 1 deletion dev/CommonStyles/CommandBar_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@
VerticalAlignment="Center"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
FontSize="20"
Glyph="&#xE10C;"
Glyph="&#xE712;"
Height="{ThemeResource AppBarExpandButtonCircleDiameter}" />
</Button>
<Rectangle x:Name="HighContrastBorder"
Expand Down
4 changes: 2 additions & 2 deletions dev/CommonStyles/CommandBar_themeresources_v1.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@
VerticalAlignment="Center"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
FontSize="20"
Glyph="&#xE10C;"
Glyph="&#xE712;"
Height="{ThemeResource AppBarExpandButtonCircleDiameter}" />
</Button>
<Popup x:Name="OverflowPopup">
Expand Down Expand Up @@ -1679,7 +1679,7 @@
VerticalAlignment="Center"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
FontSize="20"
Glyph="&#xE10C;"
Glyph="&#xE712;"
Height="{ThemeResource AppBarExpandButtonCircleDiameter}" />
</Button>
<Popup x:Name="OverflowPopup">
Expand Down
Loading

0 comments on commit 8027ff4

Please sign in to comment.