From d153290fd69d818e3e30d995c1af871f43550fdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=96R=C3=96K=20Attila?= Date: Wed, 17 Jan 2024 21:57:30 +0100 Subject: [PATCH] nits: Fix a whole bunch of typos all over the place --- core/build_playerglobal/src/lib.rs | 4 ++-- core/src/avm1/activation.rs | 4 ++-- core/src/avm1/object.rs | 4 ++-- core/src/avm1/property_map.rs | 18 +++++++++--------- core/src/avm1/runtime.rs | 2 +- core/src/avm2.rs | 6 +++--- core/src/avm2/activation.rs | 2 +- core/src/avm2/globals/README.md | 2 +- core/src/avm2/globals/date.rs | 2 +- .../avm2/globals/flash/display/shader_job.rs | 2 +- .../avm2/globals/flash/display3D/context_3d.rs | 2 +- .../avm2/globals/flash/net/FileReference.as | 4 ++-- .../globals/flash/net/NetStreamPlayOptions.as | 2 +- .../flash/text/engine/BreakOpportunity.as | 2 +- .../globals/flash/text/engine/TextBlock.as | 2 +- core/src/avm2/globals/flash/utils/timer.rs | 2 +- core/src/avm2/namespace.rs | 4 ++-- core/src/avm2/object.rs | 2 +- core/src/avm2/object/stage_object.rs | 2 +- core/src/avm2/object/xml_list_object.rs | 4 ++-- core/src/avm2/object/xml_object.rs | 4 ++-- core/src/avm2/vector.rs | 4 ++-- core/src/avm2/vtable.rs | 2 +- core/src/backend/audio.rs | 6 +++--- core/src/bitmap.rs | 2 +- core/src/context.rs | 8 ++++---- core/src/debug_ui/movie.rs | 2 +- core/src/display_object.rs | 10 +++++----- core/src/display_object/container.rs | 6 +++--- core/src/display_object/interactive.rs | 2 +- core/src/display_object/morph_shape.rs | 4 ++-- core/src/display_object/stage.rs | 4 ++-- core/src/font.rs | 6 +++--- core/src/library.rs | 2 +- core/src/streams.rs | 4 ++-- desktop/src/app.rs | 2 +- flv/src/tag.rs | 2 +- render/canvas/src/lib.rs | 4 ++-- render/naga-agal/src/builder.rs | 10 +++++----- render/naga-pixelbender/src/lib.rs | 6 +++--- render/wgpu/src/context3d/current_pipeline.rs | 2 +- render/wgpu/src/context3d/mod.rs | 8 ++++---- render/wgpu/src/pipelines.rs | 2 +- scanner/src/analyze.rs | 2 +- swf/src/read.rs | 2 +- swf/src/types.rs | 4 ++-- tests/input-format/src/injector.rs | 2 +- .../bitmapdata_copypixels_blend_over/Test.as | 2 +- .../swfs/avm2/stage3d_texture/Camera3D.as | 6 +++--- .../swfs/avm2/stage3d_texture/Sphere3D.as | 4 ++-- web/packages/core/src/polyfills.ts | 2 +- web/packages/core/src/public-api.ts | 2 +- web/packages/core/src/ruffle-player.ts | 4 ++-- wstr/src/buf.rs | 2 +- wstr/src/common.rs | 2 +- 55 files changed, 104 insertions(+), 104 deletions(-) diff --git a/core/build_playerglobal/src/lib.rs b/core/build_playerglobal/src/lib.rs index ca8238eee..d2690876c 100644 --- a/core/build_playerglobal/src/lib.rs +++ b/core/build_playerglobal/src/lib.rs @@ -297,7 +297,7 @@ fn strip_metadata(abc: &mut AbcFile) { } } -/// Handles native functons defined in our `playerglobal` +/// Handles native functions defined in our `playerglobal` /// /// The high-level idea is to generate code (specifically, a `TokenStream`) /// which builds a table - mapping from the method ids of native functions, @@ -524,7 +524,7 @@ fn write_native_table(data: &[u8], out_dir: &Path) -> Result, Box Result<(), Box> { let pattern = RegexBuilder::new( r#" - \b (?P stub_method | stub_getter | stub_setter | stub_constructor) \s* + \b (?P stub_method | stub_getter | stub_setter | stub_constructor) \s* \( \s* "(?P .+)" \s* , \s* diff --git a/core/src/avm1/activation.rs b/core/src/avm1/activation.rs index 557ea7ec6..311e8ef44 100644 --- a/core/src/avm1/activation.rs +++ b/core/src/avm1/activation.rs @@ -236,7 +236,7 @@ impl Drop for Activation<'_, '_> { } impl<'a, 'gc> Activation<'a, 'gc> { - /// Convenience method to retrieve the current GC context. Note that explicitely writing + /// Convenience method to retrieve the current GC context. Note that explicitly writing /// `self.context.gc_context` can be sometimes necessary to satisfy the borrow checker. #[inline(always)] pub fn gc(&self) -> &'gc gc_arena::Mutation<'gc> { @@ -3113,7 +3113,7 @@ impl<'a, 'gc> Activation<'a, 'gc> { } /// Checks that the clip executing a script still exists. - /// If the clip executing a script is removed during exectuion, return from this activation. + /// If the clip executing a script is removed during execution, return from this activation. /// Should be called after any action that could potentially destroy a clip (gotos, etc.) fn continue_if_base_clip_exists(&self) -> Result, Error<'gc>> { // The exception is `unload` clip event handlers, which currently are called when the clip diff --git a/core/src/avm1/object.rs b/core/src/avm1/object.rs index 817c06e4c..c22121b59 100644 --- a/core/src/avm1/object.rs +++ b/core/src/avm1/object.rs @@ -306,7 +306,7 @@ pub trait TObject<'gc>: 'gc + Collect + Into> + Clone + Copy { } } - /// Retrive a getter defined on this object. + /// Retrieve a getter defined on this object. fn getter( &self, name: AvmString<'gc>, @@ -315,7 +315,7 @@ pub trait TObject<'gc>: 'gc + Collect + Into> + Clone + Copy { self.raw_script_object().getter(name, activation) } - /// Retrive a setter defined on this object. + /// Retrieve a setter defined on this object. fn setter( &self, name: AvmString<'gc>, diff --git a/core/src/avm1/property_map.rs b/core/src/avm1/property_map.rs index a524d8787..c209d1b44 100644 --- a/core/src/avm1/property_map.rs +++ b/core/src/avm1/property_map.rs @@ -1,5 +1,5 @@ //! The map of property names to values used by the ActionScript VM. -//! This allows for dynamically choosing case-sensitivty at runtime, +//! This allows for dynamically choosing case-sensitivity at runtime, //! because SWFv6 and below is case-insensitive. This also maintains //! the insertion order of properties, which is necessary for accurate //! enumeration order. @@ -25,7 +25,7 @@ impl<'gc, V> PropertyMap<'gc, V> { if case_sensitive { self.0.contains_key(&CaseSensitive(key.as_ref())) } else { - self.0.contains_key(&CaseInsentitive(key.as_ref())) + self.0.contains_key(&CaseInsensitive(key.as_ref())) } } @@ -42,7 +42,7 @@ impl<'gc, V> PropertyMap<'gc, V> { }), } } else { - match self.0.get_index_of(&CaseInsentitive(key.as_ref())) { + match self.0.get_index_of(&CaseInsensitive(key.as_ref())) { Some(index) => Entry::Occupied(OccupiedEntry { map: &mut self.0, index, @@ -60,7 +60,7 @@ impl<'gc, V> PropertyMap<'gc, V> { if case_sensitive { self.0.get(&CaseSensitive(key.as_ref())) } else { - self.0.get(&CaseInsentitive(key.as_ref())) + self.0.get(&CaseInsensitive(key.as_ref())) } } @@ -69,7 +69,7 @@ impl<'gc, V> PropertyMap<'gc, V> { if case_sensitive { self.0.get_mut(&CaseSensitive(key.as_ref())) } else { - self.0.get_mut(&CaseInsentitive(key.as_ref())) + self.0.get_mut(&CaseInsensitive(key.as_ref())) } } @@ -103,7 +103,7 @@ impl<'gc, V> PropertyMap<'gc, V> { if case_sensitive { self.0.shift_remove(&CaseSensitive(key.as_ref())) } else { - self.0.shift_remove(&CaseInsentitive(key.as_ref())) + self.0.shift_remove(&CaseInsensitive(key.as_ref())) } } } @@ -158,15 +158,15 @@ impl<'gc, 'a, V> VacantEntry<'gc, 'a, V> { } /// Wraps a str-like type, causing the hash map to use a case insensitive hash and equality. -struct CaseInsentitive(T); +struct CaseInsensitive(T); -impl<'a> Hash for CaseInsentitive<&'a WStr> { +impl<'a> Hash for CaseInsensitive<&'a WStr> { fn hash(&self, state: &mut H) { swf_hash_string_ignore_case(self.0, state); } } -impl<'gc, 'a> Equivalent> for CaseInsentitive<&'a WStr> { +impl<'gc, 'a> Equivalent> for CaseInsensitive<&'a WStr> { fn equivalent(&self, key: &PropertyName<'gc>) -> bool { key.0.eq_ignore_case(self.0) } diff --git a/core/src/avm1/runtime.rs b/core/src/avm1/runtime.rs index 3341eb22f..b83d3d6b6 100644 --- a/core/src/avm1/runtime.rs +++ b/core/src/avm1/runtime.rs @@ -411,7 +411,7 @@ impl<'gc> Avm1<'gc> { self.registers.get_mut(id) } - /// Find all display objects with negative depth recurisvely + /// Find all display objects with negative depth recursively /// /// If an object is pending removal due to being removed by a removeObject tag on the previous frame, /// while it had an unload event listener attached, avm1 requires that the object is kept around for one extra frame. diff --git a/core/src/avm2.rs b/core/src/avm2.rs index 622ccd995..d22ee2874 100644 --- a/core/src/avm2.rs +++ b/core/src/avm2.rs @@ -153,7 +153,7 @@ pub struct Avm2<'gc> { #[collect(require_static)] native_call_handler_table: &'static [Option<(&'static str, NativeMethodImpl)>], - /// A list of objects which are capable of recieving broadcasts. + /// A list of objects which are capable of receiving broadcasts. /// /// Certain types of events are "broadcast events" that are emitted on all /// constructed objects in order of their creation, whether or not they are @@ -245,7 +245,7 @@ impl<'gc> Avm2<'gc> { orphan_objects: Default::default(), - // Set the lowest version for now - this be overriden when we set our movie + // Set the lowest version for now - this will be overridden when we set our movie root_api_version: ApiVersion::AllVersions, #[cfg(feature = "avm_debug")] @@ -322,7 +322,7 @@ impl<'gc> Avm2<'gc> { /// Adds a `MovieClip` to the orphan list. In AVM2, movies advance their /// frames even when they are not on a display list. Unfortunately, - /// mutliple SWFS rely on this behavior, so we need to match Flash's + /// multiple SWFS rely on this behavior, so we need to match Flash's /// behavior. This should not be called manually - `movie_clip` will /// call it when necessary. pub fn add_orphan_obj(&mut self, dobj: DisplayObject<'gc>) { diff --git a/core/src/avm2/activation.rs b/core/src/avm2/activation.rs index 6a90f7a85..3a4492c45 100644 --- a/core/src/avm2/activation.rs +++ b/core/src/avm2/activation.rs @@ -147,7 +147,7 @@ pub struct Activation<'a, 'gc: 'a> { } impl<'a, 'gc> Activation<'a, 'gc> { - /// Convenience method to retrieve the current GC context. Note that explicitely writing + /// Convenience method to retrieve the current GC context. Note that explicitly writing /// `self.context.gc_context` can be sometimes necessary to satisfy the borrow checker. #[inline(always)] pub fn gc(&self) -> &'gc gc_arena::Mutation<'gc> { diff --git a/core/src/avm2/globals/README.md b/core/src/avm2/globals/README.md index 0e5193dd4..178e59d59 100644 --- a/core/src/avm2/globals/README.md +++ b/core/src/avm2/globals/README.md @@ -74,7 +74,7 @@ To add versioning to an API: 1. Determine the first version where it was added. This can be seen in the Flash Documentation (e.g. "Runtime Versions: Flash Player 11.4, AIR 3.4") 2. Convert the Flash Player version to an SWF version number using [this chart](https://github.com/ruffle-rs/ruffle/wiki/SWF-version-chart) 2. Determine the corresponding asc.jar version code for the SWF version. This can be found in avmplus in https://github.com/adobe/avmplus/blob/master/core/api-versions.as -3. Add an `[API("VersionCode")]` metadata to the defintion. In the `Event.WORKER_STATE` example, +3. Add an `[API("VersionCode")]` metadata to the definition. In the `Event.WORKER_STATE` example, this looks like: ```actionscript diff --git a/core/src/avm2/globals/date.rs b/core/src/avm2/globals/date.rs index 53e30445e..baab6e70b 100644 --- a/core/src/avm2/globals/date.rs +++ b/core/src/avm2/globals/date.rs @@ -1158,7 +1158,7 @@ fn parse_date(item: &WStr) -> Option<(u32, u32, u32)> { Some(parsed) } -/// Convert a month abbrevation to a number. +/// Convert a month abbreviation to a number. fn parse_mon(item: &WStr) -> Option { const MONTHS: [&[u8]; 12] = [ b"Jan", b"Feb", b"Mar", b"Apr", b"May", b"Jun", b"Jul", b"Aug", b"Sep", b"Oct", b"Nov", diff --git a/core/src/avm2/globals/flash/display/shader_job.rs b/core/src/avm2/globals/flash/display/shader_job.rs index 081d33403..e669523c2 100644 --- a/core/src/avm2/globals/flash/display/shader_job.rs +++ b/core/src/avm2/globals/flash/display/shader_job.rs @@ -108,7 +108,7 @@ pub fn get_shader_args<'gc>( .expect("ShaderInput.input is not an object"); let bitmap = input.as_bitmap_data().expect( - "ShaderInput.input is not a BitmapData (FIXE - support other types)", + "ShaderInput.input is not a BitmapData (FIXME - support other types)", ); Some(bitmap.bitmap_handle( diff --git a/core/src/avm2/globals/flash/display3D/context_3d.rs b/core/src/avm2/globals/flash/display3D/context_3d.rs index 213a87000..6ec4aca65 100644 --- a/core/src/avm2/globals/flash/display3D/context_3d.rs +++ b/core/src/avm2/globals/flash/display3D/context_3d.rs @@ -356,7 +356,7 @@ pub fn set_program_constants_from_vector<'gc>( let num_registers = args.get_i32(activation, 3)?; let to_take = if num_registers != -1 { - // Each register requries 4 floating-point values + // Each register requires 4 floating-point values // FIXME - throw an error if 'vector' is too small num_registers as usize * 4 } else { diff --git a/core/src/avm2/globals/flash/net/FileReference.as b/core/src/avm2/globals/flash/net/FileReference.as index 131b559c1..170d7ad42 100644 --- a/core/src/avm2/globals/flash/net/FileReference.as +++ b/core/src/avm2/globals/flash/net/FileReference.as @@ -25,7 +25,7 @@ package flash.net } public function get creator(): String { - retunr this._creator; + return this._creator; } public function get data(): ByteArray { @@ -41,7 +41,7 @@ package flash.net } public function get name(): String { - retunr this._name; + return this._name; } public static function get permissionStatus(): String { diff --git a/core/src/avm2/globals/flash/net/NetStreamPlayOptions.as b/core/src/avm2/globals/flash/net/NetStreamPlayOptions.as index 4f2c06267..88e2a787e 100644 --- a/core/src/avm2/globals/flash/net/NetStreamPlayOptions.as +++ b/core/src/avm2/globals/flash/net/NetStreamPlayOptions.as @@ -12,7 +12,7 @@ package flash.net // The duration of playback, in seconds, for the stream specified in streamName. public var len: Number = -1; - // The absoulte stream time at which the server switches between streams of different bitrates for Flash Media Server dynamic streaming. + // The absolute stream time at which the server switches between streams of different bitrates for Flash Media Server dynamic streaming. public var offset: Number = -1; // The name of the old stream or the stream to transition from. diff --git a/core/src/avm2/globals/flash/text/engine/BreakOpportunity.as b/core/src/avm2/globals/flash/text/engine/BreakOpportunity.as index aa735cfe0..4d5258bfa 100644 --- a/core/src/avm2/globals/flash/text/engine/BreakOpportunity.as +++ b/core/src/avm2/globals/flash/text/engine/BreakOpportunity.as @@ -9,7 +9,7 @@ package flash.text.engine public final class BreakOpportunity { - // Treats all characters in the ContentElement object as line break opportunities, meaning that a line break will occur afer each character. + // Treats all characters in the ContentElement object as line break opportunities, meaning that a line break will occur after each character. public static const ALL:String = "all"; // Treats any character in the ContentElement object as a line break opportunity. diff --git a/core/src/avm2/globals/flash/text/engine/TextBlock.as b/core/src/avm2/globals/flash/text/engine/TextBlock.as index 66f722a66..94323ba84 100644 --- a/core/src/avm2/globals/flash/text/engine/TextBlock.as +++ b/core/src/avm2/globals/flash/text/engine/TextBlock.as @@ -39,7 +39,7 @@ package flash.text.engine { if (textJustifier) { this.textJustifier = textJustifier; } else { - // This should creaate a new TextJustifier with locale "en", but we don't actually support creating TextJustifiers yet. + // This should create a new TextJustifier with locale "en", but we don't actually support creating TextJustifiers yet. } this.lineRotation = lineRotation; diff --git a/core/src/avm2/globals/flash/utils/timer.rs b/core/src/avm2/globals/flash/utils/timer.rs index 453b64092..496af0f33 100644 --- a/core/src/avm2/globals/flash/utils/timer.rs +++ b/core/src/avm2/globals/flash/utils/timer.rs @@ -64,7 +64,7 @@ pub fn start<'gc>( .coerce_to_object(activation)?; // Note - we deliberately do *not* check if currentCount is less than repeatCount. // Calling 'start' on a timer that has currentCount >= repeatCount will tick exactly - // once, and then stop immediately. This is handeld by Timer.onUpdate + // once, and then stop immediately. This is handled by Timer.onUpdate let id = activation.context.timers.add_timer( TimerCallback::Avm2Callback { closure: on_update, diff --git a/core/src/avm2/namespace.rs b/core/src/avm2/namespace.rs index 1fab029cf..c36392625 100644 --- a/core/src/avm2/namespace.rs +++ b/core/src/avm2/namespace.rs @@ -164,7 +164,7 @@ impl<'gc> Namespace<'gc> { if is_playerglobals { if !has_version_mark - // NOTE - we deviate from avmplus by only appling VM_INTERNAL to unmarked playerglobal namespaces + // NOTE - we deviate from avmplus by only applying VM_INTERNAL to unmarked playerglobal namespaces // that use 'Package', instead of both 'Namespace' and 'Package'. This is because our version // of asc.jar does *not* apply version markers to method definitions in interfaces (unlike // method definitions in normal classes). Interface method definitions in playerglobals always @@ -299,7 +299,7 @@ impl<'gc> Namespace<'gc> { /// Compares this namespace to another, considering them equal if this namespace's version /// is less than or equal to the other (definitions in this namespace version can be - /// seen by the other). This is used to implement `ProperyMap`, where we want to + /// seen by the other). This is used to implement `PropertyMap`, where we want to /// a definition with `ApiVersion::SWF_16` to be visible when queried from /// a SWF with `ApiVersion::SWF_16` or any higher version. pub fn matches_ns(&self, other: Self) -> bool { diff --git a/core/src/avm2/object.rs b/core/src/avm2/object.rs index eafdae687..24b36558e 100644 --- a/core/src/avm2/object.rs +++ b/core/src/avm2/object.rs @@ -197,7 +197,7 @@ use crate::font::Font; )] pub trait TObject<'gc>: 'gc + Collect + Debug + Into> + Clone + Copy { /// Get the base of this object. - /// Any trait method implementations that were not overrided will forward the call to this instead. + /// Any trait method implementations that were not overridden will forward the call to this instead. fn base(&self) -> Ref>; fn base_mut(&self, mc: &Mutation<'gc>) -> RefMut>; diff --git a/core/src/avm2/object/stage_object.rs b/core/src/avm2/object/stage_object.rs index 9fbeef89b..9e102f8ff 100644 --- a/core/src/avm2/object/stage_object.rs +++ b/core/src/avm2/object/stage_object.rs @@ -137,7 +137,7 @@ impl<'gc> Debug for StageObject<'gc> { Ok(obj) => f .debug_struct("StageObject") .field("name", &obj.base.debug_class_name()) - // .field("display_object", &obj.display_object) TOOO(moulins) + // .field("display_object", &obj.display_object) TODO(moulins) .field("ptr", &self.0.as_ptr()) .finish(), Err(err) => f diff --git a/core/src/avm2/object/xml_list_object.rs b/core/src/avm2/object/xml_list_object.rs index a26a96d97..02f4eac57 100644 --- a/core/src/avm2/object/xml_list_object.rs +++ b/core/src/avm2/object/xml_list_object.rs @@ -339,7 +339,7 @@ pub struct XmlListObjectData<'gc> { } /// Holds either an `E4XNode` or an `XmlObject`. This can be converted -/// in-palce to an `XmlObject` via `get_or_create_xml`. +/// in-place to an `XmlObject` via `get_or_create_xml`. /// This deliberately does not implement `Copy`, since `get_or_create_xml` /// takes `&mut self` #[derive(Clone, Collect, Debug)] @@ -585,7 +585,7 @@ impl<'gc> TObject<'gc> for XmlListObject<'gc> { // * If we're calling a method that *doesn't* exist on the prototype, it must not be an XML-related // method. In that case, the method will only be callable on our XML child if the child has simple // content (as we'll automatically convert it to a String, and call the method on that String). - // * However, in order for a child to have a property matching the meethod name, it must be + // * However, in order for a child to have a property matching the method name, it must be // a non-simple XML object (simple XML objects have no properties to match). // // Nevertheless, there may be some weird edge case where this actually matters. diff --git a/core/src/avm2/object/xml_object.rs b/core/src/avm2/object/xml_object.rs index 0b9a1bf3d..d258eb500 100644 --- a/core/src/avm2/object/xml_object.rs +++ b/core/src/avm2/object/xml_object.rs @@ -328,7 +328,7 @@ impl<'gc> TObject<'gc> for XmlObject<'gc> { let method = self .proto() - .expect("XMLList misisng prototype") + .expect("XMLList missing prototype") .get_property(multiname, activation)?; // If the method doesn't exist on the prototype, and we have simple content, @@ -336,7 +336,7 @@ impl<'gc> TObject<'gc> for XmlObject<'gc> { // This lets things like `new XML("

