Skip to content

Commit b2d674a

Browse files
myrootrookiejavaJoonghyunChosung-su박인서/Common Platform Lab(SR)/Associate/삼성전자
committed
Replace Tizen Backend engine
* Remove comment * Remove image resource on Tizen project * Remove space * Fix compatibility issue (#41) * Fix compatibility issue * Fix Compatibility Resource path * Bump to latest - Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on. * [SingleProject] Fix Issues (#50) * Bumt to latest - Effects (dotnet#1574) - Improve Window and AnimationManager (dotnet#1653) - and so on * Add Microsoft.Maui.Graphics.Skia as PackageReference * Add Essentials.Samples.Tizen (#24) * Add Essentials.Samples.Tizen * Add guard for null exception * Fix Essentials.Samples for Tizen * Fix csproj for net6 * Remove Forms.Init * Fix build error (#60) * Update referenced Tizen.UIExtensions version (#61) * Add BlazorWebView skeleton code (#62) * Bump to latest (#71) - Window lifecycle (dotnet#1754) - Move New Navigation Handler to Core and make it internal (dotnet#1800) - Scrollview handler (dotnet#1669) - ScrollView Resize + Window Handler Resize (dotnet#1676) - Font AutoScalingEnabled (dotnet#1774) - Rename Font Properties (dotnet#1755) - Update layout system to ensure native measure/arrange are called for all controls, even from Page subclasses (dotnet#1819) - IContainer as IList<IView> (dotnet#1724) - Implement Layout padding for new StackLayouts and GridLayout (dotnet#1749) - Delete all the TabIndex, TabStop, Focusable things! (dotnet#1777) - Introduce SetSemanticFocus API via SemanticExtensions (dotnet#1829) - Improve Window and AnimationManager (dotnet#1653) - And so on * Remove IPage on Tizen (#72) - Merge IFrameworkElement and IView and Remove IPage (dotnet#1875) * Add Blazor webview (#67) * Add Blazor webview * Replace space to tab * remove space * Fix entry cursor error (#68) * Fix entry cursor error * Update code referring to android extension * Remove duplicate code & Add exception cases * Code fixes for consistency * Fix nullable issue (#77) * Fix Image loading (#78) * Fix nested layout issue (#79) Co-authored-by: 허강호/Common Platform Lab(SR)/Principal Engineer/삼성전자 <[email protected]> * Fix issues caused by bump up (#75) * Fix issues caused by bump up * Update Tizen file provider * Update file provider with proper path * Fix unmatched partial method (#84) * Fixes incorrect parameter type for ILayoutManager.ArrangeChildren (Rectangle -> Size). (#91) * Make the HandlerToRendererShim simple * Revert "Fixes incorrect parameter type for ILayoutManager.ArrangeChildren (Rectangle -> Size). (#91)" (#97) This reverts commit c54ac83. * Refactor the LayoutHandler (#99) * Fix layout measure issue (#100) * Fix LayoutHandler Update issue (#103) * Fix LayoutHandler Update issue * Implement InvalidateMeasure propagation * Update MapBackground * Add InitializationOptions (#107) * Add InitializationOptions * Set UseSkiaSharp true as default * Apply DP as default * Fix SKClipperView to have proper size (#115) * Fix Essentials sample (#108) * Fix Essentials sample for Tizen * Remove UseSkiaSharp flag * Remove MaterialComponents * Fix Tizen flag * Remove CustomRenderer * Add ShellHandler (#64) * Add ShellHandler * Move ShellView into Platform/Tizen * Update ShellView * Move the code for embedded tizen resources to csproj * Add UIExtenstions for shell * MAUI workload for Tizen (#66) * Fix build and runtime error after bumping to latest code * Fix HandlerToRendererShim dispose (dotnet#127) * Add ShellSearchView (#121) * Add ShellSearchView * Fix the layout issue in ShellSearchResultList * Enable nullable * Fix maximum height of ShellSearchResultList * Fix scaling issue on Clip (dotnet#130) * Fix DisplayResolutionUnit sync issue (dotnet#134) * Fix build error (dotnet#137) * Replace SkiaGraphicsView with local patch (dotnet#135) This commit will be revert when upstream code is updated * Support Min/Max Height/Width on IView and applying MauiApp/MauiAppBuilder pattern - Support Min/Max Height/Width on IView (dotnet#2265) - Updating .NET MAUI to use MauiApp/MauiAppBuilder pattern and use MS.Extensions.DependencyInjection (dotnet#2137) * Fix Tizen Templates (dotnet#144) * Fix webview break caused by updated dependency (dotnet#143) * Update the Tizen.UIExtension.ElmSharp version (dotnet#145) * Reomve internal UIExtensions compoments for Shell (dotnet#147) * Adds missing implementation after bumping to latest main * [Tizen] Adds BoxView Handler * [Tizen] Implement ProgressColor property in ProgressBarHandlers - Implement ProgressColor property in ProgressBarHandlers (dotnet#600) * [Tizen] Handle ContentViews and templated content in new layout system * Bump to latest (rc1) - ImageButtonHandler and Handler Re-usability (dotnet#2352) - Remove IBoxView (dotnet#2619) - Add SupportedOSPlatformVersion (dotnet#2565) - Merge all the .NET 6 projects/solutions (dotnet#2505) - Shadow Support (dotnet#570) - Add IndicatorView handler(dotnet#2038) * [Tizen] Apply graphics related code review feedback * [Tizen] Port H/V TextAlignment to Editor/Picker Handler * [Tizen] Add TVShellView (dotnet#183) * [Tizen] Add TVShellView * [Tizen] Update TVShellView * [Tizen] Update NativeView for Shell * [Tizen] Update ShellView * [Tizen] Change default FlyoutBackgroundColor for TV * [Tizen] Enable nullable * Refactor WrapperView to draw drawable features (dotnet#186) * Refactor WrapperView to draw drawable features * Update class names and devide files * Override NeesContainer to remove duplicated code * Update class names * [Tizen] Adds ApplicationHandler * Fix Background issue of Frame (dotnet#193) * Fix UpdateBackground (dotnet#194) * Fix UpdateBackground * Add ContentView Background mapper * Fix Editor/Entry/Label/Layout Background * Add IWrapperViewCanvas.Content * Add PageHandler Background mapper * Restore WrapperView * Remove unnecessary namespace * [Tizen] Fix build error on PageHandler * [Tizen] Apply ITextButton related changes * [Tizen] Add Shadows (dotnet#233) * [Tizen] Add Shadows * [Tizen] Apply review comments * [Tizen] Move updating shape in proper position * [Tizen] Update BackgroundDrawable * [Tizen] Apply review comments * [Tizen] Add BorderDrawable (dotnet#224) * Move to platform specific * Fix border handler for Tizen * Rename ToDrawable method * Fix border content layout * Fix BorderView * Apply rebase * [Tizen] Fix entry cursor issue (dotnet#222) * Fix entry cursor issue * Fix UpdateSelectionLength method * [Tizen] Remove TVNavigationDrawer TVNavigationView (dotnet#223) * [Tizen] Remove TVNavigationDrawer TVNavigationView * [Elmsharp] Update Tizen.UIExtensions version * [Tizen] Initial Multi Window support * [Tizen] Fix MauiContext * [Tizen] Refactor Border by defining MauiDrawable (dotnet#248) * [Tizen] Refactor Border by defining MauiDrawable * [Tizen] Apply review comments * [Tizen] Remove unnecessary type casting * [Tizen] Move getting path logic to drawable * [Tizen] Obsolete AndExpand & Remove IsolatedStorage * Fix tizen solution (.sln) correctly * [Tizen] Add VerticalTextAlignment * [Tizen] Fix Scoping of MauiContext * [Tizen] Use CoreApplication as native app type * [Tizen] Applying upstream changes * [Tizen] Add ContainerView to Layout if it's present * [Tizen] Initial Reloadyfy support * [Tizen] Initial IVisualDiagnosticOveraly support * [Tizen] Move types in the Platform folder into the Platform namespaces * Fix CollectionView layout issue (dotnet#288) * Fix CollectionView layout issue * Remove unnecessary code * [Tizen] ZIndex proof-of-concept * Fix ScrollView ContentSize and Padding margin (dotnet#291) * Fix ScrollView ContentSize and Padding margin * Fix MapRequestScrollTo * Update src/Core/src/Handlers/ScrollView/ScrollViewHandler.Tizen.cs Co-authored-by: 허강호/Common Platform Lab(SR)/Principal Engineer/삼성전자 <[email protected]> * Update src/Core/src/Handlers/ScrollView/ScrollViewHandler.Tizen.cs Co-authored-by: 허강호/Common Platform Lab(SR)/Principal Engineer/삼성전자 <[email protected]> * Remove MapContentSize Co-authored-by: 허강호/Common Platform Lab(SR)/Principal Engineer/삼성전자 <[email protected]> * Implements WindowOverlay and VisualDiagnosticsOverlay (dotnet#294) * Implements WindowOverlay and VisualDiagnosticsOverlay * Apply code review * [Tizen] Fix Image Handler * Remove GetDesiredSize (dotnet#295) * [Tizen] Fix ButtonHandler * [Tizen] Organize and centralize HandlerExtensions * Refactor WrapperView and Fix Issue (dotnet#302) * Refactor WrapperView * Use Thickness type for Shadow margin * Update variable name * Update class name to GraphicsExtensions * Fix essentials sample for Tizen (dotnet#305) * [Tizen] Fix NativeView casting issue * Fix BlazorWebview binary resource issue (dotnet#317) * [Tizen] Handle query strings in Blazor static assets by trimming them out * Refactor MauiContext (dotnet#330) * [Tizen] Adds PaintExtensions * [Tizen] Implement CursorPosition in IEditor/ITextInput Handlers * [Tizen] Remove GetNative * [Tizen] Update Microsoft.NET.Sdk.Maui/WorkloadManifest * [Tizen] Bump to latest * [Tizen] Use legacy compat renderers temporarily * [Tizen] Implement IPlatformApplication.Current * [Tizen] Fix INativeViewHandler to return more expected NativeView * [Tizen] Remove legacy TFMs * [Tizen] Remove `IPlatformInvalidate` and `Device.Invalidate() * [Tizen] Fix Essential sample build error * [Tizen] Refactor Essential's implementations * [Tizen] Renaming public APIs Native -> Platform * [Tizen] Interfaced Handler for Label, Page, NavigationView, Picker, ProgressBar, SwipeView * [Tizen] Moved GetPlatformSize logic into a new service * [Tizen] Interfaced handler for Switch, TimePicker, WebView, Slider, SearchBar, RefreshView, RadioButton * [Tizen] Fix build error after rebasing * [Tizen] Move TabbedPageHandler to TabbedViewHandler * [Tizen] Backport p14 changes * [Tizen] Loaded/Unloaded events and propagate Window * [Tizen] Implement FillRule property in Polygon/PolylineHandler * [Tizen] Add install tizen to provision.yml * [Tizen] Move package version into Versions.props * Adds the Tizen backend * [Tizen] Add Resizetizer Tizen Implementation * Bump to latest and fix build error * Bump to latest - Apply to start adding in APIs for adding legacy renderers via assembly scanning (dotnet#1333) - Update to IMauiContext (dotnet#1357) - and so on * Bump to latest - Apply to patch related to Animation (dotnet#1436) - Apply to register Microsoft.Maui.Graphics Platforms (dotnet#1441) - and so on. * Bump to latest - Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on. * Bumt to latest - Effects (dotnet#1574) - Improve Window and AnimationManager (dotnet#1653) - and so on * Fix build error (#60) * Bump to latest (#71) - Window lifecycle (dotnet#1754) - Move New Navigation Handler to Core and make it internal (dotnet#1800) - Scrollview handler (dotnet#1669) - ScrollView Resize + Window Handler Resize (dotnet#1676) - Font AutoScalingEnabled (dotnet#1774) - Rename Font Properties (dotnet#1755) - Update layout system to ensure native measure/arrange are called for all controls, even from Page subclasses (dotnet#1819) - IContainer as IList<IView> (dotnet#1724) - Implement Layout padding for new StackLayouts and GridLayout (dotnet#1749) - Delete all the TabIndex, TabStop, Focusable things! (dotnet#1777) - Introduce SetSemanticFocus API via SemanticExtensions (dotnet#1829) - Improve Window and AnimationManager (dotnet#1653) - And so on * Bump to latest * Fix Essentials sample (#108) * Fix Essentials sample for Tizen * Remove UseSkiaSharp flag * Remove MaterialComponents * Fix Tizen flag * Remove CustomRenderer * Add ShellHandler (#64) * Add ShellHandler * Move ShellView into Platform/Tizen * Update ShellView * Move the code for embedded tizen resources to csproj * Add UIExtenstions for shell * MAUI workload for Tizen (#66) * Fix build and runtime error after bumping to latest code * Fix Essentials (dotnet#146) * Fix Essentials sample for tizen * Add SemanticScreenReader for Tizen * Fix Startup * Adds missing implementation after bumping to latest main * Bump to latest (rc1) - ImageButtonHandler and Handler Re-usability (dotnet#2352) - Remove IBoxView (dotnet#2619) - Add SupportedOSPlatformVersion (dotnet#2565) - Merge all the .NET 6 projects/solutions (dotnet#2505) - Shadow Support (dotnet#570) - Add IndicatorView handler(dotnet#2038) * Refactor WrapperView to draw drawable features (dotnet#186) * Refactor WrapperView to draw drawable features * Update class names and devide files * Override NeesContainer to remove duplicated code * Update class names * [Tizen] Adds ApplicationHandler * Fix UpdateBackground (dotnet#194) * Fix UpdateBackground * Add ContentView Background mapper * Fix Editor/Entry/Label/Layout Background * Add IWrapperViewCanvas.Content * Add PageHandler Background mapper * Restore WrapperView * Remove unnecessary namespace * [Tizen] Add BorderDrawable (dotnet#224) * Move to platform specific * Fix border handler for Tizen * Rename ToDrawable method * Fix border content layout * Fix BorderView * Apply rebase * [Tizen] Refactor Border by defining MauiDrawable (dotnet#248) * [Tizen] Refactor Border by defining MauiDrawable * [Tizen] Apply review comments * [Tizen] Remove unnecessary type casting * [Tizen] Move getting path logic to drawable * [Tizen] Fix Scoping of MauiContext * [Tizen] Applying upstream changes * [Tizen] Move types in the Platform folder into the Platform namespaces * [Tizen] Fix ButtonHandler * [Tizen] Organize and centralize HandlerExtensions * Refactor MauiContext (dotnet#330) * Add NUI handler * [Tizen] Refactor MauiApplication and MauiContext (dotnet#216) * Add AlertManager (dotnet#214) * Code clean up (dotnet#218) * Fix build error on Controls.Sample (dotnet#225) * [Tizen] Initail CollectionViewHandler for NUI * Fix PlatformEffect NativeView type (dotnet#231) * Fix Control.Sample correctly (dotnet#234) * Fix NamedSize (dotnet#242) * Update NavigationPageRenderer (dotnet#238) - Implement title view * Fix build errors and apply upstream changes * Refactoring Window and modal (dotnet#246) * Obsolete AndExpand & fix build eror * [NUI] Implement BlazorWebView (dotnet#259) * Implement BlazorWebView * Update NUI WebView alias name * Bump to latest * Fix MinimumWidth/Height MaximumWidth/Height (dotnet#270) * [NUI] Add GestureManager (dotnet#272) * Add gesture handler * enable nullable * use lazy * Remove unnessary EFL code in ScrollViewHandler (dotnet#274) * Add TabbedPage Renderer (dotnet#275) * [NUI] Implement WrapperView enabling Border and Shadow (dotnet#273) * [NUI] Add MauiDrawable enabling Border and Shadow * [NUI] Remove BorderView type and refactor * Refactor StrokeExtensions * Remove unnecessary code * Update a way clearing content * [NUI] Add Picker handler (dotnet#276) * Add Picker handler * Apply code review * Change timing adding event handler * Update Picker on touch (dotnet#293) * Fix NeedsContainer (dotnet#306) * Update FrameRenderer to support Brush (dotnet#309) * Fix minor layout issue (dotnet#314) * Fix build error * Fix ScrollView ContentSize (dotnet#324) * Refactor Maui context (dotnet#328) * Fix build error after bumping to latest * [Tizen] Add ImageButtonHandler (dotnet#334) * [NUI] Implement Editor/Entry handler (dotnet#335) * Implement Editor/Entry handler * Fix measure issue * Update paramer name * Fix if statement * Fix Editor/Entry CursorPosition issue (dotnet#336) * [NUI] Add CollectionViewHandler (dotnet#352) * Fix EmptyView on CollectionView * Add CollectionViewHandler * Add SearchBar handler (dotnet#354) * Implement Clip (dotnet#384) * Bump to latest * [NUI] Add TimePickerHandler (dotnet#390) * [NUI] Add TimePickerHandler * Update button placement * Clean up code after rebase (dotnet#399) * Fix TabbedPage to use Controls.Grid instead Compatibility.Grid (dotnet#400) * Fix Controls MapText (dotnet#406) * Fix focus management (dotnet#407) * Update WrapperView (dotnet#409) * Update Tizen platform to tizen10.0 (dotnet#416) * Update WebView handler and MauiWebView handler (dotnet#417) * Update Label shadow (dotnet#420) * Fix build error after rebase * Fix InputTransparent (dotnet#424) * Implement CarouselView handler (dotnet#428) * Fix GestureManager crash issue (dotnet#432) * Update WebView EvaluateJavaScript async (dotnet#435) * Fix CascadeInputTransparent (dotnet#442) * Add NavigationView handler (dotnet#449) * Update WindowOverlay handler (dotnet#452) * Update ViewExtensions (dotnet#455) * Update ImageSourceService (dotnet#454) * Fix MauiSearchBar IsEnabled property (dotnet#458) * Add SwipeView handler (dotnet#460) * Clean code after rebase * Fix GetPath to return a correct path (dotnet#465) * Update for focus navigation (dotnet#459) * Cleanup code after rebase * Fix build error after rebase * Implement UpdateBackgroundImageSourceAsync extensions method (dotnet#479) * [NUI] Update SliderHandler with NUI slider component (dotnet#487) * Update SliderHandler with NUI compnent * Update SliderHandler with review feedback * Update with review feedback * Fix GetPlatformViewBounds as Pixel coordinate (dotnet#488) * Fix ScrollView content size update issue (dotnet#492) * Implement Controls.Compatibility for tizen (dotnet#493) * Optimize Layout Measure (dotnet#495) * Code cleanup after code rebase * Fix z-order on Layout (dotnet#497) * [NUI] Update StepperHandler (dotnet#498) * Update StepperHandler * Apply Review comment * Fix Frame measure (dotnet#501) * Fix BorderView (dotnet#500) * Add RadioButton handler (dotnet#499) * Fix CollectionView Item measure (dotnet#502) * Fix Measure contraint convert (dotnet#504) * Fix WrapperView measure (dotnet#507) * Implement Missing mapper (dotnet#509) * Fix WrapperView Width/HeightSpecification (dotnet#510) * Fix ShapeView (dotnet#511) * Optimize View measure (dotnet#513) * Fix NavigationPage disposing pages (dotnet#514) * Fix build error after rebase * Fix WebView (dotnet#515) * Fix TableView (dotnet#516) * Fix Compatibility Cell templates (dotnet#517) * [NUI] Add IndicatorViewHandler (dotnet#518) * Add IndicatorViewHandler * Update review comment * Add space * Fix ListViewRenderer (dotnet#519) * Fix Binding error on CollectionView (dotnet#520) * Fix layout issue when view was shown from hide (dotnet#522) * [NUI] Fix ImageButton Clicked (dotnet#523) * Fix ImageButton Clicked * Apply review comment * Fix BlazorWebView RequestIntercept issue (dotnet#524) * Fix Layout size issue (dotnet#525) * Fix build error after rebase * [NUI] Add DatePicker Handler (dotnet#528) * Add DatePicker * Add missing class * Update Style and Use DummyPopupPage * Refactoring with MauiTimePicker * add new file Co-authored-by: Jay Cho <[email protected]> * Fix GetBoundingBox/OverlayWindow touch point coordinate to DP (dotnet#529) * Fix CollectionView EmptyView HeaderFooter (dotnet#530) * Update DateTimePicker width on horizontal (dotnet#531) * Fix DisconnectHandler (dotnet#532) * Update Page default background color (dotnet#533) * Clean up NuGet.config (dotnet#535) * [NUI] Update font size (dotnet#536) * Update FontNamedSize * adjust font size on tv profile * Add RefreshViewHandler (dotnet#490) * [Tizen] Refactor compat renderers (dotnet#538) * [Tizen] Refactor the TabbedPageRenderer (dotnet#541) * [Tizen] Add FlyoutViewHandler (dotnet#540) * Add FlyoutView * Update FlyoutView to cover TV drawer * Add missing connecting handler * Update handler implementation using extensions * Simplify code Co-authored-by: Jay Cho <[email protected]> * [Tizen] Add MauiPicker (dotnet#543) * Add MenuIcon to Toolbar (dotnet#542) * Add MenuIcon to Toolbar * Apply Reviews Co-authored-by: Jay Cho <[email protected]> * [Tizen] Add ShellHandler (dotnet#539) * [NUI] Add ShellHandler * Update PublicAPI.Shipped.txt file * Fix build error * Update AppHostingBuilder * Update ShellView with review feedback * Remove unnecessary code * Update Shell navigation stack * Add IDisposable interface * Update ShellSectionView * Update AdppHostBuilderExtensions * Rebase and update toolbar to resolve conflict * Remove ShellContentHandler and update ToolbarHandler * Update ShellView to handle DrawerToggleVisible * Remove unnecessary code * Fix build error after rebase Co-authored-by: Kangho Hur <[email protected]> Co-authored-by: 조중현/Common Platform Lab(SR)/Engineer/삼성전자 <[email protected]> Co-authored-by: 김성수/Common Platform Lab(SR)/Staff Engineer/삼성전자 <[email protected]> Co-authored-by: 박인서/Common Platform Lab(SR)/Associate/삼성전자 <[email protected]> Co-authored-by: 민성현/Common Platform Lab(SR)/Staff Engineer/삼성전자 <[email protected]> Co-authored-by: Jay Cho <[email protected]>
1 parent 2b34482 commit b2d674a

File tree

539 files changed

+12426
-39493
lines changed

Some content is hidden

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

539 files changed

+12426
-39493
lines changed

.nuspec/Microsoft.Maui.Controls.MultiTargeting.targets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,4 @@
113113
<PropertyGroup Condition=" $(TargetFramework.StartsWith('uap10.0')) ">
114114
<DefineConstants>WINDOWS_UWP;$(DefineConstants)</DefineConstants>
115115
</PropertyGroup>
116-
117116
</Project>

.nuspec/Microsoft.Maui.Controls.SingleProject.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
BeforeTargets="_MauiInjectXamlCssAdditionalFiles;GenerateMSBuildEditorConfigFileShouldRun"
112112
Condition=" '$(EnableDefaultItems)' == 'true' and '$(SingleProject)' == 'true' ">
113113

114-
<!-- Removals -->
114+
<!-- Removals -->
115115
<ItemGroup>
116116
<!-- Remove everything that isn't part of this platform -->
117117
<Compile

eng/Microsoft.Extensions.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
Version="$(MicrosoftCodeAnalysisPublicApiAnalyzersVersion)"
111111
/>
112112
<PackageReference
113-
Update="Tizen.UIExtensions.ElmSharp"
113+
Update="Tizen.UIExtensions.NUI"
114114
Version="$(TizenUIExtensionsVersion)"
115115
/>
116116
<PackageReference

src/BlazorWebView/src/Maui/PublicAPI/net-tizen/PublicAPI.Shipped.txt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@ Microsoft.AspNetCore.Components.WebView.Maui.RootComponentsCollection
3636
Microsoft.AspNetCore.Components.WebView.Maui.RootComponentsCollection.JSComponents.get -> Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore!
3737
Microsoft.AspNetCore.Components.WebView.Maui.RootComponentsCollection.RootComponentsCollection(Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore! jsComponents) -> void
3838
Microsoft.AspNetCore.Components.WebView.Maui.TizenWebViewManager
39-
Microsoft.AspNetCore.Components.WebView.Maui.TizenWebViewManager.TizenWebViewManager(Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebViewHandler! blazorMauiWebViewHandler, Tizen.WebView.WebView! webview, System.IServiceProvider! provider, Microsoft.AspNetCore.Components.Dispatcher! dispatcher, Microsoft.Extensions.FileProviders.IFileProvider! fileProvider, Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore! jsComponents, string! contentRootRelativeToAppRoot, string! hostPageRelativePath) -> void
39+
Microsoft.AspNetCore.Components.WebView.Maui.TizenWebViewManager.TizenWebViewManager(Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebViewHandler! blazorMauiWebViewHandler, Tizen.NUI.BaseComponents.WebView! webview, System.IServiceProvider! provider, Microsoft.AspNetCore.Components.Dispatcher! dispatcher, Microsoft.Extensions.FileProviders.IFileProvider! fileProvider, Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore! jsComponents, string! contentRootRelativeToAppRoot, string! hostPageRelativePath) -> void
4040
override Microsoft.AspNetCore.Components.WebView.Maui.TizenWebViewManager.NavigateCore(System.Uri! absoluteUri) -> void
4141
override Microsoft.AspNetCore.Components.WebView.Maui.TizenWebViewManager.SendMessage(string! message) -> void
42-
Microsoft.AspNetCore.Components.WebView.Maui.WebViewContainer
43-
Microsoft.AspNetCore.Components.WebView.Maui.WebViewContainer.WebViewContainer(ElmSharp.EvasObject! parent) -> void
44-
Microsoft.AspNetCore.Components.WebView.Maui.WebViewContainer.WebView.get -> Tizen.WebView.WebView!
4542
Microsoft.AspNetCore.Components.WebView.UrlLoadingEventArgs
4643
Microsoft.AspNetCore.Components.WebView.UrlLoadingEventArgs.Url.get -> System.Uri!
4744
Microsoft.AspNetCore.Components.WebView.UrlLoadingEventArgs.UrlLoadingStrategy.get -> Microsoft.AspNetCore.Components.WebView.UrlLoadingStrategy
@@ -51,13 +48,13 @@ Microsoft.AspNetCore.Components.WebView.UrlLoadingStrategy.CancelLoad = 2 -> Mic
5148
Microsoft.AspNetCore.Components.WebView.UrlLoadingStrategy.OpenExternally = 0 -> Microsoft.AspNetCore.Components.WebView.UrlLoadingStrategy
5249
Microsoft.AspNetCore.Components.WebView.UrlLoadingStrategy.OpenInWebView = 1 -> Microsoft.AspNetCore.Components.WebView.UrlLoadingStrategy
5350
Microsoft.Extensions.DependencyInjection.BlazorWebViewServiceCollectionExtensions
54-
override Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebViewHandler.CreatePlatformView() -> Microsoft.AspNetCore.Components.WebView.Maui.WebViewContainer!
55-
override Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebViewHandler.ConnectHandler(Microsoft.AspNetCore.Components.WebView.Maui.WebViewContainer! platformView) -> void
56-
override Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebViewHandler.DisconnectHandler(Microsoft.AspNetCore.Components.WebView.Maui.WebViewContainer! platformView) -> void
51+
override Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebViewHandler.CreatePlatformView() -> Tizen.NUI.BaseComponents.WebView!
52+
override Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebViewHandler.ConnectHandler(Tizen.NUI.BaseComponents.WebView! platformView) -> void
53+
override Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebViewHandler.DisconnectHandler(Tizen.NUI.BaseComponents.WebView! platformView) -> void
5754
static Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebViewHandler.MapHostPage(Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebViewHandler! handler, Microsoft.AspNetCore.Components.WebView.Maui.IBlazorWebView! webView) -> void
5855
static Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebViewHandler.MapRootComponents(Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebViewHandler! handler, Microsoft.AspNetCore.Components.WebView.Maui.IBlazorWebView! webView) -> void
5956
static Microsoft.Extensions.DependencyInjection.BlazorWebViewServiceCollectionExtensions.AddBlazorWebViewDeveloperTools(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!
6057
static Microsoft.Extensions.DependencyInjection.BlazorWebViewServiceCollectionExtensions.AddMauiBlazorWebView(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.AspNetCore.Components.WebView.Maui.IMauiBlazorWebViewBuilder!
6158
static Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebViewHandler.BlazorWebViewMapper -> Microsoft.Maui.PropertyMapper<Microsoft.AspNetCore.Components.WebView.Maui.IBlazorWebView!, Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebViewHandler!>!
6259
virtual Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebView.CreateFileProvider(string! contentRootDir) -> Microsoft.Extensions.FileProviders.IFileProvider!
63-
~Microsoft.AspNetCore.Components.WebView.BlazorWebViewInitializedEventArgs.WebView.get -> Tizen.WebView.WebView
60+
~Microsoft.AspNetCore.Components.WebView.BlazorWebViewInitializedEventArgs.WebView.get -> Tizen.NUI.BaseComponents.WebView

src/BlazorWebView/src/Maui/Tizen/BlazorWebViewHandler.Tizen.cs

Lines changed: 77 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
using System;
2+
using System.Collections.Generic;
23
using System.IO;
34
using Microsoft.Extensions.DependencyInjection;
45
using Microsoft.Extensions.FileProviders;
56
using Microsoft.Maui;
67
using Microsoft.Maui.Dispatching;
78
using Microsoft.Maui.Handlers;
8-
using Tizen.WebView;
9-
using TChromium = Tizen.WebView.Chromium;
10-
using TWebView = Tizen.WebView.WebView;
9+
using Tizen.NUI;
10+
using NWebView = Tizen.NUI.BaseComponents.WebView;
1111

1212
namespace Microsoft.AspNetCore.Components.WebView.Maui
1313
{
1414
/// <summary>
1515
/// The Tizen <see cref="ViewHandler"/> for <see cref="BlazorWebView"/>.
1616
/// </summary>
17-
public partial class BlazorWebViewHandler : ViewHandler<IBlazorWebView, WebViewContainer>
17+
public partial class BlazorWebViewHandler : ViewHandler<IBlazorWebView, NWebView>
1818
{
19+
private const string BlazorWebViewIdentifier = "BlazorWebView:";
20+
private const string UserAgentHeaderKey = "User-Agent";
1921
private const string AppOrigin = "http://0.0.0.0/";
2022
private const string BlazorInitScript = @"
2123
window.__receiveMessageCallbacks = [];
@@ -42,53 +44,99 @@ public partial class BlazorWebViewHandler : ViewHandler<IBlazorWebView, WebViewC
4244
})();
4345
";
4446

45-
private TizenWebViewManager? _webviewManager;
46-
private WebViewExtensions.InterceptRequestCallback? _interceptRequestCallback;
47+
static private Dictionary<string, WeakReference<BlazorWebViewHandler>> s_webviewHandlerTable = new Dictionary<string, WeakReference<BlazorWebViewHandler>>();
4748

48-
private TWebView PlatformWebView => PlatformView.WebView;
49+
private TizenWebViewManager? _webviewManager;
4950

5051
private bool RequiredStartupPropertiesSet =>
5152
//_webview != null &&
5253
HostPage != null &&
5354
Services != null;
5455

5556
/// <inheritdoc />
56-
protected override WebViewContainer CreatePlatformView()
57+
protected override NWebView CreatePlatformView()
5758
{
58-
TChromium.Initialize();
59-
MauiApplication.Current.Terminated += (s, e) => TChromium.Shutdown();
60-
61-
return new WebViewContainer(PlatformParent);
59+
return new NWebView()
60+
{
61+
MouseEventsEnabled = true,
62+
KeyEventsEnabled = true,
63+
};
6264
}
6365

6466
/// <inheritdoc />
65-
protected override void ConnectHandler(WebViewContainer platformView)
67+
protected override void ConnectHandler(NWebView platformView)
6668
{
67-
_interceptRequestCallback = OnRequestInterceptCallback;
68-
PlatformWebView.LoadFinished += OnLoadFinished;
69-
PlatformWebView.AddJavaScriptMessageHandler("BlazorHandler", PostMessageFromJS);
70-
PlatformWebView.SetInterceptRequestCallback(_interceptRequestCallback);
71-
PlatformWebView.GetSettings().JavaScriptEnabled = true;
69+
platformView.PageLoadFinished += OnLoadFinished;
70+
platformView.Context.RegisterHttpRequestInterceptedCallback(OnRequestInterceptStaticCallback);
71+
platformView.AddJavaScriptMessageHandler("BlazorHandler", PostMessageFromJS);
72+
platformView.UserAgent += $" {BlazorWebViewIdentifier}{GetHashCode()}";
73+
s_webviewHandlerTable[GetHashCode().ToString()] = new WeakReference<BlazorWebViewHandler>(this);
7274
}
7375

7476
/// <inheritdoc />
75-
protected override void DisconnectHandler(WebViewContainer platformView)
77+
protected override void DisconnectHandler(NWebView platformView)
7678
{
77-
PlatformWebView.LoadFinished -= OnLoadFinished;
79+
platformView.PageLoadFinished -= OnLoadFinished;
7880
base.DisconnectHandler(platformView);
81+
s_webviewHandlerTable.Remove(GetHashCode().ToString());
82+
}
83+
84+
85+
private void PostMessageFromJS(string message)
86+
{
87+
_webviewManager!.MessageReceivedInternal(new Uri(PlatformView.Url), message);
7988
}
8089

81-
private void PostMessageFromJS(JavaScriptMessage message)
90+
private void OnLoadFinished(object? sender, WebViewPageLoadEventArgs e)
8291
{
83-
if (message is null)
92+
//FocusManager.Instance.SetCurrentFocusView(NativeView);
93+
var url = PlatformView.Url;
94+
95+
if (url == AppOrigin)
96+
PlatformView.EvaluateJavaScript(BlazorInitScript);
97+
}
98+
99+
private static void OnRequestInterceptStaticCallback(WebHttpRequestInterceptor interceptor)
100+
{
101+
if (interceptor.Headers.TryGetValue(UserAgentHeaderKey, out var agent))
84102
{
85-
throw new ArgumentNullException(nameof(message));
103+
var idx = agent.IndexOf(BlazorWebViewIdentifier);
104+
if (idx >= 0)
105+
{
106+
var webviewKey = agent.Substring(idx + BlazorWebViewIdentifier.Length);
107+
if (s_webviewHandlerTable.TryGetValue(webviewKey, out var weakHandler)
108+
&& weakHandler.TryGetTarget(out var handler))
109+
{
110+
handler.OnRequestInterceptCallback(interceptor);
111+
return;
112+
}
113+
}
86114
}
115+
interceptor.Ignore();
116+
}
87117

88-
if (message.Name.Equals("BlazorHandler", StringComparison.Ordinal))
118+
private void OnRequestInterceptCallback(WebHttpRequestInterceptor interceptor)
119+
{
120+
var url = interceptor.Url;
121+
if (url.StartsWith(AppOrigin))
89122
{
90-
_webviewManager!.MessageReceivedInternal(new Uri(PlatformWebView.Url), message.GetBodyAsString());
123+
var allowFallbackOnHostPage = url.EndsWith("/");
124+
url = QueryStringHelper.RemovePossibleQueryString(url);
125+
if (_webviewManager!.TryGetResponseContentInternal(url, allowFallbackOnHostPage, out var statusCode, out var statusMessage, out var content, out var headers))
126+
{
127+
var header = $"HTTP/1.0 200 OK\r\n";
128+
foreach (var item in headers)
129+
{
130+
header += $"{item.Key}:{item.Value}\r\n";
131+
}
132+
header += "\r\n";
133+
MemoryStream memstream = new MemoryStream();
134+
content.CopyTo(memstream);
135+
interceptor.SetResponse(header, memstream.ToArray());
136+
return;
137+
}
91138
}
139+
interceptor.Ignore();
92140
}
93141

94142
private void StartWebViewCoreIfPossible()
@@ -105,14 +153,14 @@ private void StartWebViewCoreIfPossible()
105153

106154
// We assume the host page is always in the root of the content directory, because it's
107155
// unclear there's any other use case. We can add more options later if so.
108-
var contentRootDir = Path.GetDirectoryName(HostPage!) ?? string.Empty;
109-
var hostPageRelativePath = Path.GetRelativePath(contentRootDir, HostPage!);
156+
var contentRootDir = System.IO.Path.GetDirectoryName(HostPage!) ?? string.Empty;
157+
var hostPageRelativePath = System.IO.Path.GetRelativePath(contentRootDir, HostPage!);
110158

111159
var fileProvider = VirtualView.CreateFileProvider(contentRootDir);
112160

113161
_webviewManager = new TizenWebViewManager(
114162
this,
115-
PlatformWebView,
163+
PlatformView,
116164
Services!,
117165
new MauiDispatcher(Services!.GetRequiredService<IDispatcher>()),
118166
fileProvider,
@@ -125,7 +173,7 @@ private void StartWebViewCoreIfPossible()
125173
VirtualView.BlazorWebViewInitializing(new BlazorWebViewInitializingEventArgs());
126174
VirtualView.BlazorWebViewInitialized(new BlazorWebViewInitializedEventArgs
127175
{
128-
WebView = PlatformWebView,
176+
WebView = PlatformView,
129177
});
130178

131179
if (RootComponents != null)
@@ -139,50 +187,6 @@ private void StartWebViewCoreIfPossible()
139187
_webviewManager.Navigate("/");
140188
}
141189

142-
private void OnRequestInterceptCallback(IntPtr context, IntPtr request, IntPtr userdata)
143-
{
144-
if (request == IntPtr.Zero)
145-
{
146-
return;
147-
}
148-
149-
var url = PlatformWebView.GetInterceptRequestUrl(request);
150-
151-
if (url.StartsWith(AppOrigin))
152-
{
153-
var allowFallbackOnHostPage = url.EndsWith("/");
154-
url = QueryStringHelper.RemovePossibleQueryString(url);
155-
if (_webviewManager!.TryGetResponseContentInternal(url, allowFallbackOnHostPage, out var statusCode, out var statusMessage, out var content, out var headers))
156-
{
157-
var header = $"HTTP/1.0 200 OK\r\n";
158-
foreach (var item in headers)
159-
{
160-
header += $"{item.Key}:{item.Value}\r\n";
161-
}
162-
header += "\r\n";
163-
164-
using (MemoryStream memstream = new MemoryStream())
165-
{
166-
content.CopyTo(memstream);
167-
var body = memstream.ToArray();
168-
PlatformWebView.SetInterceptRequestResponse(request, header, body, (uint)body.Length);
169-
}
170-
return;
171-
}
172-
}
173-
174-
PlatformWebView.IgnoreInterceptRequest(request);
175-
}
176-
177-
private void OnLoadFinished(object? sender, EventArgs e)
178-
{
179-
PlatformWebView.SetFocus(true);
180-
var url = PlatformWebView.Url;
181-
182-
if (url == AppOrigin)
183-
PlatformWebView.Eval(BlazorInitScript);
184-
}
185-
186190
internal IFileProvider CreateFileProvider(string contentRootDir)
187191
{
188192
return new TizenMauiAssetFileProvider(contentRootDir);

src/BlazorWebView/src/Maui/Tizen/TizenWebViewManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Text.Encodings.Web;
55
using Microsoft.AspNetCore.Components.Web;
66
using Microsoft.Extensions.FileProviders;
7-
using TWebView = Tizen.WebView.WebView;
7+
using NWebView = Tizen.NUI.BaseComponents.WebView;
88

99
namespace Microsoft.AspNetCore.Components.WebView.Maui
1010
{
@@ -17,7 +17,7 @@ public class TizenWebViewManager : WebViewManager
1717
private const string AppOrigin = "http://0.0.0.0/";
1818

1919
private readonly BlazorWebViewHandler _blazorMauiWebViewHandler;
20-
private readonly TWebView _webview;
20+
private readonly NWebView _webview;
2121
private readonly string _contentRootRelativeToAppRoot;
2222

2323
/// <summary>
@@ -31,7 +31,7 @@ public class TizenWebViewManager : WebViewManager
3131
/// <param name="jsComponents">Describes configuration for adding, removing, and updating root components from JavaScript code.</param>
3232
/// <param name="contentRootRelativeToAppRoot">Path to the directory containing application content files.</param>
3333
/// <param name="hostPageRelativePath">Path to the host page within the fileProvider.</param>
34-
public TizenWebViewManager(BlazorWebViewHandler blazorMauiWebViewHandler, TWebView webview, IServiceProvider provider, Dispatcher dispatcher, IFileProvider fileProvider, JSComponentConfigurationStore jsComponents, string contentRootRelativeToAppRoot, string hostPageRelativePath)
34+
public TizenWebViewManager(BlazorWebViewHandler blazorMauiWebViewHandler, NWebView webview, IServiceProvider provider, Dispatcher dispatcher, IFileProvider fileProvider, JSComponentConfigurationStore jsComponents, string contentRootRelativeToAppRoot, string hostPageRelativePath)
3535
: base(provider, dispatcher, new Uri(AppOrigin), fileProvider, jsComponents, hostPageRelativePath)
3636
{
3737
_blazorMauiWebViewHandler = blazorMauiWebViewHandler ?? throw new ArgumentNullException(nameof(blazorMauiWebViewHandler));
@@ -58,7 +58,7 @@ protected override void NavigateCore(Uri absoluteUri)
5858
protected override void SendMessage(string message)
5959
{
6060
var messageJSStringLiteral = JavaScriptEncoder.Default.Encode(message);
61-
_webview.Eval($"__dispatchMessageCallback(\"{messageJSStringLiteral}\")");
61+
_webview.EvaluateJavaScript($"__dispatchMessageCallback(\"{messageJSStringLiteral}\")");
6262
}
6363

6464
internal void MessageReceivedInternal(Uri uri, string message)

src/BlazorWebView/src/Maui/Tizen/WebViewContainer.cs

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)