do not rely on UWP URL parser

This commit is contained in:
Paul Rouget 2019-11-06 07:38:19 +01:00
parent 147c042c5a
commit 1c3da95b70
7 changed files with 67 additions and 35 deletions

View file

@ -14,7 +14,7 @@ struct ServoControl : ServoControlT<ServoControl>, public servo::ServoDelegate {
void Reload();
void Stop();
void Shutdown();
Windows::Foundation::Uri LoadURIOrSearch(hstring);
hstring LoadURIOrSearch(hstring);
void OnLoaded(IInspectable const &,
Windows::UI::Xaml::RoutedEventArgs const &);
@ -110,14 +110,6 @@ private:
void StopRenderLoop();
void Loop();
std::optional<Windows::Foundation::Uri> TryParseURI(hstring input) {
try {
return Windows::Foundation::Uri(input);
} catch (hresult_invalid_argument const &) {
return {};
}
}
void OnSurfaceTapped(IInspectable const &,
Windows::UI::Xaml::Input::TappedRoutedEventArgs const &);
@ -147,6 +139,8 @@ private:
template <typename Callable> void RunOnUIThread(Callable);
void RunOnGLThread(std::function<void()>);
void TryLoadUri(hstring);
std::unique_ptr<servo::Servo> mServo;
EGLSurface mRenderSurface{EGL_NO_SURFACE};
OpenGLES mOpenGLES;