Skip to content

Commit

Permalink
Fix typos (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
bg5hfc authored Jul 11, 2022
1 parent d972241 commit 4466250
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 23 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-typos-in-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": patch
---

Fix typos in several files.
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The `webview2-com` crate specifies `rust-version = "1.61"`, so `wry` will inheri
- - Expose methods to access the underlying native handles of the webview.
- **Breaking change**: `WebviewExtWindows::controller` now returns the controller directly and not wrapped in an `Option`
- [e54afec](https://github.com/tauri-apps/wry/commit/e54afec43b767ffdb43debbd526d249c3c5b5490) feat: expose webview native handles, closes [#495](https://github.com/tauri-apps/wry/pull/495) ([#513](https://github.com/tauri-apps/wry/pull/513)) on 2022-03-03
- Add navigation handler to decide if a url is allowed to navigate.
- Add navigation handler to decide if an url is allowed to navigate.
- [aa8af02](https://github.com/tauri-apps/wry/commit/aa8af020ab9d88ad762f2facbfa368effb04f570) feat: Implement navigation event and cancellation, closes [#456](https://github.com/tauri-apps/wry/pull/456) ([#519](https://github.com/tauri-apps/wry/pull/519)) on 2022-03-18
- **Breaking change**: Renamed the `devtool` feature to `devtools`.
- [bf3b710](https://github.com/tauri-apps/wry/commit/bf3b7107631f14567b0b5ff1947c2bff1ffa2603) feat: add function to close the devtool and check if it is opened ([#529](https://github.com/tauri-apps/wry/pull/529)) on 2022-03-28
Expand Down Expand Up @@ -311,7 +311,7 @@ Targeting \*-pc-windows-gnu works now, but it has some [limitations](https://git

## \[0.9.1]

- Correctly set visibilty when building `Window` on gtk-backend
- Correctly set visibility when building `Window` on gtk-backend
- [4395ad1](https://github.com/tauri-apps/wry/commit/4395ad147b799e67f9802c499346d0ad53554317) fix: only call `show_all` when needed ([#227](https://github.com/tauri-apps/wry/pull/227)) on 2021-05-02
- Fix `macOS` cursors and other minors UI glitch.
- [d550b2f](https://github.com/tauri-apps/wry/commit/d550b2f0a1c708747537e3a5e6d880fea00e651d) fix(macOS): Window layers ([#220](https://github.com/tauri-apps/wry/pull/220)) on 2021-04-28
Expand Down Expand Up @@ -344,7 +344,7 @@ Targeting \*-pc-windows-gnu works now, but it has some [limitations](https://git
- [22a4991](https://github.com/tauri-apps/wry/commit/22a4991aa8ca7c75aa52150a90379c40bcc34d07) bug(macOS): Runtime panic when no file_drop_handler ([#177](https://github.com/tauri-apps/wry/pull/177)) on 2021-04-20
- Add position field on WindowAttribute
- [2b3be7a](https://github.com/tauri-apps/wry/commit/2b3be7a4db2cbc1612c7105cb698c1f21a05da77) Add position field on WindowAttribute ([#219](https://github.com/tauri-apps/wry/pull/219)) on 2021-04-28
- Fix panic on mutiple custom protocol registration.
- Fix panic on multiple custom protocols registration.
- [01647a2](https://github.com/tauri-apps/wry/commit/01647a2a5b769bc192754c2d3806a55112d58d33) Fix custom protocol registry on mac ([#205](https://github.com/tauri-apps/wry/pull/205)) on 2021-04-26
- Fix SVG render with the custom protocol.
- [890cfe5](https://github.com/tauri-apps/wry/commit/890cfe527996c181d643c9f8e5fc3e79ff0841a0) fix(custom-protocol): SVG mime type - close [#168](https://github.com/tauri-apps/wry/pull/168) ([#169](https://github.com/tauri-apps/wry/pull/169)) on 2021-04-19
Expand All @@ -361,7 +361,7 @@ Targeting \*-pc-windows-gnu works now, but it has some [limitations](https://git

## \[0.8.0]

- Wry now accepts multiple custom protocol registerations.
- Wry now accepts multiple custom protocol registrations.
- [db64fc6](https://github.com/tauri-apps/wry/commit/db64fc69c48a728184fcef001688b94f0294edab) feat/licenses ([#155](https://github.com/tauri-apps/wry/pull/155)) on 2021-04-14
- Apply license header for SPDX compliance.
- [05e0218](https://github.com/tauri-apps/wry/commit/05e02180c9fe929d3e691185df44257654546935) feat: multiple custom protocols ([#151](https://github.com/tauri-apps/wry/pull/151)) on 2021-04-11
Expand All @@ -386,7 +386,7 @@ Targeting \*-pc-windows-gnu works now, but it has some [limitations](https://git
- [b2a0bfc](https://github.com/tauri-apps/wry/commit/b2a0bfc289786d0a23dac0c8d9543771e70e3427) feat/ draggable-region ([#92](https://github.com/tauri-apps/wry/pull/92)) on 2021-03-25
- Add event listener in application proxy
- [c49846c](https://github.com/tauri-apps/wry/commit/c49846cfc41bb548a685edeac5f8036501f7dcec) feat: event listener ([#129](https://github.com/tauri-apps/wry/pull/129)) on 2021-03-26
- Better result errror handling
- Better result error handling
- [485035f](https://github.com/tauri-apps/wry/commit/485035f17d28560966b07b512935821814f0e951) chore: better result error handling ([#124](https://github.com/tauri-apps/wry/pull/124)) on 2021-03-21
- Fix visibility on webview2 when window was invisible previously and then shown.
- [6d31706](https://github.com/tauri-apps/wry/commit/6d31706a6bff43e9b28100675cf8fc12f29db248) Fix visibility on webview2 when window was invisible previously ([#128](https://github.com/tauri-apps/wry/pull/128)) on 2021-03-24
Expand Down
8 changes: 4 additions & 4 deletions bench/src/build_benchmark_jsons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ fn main() {
let mut all_data: Vec<utils::BenchResult> =
serde_json::from_reader(all_data_buffer).expect("Unable to read all data buffer");

// add current data to alls data
// add current data to all data
all_data.push(current_data);

// use only latest 20 elements from alls data
// use only latest 20 elements from all data
let recent: Vec<utils::BenchResult>;
if all_data.len() > 20 {
recent = all_data[all_data.len() - 20..].to_vec();
} else {
recent = all_data.clone();
}

// write json's
// write jsons
utils::write_json(
wry_data.to_str().expect("Something wrong with wry_data"),
&serde_json::to_value(&all_data).expect("Unable to build final json (alls)"),
&serde_json::to_value(&all_data).expect("Unable to build final json (all)"),
)
.expect(format!("Unable to write {:?}", wry_data).as_str());

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
//! This feature requires either `libayatana-appindicator` or `libappindicator` package installed.
//! You can still create those types if you disable it. They just don't create the actual objects.
//! - `devtools`: Enables devtools on release builds. Devtools are always enabled in debug builds.
//! On **macOS**, enabling devtools, reuires calling private apis so you should enabling this flag in release
//! On **macOS**, enabling devtools, requires calling private apis so you should enabling this flag in release
//! build if your app needs to publish to App Store.
//! - `transparent`: Transparent background on **macOS** requires calling private functions.
//! Avoid this in release build if your app needs to publish to App Store.
Expand Down
16 changes: 8 additions & 8 deletions src/webview/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@ pub struct WebViewAttributes {
/// Set a navigation handler to decide if incoming url is allowed to navigate.
///
/// The closure take a `String` parameter as url and return `bool` to determine the url. True is
/// allow to nivagate and false is not.
/// allow to navigate and false is not.
pub navigation_handler: Option<Box<dyn Fn(String) -> bool>>,

/// Set a new window handler to decide if incoming url is allowed to open in a new window.
///
/// The closure take a `String` parameter as url and return `bool` to determine the url. True is
/// allow to nivagate and false is not.
/// allow to navigate and false is not.
pub new_window_req_handler: Option<Box<dyn Fn(String) -> bool>>,

/// Enables clipboard access for the page rendered on **Linux** and **Windows**.
Expand Down Expand Up @@ -189,9 +189,9 @@ impl Default for WebViewAttributes {

/// Builder type of [`WebView`].
///
/// [`WebViewBuilder`] / [`WebView`] are the basic building blocks to constrcut WebView contents and
/// [`WebViewBuilder`] / [`WebView`] are the basic building blocks to construct WebView contents and
/// scripts for those who prefer to control fine grained window creation and event handling.
/// [`WebViewBuilder`] privides ability to setup initialization before web engine starts.
/// [`WebViewBuilder`] provides ability to setup initialization before web engine starts.
pub struct WebViewBuilder<'a> {
pub webview: WebViewAttributes,
web_context: Option<&'a mut WebContext>,
Expand Down Expand Up @@ -360,7 +360,7 @@ impl<'a> WebViewBuilder<'a> {
/// Set a navigation handler to decide if incoming url is allowed to navigate.
///
/// The closure takes a `String` parameter as url and return `bool` to determine the url. True is
/// allowed to nivagate and false is not.
/// allowed to navigate and false is not.
pub fn with_navigation_handler(mut self, callback: impl Fn(String) -> bool + 'static) -> Self {
self.webview.navigation_handler = Some(Box::new(callback));
self
Expand Down Expand Up @@ -405,9 +405,9 @@ impl<'a> WebViewBuilder<'a> {

/// The fundamental type to present a [`WebView`].
///
/// [`WebViewBuilder`] / [`WebView`] are the basic building blocks to constrcut WebView contents and
/// [`WebViewBuilder`] / [`WebView`] are the basic building blocks to construct WebView contents and
/// scripts for those who prefer to control fine grained window creation and event handling.
/// [`WebView`] presents the actuall WebView window and let you still able to perform actions
/// [`WebView`] presents the actual WebView window and let you still able to perform actions
/// during event handling to it. [`WebView`] also contains the associate [`Window`] with it.
pub struct WebView {
window: Rc<Window>,
Expand Down Expand Up @@ -507,7 +507,7 @@ impl WebView {
self.webview.close_devtools();
}

/// Gets the devtool window's current vibility state.
/// Gets the devtool window's current visibility state.
///
/// ## Platform-specific
///
Expand Down
2 changes: 1 addition & 1 deletion src/webview/webkitgtk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ impl InnerWebView {
let window: gtk::Window = window.downcast().unwrap();
if !window.is_decorated() && window.is_resizable() {
if let Some(window) = window.window() {
// Safe to unwrap since it's a valide GtkWindow
// Safe to unwrap since it's a valid GtkWindow
let result = hit_test(&window, cx, cy);

// we ignore the `__Unknown` variant so the webview receives the click correctly if it is not on the edges.
Expand Down
4 changes: 2 additions & 2 deletions src/webview/webview2/file_drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ impl FileDropHandler {
win32f::DV_E_FORMATETC => {
// If the dropped item is not a file this error will occur.
// In this case it is OK to return without taking further action.
"Error occured while processing dropped/hovered item: item is not a file."
"Error occurred while processing dropped/hovered item: item is not a file."
}
_ => "Unexpected error occured while processing dropped/hovered item.",
_ => "Unexpected error occurred while processing dropped/hovered item.",
}
);
None
Expand Down
4 changes: 2 additions & 2 deletions src/webview/wkwebview/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub struct InnerWebView {
pub(crate) ns_window: id,
pub(crate) manager: id,
// Note that if following functions signatures are changed in the future,
// all fucntions pointer declarations in objc callbacks below all need to get updated.
// all functions pointer declarations in objc callbacks below all need to get updated.
ipc_handler_ptr: *mut (Box<dyn Fn(&Window, String)>, Rc<Window>),
navigation_decide_policy_ptr: *mut Box<dyn Fn(String, bool) -> bool>,
#[cfg(target_os = "macos")]
Expand Down Expand Up @@ -690,7 +690,7 @@ impl NSString {
length:s.len()
encoding:UTF8_ENCODING];

// The thing allocs in rust, the thing must be set to autorelease in rust to relinquish control
// The thing is allocated in rust, the thing must be set to autorelease in rust to relinquish control
// or it can not be released correctly in OC runtime
let _: () = msg_send![ns_string, autorelease];

Expand Down

0 comments on commit 4466250

Please sign in to comment.