docs: Miscellaneous spelling corrections
This commit is contained in:
parent
48ee47d88a
commit
2e0509694c
|
@ -457,7 +457,7 @@ impl<'gc> FunctionObject<'gc> {
|
|||
///
|
||||
/// `fn_proto` refers to the implicit proto of the function object, and the
|
||||
/// `prototype` refers to the explicit prototype of the function.
|
||||
/// The function and it's prototype will be linked to each other.
|
||||
/// The function and its prototype will be linked to each other.
|
||||
fn allocate_function(
|
||||
context: MutationContext<'gc, '_>,
|
||||
function: Option<impl Into<Executable<'gc>>>,
|
||||
|
|
|
@ -81,7 +81,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
this: Object<'gc>,
|
||||
) -> Result<Value<'gc>, Error<'gc>>;
|
||||
|
||||
/// Retrieve a named property from the object, or it's prototype.
|
||||
/// Retrieve a named property from the object, or its prototype.
|
||||
fn get(
|
||||
&self,
|
||||
name: &str,
|
||||
|
@ -94,7 +94,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
}
|
||||
}
|
||||
|
||||
/// Set a named property on this object, or it's prototype.
|
||||
/// Set a named property on this object, or its prototype.
|
||||
fn set(
|
||||
&self,
|
||||
name: &str,
|
||||
|
@ -140,7 +140,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
///
|
||||
/// It is highly recommended to use this convenience method to perform
|
||||
/// method calls. It is morally equivalent to an AVM1 `ActionCallMethod`
|
||||
/// opcode. It will take care of retrieving the method, calculating it's
|
||||
/// opcode. It will take care of retrieving the method, calculating its
|
||||
/// base prototype for `super` calls, and providing it with the correct
|
||||
/// `this` parameter.
|
||||
fn call_method(
|
||||
|
@ -177,7 +177,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
activation: &mut Activation<'_, 'gc, '_>,
|
||||
) -> Option<Object<'gc>>;
|
||||
|
||||
/// Construct a host object of some kind and return it's cell.
|
||||
/// Construct a host object of some kind and return its cell.
|
||||
///
|
||||
/// As the first step in object construction, the `new` method is called on
|
||||
/// the prototype to initialize an object. The prototype may construct any
|
||||
|
@ -336,7 +336,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
|
||||
/// Determine if this object is an instance of a class.
|
||||
///
|
||||
/// The class is provided in the form of it's constructor function and the
|
||||
/// The class is provided in the form of its constructor function and the
|
||||
/// explicit prototype of that constructor function. It is assumed that
|
||||
/// they are already linked.
|
||||
///
|
||||
|
|
|
@ -17,7 +17,7 @@ use std::borrow::Cow;
|
|||
///
|
||||
/// A `SuperObject` references all data from another object, but with one layer
|
||||
/// of prototyping removed. It's as if the given object had been constructed
|
||||
/// with it's parent class.
|
||||
/// with its parent class.
|
||||
#[collect(no_drop)]
|
||||
#[derive(Copy, Clone, Collect, Debug)]
|
||||
pub struct SuperObject<'gc>(GcCell<'gc, SuperObjectData<'gc>>);
|
||||
|
|
|
@ -33,7 +33,7 @@ impl<'gc> Property<'gc> {
|
|||
/// Set a property slot.
|
||||
///
|
||||
/// This function may return an `Executable` of the property's virtual
|
||||
/// function, if any happen to exist. It should be resolved, and it's value
|
||||
/// function, if any happen to exist. It should be resolved, and its value
|
||||
/// discarded.
|
||||
pub fn set(&mut self, new_value: impl Into<Value<'gc>>) -> Option<Object<'gc>> {
|
||||
match self {
|
||||
|
|
|
@ -67,7 +67,7 @@ pub struct Class<'gc> {
|
|||
/// These are accessed as constructor properties.
|
||||
class_traits: Vec<Trait<'gc>>,
|
||||
|
||||
/// Whether or not this `Class` has loaded it's traits or not.
|
||||
/// Whether or not this `Class` has loaded its traits or not.
|
||||
traits_loaded: bool,
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ impl<'gc> Class<'gc> {
|
|||
self.protected_namespace = Some(ns)
|
||||
}
|
||||
|
||||
/// Construct a class from a `TranslationUnit` and it's class index.
|
||||
/// Construct a class from a `TranslationUnit` and its class index.
|
||||
///
|
||||
/// The returned class will be allocated, but no traits will be loaded. The
|
||||
/// caller is responsible for storing the class in the `TranslationUnit`
|
||||
|
@ -296,7 +296,7 @@ impl<'gc> Class<'gc> {
|
|||
/// Given a name, append class traits matching the name to a list of known
|
||||
/// traits.
|
||||
///
|
||||
/// This function adds it's result onto the list of known traits, with the
|
||||
/// This function adds its result onto the list of known traits, with the
|
||||
/// caveat that duplicate entries will be replaced (if allowed). As such, this
|
||||
/// function should be run on the class hierarchy from top to bottom.
|
||||
///
|
||||
|
@ -322,7 +322,7 @@ impl<'gc> Class<'gc> {
|
|||
false
|
||||
}
|
||||
|
||||
/// Look for a class trait with a given local name, and return it's
|
||||
/// Look for a class trait with a given local name, and return its
|
||||
/// namespace.
|
||||
///
|
||||
/// TODO: Matching multiple namespaces with the same local name is at least
|
||||
|
@ -349,7 +349,7 @@ impl<'gc> Class<'gc> {
|
|||
/// Given a name, append instance traits matching the name to a list of
|
||||
/// known traits.
|
||||
///
|
||||
/// This function adds it's result onto the list of known traits, with the
|
||||
/// This function adds its result onto the list of known traits, with the
|
||||
/// caveat that duplicate entries will be replaced (if allowed). As such, this
|
||||
/// function should be run on the class hierarchy from top to bottom.
|
||||
///
|
||||
|
@ -364,7 +364,7 @@ impl<'gc> Class<'gc> {
|
|||
do_trait_lookup(name, known_traits, &self.instance_traits)
|
||||
}
|
||||
|
||||
/// Determines if this class provides a given trait on it's instances.
|
||||
/// Determines if this class provides a given trait on its instances.
|
||||
pub fn has_instance_trait(&self, name: &QName<'gc>) -> bool {
|
||||
for trait_entry in self.instance_traits.iter() {
|
||||
if name == trait_entry.name() {
|
||||
|
@ -375,7 +375,7 @@ impl<'gc> Class<'gc> {
|
|||
false
|
||||
}
|
||||
|
||||
/// Look for an instance trait with a given local name, and return it's
|
||||
/// Look for an instance trait with a given local name, and return its
|
||||
/// namespace.
|
||||
///
|
||||
/// TODO: Matching multiple namespaces with the same local name is at least
|
||||
|
|
|
@ -805,7 +805,7 @@ where
|
|||
|
||||
/// Sort array storage.
|
||||
///
|
||||
/// This function expects it's values to have been pre-enumerated and
|
||||
/// This function expects its values to have been pre-enumerated and
|
||||
/// pre-resolved. They will be sorted in-place. It is the caller's
|
||||
/// responsibility to place the resulting half of the sorted array wherever.
|
||||
///
|
||||
|
@ -944,7 +944,7 @@ fn sort_postprocess<'gc>(
|
|||
Ok(0.into())
|
||||
}
|
||||
|
||||
/// Given a value, extract it's array values.
|
||||
/// Given a value, extract its array values.
|
||||
///
|
||||
/// If the value is not an array, this function yields `None`.
|
||||
fn extract_array_values<'gc>(
|
||||
|
@ -1064,7 +1064,7 @@ pub fn sort<'gc>(
|
|||
Ok(0.into())
|
||||
}
|
||||
|
||||
/// Given a value, extract it's array values.
|
||||
/// Given a value, extract its array values.
|
||||
///
|
||||
/// If the value is not an array, it will be returned as if it was present in a
|
||||
/// one-element array containing itself. This is intended for use with parsing
|
||||
|
@ -1076,7 +1076,7 @@ fn extract_maybe_array_values<'gc>(
|
|||
Ok(extract_array_values(activation, value.clone())?.unwrap_or_else(|| vec![value]))
|
||||
}
|
||||
|
||||
/// Given a value, extract it's array values and coerce them to strings.
|
||||
/// Given a value, extract its array values and coerce them to strings.
|
||||
///
|
||||
/// If the value is not an array, it will be returned as if it was present in a
|
||||
/// one-element array containing itself. This is intended for use with parsing
|
||||
|
@ -1095,7 +1095,7 @@ fn extract_maybe_array_strings<'gc>(
|
|||
Ok(out)
|
||||
}
|
||||
|
||||
/// Given a value, extract it's array values and coerce them to enumsets.
|
||||
/// Given a value, extract its array values and coerce them to enumsets.
|
||||
///
|
||||
/// If the value is not an array, it will be returned as if it was present in a
|
||||
/// one-element array containing itself. This is intended for use with parsing
|
||||
|
|
|
@ -137,7 +137,7 @@ pub fn current_label<'gc>(
|
|||
Ok(Value::Undefined)
|
||||
}
|
||||
|
||||
/// Given a scene, produce it's name, length, and a list of frame labels.
|
||||
/// Given a scene, produce its name, length, and a list of frame labels.
|
||||
///
|
||||
/// The intended purpose of this output is to be sent directly into the
|
||||
/// constructor of `flash.display.Scene`.
|
||||
|
|
|
@ -90,7 +90,7 @@ impl<'gc> Namespace<'gc> {
|
|||
self.eq(&Self::Package("".into())) || self.is_any()
|
||||
}
|
||||
|
||||
/// Get the string value of this namespace, ignoring it's type.
|
||||
/// Get the string value of this namespace, ignoring its type.
|
||||
///
|
||||
/// TODO: Is this *actually* the namespace URI?
|
||||
pub fn as_uri(&self) -> AvmString<'gc> {
|
||||
|
|
|
@ -50,7 +50,7 @@ pub use crate::avm2::object::stage_object::StageObject;
|
|||
}
|
||||
)]
|
||||
pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy {
|
||||
/// Retrieve a property by it's QName, without taking prototype lookups
|
||||
/// Retrieve a property by its QName, without taking prototype lookups
|
||||
/// into account.
|
||||
fn get_property_local(
|
||||
self,
|
||||
|
@ -59,7 +59,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
activation: &mut Activation<'_, 'gc, '_>,
|
||||
) -> Result<Value<'gc>, Error>;
|
||||
|
||||
/// Retrieve a property by it's QName.
|
||||
/// Retrieve a property by its QName.
|
||||
fn get_property(
|
||||
&mut self,
|
||||
receiver: Object<'gc>,
|
||||
|
@ -110,7 +110,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
activation: &mut Activation<'_, 'gc, '_>,
|
||||
) -> Result<(), Error>;
|
||||
|
||||
/// Set a property by it's QName.
|
||||
/// Set a property by its QName.
|
||||
fn set_property(
|
||||
&mut self,
|
||||
receiver: Object<'gc>,
|
||||
|
@ -152,7 +152,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
activation: &mut Activation<'_, 'gc, '_>,
|
||||
) -> Result<(), Error>;
|
||||
|
||||
/// Init a property by it's QName.
|
||||
/// Init a property by its QName.
|
||||
fn init_property(
|
||||
&mut self,
|
||||
receiver: Object<'gc>,
|
||||
|
@ -185,10 +185,10 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
receiver.init_property_local(receiver, name, value, activation)
|
||||
}
|
||||
|
||||
/// Retrieve a slot by it's index.
|
||||
/// Retrieve a slot by its index.
|
||||
fn get_slot(self, id: u32) -> Result<Value<'gc>, Error>;
|
||||
|
||||
/// Set a slot by it's index.
|
||||
/// Set a slot by its index.
|
||||
fn set_slot(
|
||||
self,
|
||||
id: u32,
|
||||
|
@ -196,7 +196,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
mc: MutationContext<'gc, '_>,
|
||||
) -> Result<(), Error>;
|
||||
|
||||
/// Initialize a slot by it's index.
|
||||
/// Initialize a slot by its index.
|
||||
fn init_slot(
|
||||
self,
|
||||
id: u32,
|
||||
|
@ -204,7 +204,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
mc: MutationContext<'gc, '_>,
|
||||
) -> Result<(), Error>;
|
||||
|
||||
/// Retrieve a method by it's index.
|
||||
/// Retrieve a method by its index.
|
||||
fn get_method(self, id: u32) -> Option<Object<'gc>>;
|
||||
|
||||
/// Retrieves a trait entry by name.
|
||||
|
@ -226,7 +226,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
known_traits: &mut Vec<Trait<'gc>>,
|
||||
) -> Result<(), Error>;
|
||||
|
||||
/// Retrieves the scope chain of the object at time of it's creation.
|
||||
/// Retrieves the scope chain of the object at time of its creation.
|
||||
///
|
||||
/// The scope chain is used to determine the starting scope stack when an
|
||||
/// object is called, as well as any class methods on the object.
|
||||
|
@ -340,7 +340,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
/// Change the `__proto__` on this object.
|
||||
///
|
||||
/// This method primarily exists so that the global scope that player
|
||||
/// globals loads into can be created before it's superclasses are. It
|
||||
/// globals loads into can be created before its superclasses are. It
|
||||
/// should be used sparingly, if at all.
|
||||
fn set_proto(self, mc: MutationContext<'gc, '_>, proto: Object<'gc>);
|
||||
|
||||
|
@ -638,7 +638,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
Err("Object is not callable".into())
|
||||
}
|
||||
|
||||
/// Construct a host object of some kind and return it's cell.
|
||||
/// Construct a host object of some kind and return its cell.
|
||||
///
|
||||
/// As the first step in object construction, the `construct` method is
|
||||
/// called on the prototype to create a new object. The prototype may
|
||||
|
@ -737,7 +737,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
/// Determine if this object is an instance of a given type.
|
||||
///
|
||||
/// The given object should be the constructor for the given type we are
|
||||
/// checking against this object. It's prototype will be searched in the
|
||||
/// checking against this object. Its prototype will be searched in the
|
||||
/// prototype chain of this object. If `check_interfaces` is enabled, then
|
||||
/// the interfaces listed on each prototype will also be checked.
|
||||
#[allow(unused_mut)] //it's not unused
|
||||
|
@ -754,10 +754,10 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
self.has_prototype_in_chain(type_proto, check_interfaces)
|
||||
}
|
||||
|
||||
/// Determine if this object has a given prototype in it's prototype chain.
|
||||
/// Determine if this object has a given prototype in its prototype chain.
|
||||
///
|
||||
/// The given object should be the prototype we are checking against this
|
||||
/// object. It's prototype will be searched in the
|
||||
/// object. Its prototype will be searched in the
|
||||
/// prototype chain of this object. If `check_interfaces` is enabled, then
|
||||
/// the interfaces listed on each prototype will also be checked.
|
||||
fn has_prototype_in_chain(
|
||||
|
@ -793,7 +793,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
|||
/// Get this object's `Class`, if it has one.
|
||||
fn as_class(&self) -> Option<GcCell<'gc, Class<'gc>>>;
|
||||
|
||||
/// Get this object's `Class`, or any `Class` on it's prototype chain.
|
||||
/// Get this object's `Class`, or any `Class` on its prototype chain.
|
||||
///
|
||||
/// This only yields `None` for bare objects.
|
||||
fn as_proto_class(&self) -> Option<GcCell<'gc, Class<'gc>>> {
|
||||
|
|
|
@ -15,7 +15,7 @@ use crate::avm2::Error;
|
|||
use crate::{impl_avm2_custom_object, impl_avm2_custom_object_properties};
|
||||
use gc_arena::{Collect, GcCell, MutationContext};
|
||||
|
||||
/// An Object which can be called to execute it's function code.
|
||||
/// An Object which can be called to execute its function code.
|
||||
#[derive(Collect, Debug, Clone, Copy)]
|
||||
#[collect(no_drop)]
|
||||
pub struct FunctionObject<'gc>(GcCell<'gc, FunctionObjectData<'gc>>);
|
||||
|
@ -65,7 +65,7 @@ impl<'gc> FunctionObject<'gc> {
|
|||
)
|
||||
}
|
||||
|
||||
/// Construct a class with a different `TObject` implementation than it's
|
||||
/// Construct a class with a different `TObject` implementation than its
|
||||
/// base class.
|
||||
///
|
||||
/// This is identical to `from_class`, save for the fact that you must also
|
||||
|
@ -117,7 +117,7 @@ impl<'gc> FunctionObject<'gc> {
|
|||
FunctionObject::from_class_and_proto(activation, class, class_proto, scope)
|
||||
}
|
||||
|
||||
/// Construct a class with a custom object type as it's prototype.
|
||||
/// Construct a class with a custom object type as its prototype.
|
||||
fn from_class_and_proto(
|
||||
activation: &mut Activation<'_, 'gc, '_>,
|
||||
class: GcCell<'gc, Class<'gc>>,
|
||||
|
|
|
@ -524,7 +524,7 @@ impl<'gc> ScriptObjectData<'gc> {
|
|||
.map(|slot| slot.get().unwrap_or(Value::Undefined))
|
||||
}
|
||||
|
||||
/// Set a slot by it's index.
|
||||
/// Set a slot by its index.
|
||||
pub fn set_slot(
|
||||
&mut self,
|
||||
id: u32,
|
||||
|
@ -538,7 +538,7 @@ impl<'gc> ScriptObjectData<'gc> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Set a slot by it's index.
|
||||
/// Set a slot by its index.
|
||||
pub fn init_slot(
|
||||
&mut self,
|
||||
id: u32,
|
||||
|
|
|
@ -79,7 +79,7 @@ impl<'gc> TranslationUnit<'gc> {
|
|||
self.0.read().abc.0.clone()
|
||||
}
|
||||
|
||||
/// Load a method from the ABC file and return it's method definition.
|
||||
/// Load a method from the ABC file and return its method definition.
|
||||
pub fn load_method(
|
||||
self,
|
||||
method_index: u32,
|
||||
|
@ -105,7 +105,7 @@ impl<'gc> TranslationUnit<'gc> {
|
|||
Ok(method)
|
||||
}
|
||||
|
||||
/// Load a class from the ABC file and return it's class definition.
|
||||
/// Load a class from the ABC file and return its class definition.
|
||||
pub fn load_class(
|
||||
self,
|
||||
class_index: u32,
|
||||
|
@ -127,7 +127,7 @@ impl<'gc> TranslationUnit<'gc> {
|
|||
Ok(class)
|
||||
}
|
||||
|
||||
/// Load a script from the ABC file and return it's script definition.
|
||||
/// Load a script from the ABC file and return its script definition.
|
||||
pub fn load_script(
|
||||
self,
|
||||
script_index: u32,
|
||||
|
@ -257,7 +257,7 @@ impl<'gc> Script<'gc> {
|
|||
))
|
||||
}
|
||||
|
||||
/// Construct a script from a `TranslationUnit` and it's script index.
|
||||
/// Construct a script from a `TranslationUnit` and its script index.
|
||||
///
|
||||
/// The returned script will be allocated, but no traits will be loaded.
|
||||
/// The caller is responsible for storing the class in the
|
||||
|
|
|
@ -279,7 +279,7 @@ impl<'gc> Value<'gc> {
|
|||
/// `TypeError`.
|
||||
///
|
||||
/// The `Hint` parameter selects if the coercion prefers `toString` or
|
||||
/// `valueOf`. If the preferred function is not available, it's opposite
|
||||
/// `valueOf`. If the preferred function is not available, its opposite
|
||||
/// will be called. If neither function successfully generates a primitive,
|
||||
/// a `TypeError` will be raised.
|
||||
///
|
||||
|
|
|
@ -134,7 +134,7 @@ pub struct UpdateContext<'a, 'gc, 'gc_context> {
|
|||
/// The AVM2 global state.
|
||||
pub avm2: &'a mut Avm2<'gc>,
|
||||
|
||||
/// External interface for (for example) Javascript <-> Actionscript interaction
|
||||
/// External interface for (for example) JavaScript <-> ActionScript interaction
|
||||
pub external_interface: &'a mut ExternalInterface<'gc>,
|
||||
|
||||
/// The instant at which the current update started.
|
||||
|
@ -184,7 +184,7 @@ impl<'a, 'gc, 'gc_context> UpdateContext<'a, 'gc, 'gc_context> {
|
|||
/// a shorter internal lifetime.
|
||||
///
|
||||
/// This is particularly useful for structures that may wish to hold an
|
||||
/// update context without adding further lifetimes for it's borrowing.
|
||||
/// update context without adding further lifetimes for its borrowing.
|
||||
/// Please note that you will not be able to use the original update
|
||||
/// context until this reborrowed copy has fallen out of scope.
|
||||
pub fn reborrow<'b>(&'b mut self) -> UpdateContext<'b, 'gc, 'gc_context>
|
||||
|
|
|
@ -698,7 +698,7 @@ impl<'gc> EditText<'gc> {
|
|||
)
|
||||
}
|
||||
|
||||
/// Render a layout box, plus it's children.
|
||||
/// Render a layout box, plus its children.
|
||||
fn render_layout_box(self, context: &mut RenderContext<'_, 'gc>, lbox: &LayoutBox<'gc>) {
|
||||
let box_transform: Transform = lbox.bounds().origin().into();
|
||||
context.transform_stack.push(&box_transform);
|
||||
|
@ -852,7 +852,7 @@ impl<'gc> EditText<'gc> {
|
|||
&mut activation.context,
|
||||
);
|
||||
} else {
|
||||
// Otherwise, we initialize the proprty with the text field's text, if it's non-empty.
|
||||
// Otherwise, we initialize the property with the text field's text, if it's non-empty.
|
||||
// Note that HTML text fields are often initialized with an empty <p> tag, which is not considered empty.
|
||||
let text = self.text();
|
||||
if !text.is_empty() {
|
||||
|
|
|
@ -1360,7 +1360,7 @@ impl<'gc> MovieClip<'gc> {
|
|||
params: &GotoPlaceObject| {
|
||||
let child_entry = clip.0.read().children.get(¶ms.depth()).copied();
|
||||
match child_entry {
|
||||
// Apply final delta to display pamareters.
|
||||
// Apply final delta to display parameters.
|
||||
// For rewinds, if an object was created before the final frame,
|
||||
// it will exist on the final frame as well. Re-use this object
|
||||
// instead of recreating.
|
||||
|
|
|
@ -41,7 +41,7 @@ pub struct LayoutContext<'a, 'gc> {
|
|||
/// The position to put text into.
|
||||
///
|
||||
/// This cursor does not take indents, left margins, or alignment into
|
||||
/// account. It's X coordinate is always relative to the start of the
|
||||
/// account. Its X coordinate is always relative to the start of the
|
||||
/// current line, not the left edge of the text field being laid out.
|
||||
cursor: Position<Twips>,
|
||||
|
||||
|
@ -605,7 +605,7 @@ pub enum LayoutContent<'gc> {
|
|||
|
||||
/// A layout box containing a drawing.
|
||||
///
|
||||
/// The drawing will be rendered with it's origin at the position of the
|
||||
/// The drawing will be rendered with its origin at the position of the
|
||||
/// layout box's bounds. The size of those bounds do not affect the
|
||||
/// rendering of the drawing.
|
||||
Drawing(Drawing),
|
||||
|
|
|
@ -665,7 +665,7 @@ impl TextFormat {
|
|||
/// Represents the application of a `TextFormat` to a particular text span.
|
||||
///
|
||||
/// The actual string data is not stored here; a `TextSpan` is meaningless
|
||||
/// without it's underlying string content. Furthermore, the start position
|
||||
/// without its underlying string content. Furthermore, the start position
|
||||
/// within the string is implicit in the sum of all previous text span's
|
||||
/// lengths. See `TextSpans` for more information.
|
||||
///
|
||||
|
@ -902,7 +902,7 @@ impl FormatSpans {
|
|||
}
|
||||
}
|
||||
|
||||
/// Construct a format span from it's raw parts.
|
||||
/// Construct a format span from its raw parts.
|
||||
#[allow(dead_code)]
|
||||
pub fn from_str_and_spans(text: &str, spans: &[TextSpan]) -> Self {
|
||||
FormatSpans {
|
||||
|
@ -937,7 +937,7 @@ impl FormatSpans {
|
|||
/// Find the index of the span that covers a given search position.
|
||||
///
|
||||
/// This function returns both the index of the span which covers the
|
||||
/// search position, but how far into the span it's position is.
|
||||
/// search position, but how far into the span its position is.
|
||||
///
|
||||
/// The index returned from this function is not valid across calls which
|
||||
/// mutate spans.
|
||||
|
@ -1150,7 +1150,7 @@ impl FormatSpans {
|
|||
///
|
||||
/// Text span formatting will be adjusted to match: specifically, the spans
|
||||
/// corresponding to the range will be removed and replaced with a single
|
||||
/// span for the newly inserted text. It's formatting will be determined by
|
||||
/// span for the newly inserted text. Its formatting will be determined by
|
||||
/// either the formatting of the last span in the range, or if the range
|
||||
/// extends beyond the end of the field, the default text format.
|
||||
///
|
||||
|
|
|
@ -120,7 +120,7 @@ impl<'gc> LoadManager<'gc> {
|
|||
/// The root movie is special because it determines a few bits of player
|
||||
/// state, such as the size of the stage and the current frame rate. Ergo,
|
||||
/// this method should only be called once, by the player that is trying to
|
||||
/// kick off it's root movie load.
|
||||
/// kick off its root movie load.
|
||||
pub fn load_root_movie(
|
||||
&mut self,
|
||||
player: Weak<Mutex<Player>>,
|
||||
|
@ -162,7 +162,7 @@ impl<'gc> LoadManager<'gc> {
|
|||
loader.movie_loader(player, fetch, url)
|
||||
}
|
||||
|
||||
/// Indicates that a movie clip has initialized (ran it's first frame).
|
||||
/// Indicates that a movie clip has initialized (ran its first frame).
|
||||
///
|
||||
/// Interested loaders will be invoked from here.
|
||||
pub fn movie_clip_on_load(
|
||||
|
@ -280,7 +280,7 @@ pub enum Loader<'gc> {
|
|||
/// Indicates that the load has completed.
|
||||
///
|
||||
/// This flag exists to prevent a situation in which loading a movie
|
||||
/// into a clip that has not yet fired it's Load event causes the
|
||||
/// into a clip that has not yet fired its Load event causes the
|
||||
/// loader to be prematurely removed. This flag is only set when either
|
||||
/// the movie has been replaced (and thus Load events can be trusted)
|
||||
/// or an error has occurred (in which case we don't care about the
|
||||
|
|
|
@ -82,7 +82,7 @@ struct GcRootData<'gc> {
|
|||
/// Timed callbacks created with `setInterval`/`setTimeout`.
|
||||
timers: Timers<'gc>,
|
||||
|
||||
/// External interface for (for example) Javascript <-> Actionscript interaction
|
||||
/// External interface for (for example) JavaScript <-> ActionScript interaction
|
||||
external_interface: ExternalInterface<'gc>,
|
||||
|
||||
/// A tracker for the current keyboard focused element
|
||||
|
|
|
@ -9,7 +9,7 @@ use gc_arena::Collect;
|
|||
/// This primary purpose of this type is to communicate if a movie clip is
|
||||
/// being created on an AVM stack, and if so, which type. If it is on-stack,
|
||||
/// then it needs to be constructed immediately before user code can continue
|
||||
/// running. Otherwise, it's constructor should be queued to run later.
|
||||
/// running. Otherwise, its constructor should be queued to run later.
|
||||
///
|
||||
/// A secondary purpose of this type is to flag which VM is creating an object,
|
||||
/// which can be used to ensure the object is instantiated as tied to the
|
||||
|
|
|
@ -57,7 +57,7 @@ impl<'gc> DoubleEndedIterator for ChildIter<'gc> {
|
|||
/// throughout the tree.
|
||||
#[derive(Copy, Clone)]
|
||||
pub enum Step<'gc> {
|
||||
/// `WalkIter` has discovered a new element and will begin to yield it's
|
||||
/// `WalkIter` has discovered a new element and will begin to yield its
|
||||
/// children's steps.
|
||||
In(XMLNode<'gc>),
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ pub struct XMLName {
|
|||
}
|
||||
|
||||
impl XMLName {
|
||||
/// Construct an XML name from it's parts (name and namespace).
|
||||
/// Construct an XML name from its parts (name and namespace).
|
||||
pub fn from_parts(namespace: Option<&str>, name: &str) -> Self {
|
||||
XMLName {
|
||||
namespace: namespace.map(|s| s.to_string()),
|
||||
|
|
|
@ -410,7 +410,7 @@ impl<'gc> XMLNode<'gc> {
|
|||
/// Adopt a new child node into the current node.
|
||||
///
|
||||
/// This does not add the node to any internal lists; it merely updates the
|
||||
/// child to ensure that it considers this node it's parent. This function
|
||||
/// child to ensure that it considers this node its parent. This function
|
||||
/// should always be called after a child node is added to this one. If
|
||||
/// you adopt a node that is NOT already added to the children list, bad
|
||||
/// things may happen.
|
||||
|
@ -557,7 +557,7 @@ impl<'gc> XMLNode<'gc> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Remove node from it's current siblings list.
|
||||
/// Remove node from its current siblings list.
|
||||
///
|
||||
/// If a former sibling exists, we will also adopt it to the opposing side
|
||||
/// of this node, so as to maintain a coherent sibling list.
|
||||
|
@ -598,10 +598,10 @@ impl<'gc> XMLNode<'gc> {
|
|||
/// Add node to a new siblings list.
|
||||
///
|
||||
/// If a given sibling exists, we will also ensure this node is adopted as
|
||||
/// it's sibling, so as to maintain a coherent sibling list.
|
||||
/// its sibling, so as to maintain a coherent sibling list.
|
||||
///
|
||||
/// This is the opposite of `disown_siblings` - the former removes a
|
||||
/// sibling from it's current list, and this adds the sibling to a new one.
|
||||
/// sibling from its current list, and this adds the sibling to a new one.
|
||||
fn adopt_siblings(
|
||||
&mut self,
|
||||
mc: MutationContext<'gc, '_>,
|
||||
|
@ -646,7 +646,7 @@ impl<'gc> XMLNode<'gc> {
|
|||
/// Insert a child element into the child list of an Element node.
|
||||
///
|
||||
/// The child will be adopted into the current tree: all child references
|
||||
/// to other nodes or documents will be adjusted to reflect it's new
|
||||
/// to other nodes or documents will be adjusted to reflect its new
|
||||
/// position in the tree. This may remove it from any existing trees or
|
||||
/// documents.
|
||||
///
|
||||
|
@ -1092,7 +1092,7 @@ impl<'gc> XMLNode<'gc> {
|
|||
/// Look up the URI for the given namespace.
|
||||
///
|
||||
/// XML namespaces are determined by `xmlns:` namespace attributes on the
|
||||
/// current node, or it's parent.
|
||||
/// current node, or its parent.
|
||||
pub fn lookup_uri_for_namespace(self, namespace: &str) -> Option<String> {
|
||||
let xmlns_default = XMLName::from_parts(None, "xmlns");
|
||||
let xmlns_ns = XMLName::from_parts(Some("xmlns"), namespace);
|
||||
|
@ -1145,7 +1145,7 @@ impl<'gc> XMLNode<'gc> {
|
|||
/// Look up the namespace for the given URI.
|
||||
///
|
||||
/// XML namespaces are determined by `xmlns:` namespace attributes on the
|
||||
/// current node, or it's parent.
|
||||
/// current node, or its parent.
|
||||
///
|
||||
/// If there are multiple namespaces that match the URI, the first
|
||||
/// mentioned on the closest node will be returned.
|
||||
|
@ -1175,7 +1175,7 @@ impl<'gc> XMLNode<'gc> {
|
|||
Ok(String::from_utf8(buf)?)
|
||||
}
|
||||
|
||||
/// Write the contents of this node, including it's children, to the given
|
||||
/// Write the contents of this node, including its children, to the given
|
||||
/// writer.
|
||||
///
|
||||
/// The given filter function allows filtering specific children out of the
|
||||
|
|
|
@ -668,7 +668,7 @@ impl Ruffle {
|
|||
>= std::f64::EPSILON
|
||||
{
|
||||
let mut mut_instance = instance.borrow_mut();
|
||||
// If a canvas resizes, it's drawing context will get scaled. You must reset
|
||||
// If a canvas resizes, its drawing context will get scaled. You must reset
|
||||
// the width and height attributes of the canvas element to recreate the context.
|
||||
// (NOT the CSS width/height!)
|
||||
mut_instance.canvas_width = canvas_width;
|
||||
|
|
Loading…
Reference in New Issue