Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
137 KiB
Changelog
[0.54.1]
[0.54.0]
-
5fdd1a9(#1625) Use OnBackPressedCallback instead of the deprecated onKeyDown for back navigation on Android. -
51d06d0(#1646) Remove redundant clones in WebView and download handling. No user facing changes. -
7b77322(#1647) Fix clippy io_other_error. No user facing changes. -
ff8876d(#1652) Improve wkwebview performance. No user-facing changes. -
27ba73fAdd handler for web content process termination. -
4fcff14(#1547) SetWebsiteDataManagerBuilder::base_cache_directorywith the same path asbase_data_directory.This change allows the cache directory to be changed instead of using the default one from WebKitGTK.
[0.53.5]
- #1622 Fixed an issue that caused docs.rs builds to fail. No user facing changes.
[0.53.4]
093856a(#1622 by @lucasfernog) Add flag to opt out of automatic back navigation handling on Android viaWryActivity#handleBackNavigation.0f51d67(#1605 by @dgerhardt) On Linux, removed a workaround which forced inital requests for multiple webviews to be handled sequentially. The workaround was intended to fix a concurrency bug with loading multiple URIs at the same time on WebKitGTK. But it prevented parallelization and could cause a deadlock in certain situations. It is no longer needed with newer WebKitGTK versions.
[0.53.3]
6aa5854(#1609 by @lucasfernog) Enhance error handling of thewebview_versionfunction on macOS.
[0.53.2]
1743e7f(#1608 by @lucasfernog) Fix new_window_req_handler craashing when creating new window for webview that has a custom data_store_identifier.
[0.53.1]
ccdf912(#1603 by @lucasfernog) Fix the build when not enabling thex11feature.
[0.53.0]
1456f8e(#1602 by @FabianLars) Enabled all downloads by default to match WebView2 and browser behavior on all platforms. To disable this, provide a customdownload_started_handler.43e78ff(#1588 by @zphrs) AddWebViewBuilder::with_limit_navigations_to_app_bound_domainsonly on iOS. Function is a no-op if iOS version is less than iOS 14.60dba38(#1569 by @WSH032) AddWebView::set_cookieandWebView::delete_cookieAPIs.88cbb01(#1561 by @dgerhardt) On Linux, fix a deadlock, which could occur when destroying a WebView before loading has finished.eb562ca(#1596 by @lucasfernog) Do not firenew_window_req_handleron navigation events on macOS and iOS.78634b3(#1594 by @FabianLars) On Linux, macOS and iOS, thedownload_started_handlerwill now get the correct suggested destination path.5399823(#1600 by @lucasfernog) Fixesnew_window_req_handlernot creating the webview on Linux when executingwindow.open().eb562ca(#1596 by @lucasfernog) Fixesnew_window_req_handlernot fired on macOS when executingwindow.open().3f978d3(#1601 by @lucasfernog) RefactorWebViewBuilder::with_new_window_req_handlerto allow creating the webview manually.3f978d3(#1601 by @lucasfernog) Disable new window creation by default on Windows to match behavior of other platforms. UseWebViewBuilder::with_new_window_req_handlerto enable.
[0.52.1]
63eaab8(#1573 by @Legend-Master) Fixwry::DragDropEvent::Drop::pathsreturns random data on Windows
[0.52.0]
5e6b0e6(#1555 by @FabianLars) Added iOS support forset_background_color.99dab51(#1570 by @renovate) Updatedwebview2-comto0.38.41f4a3a(#1572 by @FabianLars) On Windows on systems running WebView2 v137+ wry now uses a new default background color API which should reduce white flashes. The use of theRemoveRedirectionBitmapbrowser flag (v134+) was removed due to crashes on Insider builds.eb40ac8(#1528 by @aurelj) Addedx11feature flag (enabled by default).
breaking
-
1567635(#1558 by @amrbashir) RenameWebViewBuildermethods for consistency and clarity:- Renamed
WebViewBuilder::with_web_contexttoWebViewBuilder::new_with_web_context - Renamed
WebViewBuilder::with_attributestoWebViewBuilder::new_with_attributes
- Renamed
-
f868658(#1556 by @Legend-Master)WebContext::is_custom_protocol_registerednow takes&strinstead ofString
[0.51.2]
f7781a7(#1544 by @lucasfernog) Allow modifying or removing the input accessory view on iOS viaWebViewBuilderExtIos::with_input_accessory_view_builder.
[0.51.1]
3e24d6b(#1543 by @lucasfernog) Fix async custom protocol not responding.
[0.51.0]
f99bbd9(#1507 by @Simon-Laux) RenamedError::UrlPrasetoError::UrlParseto fix typo.2d753c6(#1531 by @Legend-Master) Breaking Change:WebViewAttributes::initialization_scriptstakesVec::<InitializationScript>now instead ofVec::<(String, bool)>78b83a0(#1537 by @Brendonovich) Moved protocol handler functions to a thread local instead of storing them as ivars to prevent a race condition between webview close and custom protocol handling.5f1e4ba(#1538 by @syrel) macOS: Handle flipped coordinates when adding a WebView as a child4ec951a(#1526 by @Legend-Master) Updatedwebview2-comto0.37,windowsto0.61.2d753c6(#1531 by @Legend-Master) Init scripts are always executed on all frames on Windows WebView22d753c6(#1531 by @Legend-Master) Fix init script sometimes get executed too late on Windows WebView2
feat
-
ecbced2(#1534 by @Simon-Laux) macOS/iOS: add option to disable link previews when building a webview (the webkit API has it enabled by default)WebViewBuilderExtDarwin.with_allow_link_preview(bool)
[0.50.5]
enhance
353bd95(#1517 by @FabianLars) Added a Windows-only setting to disable all Webview2 context menus.
bug
4f4ade3(#1520 by @lucasfernog) Fix crash setting macOS traffic light buttons inset when window is undecorated or buttons have been removed.
[0.50.4]
349dfe3(#1512 by @Simon-Laux) AddedWebViewExtDarwinto expose WebView functions available to both macOS and iOS.349dfe3(#1512 by @Simon-Laux) fix: crash when usingWebViewBuilderExtDarwin.with_data_store_identifier349dfe3(#1512 by @Simon-Laux) feat: macOS: addWebViewExtDarwin::fetch_data_store_identifiersandWebViewExtDarwin::remove_data_store.d0b16a7(#1491 by @neilmcguire) On Windows, Add support for iframe requests in custom protocols. Requires WebView2 1.0.2365.46 or higher.148d7cd(#1513 by @FabianLars) Wry by default now passes--enable-features=RemoveRedirectionBitmapto WebView2 to hide the initial white flash of newly created webviews. Only takes effect on WebView2 Runtime versions 134 and above.
[0.50.3]
94ecadb(#1496 by @Simon-Laux) AddWebViewBuilder.with_javascript_disabledapi to disable JavaScript.5120a5c(#1486 by @charrondev) FixWebview::cookiesandWebview::cookies_for_urldeadlock on macOS.8dfeb76(#1500 by @Simon-Laux) feat: addWebview.reload
[0.50.2]
cef818f(#1505 by @lucasfernog) Fixalready mutably borrowed: BorrowErrorpanic on webview initialization on Android.
[0.50.1]
f9abf6b(#1501 by @Legend-Master) Fix webview not resized with parent when it gets maximized on Windows
[0.50.0]
933de78(#1492 by @Legend-Master) Updatedwebview2-comto0.36,windowsto0.60.
[0.49.0]
-
c27b4ff(#1468 by @madsmtm) Update toobjc2v0.6.This bumps MSRV on macOS/iOS to 1.71.
-
95a9319(#1454 by @Legend-Master) Updatedwebview2-comto0.35,windowsto0.59. -
9df094a(#1483 by @amrbashir) On Windows, fix webview slightly larger than the host window causing a pixel or two to be obscured. -
ce98c34(#1480 by @ahqsoftwares) Fixed an issue that could causeReturn type mismatch: expected 'kotlin.String', actual 'kotlin.String?'errors.
enhance
0185644(#1452 by @mzdk100) Allow the use of TAB to cycle through focus elements in an HTML document.
[0.48.1]
cbbcccc(#1446 by @FabianLars) Add functionality to set the traffic light inset on macOS. This is required to prevent flickers if the WebView is injected viabuild()instead ofbuild_as_child().
enhance
26abf63(#1445 by @bastiankistner) Add an option to change the default background throttling policy (currently for WebKit only).
[0.48.0]
eb0c816(#1423 by @SpikeHD) Rename{WebViewBuilderExtWindows, WebViewBuilderExtUnix}::with_extension_pathtowith_extensions_path.b4ba5b4(#1426 by @FabianLars) On Windows, Wry will now log PostMessage errors instead of panicking.f0c6b94(#1441 by @renovate) Updatedwebview2-comto0.34.
[0.47.2]
[0.47.1]
59c1eef(#1418 by @amrbashir) Fix initialization scripts running twice on Windows.
[0.47.0]
7221256(#1365 by @Norbiros) AddWebViewBuilder::with_initialization_script_for_main_onlyto enable injecting JavaScript code into main frame only or all subframes.c1b26b9(#1394 by @amrbashir) AddWebView::cookiesandWebView::cookies_for_urlAPIs.c193e2a(#1408 by @amrbashir) FixDragDropEvent::Dropevent never fired on Wayland (and sometimes on X11).1d63fa3(#1403 by @SpikeHD) AddWebViewBuilder::with_extension_pathAPI to Windows and Linux.0c192f4(#1414 by @lucasfernog) Fix Android static handlers not being replaced when the application UI is relaunched while still running in the foreground.9a2a2d4(#1412 by @amrbashir) Fix icons of dragged items getting stuck when usingWebViewBuilder::with_drag_drop_handleron some distros like Gnome.fa9875b(#1409 by @amrbashir) On Windows, disable Webview2's file drop when usingWebViewBuilder::with_drag_drop_handlerwhich fix drag events for files from "Recent files" view.6007608(#1400 by @amrbashir) On Windows, fix webview slightly larger than the window inner size, which resulted in a hidden 1px in the right and bottom borders of the webview
[0.46.3]
be122f6(#1397 by @lucasfernog) Fixwith_user_agentregression.
[0.46.2]
[0.46.1]
bug
33c0193(#1389 by @amrbashir) Fix crash on macOS versions below 14.a57719e(#1385 by @huacnlee) AddWebView::focus_parentmethod.
[0.46.0]
-
8cc2a7f(#1384 by @amrbashir) This release contains quite the breaking changes, because even though wry@0.44, ignored duplicate custom protocols, On Linux when using a shared web context, the custom protocol handler can only be registered once so we are bringing the duplicate custom protocols on Linux again, Windows and macOS are not affected. If using a shared web context, make sure to register a protocol only once on Linux (other platforms should be registed multiple times), useWebContext::is_custom_protocol_registeredwith#[cfg(target_os = "linux")].We also noticed that it is hard to know which webview made a request to the custom protocol so we added a method to attach an ID to a webview, and changed relevant custom protocol APIs to take a new argument that passes the specified id back to protocol handler.
We also made a few changes to the builder, specifically
WebViewBuilder::newandWebViewBuilder::buildmethods to make them more ergonomic to work with.- Added
Error::DuplicateCustomProtocolenum variant. - Added
Error::ContextDuplicateCustomProtocolenum variant. - On Linux, return an error in
WebViewBuilder::buildif registering a custom protocol multiple times. - Added
WebContext::is_custom_protocol_registeredto check if a protocol has been regsterd for this web context. - Added
WebViewIdalias type. - Breaking Changed
WebViewAttributesto have a lifetime parameter. - Added
WebViewAttributes.idfield to specify an id for the webview. - Added
WebViewBuilder::with_idmethod to specify an id for the webview. - Added
WebViewAttributes.contextfield to specify a shared context for the webview. - Breaking Changed
WebViewAttributes.custom_protocolsfield,WebViewBuilder::with_custom_protocolmethod andWebViewBuilder::with_asynchronous_custom_protocolmethod handler function to takeWebViewIdas the first argument to check which webview made the request to the protocol. - Breaking Changed
WebViewBuilder::with_web_contextto be a static method to create a builder with a webcontext, instead of it being a setter method. It is now an alternative toWebviewBuilder::new - Added
WebViewBuilder::with_attributesto create a webview builder with provided attributes. - Breaking Changed
WebViewBuilder::newto take no arguments. - Breaking Changed
WebViewBuilder::buildmethod to take a reference to a window to create the webview in it. - Breaking Removed
WebViewBuilder::new_as_child. - Added
WebViewBuilder::build_as_childmethod, which takes a reference to a window to create the webview in it. - Breaking Removed
WebViewBuilderExtUnix::new_gtk. - Added
WebViewBuilderExtUnix::build_gtk.
- Added
-
b01eac3(#1386 by @lucasfernog) Use unescaped Android package identifier for the proguard rules.
[0.45.0]
0fd1229(#1369 by @lloydzhou) On Linux, fixed incorrect path for indexeddb database directory which made apps usingwry@0.24andtauri@1migrating towry@>=0.38andtauri@2lose their indexeddb data.e332eff(#1368 by @zephraph) AddWebview::load_html.
[0.44.1]
5111eb0(#1362 by @lucasfernog) FixesWebView::clear_all_browsing_datacrashing with a segfault on macOS.
[0.44.0]
b863d38(#1356 by @SpikeHD) Expose ability to enable browser extensions in WebView29220793(#1361 by @amrbashir) Ignore duplicate custom protocols inWebviewBuilder::with_custom_protocolandWebviewBuilder::with_async_custom_protocoland use the last registered one.9220793(#1361 by @amrbashir) RemovedError::DuplicateCustomProtocolvariant.5915341(#1354 by @millermk) Fixes Android webview error page flashing when a redirect to the app is performed.170095b(#1360 by @Steve-xmh) Fix web resource loading in android binding by skip duplicate Content-Type/Content-Length headers.5915341(#1354 by @millermk) Fix navigation error handling to trigger custom protocol on Android.
[0.43.1]
5cea504(#1352 by @lucasfernog) Fixes Android file picker result processing.
[0.43.0]
7b1c26a(#1344 by @Themayu) Windows: ImplementWebViewBuilderExtWindows::with_scroll_bar_styleto allow opting into Fluent Overlay style scrollbars.98d1a83(#1326 by @ollpu) Fix Linux IPC handler and initialization scripts when sharing a WebContext between multiple WebViews.
[0.42.0]
556a359(#1301 by @pewsheen) On macOS, emit an error when the URL scheme registration fails.19d83d7(#1332 by @lucasfernog) Fixes a crash on the Android custom protocol handler when the request URL is invalid.38abcb9(#1340 by @lucasfernog) Fixes custom protocols not triggered on Android on external redirects.d1f1e7e(#1299 by @kanatapple) FixWebview::boundsreturning logical values where it should have been physical.03cdf93(#1311 by @bukowa) Handlewebkit2gtkclose signal (whenwindow.closeis called from js)68413e8(#1296 by @MarijnS95) Breaking change: Upgradendkcrate to0.9and delete unusedndk-sysandndk-contextdependencies. Types from thendkcrate are used in public API surface. Breaking change: The publicandroid_setup()function now takes&ThreadLooperinstead of&ForeignLooper, signifying that the setup function must be called on the thread where the looper is attached (and theJNIEnvargument is already thread-local as well).39fc82c(#1306 by @Legend-Master) Support WebView2 version older than 101.0.1210.39 and documentincognitoandthemewill not work for versions before it5231a37(#1322 by @Legend-Master) Support WebView2 version older than 86.0.616.0 and document version requirements forback_forward_navigation_gestures,with_user_agent,with_hotkeys_zoom,with_browser_accelerator_keysa23a28d(#1341 by @amrbashir) Updatedwindowsto 0.58.
[0.41.0]
8b691df(#1285 by @pewsheen) On macOS, fix an issue that could cause a panic when running an async command.6c7f45e(#1287 by @FabianLars) Fixed a regression causing autoplay on windows to require user gestures.24a7d27(#1289 by @renovate) Updatewindowscrate to0.57andwebview2-comcrate to0.31
[0.40.1]
b6863ed(#1275) On Android, setRustWebViewClient.currentUrlfield early inonPageStartedmethod instead ofonPageFinishedf089964(#1276) Fixeswith_asynchronous_custom_protocolcrashing when sending the response on Linux.637289d(#1272) On Android, makeWryActivity.setWebviewmethod public to prevent JNI crashes.
[0.40.0]
a424a0b(#1270) On Windows, fix child webview invisible after creation because it was created with0,0sized6f8dd7(#1271) On Windows, create child webview at the top of z-order to align with other platforms.03d2535(#1269) On macOS, disable initialization script injection into subframes.1e65049(#1267) On macOS, fixed a crash when sending empty body by IPC.0f3c886(#1260) On macOS, fixed an issue of not being able to listen to the cmd+key event in javascript in single WebView.0f14e2a(#1259) Default the margin when printing on MacOS to 0 so it is closer to the behavior of when printing on the web.0f14e2a(#1259) AddWebViewExtMacOS::print_with_optionswhich allows to modify the margins that will be used on the print dialog.f516122(#1262) On Windows, enable webview2 non client region support which allows usingapp-regionCSS style.
[0.39.5]
4c88c66(#1247) Force the IPC and custom protocol tracing spans to have no parent.2d43d62(#1254) On Windows, fix webview having a bigger size than the actual window size after creation and until the window is resized.
[0.39.4]
8bbc2bf(#1237) FixWebviewBuilder::with_transparent,WebviewBuilder::with_background_color, andWebview::set_background_coloralways failing and causing the webview to fail to load.130c469(#1238) AddWebViewBuilderExtDarwin::with_data_store_identifier.203604c(#1233) On Windows, fix the webview not filling up the whole window if the parent window was resized during the webview initialization.
[0.39.3]
c7ca3db(#1221) On Windows, fix data directory created next to the executable with a gibberish name even if it was explicitly provided inWebConext::new
[0.39.2]
3e3d59c(#1215) On macOS, prevent NSExceptions and invalid memory access panics when dropping the WebView while custom protocols handlers may still be running.ca6b5fb(#1224) Updatewindowscrate to0.56
[0.39.1]
f0e82d3(#1217) Fix target detection on build script to enhance cross compiling capabilities.ed9fa9b(#1210) On iOS, allows media plays inline.
[0.39.0]
ddda455(#1207) Disable deprecated applicationCache web api. This api was completely removed upstream in webkitgtk 2.44.d7031ae(#1206) On Windows, fix a crash due to a double-free when the host window is destroyed before the webview is dropped.34ae1ca(#1202) Adddpimodule which is a re-export ofdpicrate.fdbd3d3(#1081) Updatehttpdependency to134ae1ca(#1202) Breaking Change: Removedx,y,withandheightfields fromRectstruct and replaced it withsizeandpositionfields.c033bd2(#1156) OnmacOS, fix menu keyboard shortcuts when addedwebviewaschild.
[0.38.2]
[0.38.1]
[0.38.0]
-
e6f0fbd(#1180) Fixes a null pointer exception when runningwindow.ipc.postMessage(null)on Android. -
5789bf7(#1187) Breaking change: Refactored the file-drop handling on the webview for better representation of the actual drag and drop operation:- Renamed
file-dropcargo feature flag todrag-drop. - Removed
FileDropEventenum and replaced with a newDragDropEventenum. - Renamed
WebViewAttributes::file_drop_handlerfield toWebViewAttributes::drag_drop_handler. - Renamed
WebViewAttributes::with_file_drop_handlermethod toWebViewAttributes::with_drag_drop_handler.
- Renamed
-
b8fea39(#1183) ChangedWebViewBuilder::with_ipc_handlerclosure to takehttp::Requestinstead ofStringso the request URL is available. -
3a2026b(#1182) Breaking changes: Changed a few methods onWebViewtype to return aResult:Webview::urlWebview::zoomWebview::load_urlWebview::load_url_with_headersWebview::boundsWebview::set_boundsWebview::set_visibleWebviewExtWindows::set_themeWebviewExtWindows::set_memory_usage_levelWebviewExtWindows::reparentWebviewExtUnix::reparentWebviewExtMacOS::reparent
-
00bc96d(#1179) AddedWryActivity::onWebViewCreate(android.webkit.WebView)on Android.
[0.37.0]
-
8c86fbaBreaking change: Removeddata:url support, as its native support in Windows and macOS are buggy and unreliable, useWebview::with_htmlinstead. -
8c86fbaOn Linux, decodeFilDropEventpaths before emitting them to make it consistent across all platforms. -
8c86fbaAddedWebViewExtMacOS::reparent,WebViewExtWindows::reparentandWebViewExtUnix::reparent. -
8c86fbaRevert global keys shortcuts (wry#1156) -
8c86fbaBreaking change: Removed internal url parsing which had a few side-effects such as encoded url content, now it is up to the user to pass a valid URL as a string. This also came with a few breaking changes:- Removed
Urlstruct re-export - Removed
Error::UrlErrorvariant. - Changed
WebviewAttributes::urlfield type toString. - Changed
WebviewBuilder::with_urlandWebviewBuilder::with_url_and_headersreturn type toWebviewBuilderinstead ofResult<WebviewBuilder>. - Changed
Webview::urlgetter to return aStringinstead ofUrl.
- Removed
[0.36.0]
-
8646120(#1159) On android, fixno non-static method ".evalScript(ILjava/lang/String;)"when callingWindow::eval. -
8646120(#1159) On macOS, fix a release build crashes with SEGV when callingWebView::evaluate_script. This crash bug was introduced at v0.35.2. -
8646120(#1159) Breaking change Update raw-window-handle crate to v0.6.HasWindowHandletrait is required for window types instead ofHasRawWindowHandle.wry::raw_window_handlenow re-exports v0.6.
-
8646120(#1159) OnmacOS, fix menu keyboard shortcuts. This issue bug was introduced inv2when addedwebviewaschild.
[0.35.2]
0ef041f(#1133) On Linux, apply passed webview bounds when usingWebView::new_gtkorWebViewBuilder::new_gtkwithgtk::Fixedwidget. This allows to create multiple webviews insidegtk::Fixedin the same window.0ef041f(#1133) Added tracing spans forevaluate_script,ipc_handlerandcustom_protocolsbehind thetracingfeature flag.
[0.35.1]
a4a39b9(#1098) Fix the API documentation cannot be built on docs.rs.e116d42(#1111) Fix screen share permissions dialog not showing up on macOS 14.0+a8c0d38(#1097) Fix IPC crash on wkwebview if receiving invalid types.8fddbb6(#1091) AddWebView::boundsgetter.30a85f3(#1122) On Windows, fix file drop handler.
[0.35.0]
-
e61e7f8(#1090) Breaking change Consistently useWebViewin API names. The following APIs were renamed:WebviewExtWindows→WebViewExtWindowsWebviewExtUnix→WebViewExtUnixWebviewExtMacOS→WebViewExtMacOSWebviewExtIOS→WebViewExtIOSWebviewExtAndroid→WebViewExtAndroidWebviewUriLoader→WebViewUriLoader
-
e61e7f8(#1090) AddWebViewExtWindows::set_memory_usage_levelAPI to set the memory usage target level on Windows. Setting 'Low' memory usage target level when an application is going to inactive can significantly reduce the memory consumption. Please read the guide for WebView2 for more details. -
e61e7f8(#1090) - Add cfg_aliases for easier feature configuration. And addos-webviewas default feature. -
e61e7f8(#1090) Enhance initalization script implementation on Android supporting any kind of URL. -
e61e7f8(#1090) Fix wkwebview crashed when received invalid UTF8 string from IPC. -
e61e7f8(#1090) Refactor new method to take raw window handle instead. Following are APIs got affected:applicationmodule is removed, andwebivewmodule is moved to root module.WebViewBuilder::new,WebView::newnow takeRawWindowHandleinstead.- Add
WebViewBuilder::new_as_child,WebView::new_as_childto crate a webview as a child inside a parent window. Webview::inner_sizeis removed.- Add
WebViewBuilderExtUnixtrait to extendWebViewBuilderon Unix platforms. - Add
new_gtkfunctions toWebViewBuilderExtUnixandWebviewExtUnix. - raw-window-handle crate is re-exported as
wry::raw_window_handle.
This also means that we removed
taoas a dependency completely which required some changes to the public APIs and to the Android backend:- Webview attributes
ipc_handler,file_drop_handler,document_change_handlerdon't take theWindowas first parameter anymore. Users should use closure to capture the types they want to use. - Position field in
FileDropevent is now a tuple of(x, y)physical position instead ofPhysicalPosition. Users need to handle scale factor - We exposed the
android_setupfunction that needs to be called once to setup necessary logic. - Previously the
android_binding!had internal call totao::android_bindingbut now thattaohas been removed, the macro signature has changed and you now need to calltao::android_bindingyourself, checkout the crate documentation for more information.
[0.34.2]
c2e6980(#1047) Fix doc building by removing dox feature requirement fromwebkit2gtk.82908d4(#1045) Fix docs.rs build.
[0.34.1]
[0.34.0]
ce95730(#1036) Upgrade gtk to 0.18 and bump MSRV to 1.70.0.591fda8(#1042) Usegtk's re-exported modules instead.b22a19e(#1037) Updatewindowsandwindows-implementcrate to0.51
[0.33.1]
[0.33.0]
5adf9da(#994) Breaking change Wry now defaults tohttp://<scheme>.localhost/for custom protocols on Android.844d95a(#1023) Fixes async custom protocol resolver on Windows.5adf9da(#994) AddWebViewBuilderExtAndroid::with_https_schemeto be able to choose betweenhttpandhttpsfor custom protocols on Android.c5c3731(#1024) Add winit-gtk to support winit feature flag on Linux.
[0.32.0]
4bdf1c3(#1017) AddedWebViewBuilder::with_asynchronous_custom_protocolto allow implementing a protocol handler that resolves asynchronously.70d8ae0(#1009) Fixes Android freezing when handling request due to endless iteration when reading request headers.b5e1875(#994) Breaking change Wry now defaults tohttp://<scheme>.localhost/for custom protocols on Windows.b5e1875(#994) AddWebViewBuilderExtWindows::with_https_schemeto be able to choose betweenhttpandhttpsfor custom protocols on Windows.fa15076(#163) Addwinitandtaofeature flag withtaoas default.4bdf1c3(#1017) Breaking change:WebViewBuidler::with_custom_protocolclosure now returnshttp::Responseinstead ofResult<http::Response>.ebc4a20(#1015) AddWebViewAtrributes.focusedandWebViewBuilder::with_focusedto control whether to focus the webview upon creation or not. Supported on Windows and Linux only.
[0.31.0]
e47562f(#993) Update the unmaintainedkuchikicrate to the maintainedkuchikikicrate.7a353c7(#980) AddWebViewBuilder::with_on_page_load_handlerfor providing a callback for handling various page loading events.b0a08b1(#997) Updatetaoto version0.22which has removed the global-shortcut, menus and tray features, see tao@v0.22 release.
[0.30.0]
17e04e2(#985) MakeWebViewBuilder::with_navigation_handlerapply to AndroidloadUrlcalls.17e04e2(#985) Add support forWebViewBuilder::with_navigation_handleron Android.87b331a(#978) On Windows, avoid resizing the webview when the window gets minimized to avoid unnecessaryresizeevent on JS side.17e04e2(#985) Update tao to 0.21.
[0.29.0]
-
c09dd7b(#968) Remove ActionBar handling from wry. If you want to hide the action bar, hide it using thethemes.xmlfile in your android project or inheritWryActivityclass and usegetSupportActionBar()?.hide()in theonCreatemethod. -
2b56bfa(#966) Add support forWebViewBuilder::with_htmlandWebViewAttributes.htmlon Android. -
d2c1819(#969) On Linux, replacelinux-headerflag withlinux-bodyflag. Request headers are enabled by default. Add request body on custom protocol but it's behind the flag. -
f7dded4(#955) The bug was reported in tauri repo: https://github.com/tauri-apps/tauri/issues/5986With input method preedit disabled,fcitx can anchor at edit cursor position. the pre-edit text will not disappear,instead it shows in the fcitx selection window below the input area.
-
2b56bfa(#966) Set base url and origin to null forWebViewBuilder::with_htmlandWebViewAttributes.htmlfor consistency on all platforms.
[0.28.3]
- On iOS, fix panic at runtime due to setting webview ivar.
[0.28.2]
- Adjust
cargo:rerun-if-changedinstruction for Android files.
[0.28.1]
- Fix unresolved reference in kotlin files when building for android.
- Support modifying user agent string on Android.
- On Linux and macOS, add synthesized event for mouse backward and forward buttons.
[0.28.0]
- Add
Webview::clear_browsing_datamethod. - On Android, generate a
proguard-wry.profile that could be used to keep the necessary symbols for wry when using minification. - Update
taoto0.19
[0.27.3]
- Adds a way to launch a WebView as incognito through a new API at WebViewBuilder named as
with_incognito. - On macOS and iOS, remove webcontext implementation since we don't actually use it. This also fix segfault if users drop webcontext early.
- Use the new WKWebView
inspectableproperty if available (iOS 16.4, macOS 13.3).
[0.27.2]
- On Android, Add support for native back button navigation.
- Fix
WebView::urlgetter on Android. - Add Webview attribute to enable/disable autoplay. Enabled by default.
- Fix the
WebViewBuilder::with_urlwhen the projet usemimalloc - Revert
51b49c54which hid the webview when minimized on Windows.
[0.27.1]
- On Windows, Linux and macOS, add method
evaluate_script_with_callbackto execute javascipt with a callback. Evaluated result will be serialized into JSON string and pass to the callback. - On iOS, set webview scroll bounce default to NO.
- Update the value returned on a
Nonevalue ofClassDecl::new("WryDownloadDelegate", class!(NSObject))fromUIViewControllertoWryDownloadDelegate.- 7795356 fix: WryDownloadDelegate call after first time on 2023-02-20
- On Linux, disable system appearance for scrollbars.
- On Windows and Linux, implement
WebviewBuilder::with_back_forward_navigation_gesturesandWebviewAttributes::back_forward_navigation_gesturesto control swipe navigation. Disabled by default.
[0.27.0]
- Add function to dispatch closure with the Android context.
- On macOS, fix crash when getting dragging position.
- On Android,
wrycan again load assets from the apk'sassetfolder via a custom protocol. This is set byWebViewBuilder's methodwith_asset_loader, which is exclusive to Android (by virtue of existing withinWebViewBuilderExtAndroid). - Update
webview2-comto0.22andwindows-rsto0.44which bumps the MSRV of this crate on Windows to1.64.
[0.26.0]
- Added
WebViewBuilderExtAndroidtrait and withon_webview_createdhook. - Enable dox feature when building docs.
- Expose
wry::webview::prelude::find_classfunction to find an Android class in the app project scope. - Added
WebviewExtIOStrait to access the WKWebView and userContentController references.
[0.25.0]
- Breaking Change: Bump webkit2gtk to 0.19. This will use webkit2gtk-4.1 as dependency from now on. Also Bump gtk version: 0.15 -> 0.16.
- Breaking Add position of the drop to
FileDropEventstruct. - On Android, fix the injection of
intialization_scriptsfor devServers where theContent-Typeheader includes more information than just"text/plain".
[0.24.1]
- Update
taoto0.16.0- a27a66b chore: update tao to 0.16.0 on 2023-01-11
[0.24.0]
- Changed env vars used when building for Android; changed
WRY_ANDROID_REVERSED_DOMAINtoWRY_ANDROID_PACKAGEandWRY_ANDROID_APP_NAME_SNAKE_CASEtoWRY_ANDROID_LIBRARY. - Fixes Android initialization scripts order.
- Remove redundant
.clone()calls and avoid unnecessary heap allocations. - Change return type of custom protocol handlers from
Result<Response<Vec<u8>>>toResult<Response<Cow<'static, [u8]>>>. This allows the handlers to return static resources without heap allocations. This is effective when you embed some large files like bundled JavaScript source as&'static [u8]usinginclude_bytes!. - Ensures that the script passed to
.with_initialization_script("here")is not empty. - Add APIs to process webview document title change.
- Evaluate scripts after the page load starts on Linux and macOS.
- Improve panic error messages on the build script.
- Add
WebViewBuilder::with_url_and_headersandWebView::load_url_with_headersto navigate to urls with headers. - Change class declare name from
UIViewControllertoWryNavigationDelegateto avoid class name conflict on iOS. - Rerun build script if the
WRY_ANDROID_KOTLIN_FILES_OUT_DIRdirectory changes. - On Windows, Add
WebviewBuilderExtWindows::with_themeandWebviewExtWindows::set_themeto change webview2 theme.
[0.23.4]
- Fixes Android initialization scripts order.
- Improve panic error messages on the build script.
[0.23.3]
[0.23.2]
- On macOS, remove all custom keydown implementations. This will bring back keydown regression but should allow all accelerator working.
- Suppress
unused_variableswarning reported only in release build. - Add
WebViewBuilderExtWindows::with_browser_accelerator_keysmethod to allow disabling browser-specific accelerator keys enabled in WebView2 by default. Whenfalseis passed, it disables all accelerator keys that access features specific to a web browser. See the official WebView2 document for more details.
[0.23.1]
- Fixes usage of the
linux-headersfeature.- 64a72ff fix(wry): correctly use the linux-headers feature on 2022-12-05
[0.23.0]
- Properly parse the content type header for the
android.webkit.WebResourceResponsemime type. - Change typo in
WebViewBuilderExtWindows::with_additionl_browser_args. toWebViewBuilderExtWindows::with_additional_browser_args. - Add
Webiew::load_url. - Change the type of
WebViewBuilderExtWindows::with_additional_browser_argsargument fromAsRef<str>toInto<String>to reduce extra allocation. - Validate custom protocol response status code on Android.
- [
04422bc1b5] On macOS, revert content view to native NSView ([#782])(https://github.com/tauri-apps/wry/pull/782)
[0.22.6]
- Fixes usage of the
linux-headersfeature.- 14c5ae7 fix(wry): correctly use the linux-headers feature on 2022-12-05
[0.22.5]
- On macOS, fix arrow keys misprint text on textarea.
[0.22.4]
- On Linux, add
linux-headersfeature flag to fix version regression. The minimum webkit2gtk version remains v2.22.
[0.22.3]
- On macOS, fix keyinput missing by calling superclass methods.
[0.22.2]
- On macOS, add an API to enable or disable backward and forward navigation gestures.
- On macOS, pass key event to menu if we have one on key press.
[0.22.1]
- Fix
WebViewBuilder::with_accept_first_mousetaking behavior of first initalized webview. - Fix download implementation on macOS older than 11.3.
- On macOS, remove webview from window's NSView before dropping.
[0.22.0]
- Added
WebViewAttributes::with_accept_first_mousemethod for macOS. - Breaking change Custom protocol now takes
Requestand returnsResponsetypes fromhttpcrate. - Enabled devtools in debug mode by default.
- On Desktop, add
download_started_handleranddownload_completed_handler. Seeblob_downloadanddownload_eventexample for their usages. - Fix double permission dialog on macOS 12+ and iOS 15+.
- Focus webview when window starts moving or resizing on Windows to automatically close
<select>dropdowns. Also notify webview2 whenever the window position/size changes which fixes the<select>dropdown position - On Windows, hide the webview when the window is minimized to reduce memory and cpu usage.
- Internally return with error from custom protocol if an invalid uri was requseted such as
wry://which doesn't contain a host. - Support cross compiling ios on a non macos host.
- On Linux, Improve custom protocol with http headers / method added to request, and status code / http headers added to response. This feature is 2.36 only, version below it will fallback to previous implementation.
- On macOS, add WKWebview as subview of existing NSView directly.
- Keypress on non-input element no longer triggers unsupported key feedback sound.
- Remove the IPC script message handler when the WebView is dropped on macOS.
- Breaking change Removed http error variants from
wry::Errorand replaced with genericHttpErrorvariant that can be used to converthttpcrate errors. - Disabled Microsoft SmartScreen by default on Windows.
- Add
WebView::urlto get the current url. - Breaking change Removed
httpmodule and replaced with re-export ofhttpcrate. - Add
WebviewBuilderExtWindows::with_additionl_browser_argsmethod to pass additional browser args to Webview2 On Windows. By default wry passes--disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtectionso if you use this method, you also need to disable these components by yourself if you want. - On Windows, fix canonical reason for custom protocol response.
- On macOS, make the webview first responder.
[0.21.1]
[0.21.0]
- Implement
<input type="file">on Android. - Add
WebviewExtAndroid::handlewhich can be used to execute some code using JNI context. - Enable JS alert, confirm, prompt on Android.
- Prompt for permissions on Android when needed.
- Implement
webview_versionon Android. - Enable storage, geolocation, media playback,
window.open. - Improve Android initialization script implementation.
- WRY will now generate the needed kotlin files at build time but you need to set
WRY_ANDROID_REVERSED_DOMAIN,WRY_ANDROID_APP_NAME_SNAKE_CASEandWRY_ANDROID_KOTLIN_FILES_OUT_DIRenv vars. - Breaking change Removed
WebView::focus. - Updated tao to
0.14- 483bad0 feat: tao as window dependency (#230) on 2021-05-03
- 51430e9 publish new versions (#221) on 2021-05-09
- 0cf0089 Update tao to v0.2.6 (#271) on 2021-05-18
- a76206c publish new versions (#272) on 2021-05-18
- 3c4f8b8 Update tao to v0.5 (#365) on 2021-08-09
- 44aa1dc publish new versions (#351) on 2021-08-09
- 935cc5f Update tao to 0.13 (#642) on 2022-07-27
- 657888a Publish New Versions (#632) on 2022-07-27
- 3a91376 chore(deps): update tao to 0.14 (#691) on 2022-09-13
- Allow setting the webview background color.
- Added the
RustWebViewclass on Android. - Update the
windowscrate to the latest 0.39.0 release andwebview2-comto 0.19.1 to match. - On Windows, automatically focus the webview when the window gains focus to match other platforms.
[0.20.2]
- Implement custom protocol on Android.
- Implement
WebView::evalon Android. - On iOS, add webview as subview instead of replacing original view.
- Move WebView logic from tao to wry.
[0.20.1]
- Add android support
- Enable private picture-in-picture on macos.
- On macOS, fix devtool warning
- 2eba8c9 fix: devtool warning by adding parent view
[0.20.0]
- Add
WebViewBuilder::with_clipboard. - Fix typos in several files.
- Set webview2 language to match the OS language. This makes i18n functions like
new Date().toLocaleStrin()behave correctly. - Update tao to 0.13.0.
[0.19.0]
-
- Automatically resize the webview on Windows to align with other platforms.
- Breaking change: Removed
WebView::resize - d7c9097 feat: auto resize webview on Windows (#628) on 2022-06-27
- Implement new window requested handler
- Re-export
url::Url. - Update tao to 0.12
[0.18.3]
[0.18.2]
[0.18.1]
- Remove unused tray from doc features.
[0.18.0]
[0.17.0]
- Add option to enable/disable zoom shortcuts for WebView2, disabled by default.
- Prevent memory leak on macOS.
- Update the
windowscrate to the latest 0.37.0 release andwebview2-comto 0.16.0 to match.
The #[implement] macro in windows-implement and the implement feature in windows depend on some const generic features which stabilized in rustc 1.61. The MSRV on Windows targets is effectively 1.61, but other targets do not require these features.
The webview2-com crate specifies rust-version = "1.61", so wry will inherit that MSRV and developers on Windows should get a clear error message telling them to update their toolchain when building wry or anything that depends on wry. Developers targeting other platforms should be able to continue using whatever toolchain they were using before.
[0.16.2]
[0.16.1]
- Fixes a crash on macOS below Big Sur due to
titlebarSeparatorStyle(11+ API) usage.- eb2dddb fix(macos): only use APIs when supported on 2022-05-08
- Only run
WebView::printon macOS on v11+. This prevents a crash on older versions.- eb2dddb fix(macos): only use APIs when supported on 2022-05-08
[0.16.0]
- Fixes a typo in the
WebviewExtMacOSconditional compilation. - Fixes a crash when the custom protocol response is empty on macOS.
- Add
WebView::zoommethod. - Set the titlebar separator style in macOS to
none. - Disable webview2 mini menu
[0.15.1]
- Update how android handles url
- Add devtools support on Android/iOS.
- Fix to reset process on MacOS when webview is closed, closes #536.
[0.15.0]
- On Windows and Linux, disable resizing maximized borderless windows.
- Fixes a memory leak on the custom protocol response body on macOS.
- Update tao to v0.8.0.
- The
trayandayatana-trayCargo features are not enabled by default. - Breaking change: Renamed the
ayatanaCargo feature toayatana-trayand added thegtk-trayfeature. The default tray on Linux is nowlibayatana-appindicator.
[0.14.0]
- Added
close_devtoolsfunction toWebview. - Hide the devtool functions behind the
any(debug_assertions, feature = "devtools")flag. - Breaking change: Renamed the
devtoolfunction toopen_devtools. - Enable tab navigation on macOS.
- Added
is_devtools_openfunction toWebview. -
- Expose methods to access the underlying native handles of the webview.
- Breaking change:
WebviewExtWindows::controllernow returns the controller directly and not wrapped in anOption - e54afec feat: expose webview native handles, closes #495 (#513) on 2022-03-03
- Add navigation handler to decide if an url is allowed to navigate.
- Breaking change: Renamed the
devtoolfeature todevtools. - Breaking change: Renamed the
with_dev_toolfunction towith_devtools.
[0.13.3]
- Fix rustdoc generation of Windows and Mac on docs.rs.
[0.13.2]
- Fix cross compilation from
macOS. - Update
webview2-comto 0.13.0, which bumps the WebView2 SDK to 1.0.1108.44 and improves cross-compilation support.
Targeting *-pc-windows-gnu works now, but it has some limitations.
- 24a443c Add /.changes/webview2-com-0.13.0.md on 2022-02-14
[0.13.1]
-
Add
devtoolfeature flag and configuration option. -
Update the
webview2-comcrate 0.11.0: -
Fix silent build script errors related to unconfigured nuget in https://github.com/wravery/webview2-rs/pull/4
-
Update the WebView2 SDK (not the runtime, just the API bindings) to the latest 1.0.1072.54 version
[0.13.0]
- Update gtk to 0.15
- Add clipboard field in WebViewAttributes.
- Ignore transparency on Windows 7 to prevent application crash.
- Remove clipboard property for consistency across platforms.
- Enable cookie persistence on Linux if the
data_directoryis provided. - Enable objc's exception features so they can be treated as panic message.
- Add inner size method for webview. This can reflect correct size of webview on macOS.
- Add "transparent" and "fullscreen" feature flags on macOS to toggle private API.
- Implement WebContextImpl on mac to extend several callback lifetimes.
- The only thing that private mod shared does is re-export http mod to public, we can just pub mod http.
-
- Fix hovering over an edge of undecorated window on Linux won't change cursor.
- Undecorated window can be resized using touch on Linux.
- 219d20c Merge next back to dev branch (#477) on 2022-02-05
- Update webkit2gtk to 0.15
- Add
with_user_agent(&str)toWebViewBuilder. - Replace all of the
winapicrate references with thewindowscrate, and replacewebview2andwebview2-syswithwebview2-comandwebview2-com-sysbuilt with thewindowscrate. The replacement bindings are in thewebview2-com-syscrate, withpub usein thewebview2-comcrate. They can be shared with TAO. - Fix null pointer crash on
get_contentof web resource request. This is a temporary fix. We will switch it back once upstream is updated. - Update the
windowscrate to 0.25.0, which comes with pre-built libraries. WRY and Tao can both reference the same types directly from thewindowscrate instead of sharing bindings inwebview2-com-sys. - Update the
windowscrate to 0.29.0 andwebview2-comto 0.9.0. - Update the
windowscrate to 0.30.0 andwebview2-comto 0.10.0.
[0.12.2]
-
Fixed a Linux multi-window issue where the internal url loader didn't unlock when flushed while empty
-
The custom protocol now returns a
Requestand expects aResponse. -
This allows us to get the complete request from the Webview. (Method, GET, POST, PUT etc..) Read the complete header.
-
And allow us to be more flexible in the future without bringing breaking changes.
-
d202573 refactor: Custom protocol request/response (#387) on 2021-08-22
-
On Linux, automation callbacks now use the first created webview as the return value
[0.12.1]
- Add html attributes as another method to load the page. This can provide some other origin header and make CORS request possible.
- Shorter protocol name on Windows. This can make origin be shorter too.
[0.12.0]
- Custom Protocol handlers no longer take a
&Windowparameter. - Update gtk to version 0.14. This also remove requirement of
clang. - Update tao to v0.5. Please see release notes on tao for more information.
- Add flags to support all other possible unix systems.
- Support having multiple webkit2gtk
WebViews on a singleWebContext. - On Windows, Fix cursor flickering when Tao window is without decorations
- Remove winrt support since it's outdated for a long time. We will reimplement it again once
windws-rsis stable!
[0.11.0]
- Allow resizing of borderless window on Windows
- Mark enums as
#[non_exhaustive]to prevent breaking changes on enum update. - Bump tao to
0.4. Please refer totaochangelog for more details. -
- Add
focusmethod toWebview
- Add
- Add
WebviewExtWindowstrait withcontrollermethod - 621ed1f feat: add
.focus()toWebview(#325) on 2021-07-05 - 96b7b94 Add controller method instead (#326) on 2021-07-07
- macOS: Remove handler in the webview as it should be handled with the menu.
- Fixes multiple custom protocols registration on Windows.
[0.10.3]
- #315 fixed Webview2 runtime performance issues.
[0.10.2]
- Fix file explorer getting blocked by automation.
[0.10.1]
WebContext::set_allows_automationis now available to specify if the context should allow automation (e.g. WebDriver). It is only enforced on Linux, but may expand platforms in the future.
[0.10.0]
- Add WebViewAttributes
- Add
with_web_contextmethod that can work well with builder pattern. - Change the custom protocol handler on macOS so it returns a response on error and a status code on success.
- Update signature of custom protocol closure. It should return a mime type string now.
- Fix webview creation when using new_any_thread of event loop.
- Remove
Dispatcher,dispatch_scriptanddispatcherin thewebviewmodule and add ajsparameter toevaluate_script. - Removes the
imagedependency. - Bump tao to
0.3and add more examples.
For more details, please refer to tao changelog.
- cd4697e bump
taoto 0.3 with examples (#294) on 2021-06-21 - Add
wry::webview::WebContext. It's now a required argument onWebViewBuilder::build.
[0.9.4]
- Update tao to v0.2.6
[0.9.3]
- Expose
webview_versionfunction in thewebviewmodule. - Add print method on Linux and Windows.
- Disable smooth scrolling on Linux to match behaviour on browsers.
[0.9.2]
[0.9.1]
- Correctly set visibility when building
Windowon gtk-backend - Fix
macOScursors and other minors UI glitch. - Expose
print()function to the webview. Work only on macOS for now. - Fix macOS windows order for tray (statusbar) applications.
- Add
request_redrawmethod ofWindowon Linux - Add tao as window dependency.
- Close the window when the instance is dropped on Linux and Windows.
- Remove winit dependency on Linux
[0.9.0]
- Refactor signatures of most closure types
- Drop handler closures properly on macOS.
- Fix
history.pushStatein webview2. - The
data_directoryfield now affects the IndexedDB and LocalStorage directories on Linux. - Fix runtime panic on macOS, when no file handler are defined.
- Add position field on WindowAttribute
- Fix panic on multiple custom protocols registration.
- Fix SVG render with the custom protocol.
- Initial custom WindowExtWindows trait.
- Fix transparency on Windows
- Add platform module and WindowExtUnix trait on Linux
- Make sure custom protocol on Windows is over HTTPS.
- Initial winit interface for gtk backend
[0.8.0]
- Wry now accepts multiple custom protocol registrations.
- Apply license header for SPDX compliance.
- Remove bindings crate and use windows-webview2 as dependency instead.
[0.7.0]
- Add old win32 implementation on windows as default feature flag.
- Adds a
WindowProxyto the file drop handler closure -WindowFileDropHandler.
[0.6.2]
- Add pipe back to version check for covector config. This prevents the CI failure on publish if it exists already. The issue was patched in covector (and tests in place so it doesn't break in the future).
- Fix messages to the webview from the backend being delayed on Linux/GTK when the user is not actively engaged with the UI.
- Add draggable regions, just add
drag-regionclass to the html element. - Add event listener in application proxy
- Better result error handling
- Fix visibility on webview2 when window was invisible previously and then shown.
[0.6.1]
- Add attribute option to allow WebView on Windows use user_data folder
[0.6.0]
- Initialize covector!
- Support Windows 7, 8, and 10
- Dev tools are enabled on debug build
- Add skip task bar option
- Add custom protocol option
- Add transparent option to mac and linux
- Error type has Send/Sync traits
- 3536b83 Add .changes file in prepare of v0.6 on 2021-02-24
- Replace Callback with RPC handler
- Add File drop handlers