Hello world

").split(" ")` work. if matches!(method, Value::Undefined) { // Checking if we have a child with the same name as the method is probably - // unecessary - if we had such a child, then we wouldn't have simple content, + // unnecessary - if we had such a child, then we wouldn't have simple content, // so we already would bail out before calling the method. Nevertheless, // avmplus has this check, so we do it out of an abundance of caution. // Compare to the very similar case in XMLListObject::call_property_local diff --git a/core/src/avm2/vector.rs b/core/src/avm2/vector.rs index 7524e9b33..4277278e9 100644 --- a/core/src/avm2/vector.rs +++ b/core/src/avm2/vector.rs @@ -153,8 +153,8 @@ impl<'gc> VectorStorage<'gc> { /// Change an arbitrary i32 into a positive parameter index. /// - /// This converts negative indicies into positive indicies indexed from the - /// end of the array. Negative indicies that point before the start of the + /// This converts negative indices into positive indices indexed from the + /// end of the array. Negative indices that point before the start of the /// array are clamped to zero. pub fn clamp_parameter_index(&self, pos: i32) -> usize { if pos < 0 { diff --git a/core/src/avm2/vtable.rs b/core/src/avm2/vtable.rs index 851a87b76..08270b6e3 100644 --- a/core/src/avm2/vtable.rs +++ b/core/src/avm2/vtable.rs @@ -264,7 +264,7 @@ impl<'gc> VTable<'gc> { // such slot with `getslot` wouldn't have passed verification in the first place. // So such SWFs shouldn't be encountered in the wild. // - // Worst-case is that someone can hand-craft such an SWF speficically for Ruffle + // Worst-case is that someone can hand-craft such an SWF specifically for Ruffle // and be able to access private class members with `getslot/setslot, // so long-term it's still something we should verify. // (and it's far from the only verification check we lack anyway) diff --git a/core/src/backend/audio.rs b/core/src/backend/audio.rs index c7a3a42de..8a913887f 100644 --- a/core/src/backend/audio.rs +++ b/core/src/backend/audio.rs @@ -134,11 +134,11 @@ pub trait AudioBackend: Downcast { fn stop_all_sounds(&mut self); /// Get the position of a sound instance in milliseconds. - /// Returns `None` if ther sound is not/no longer playing + /// Returns `None` if the sound is not/no longer playing fn get_sound_position(&self, instance: SoundInstanceHandle) -> Option; /// Get the duration of a sound in milliseconds. - /// Returns `None` if sound is not registered. + /// Returns `None` if the sound is not registered. fn get_sound_duration(&self, sound: SoundHandle) -> Option; /// Get the size of the data stored within a given sound. @@ -359,7 +359,7 @@ impl<'gc> AudioManager<'gc> { /// The threshold in seconds where an audio stream is considered too out-of-sync and will be stopped. pub const STREAM_RESTART_THRESHOLD: f64 = 1.0; - /// The minimum audio sycning threshold in seconds. + /// The minimum audio syncing threshold in seconds. /// /// The player will adjust animation speed to stay within this many seconds of the audio track. pub const STREAM_DEFAULT_SYNC_THRESHOLD: f64 = 0.2; diff --git a/core/src/bitmap.rs b/core/src/bitmap.rs index d429ea11d..be78ffe17 100644 --- a/core/src/bitmap.rs +++ b/core/src/bitmap.rs @@ -22,7 +22,7 @@ pub mod turbulence; /// - Widths and heights exceeding 0x666666 are invalid in all versions /// - Pixel counts (of any width/height) exceeding 0x20000000 pixels /// -/// All of these are curently enforced. +/// All of these are currently enforced. pub fn is_size_valid(swf_version: u8, width: u32, height: u32) -> bool { // From : // diff --git a/core/src/context.rs b/core/src/context.rs index 56fb9bcd9..e77b6c439 100644 --- a/core/src/context.rs +++ b/core/src/context.rs @@ -71,7 +71,7 @@ impl<'a, 'gc> GcContext<'a, 'gc> { } } - /// Convenience method to retrieve the current GC context. Note that explicitely writing + /// Convenience method to retrieve the current GC context. Note that explicitly writing /// `self.gc_context` can be sometimes necessary to satisfy the borrow checker. #[inline(always)] pub fn gc(&self) -> &'gc Mutation<'gc> { @@ -450,7 +450,7 @@ impl<'a, 'gc> UpdateContext<'a, 'gc> { } impl<'a, 'gc> UpdateContext<'a, 'gc> { - /// Convenience method to retrieve the current GC context. Note that explicitely writing + /// Convenience method to retrieve the current GC context. Note that explicitly writing /// `self.gc_context` can be sometimes necessary to satisfy the borrow checker. #[inline(always)] pub fn gc(&self) -> &'gc Mutation<'gc> { @@ -611,7 +611,7 @@ impl<'gc> Default for ActionQueue<'gc> { /// Shared data used during rendering. /// `Player` creates this when it renders a frame and passes it down to display objects. /// -/// As a convenience, this type can be deref-coerced to `Mutation<'gc>`, but note that explicitely +/// As a convenience, this type can be deref-coerced to `Mutation<'gc>`, but note that explicitly /// writing `context.gc_context` can be sometimes necessary to satisfy the borrow checker. pub struct RenderContext<'a, 'gc> { /// The renderer, used by the display objects to register themselves. @@ -643,7 +643,7 @@ pub struct RenderContext<'a, 'gc> { } impl<'a, 'gc> RenderContext<'a, 'gc> { - /// Convenience method to retrieve the current GC context. Note that explicitely writing + /// Convenience method to retrieve the current GC context. Note that explicitly writing /// `self.gc_context` can be sometimes necessary to satisfy the borrow checker. #[inline(always)] pub fn gc(&self) -> &'gc Mutation<'gc> { diff --git a/core/src/debug_ui/movie.rs b/core/src/debug_ui/movie.rs index b0f4c7947..a9ef993c9 100644 --- a/core/src/debug_ui/movie.rs +++ b/core/src/debug_ui/movie.rs @@ -210,7 +210,7 @@ impl MovieWindow { if movie.header().is_action_script_3() { ui.label("Uses Actionscript 3"); } - if movie.header().has_metdata() { + if movie.header().has_metadata() { ui.label("Has XMP Metadata"); } if movie.header().use_direct_blit() { diff --git a/core/src/display_object.rs b/core/src/display_object.rs index 2c543c9d8..cea977bf2 100644 --- a/core/src/display_object.rs +++ b/core/src/display_object.rs @@ -255,7 +255,7 @@ pub struct DisplayObjectBase<'gc> { #[collect(require_static)] next_scroll_rect: Rectangle, - /// Rectangle used for 9-slice scaling (`DislayObject.scale9grid`). + /// Rectangle used for 9-slice scaling (`DisplayObject.scale9grid`). #[collect(require_static)] scaling_grid: Rectangle, @@ -1020,12 +1020,12 @@ pub fn apply_standard_mask_and_scroll<'gc, F>( // There are two parts to 'DisplayObject.scrollRect': // a scroll effect (translation), and a crop effect. - // This scroll is implementing by appling a translation matrix + // This scroll is implementing by applying a translation matrix // when we defined 'scroll_rect_matrix'. // The crop is implemented as a rectangular mask using the height // and width provided by 'scrollRect'. - // Note that this mask is applied *in additon to* a mask defined + // Note that this mask is applied *in addition to* a mask defined // with 'DisplayObject.mask'. We will end up rendering content that // lies in the intersection of the scroll rect and DisplayObject.mask, // which is exactly the behavior that we want. @@ -1797,7 +1797,7 @@ pub trait TDisplayObject<'gc>: } /// Whether this display object prefers to be cached into a bitmap rendering. - /// This is the PlaceObject `cacheAsBitmap` flag - and may be overriden if filters are applied. + /// This is the PlaceObject `cacheAsBitmap` flag - and may be overridden if filters are applied. /// Consider `is_bitmap_cached` for if a bitmap cache is actually in use. fn is_bitmap_cached_preference(&self) -> bool { self.base().is_bitmap_cached_preference() @@ -2599,7 +2599,7 @@ impl SoundTransform { /// This matches the behavior of AVM1 `Sound.getPan()` pub fn pan(&self) -> i32 { // It's not clear why Flash has the weird `abs` behavior, but this - // mathes the values that Flash returns (see `sound` regression test). + // matches the values that Flash returns (see `sound` regression test). if self.left_to_left != Self::MAX_VOLUME { Self::MAX_VOLUME - self.left_to_left.abs() } else { diff --git a/core/src/display_object/container.rs b/core/src/display_object/container.rs index 76c3e9abb..d633f19c0 100644 --- a/core/src/display_object/container.rs +++ b/core/src/display_object/container.rs @@ -84,8 +84,8 @@ pub fn dispatch_added_to_stage_event<'gc>( } } -/// Dispatch an `added` event to one object, and log an errors encounted whilst -/// doing so. +/// Dispatch an `added` event to one object, and log any errors encountered +/// whilst doing so. pub fn dispatch_added_event_only<'gc>( child: DisplayObject<'gc>, context: &mut UpdateContext<'_, 'gc>, @@ -413,7 +413,7 @@ pub trait TDisplayObjectContainer<'gc>: this.invalidate_cached_bitmap(context.gc_context); } - /// Remove a set of children identified by their render list indicies from + /// Remove a set of children identified by their render list indices from /// this container's render and depth lists. fn remove_range(&mut self, context: &mut UpdateContext<'_, 'gc>, range: R) where diff --git a/core/src/display_object/interactive.rs b/core/src/display_object/interactive.rs index 4c8c108b1..1cabda5b4 100644 --- a/core/src/display_object/interactive.rs +++ b/core/src/display_object/interactive.rs @@ -534,7 +534,7 @@ impl<'gc> Avm2MousePick<'gc> { // If the parent has `mouseChildren=false` and `mouseEnabled=true`, // we have a weird case. The event can propagate through this 'fully disabled' // parent - if it reaches an ancestor with `mouseEnabled=true`, it will get - // 'abosrbed' by that ancestor. Otherwise, no event will be fired. + // 'absorbed' by that ancestor. Otherwise, no event will be fired. } else { Avm2MousePick::PropagateToParent } diff --git a/core/src/display_object/morph_shape.rs b/core/src/display_object/morph_shape.rs index ae8f25d24..ba550ea7c 100644 --- a/core/src/display_object/morph_shape.rs +++ b/core/src/display_object/morph_shape.rs @@ -215,7 +215,7 @@ impl MorphShapeStatic { } /// Retrieves the `Frame` for the given ratio. - /// Lazily intializes the frame if it does not yet exist. + /// Lazily initializes the frame if it does not yet exist. fn get_frame(&self, ratio: u16) -> RefMut<'_, Frame> { let frames = self.frames.borrow_mut(); RefMut::map(frames, |frames| { @@ -226,7 +226,7 @@ impl MorphShapeStatic { } /// Retrieves the `ShapeHandle` for the given ratio. - /// Lazily intializes and tessellates the shape if it does not yet exist. + /// Lazily initializes and tessellates the shape if it does not yet exist. fn get_shape<'gc>( &self, context: &mut RenderContext<'_, 'gc>, diff --git a/core/src/display_object/stage.rs b/core/src/display_object/stage.rs index e28db2405..f73fdf2b6 100644 --- a/core/src/display_object/stage.rs +++ b/core/src/display_object/stage.rs @@ -54,7 +54,7 @@ pub struct StageData<'gc> { /// Base properties for interactive display objects. /// /// This particular base has additional constraints currently not - /// expressable by the type system. Notably, this should never have a + /// expressible by the type system. Notably, this should never have a /// parent, as the stage does not respect it. base: InteractiveObjectBase<'gc>, @@ -108,7 +108,7 @@ pub struct StageData<'gc> { /// Whether to use high quality downsampling for bitmaps. /// - /// This is usally implied by `quality` being `Best` or higher, but the AVM1 + /// This is usually implied by `quality` being `Best` or higher, but the AVM1 /// `ToggleHighQuality` op can adjust stage quality independently of this flag. /// This setting is currently ignored in Ruffle. use_bitmap_downsampling: bool, diff --git a/core/src/font.rs b/core/src/font.rs index dc257dea1..990319636 100644 --- a/core/src/font.rs +++ b/core/src/font.rs @@ -274,7 +274,7 @@ pub enum GlyphSource { /// Used by `DefineEditText` tags. code_point_to_glyph: fnv::FnvHashMap, - /// Kerning infomration. + /// Kerning information. /// Maps from a pair of unicode code points to horizontal offset value. kerning_pairs: fnv::FnvHashMap<(u16, u16), Twips>, }, @@ -887,7 +887,7 @@ impl FontDescriptor { /// The text rendering engine that a text field should use. /// This is controlled by the "Anti-alias" setting in the Flash IDE. -/// Using "Anti-alias for readibility" switches to the "Advanced" text +/// Using "Anti-alias for readability" switches to the "Advanced" text /// rendering engine. #[derive(Debug, PartialEq, Clone)] pub enum TextRenderSettings { @@ -904,7 +904,7 @@ pub enum TextRenderSettings { }, /// This text should render with the advanced rendering engine. - /// Set via "Anti-alias for readibility" in the Flash IDE. + /// Set via "Anti-alias for readability" in the Flash IDE. /// The parameters are set via the CSMTextSettings SWF tag. /// Ruffle does not support this currently, but this also affects /// hit-testing behavior. diff --git a/core/src/library.rs b/core/src/library.rs index 2517e54e1..4db9d523b 100644 --- a/core/src/library.rs +++ b/core/src/library.rs @@ -97,7 +97,7 @@ impl<'gc> Avm2ClassRegistry<'gc> { if let Some(old) = self.class_map.get(&class_object) { if Arc::ptr_eq(&movie, &old.0) && symbol != old.1 { // Flash player actually allows using the same class in multiple SymbolClass - // entires in the same swf, with *different* symbol ids. Whichever one + // entries in the same swf, with *different* symbol ids. Whichever one // is processed first will *win*, and the second one will be ignored. // We still log a warning, since we wouldn't expect this to happen outside // of deliberately crafted SWFs. diff --git a/core/src/streams.rs b/core/src/streams.rs index bf91b6e40..cbde514b6 100644 --- a/core/src/streams.rs +++ b/core/src/streams.rs @@ -878,7 +878,7 @@ impl<'gc> NetStream<'gc> { } Err(e) => { tracing::error!( - "Got error when registring FLV video stream: {}", + "Got error when registering FLV video stream: {}", e ); return; //TODO: This originally breaks and halts tag processing @@ -1039,7 +1039,7 @@ impl<'gc> NetStream<'gc> { _ => unreachable!(), }, Err(e) => { - tracing::error!("Got error when registring FLV video stream: {}", e) + tracing::error!("Got error when registering FLV video stream: {}", e) } } } else { diff --git a/desktop/src/app.rs b/desktop/src/app.rs index eddc0228a..764aab709 100644 --- a/desktop/src/app.rs +++ b/desktop/src/app.rs @@ -164,7 +164,7 @@ impl App { return; } WindowEvent::Resized(size) => { - // TODO: Change this when winit adds a `Window::minimzed` or `WindowEvent::Minimize`. + // TODO: Change this when winit adds a `Window::minimized` or `WindowEvent::Minimize`. minimized = size.width == 0 && size.height == 0; if let Some(mut player) = self.player.get() { diff --git a/flv/src/tag.rs b/flv/src/tag.rs index 41d85f02d..f76f92b7e 100644 --- a/flv/src/tag.rs +++ b/flv/src/tag.rs @@ -16,7 +16,7 @@ pub enum TagData<'a> { /// The tag data was recognized but could not be parsed due to an error. /// /// The error contained will never be EndOfData; this should only be used - /// to flag unparseable data within an otherwise complete tag. + /// to flag unparsable data within an otherwise complete tag. Invalid(Error), } diff --git a/render/canvas/src/lib.rs b/render/canvas/src/lib.rs index 17ca8fa1b..2e43b38a1 100644 --- a/render/canvas/src/lib.rs +++ b/render/canvas/src/lib.rs @@ -37,7 +37,7 @@ pub struct WebCanvasRenderBackend { mask_state: MaskState, blend_modes: Vec, - // This is currnetly unused - we just store it to report + // This is currently unused - we just store it to report // in `get_viewport_dimensions` viewport_scale_factor: f64, } @@ -1099,7 +1099,7 @@ fn swf_to_canvas_gradient( ) -> Result { let matrix = if transformed { // When we are rendering a complex gradient, the gradient transform is handled later by - // transforming the path before rendering; so use the indentity matrix here. + // transforming the path before rendering; so use the identity matrix here. swf::Matrix::scale(swf::Fixed16::from_f64(20.0), swf::Fixed16::from_f64(20.0)) } else { swf_gradient.matrix diff --git a/render/naga-agal/src/builder.rs b/render/naga-agal/src/builder.rs index 95327578e..e49d25592 100644 --- a/render/naga-agal/src/builder.rs +++ b/render/naga-agal/src/builder.rs @@ -19,7 +19,7 @@ use crate::{ SHADER_ENTRY_POINT, }; -const VERTEX_PROGRAM_CONTANTS: u64 = 128; +const VERTEX_PROGRAM_CONSTANTS: u64 = 128; const FRAGMENT_PROGRAM_CONSTANTS: u64 = 28; pub const TEXTURE_SAMPLER_START_BIND_INDEX: u32 = 2; @@ -46,7 +46,7 @@ pub(crate) struct NagaBuilder<'a> { pub(crate) module: Module, pub(crate) func: Function, - // This evaluate to a Pointer to the temporary 'main' destiation location + // This evaluate to a Pointer to the temporary 'main' destination location // (the output position for a vertex shader, or the output color for a fragment shader) // which can be used with Expression::Load and Expression::Store // This is needed because an AGAL shader can write to the output register @@ -110,7 +110,7 @@ pub(crate) struct NagaBuilder<'a> { /// Any subsequent opcodes will be added to the `after_if` block. /// When we encounter an 'else' opcode, we switch to adding opcodes to the `after_else` block /// by setting `in_after_if` to false. -/// When we encouter an `eif` opcode, we pop our `IfElse` entry from the stack, and emit +/// When we encounter an `eif` opcode, we pop our `IfElse` entry from the stack, and emit /// a `Statement::If` with the `after_if` and `after_else` blocks. #[derive(Debug)] enum BlockStackEntry { @@ -245,7 +245,7 @@ impl VertexAttributeFormat { /// Combines information extracted from the AGAL bytecode itself /// with information provided from the AVM side of ruffle -/// (based on the Context3D methods that ActionSCript called) +/// (based on the Context3D methods that ActionScript called) #[derive(Debug)] pub struct ShaderConfig<'a> { pub shader_type: ShaderType, @@ -583,7 +583,7 @@ impl<'a> NagaBuilder<'a> { base: vec4f, size: ArraySize::Constant( NonZeroU32::new(match shader_config.shader_type { - ShaderType::Vertex => VERTEX_PROGRAM_CONTANTS as u32, + ShaderType::Vertex => VERTEX_PROGRAM_CONSTANTS as u32, ShaderType::Fragment => FRAGMENT_PROGRAM_CONSTANTS as u32, }) .unwrap(), diff --git a/render/naga-pixelbender/src/lib.rs b/render/naga-pixelbender/src/lib.rs index 4f4a9e3cf..f8c6838d8 100644 --- a/render/naga-pixelbender/src/lib.rs +++ b/render/naga-pixelbender/src/lib.rs @@ -81,7 +81,7 @@ pub struct ShaderBuilder<'a> { /// Any subsequent opcodes will be added to the `after_if` block. /// When we encounter an 'OpElse' opcode, we switch to adding opcodes to the `after_else` block /// by setting `in_after_if` to false. -/// When we encouter an `OpEndIf` opcode, we pop our `IfElse` entry from the stack, and emit +/// When we encounter an `OpEndIf` opcode, we pop our `IfElse` entry from the stack, and emit /// a `Statement::If` with the `after_if` and `after_else` blocks. #[derive(Debug)] enum BlockStackEntry { @@ -900,7 +900,7 @@ impl<'a> ShaderBuilder<'a> { }) } Opcode::Sub | Opcode::Add | Opcode::Mul => { - // The destiation is also used as the first operand: 'dst = dst src' + // The destination is also used as the first operand: 'dst = dst src' let left = self.load_src_register(&dst)?; let op = match opcode { @@ -1671,7 +1671,7 @@ impl<'a> ShaderBuilder<'a> { ) { panic!("Unexpected to matrix channel for dst {dst:?}"); } - // Write each channel of the source to the channel specified by the destiation mask + // Write each channel of the source to the channel specified by the destination mask let src_component_index = *src_channel as u32; let dst_component_index = *dst_channel as u32; let src_component = self.evaluate_expr(Expression::AccessIndex { diff --git a/render/wgpu/src/context3d/current_pipeline.rs b/render/wgpu/src/context3d/current_pipeline.rs index 9f118c794..af314bf75 100644 --- a/render/wgpu/src/context3d/current_pipeline.rs +++ b/render/wgpu/src/context3d/current_pipeline.rs @@ -39,7 +39,7 @@ const FRAGMENT_SHADER_UNIFORMS_BUFFER_SIZE: u64 = // In WGPU, this state is associated by a `RenderPipeline` object, // which needs to be rebuilt whenever the state changes. // -// To match up these APIs, we store the current state in `CurentPipeline`. +// To match up these APIs, we store the current state in `CurrentPipeline`. // Whenever a state-changing `Context3DCommand` is executed, we mark the `CurrentPipeline` // as dirty. When a `wgpu::RenderPipeline` is actually needed by `drawTriangles`, // we build a new `wgpu::RenderPipeline` from the `CurrentPipeline` state (if it's dirty). diff --git a/render/wgpu/src/context3d/mod.rs b/render/wgpu/src/context3d/mod.rs index def7b170b..9934bbe6b 100644 --- a/render/wgpu/src/context3d/mod.rs +++ b/render/wgpu/src/context3d/mod.rs @@ -45,7 +45,7 @@ const STENCIL_MASK: u32 = 1 << 2; /// lifetime management - we can store an `Rc` or `Rc` /// in the `VertexBuffer3DObject` or `IndexBuffer3DObject`. If we delayed creating them, /// we would need to store a `GcCell>>`, which prevents -/// us from obtaining a long-lived reference to the `wgpu:Bufer` (it would instead be +/// us from obtaining a long-lived reference to the `wgpu:Buffer` (it would instead be /// tied to the `Ref` returned by `GcCell::read`). pub struct WgpuContext3D { // We only use some of the fields from `Descriptors`, but we @@ -373,7 +373,7 @@ const MAX_VERTEX_ATTRIBUTES: usize = 8; #[derive(Clone, Debug)] pub struct VertexAttributeInfo { - // An offset in units of buffer entires (f32 or u8) + // An offset in units of buffer entries (f32 or u8) offset_in_32bit_units: u64, format: Context3DVertexBufferFormat, buffer: Rc, @@ -717,7 +717,7 @@ impl Context3D for WgpuContext3D { // to keep a copy of the data on the CPU side. We round *down* the offset to // the closest multiple of 4 bytes, and round *up* the length to the closest // multiple of 4 bytes. We then perform a copy from our CPU-side buffer, which - // which uses the existing data (at the beiginning or end) to fill out the copy + // which uses the existing data (at the beginning or end) to fill out the copy // to the required length and offset. Without this, we would lose data in the CPU // buffer whenever we performed a copy with an unalignd offset or length. let offset_bytes = start_offset * std::mem::size_of::(); @@ -1067,7 +1067,7 @@ impl Context3D for WgpuContext3D { }, aspect: wgpu::TextureAspect::All, }, - // The copy size uses the orignal image, with the original row size + // The copy size uses the original image, with the original row size wgpu::Extent3d { width: dest.width(), height: dest.height(), diff --git a/render/wgpu/src/pipelines.rs b/render/wgpu/src/pipelines.rs index b4f2dc293..f73d3d6a9 100644 --- a/render/wgpu/src/pipelines.rs +++ b/render/wgpu/src/pipelines.rs @@ -36,7 +36,7 @@ pub struct Pipelines { pub color: ShapePipeline, /// Renders a bitmap without any blending, and does /// not write to the alpha channel. This is used for - /// drawing a finished Stage3D buffer onto the backgroud. + /// drawing a finished Stage3D buffer onto the background. pub bitmap_opaque: wgpu::RenderPipeline, /// Like `bitmap_opaque`, but with a no-op `DepthStencilState`. /// This is used when we're inside a `RenderPass` that is diff --git a/scanner/src/analyze.rs b/scanner/src/analyze.rs index 51b4d667e..d34cf65c5 100644 --- a/scanner/src/analyze.rs +++ b/scanner/src/analyze.rs @@ -58,7 +58,7 @@ pub fn analyze_main(opt: AnalyzeOpt) -> Result<(), std::io::Error> { match r { Ok(fr) => fr, Err(e) => { - // Treat unparseable CSV rows as a scanner panic + // Treat unparsable CSV rows as a scanner panic FileResults { error: Some(format!("{e}")), ..FileResults::default() diff --git a/swf/src/read.rs b/swf/src/read.rs index 9d6f68a03..85618e585 100644 --- a/swf/src/read.rs +++ b/swf/src/read.rs @@ -214,7 +214,7 @@ fn make_lzma_reader<'a, R: Read + 'a>( // Bytes 0..5: LZMA properties // Bytes 5..13: Uncompressed length // - // To deal with the mangled header, use lzma_rs options to anually provide uncompressed length. + // To deal with the mangled header, use lzma_rs options to manually provide uncompressed length. // Read compressed length (ignored) let _ = input.read_u32::()?; diff --git a/swf/src/types.rs b/swf/src/types.rs index bf7c8b23c..ec7781692 100644 --- a/swf/src/types.rs +++ b/swf/src/types.rs @@ -87,7 +87,7 @@ impl Header { /// The extended metadata of an SWF file. /// -/// This includes the SWF header data as well as metdata from the FileAttributes and +/// This includes the SWF header data as well as metadata from the FileAttributes and /// SetBackgroundColor tags. /// /// This metadata may not reflect the actual data inside a malformed SWF; for example, @@ -163,7 +163,7 @@ impl HeaderExt { /// Whether this SWF contains XMP metadata in a Metadata tag. #[inline] - pub fn has_metdata(&self) -> bool { + pub fn has_metadata(&self) -> bool { self.file_attributes.contains(FileAttributes::HAS_METADATA) } diff --git a/tests/input-format/src/injector.rs b/tests/input-format/src/injector.rs index 3486e132a..a0d326c15 100644 --- a/tests/input-format/src/injector.rs +++ b/tests/input-format/src/injector.rs @@ -10,7 +10,7 @@ use std::path::Path; bitflags! { /// A set of currently held-down mouse buttons. /// - /// Convertable from `MouseButton`, which is intended to represent ONE + /// Convertible from `MouseButton`, which is intended to represent ONE /// button being held or released. #[derive(Clone, Copy)] pub struct MouseButtons: u8 { diff --git a/tests/tests/swfs/avm2/bitmapdata_copypixels_blend_over/Test.as b/tests/tests/swfs/avm2/bitmapdata_copypixels_blend_over/Test.as index cb04aad1d..fb0fb68d3 100644 --- a/tests/tests/swfs/avm2/bitmapdata_copypixels_blend_over/Test.as +++ b/tests/tests/swfs/avm2/bitmapdata_copypixels_blend_over/Test.as @@ -16,7 +16,7 @@ for (var red = 0; red < 256; red += 1) { var destPixel:uint = (alpha << 24) | red; var tmp = dest.clone(); tmp.setPixel32(0, 0, destPixel); - // Account for lossy rountrip caused by premultiply/unmulitply + // Account for lossy roundtrip caused by premultiply/unmultiply var expected = tmp.getPixel32(0, 0); tmp.copyPixels(source, new Rectangle(0, 0, 1, 1), new Point(0, 0), null, null, true); var roundTrip = tmp.getPixel32(0, 0); diff --git a/tests/tests/swfs/avm2/stage3d_texture/Camera3D.as b/tests/tests/swfs/avm2/stage3d_texture/Camera3D.as index 31eab3227..8ff38bf3f 100644 --- a/tests/tests/swfs/avm2/stage3d_texture/Camera3D.as +++ b/tests/tests/swfs/avm2/stage3d_texture/Camera3D.as @@ -79,9 +79,9 @@ package * @param positionX X component of the camera's position * @param positionY Y component of the camera's position * @param positionZ Z component of the camera's position - * @param targetX X compoennt of the point the camera is aiming at - * @param targetY Y compoennt of the point the camera is aiming at - * @param targetZ Z compoennt of the point the camera is aiming at + * @param targetX X component of the point the camera is aiming at + * @param targetY Y component of the point the camera is aiming at + * @param targetZ Z component of the point the camera is aiming at * @param upDirX X component of the direction considered to be "up" * @param upDirX X component of the direction considered to be "up" * @param upDirY Y component of the direction considered to be "up" diff --git a/tests/tests/swfs/avm2/stage3d_texture/Sphere3D.as b/tests/tests/swfs/avm2/stage3d_texture/Sphere3D.as index aace0913c..6337c0e2d 100644 --- a/tests/tests/swfs/avm2/stage3d_texture/Sphere3D.as +++ b/tests/tests/swfs/avm2/stage3d_texture/Sphere3D.as @@ -48,7 +48,7 @@ package stacks = MIN_STACKS; } - // Pre-compute many constants used in tesselation + // Pre-compute many constants used in tessellation const stepTheta:Number = (2.0*Math.PI) / slices; const stepPhi:Number = Math.PI / stacks; const stepU:Number = 1.0 / slices; @@ -56,7 +56,7 @@ package const verticesPerStack:uint = slices + 1; const numVertices:uint = verticesPerStack * (stacks+1); - // Allocate the vectors of data to tesselate into + // Allocate the vectors of data to tessellate into var positions:Vector. = new Vector.(numVertices*3); var texCoords:Vector. = new Vector.(numVertices*2); var tris:Vector. = new Vector.(slices*stacks*6); diff --git a/web/packages/core/src/polyfills.ts b/web/packages/core/src/polyfills.ts index dae866b63..ac478b9aa 100644 --- a/web/packages/core/src/polyfills.ts +++ b/web/packages/core/src/polyfills.ts @@ -30,7 +30,7 @@ function isFlashEnabledBrowser(): boolean { if ("favorFlash" in globalConfig && globalConfig["favorFlash"] === false) { return false; } - // Otherwise, check for pre-exisiting Flash support. + // Otherwise, check for pre-existing Flash support. return ( (navigator.plugins.namedItem("Shockwave Flash")?.filename ?? "ruffle.js") !== "ruffle.js" diff --git a/web/packages/core/src/public-api.ts b/web/packages/core/src/public-api.ts index 3ab50d480..83f181647 100644 --- a/web/packages/core/src/public-api.ts +++ b/web/packages/core/src/public-api.ts @@ -19,7 +19,7 @@ declare global { * Represents a potential installation of a Ruffle public API. * * Unlike [[PublicAPI]], this may come from any source, past or future. - * It needs to be forwards compatible and convertable into a modern day [[PublicAPI]]. + * It needs to be forwards compatible and convertible into a modern day [[PublicAPI]]. */ interface PublicAPILike { config?: DataLoadOptions | URLLoadOptions | object; diff --git a/web/packages/core/src/ruffle-player.ts b/web/packages/core/src/ruffle-player.ts index 3711c9bc2..c9024c978 100644 --- a/web/packages/core/src/ruffle-player.ts +++ b/web/packages/core/src/ruffle-player.ts @@ -2174,7 +2174,7 @@ export class RufflePlayer extends HTMLElement { ]); break; case PanicError.JavascriptConflict: - // Self hosted: Cannot load `.wasm` file - a native object / function is overriden + // Self hosted: Cannot load `.wasm` file - a native object / function is overridden errorBody = textAsParagraphs("error-javascript-conflict"); if (isBuildOutdated) { errorBody.appendChild( @@ -2189,7 +2189,7 @@ export class RufflePlayer extends HTMLElement { ]); break; case PanicError.CSPConflict: - // General error: Cannot load `.wasm` file - a native object / function is overriden + // General error: Cannot load `.wasm` file - a native object / function is overridden errorBody = textAsParagraphs("error-csp-conflict"); errorFooter = this.createErrorFooter([ new PanicLinkInfo( diff --git a/wstr/src/buf.rs b/wstr/src/buf.rs index 05e569118..96b872a75 100644 --- a/wstr/src/buf.rs +++ b/wstr/src/buf.rs @@ -9,7 +9,7 @@ use core::ptr::NonNull; use super::utils::{encode_raw_utf16, split_ascii_prefix, split_ascii_prefix_bytes, DecodeAvmUtf8}; use super::{ptr, Units, WStr, WStrMetadata}; -/// An owned, extensible UCS2 string, analoguous to `String`. +/// An owned, extensible UCS2 string, analogous to `String`. pub struct WString { data: NonNull<()>, meta: WStrMetadata, diff --git a/wstr/src/common.rs b/wstr/src/common.rs index 9889bd56a..f2c9e9aab 100644 --- a/wstr/src/common.rs +++ b/wstr/src/common.rs @@ -3,7 +3,7 @@ use core::ops::{Bound, Index, IndexMut, Range, RangeBounds}; use super::{ptr, FromWStr, Pattern, WString}; -/// A UCS2 string slice, analoguous to `&'a str`. +/// A UCS2 string slice, analogous to `&'a str`. #[repr(transparent)] pub struct WStr { /// See the `ptr` module for more details.