Browse Source

fix some compile warnings.

pull/9028/head
Dan Walmsley 4 years ago
parent
commit
eb4605cf17
  1. 6
      src/Web/Avalonia.Web/AvaloniaView.cs
  2. 1
      src/Web/Avalonia.Web/BrowserSingleViewLifetime.cs
  3. 1
      src/Web/Avalonia.Web/BrowserTopLevelImpl.cs
  4. 1
      src/Web/Avalonia.Web/Interop/CanvasHelper.cs
  5. 1
      src/Web/Avalonia.Web/Storage/WriteableStream.cs

6
src/Web/Avalonia.Web/AvaloniaView.cs

@ -13,6 +13,7 @@ using SkiaSharp;
namespace Avalonia.Web
{
[System.Runtime.Versioning.SupportedOSPlatform("browser")] // gets rid of callsite warnings
public partial class AvaloniaView : ITextInputMethodImpl
{
private readonly BrowserTopLevelImpl _topLevelImpl;
@ -31,8 +32,7 @@ namespace Avalonia.Web
private GRGlInterface? _glInterface;
private const SKColorType ColorType = SKColorType.Rgba8888;
private bool _useGL;
private bool _inputElementFocused;
private bool _useGL;
private ITextInputMethodClient? _client;
private static int _canvasCount;
@ -399,7 +399,6 @@ namespace Avalonia.Web
if (_client != null)
{
InputHelper.ShowElement(_inputElement);
_inputElementFocused = true;
InputHelper.FocusElement(_inputElement);
var surroundingText = _client.SurroundingText;
@ -410,7 +409,6 @@ namespace Avalonia.Web
}
else
{
_inputElementFocused = false;
HideIme();
}
}

1
src/Web/Avalonia.Web/BrowserSingleViewLifetime.cs

@ -6,6 +6,7 @@ using Avalonia.Media;
namespace Avalonia.Web
{
[System.Runtime.Versioning.SupportedOSPlatform("browser")] // gets rid of callsite warnings
public class BrowserSingleViewLifetime : ISingleViewApplicationLifetime
{
public AvaloniaView? View;

1
src/Web/Avalonia.Web/BrowserTopLevelImpl.cs

@ -16,6 +16,7 @@ using Avalonia.Rendering.Composition;
namespace Avalonia.Web
{
[System.Runtime.Versioning.SupportedOSPlatform("browser")] // gets rid of callsite warnings
internal class BrowserTopLevelImpl : ITopLevelImplWithTextInputMethod, ITopLevelImplWithNativeControlHost, ITopLevelImplWithStorageProvider
{
private Size _clientSize;

1
src/Web/Avalonia.Web/Interop/CanvasHelper.cs

@ -6,6 +6,7 @@ namespace Avalonia.Web.Interop;
internal record GLInfo(int ContextId, uint FboId, int Stencils, int Samples, int Depth);
[System.Runtime.Versioning.SupportedOSPlatform("browser")] // gets rid of callsite warnings
internal static partial class CanvasHelper
{

1
src/Web/Avalonia.Web/Storage/WriteableStream.cs

@ -6,6 +6,7 @@ using System.Threading.Tasks;
namespace Avalonia.Web.Storage;
[System.Runtime.Versioning.SupportedOSPlatform("browser")] // gets rid of callsite warnings
// Loose wrapper implementaion of a stream on top of FileAPI FileSystemWritableFileStream
internal sealed class JSWriteableStream : Stream
{

Loading…
Cancel
Save