Skip to content

Commit

Permalink
Fix spelling errors in dartdocs (flutter#7997)
Browse files Browse the repository at this point in the history
Fix the spelling errors in the dartdocs for the engine.

There are no functionality changes here, just documentation fixes.
  • Loading branch information
gspencergoog authored Feb 28, 2019
1 parent 6bc9c3d commit a1d8499
Show file tree
Hide file tree
Showing 11 changed files with 97 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class _WidgetCallSiteTransformer extends Transformer {
/// locations of the parameters passed in from the source location of the
/// constructor call but it is convenient to bundle the location and names
/// of the parameters passed in so that tools can show parameter locations
/// without reparsing the source code.
/// without re-parsing the source code.
ConstructorInvocation _constructLocation(
Location location, {
String name,
Expand Down Expand Up @@ -399,7 +399,7 @@ class WidgetCreatorTracker implements ProgramTransformer {
new VariableGet(variable),
));
// TODO(jacobr): add an assert verifying the locationField is not
// null. Curently we cannot safely add this assert because we do not
// null. Currently, we cannot safely add this assert because we do not
// handle Widget classes with optional positional arguments. There are
// no Widget classes in the flutter repo with optional positional
// arguments but it is possible users could add classes with optional
Expand Down
2 changes: 1 addition & 1 deletion lib/stub_ui/compositing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class SceneBuilder {
/// Android view: When resizing an Android view there is a short period during
/// which the framework cannot tell if the newest texture frame has the
/// previous or new size, to workaround this the framework "freezes" the
/// texture just before resizing the Android view and unfreezes it when it is
/// texture just before resizing the Android view and un-freezes it when it is
/// certain that a frame with the new size is ready.
void addTexture(int textureId, { Offset offset: Offset.zero, double width: 0.0, double height: 0.0 , bool freeze: false}) {
throw UnimplementedError();
Expand Down
2 changes: 1 addition & 1 deletion lib/stub_ui/natives.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void _setupHooks() { // ignore: unused_element
///
/// The buffer contains a list of symbols compiled by the Dart JIT at runtime up to the point
/// when this function was called. This list can be saved to a text file and passed to tools
/// such as `flutter build` or Dart `gen_snapshot` in order to precompile this code offline.
/// such as `flutter build` or Dart `gen_snapshot` in order to pre-compile this code offline.
///
/// The list has one symbol per line of the following format: `<namespace>,<class>,<symbol>\n`.
/// Here are some examples:
Expand Down
69 changes: 35 additions & 34 deletions lib/stub_ui/painting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Color _scaleAlpha(Color a, double factor) {
///
/// Consider the light teal of the Flutter logo. It is fully opaque, with a red
/// channel value of 0x42 (66), a green channel value of 0xA5 (165), and a blue
/// channel value of 0xF5 (245). In the common "hash syntax" for colour values,
/// channel value of 0xF5 (245). In the common "hash syntax" for color values,
/// it would be described as `#42A5F5`.
///
/// Here are some ways it could be constructed:
Expand Down Expand Up @@ -803,7 +803,7 @@ enum FilterQuality {

/// Fastest possible filtering, albeit also the lowest quality.
///
/// Typically this implies nearest-neighbour filtering.
/// Typically this implies nearest-neighbor filtering.
none,

/// Better quality than [none], faster than [medium].
Expand All @@ -814,7 +814,7 @@ enum FilterQuality {
/// Better quality than [low], faster than [high].
///
/// Typically this implies a combination of bilinear interpolation and
/// pyramidal parametric prefiltering (mipmaps).
/// pyramidal parametric pre-filtering (mipmaps).
medium,

/// Best possible quality filtering, albeit also the slowest.
Expand Down Expand Up @@ -1651,7 +1651,7 @@ void decodeImageFromList(Uint8List list, ImageDecoderCallback callback) {
/// [pixels] is the pixel data in the encoding described by [format].
///
/// [rowBytes] is the number of bytes consumed by each row of pixels in the
/// data buffer. If unspecified, it defaults to [width] multipled by the
/// data buffer. If unspecified, it defaults to [width] multiplied by the
/// number of bytes per pixel in the provided [format].
///
/// The [decodedCacheRatioCap] is the default maximum multiple of the compressed
Expand Down Expand Up @@ -1762,17 +1762,17 @@ class EngineLayer {

/// A complex, one-dimensional subset of a plane.
///
/// A path consists of a number of subpaths, and a _current point_.
/// A path consists of a number of sub-paths, and a _current point_.
///
/// Subpaths consist of segments of various types, such as lines,
/// arcs, or beziers. Subpaths can be open or closed, and can
/// Sub-paths consist of segments of various types, such as lines,
/// arcs, or beziers. Sub-paths can be open or closed, and can
/// self-intersect.
///
/// Closed subpaths enclose a (possibly discontiguous) region of the
/// Closed sub-paths enclose a (possibly discontiguous) region of the
/// plane based on the current [fillType].
///
/// The _current point_ is initially at the origin. After each
/// operation adding a segment to a subpath, the current point is
/// operation adding a segment to a sub-path, the current point is
/// updated to the end of that segment.
///
/// Paths can be drawn on canvases using [Canvas.drawPath], and can
Expand All @@ -1798,12 +1798,12 @@ class Path {
}


/// Starts a new subpath at the given coordinate.
/// Starts a new sub-path at the given coordinate.
void moveTo(double x, double y) {
throw UnimplementedError();
}

/// Starts a new subpath at the given offset from the current point.
/// Starts a new sub-path at the given offset from the current point.
void relativeMoveTo(double dx, double dy) {
throw UnimplementedError();
}
Expand Down Expand Up @@ -1872,7 +1872,7 @@ class Path {
/// If the `forceMoveTo` argument is false, adds a straight line
/// segment and an arc segment.
///
/// If the `forceMoveTo` argument is true, starts a new subpath
/// If the `forceMoveTo` argument is true, starts a new sub-path
/// consisting of an arc segment.
///
/// In either case, the arc segment consists of the arc that follows
Expand Down Expand Up @@ -1936,14 +1936,14 @@ class Path {
throw UnimplementedError();
}

/// Adds a new subpath that consists of four lines that outline the
/// Adds a new sub-path that consists of four lines that outline the
/// given rectangle.
void addRect(Rect rect) {
assert(_rectIsValid(rect));
throw UnimplementedError();
}

/// Adds a new subpath that consists of a curve that forms the
/// Adds a new sub-path that consists of a curve that forms the
/// ellipse that fills the given rectangle.
///
/// To add a circle, pass an appropriate rectangle as `oval`. [Rect.fromCircle]
Expand All @@ -1953,7 +1953,7 @@ class Path {
throw UnimplementedError();
}

/// Adds a new subpath with one arc segment that consists of the arc
/// Adds a new sub-path with one arc segment that consists of the arc
/// that follows the edge of the oval bounded by the given
/// rectangle, from startAngle radians around the oval up to
/// startAngle + sweepAngle radians around the oval, with zero
Expand All @@ -1967,7 +1967,7 @@ class Path {
}


/// Adds a new subpath with a sequence of line segments that connect the given
/// Adds a new sub-path with a sequence of line segments that connect the given
/// points.
///
/// If `close` is true, a final line segment will be added that connects the
Expand All @@ -1979,15 +1979,15 @@ class Path {
throw UnimplementedError();
}

/// Adds a new subpath that consists of the straight lines and
/// Adds a new sub-path that consists of the straight lines and
/// curves needed to form the rounded rectangle described by the
/// argument.
void addRRect(RRect rrect) {
assert(_rrectIsValid(rrect));
throw UnimplementedError();
}

/// Adds a new subpath that consists of the given `path` offset by the given
/// Adds a new sub-path that consists of the given `path` offset by the given
/// `offset`.
///
/// If `matrix4` is specified, the path will be transformed by this matrix
Expand All @@ -2011,13 +2011,13 @@ class Path {
throw UnimplementedError();
}

/// Closes the last subpath, as if a straight line had been drawn
/// from the current point to the first point of the subpath.
/// Closes the last sub-path, as if a straight line had been drawn
/// from the current point to the first point of the sub-path.
void close() {
throw UnimplementedError();
}

/// Clears the [Path] object of all subpaths, returning it to the
/// Clears the [Path] object of all sub-paths, returning it to the
/// same state it had when it was created. The _current point_ is
/// reset to the origin.
void reset() {
Expand All @@ -2037,14 +2037,14 @@ class Path {
}

/// Returns a copy of the path with all the segments of every
/// subpath translated by the given offset.
/// sub-path translated by the given offset.
Path shift(Offset offset) {
assert(_offsetIsValid(offset));
throw UnimplementedError();
}

/// Returns a copy of the path with all the segments of every
/// subpath transformed by the given matrix.
/// sub-path transformed by the given matrix.
Path transform(Float64List matrix4) {
assert(_matrix4IsValid(matrix4));
throw UnimplementedError();
Expand Down Expand Up @@ -2174,7 +2174,7 @@ class PathMetricIterator implements Iterator<PathMetric> {
}
}

/// Utilities for measuring a [Path] and extracting subpaths.
/// Utilities for measuring a [Path] and extracting sub-paths.
///
/// Iterate over the object returned by [Path.computeMetrics] to obtain
/// [PathMetric] objects.
Expand Down Expand Up @@ -2220,7 +2220,7 @@ class PathMetric {
final _PathMeasure _measure;


/// Computes the position of hte current contour at the given offset, and the
/// Computes the position of the current contour at the given offset, and the
/// angle of the path at that point.
///
/// For example, calling this method with a distance of 1.41 for a line from
Expand Down Expand Up @@ -2386,15 +2386,15 @@ class ColorFilter {
_matrix = matrix,
_type = _TypeMatrix;

/// Construct a color filter that applies the srgb gamma curve to the RGB
/// Construct a color filter that applies the sRGB gamma curve to the RGB
/// channels.
const ColorFilter.linearToSrgbGamma()
: _color = null,
_blendMode = null,
_matrix = null,
_type = _TypeLinearToSrgbGamma;

/// Creates a color filter that applies the inverse of the srgb gamma curve
/// Creates a color filter that applies the inverse of the sRGB gamma curve
/// to the RGB channels.
const ColorFilter.srgbToLinearGamma()
: _color = null,
Expand Down Expand Up @@ -2811,8 +2811,8 @@ class Canvas {
/// ## Using saveLayer with clips
///
/// When a rectangular clip operation (from [clipRect]) is not axis-aligned
/// with the raster buffer, or when the clip operation is not rectalinear (e.g.
/// because it is a rounded rectangle clip created by [clipRRect] or an
/// with the raster buffer, or when the clip operation is not rectilinear
/// (e.g. because it is a rounded rectangle clip created by [clipRRect] or an
/// arbitrarily complicated path clip created by [clipPath]), the edge of the
/// clip needs to be anti-aliased.
///
Expand Down Expand Up @@ -3103,7 +3103,7 @@ class Canvas {

/// Draws the given [Path] with the given [Paint]. Whether this shape is
/// filled or stroked (or both) is controlled by [Paint.style]. If the path is
/// filled, then subpaths within it are implicitly closed (see [Path.close]).
/// filled, then sub-paths within it are implicitly closed (see [Path.close]).
void drawPath(Path path, Paint paint) {
assert(path != null); // path is checked on the engine side
assert(paint != null);
Expand Down Expand Up @@ -3368,7 +3368,7 @@ class Shadow {
///
/// The default shadow is a black shadow with zero offset and zero blur.
/// Default shadows should be completely covered by the casting element,
/// and not be visble.
/// and not be visible.
///
/// Transparency should be adjusted through the [color] alpha.
///
Expand Down Expand Up @@ -3421,9 +3421,10 @@ class Shadow {
/// To honor this as well, the shape should be translated by [offset] before
/// being filled using this [Paint].
///
/// This class does not provide a way to disable shadows to avoid inconsistencies
/// in shadow blur rendering, primarily as a method of reducing test flakiness.
/// [toPaint] should be overriden in subclasses to provide this functionality.
/// This class does not provide a way to disable shadows to avoid
/// inconsistencies in shadow blur rendering, primarily as a method of
/// reducing test flakiness. [toPaint] should be overridden in subclasses to
/// provide this functionality.
Paint toPaint() {
throw UnimplementedError();
}
Expand Down
10 changes: 5 additions & 5 deletions lib/stub_ui/semantics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class SemanticsAction {
/// A [Snackbar], for example, may have a dismiss action to indicate to the
/// user that it can be removed after it is no longer relevant. On Android,
/// (with TalkBack) special hint text is spoken when focusing the node and
/// a custom action is availible in the local context menu. On iOS,
/// a custom action is available in the local context menu. On iOS,
/// (with VoiceOver) users can perform a standard gesture to dismiss it.
static const SemanticsAction dismiss = const SemanticsAction._(_kDismissIndex);

Expand Down Expand Up @@ -642,7 +642,7 @@ class SemanticsUpdateBuilder {

/// Update the custom semantics action associated with the given `id`.
///
/// The name of the action exposed to the user is the `label`. For overriden
/// The name of the action exposed to the user is the `label`. For overridden
/// standard actions this value is ignored.
///
/// The `hint` should describe what happens when an action occurs, not the
Expand All @@ -652,9 +652,9 @@ class SemanticsUpdateBuilder {
/// The text direction of the `hint` and `label` is the same as the global
/// window.
///
/// For overriden standard actions, `overrideId` corresponds with a
/// [SemanticsAction.index] value. For custom actions this argument should not be
/// provided.
/// For overridden standard actions, `overrideId` corresponds with a
/// [SemanticsAction.index] value. For custom actions this argument should not
/// be provided.
void updateCustomAction({int id, String label, String hint, int overrideId = -1}) {
assert(id != null);
assert(overrideId != null);
Expand Down
6 changes: 3 additions & 3 deletions lib/stub_ui/text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class TextStyle {
/// * `fontWeight`: The typeface thickness to use when painting the text (e.g., bold).
/// * `fontStyle`: The typeface variant to use when drawing the letters (e.g., italics).
/// * `fontFamily`: The name of the font to use when painting the text (e.g., Roboto). If a `fontFamilyFallback` is
/// provided and `fontFamily` is not, then the first font family in `fontFamilyFallback` will take the postion of
/// provided and `fontFamily` is not, then the first font family in `fontFamilyFallback` will take the position of
/// the preferred font family. When a higher priority font cannot be found or does not contain a glyph, a lower
/// priority font will be used.
/// * `fontFamilyFallback`: An ordered list of the names of the fonts to fallback on when a glyph cannot
Expand Down Expand Up @@ -1163,7 +1163,7 @@ class TextPosition {
/// The only constraint that can be specified is the [width]. See the discussion
/// at [width] for more details.
class ParagraphConstraints {
/// Creates constraints for laying out a pargraph.
/// Creates constraints for laying out a paragraph.
///
/// The [width] argument must not be null.
const ParagraphConstraints({
Expand Down Expand Up @@ -1372,7 +1372,7 @@ class Paragraph {

/// Builds a [Paragraph] containing text with the given styling information.
///
/// To set the paragraph's alignment, truncation, and ellipsising behavior, pass
/// To set the paragraph's alignment, truncation, and ellipsizing behavior, pass
/// an appropriately-configured [ParagraphStyle] object to the [new
/// ParagraphBuilder] constructor.
///
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/compositing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
/// Android view: When resizing an Android view there is a short period during
/// which the framework cannot tell if the newest texture frame has the
/// previous or new size, to workaround this the framework "freezes" the
/// texture just before resizing the Android view and unfreezes it when it is
/// texture just before resizing the Android view and un-freezes it when it is
/// certain that a frame with the new size is ready.
void addTexture(int textureId, { Offset offset: Offset.zero, double width: 0.0, double height: 0.0 , bool freeze: false}) {
assert(offset != null, 'Offset argument was null');
Expand Down
11 changes: 7 additions & 4 deletions lib/ui/natives.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,14 @@ void _setupHooks() { // ignore: unused_element

/// Returns runtime Dart compilation trace as a UTF-8 encoded memory buffer.
///
/// The buffer contains a list of symbols compiled by the Dart JIT at runtime up to the point
/// when this function was called. This list can be saved to a text file and passed to tools
/// such as `flutter build` or Dart `gen_snapshot` in order to precompile this code offline.
/// The buffer contains a list of symbols compiled by the Dart JIT at runtime up
/// to the point when this function was called. This list can be saved to a text
/// file and passed to tools such as `flutter build` or Dart `gen_snapshot` in
/// order to pre-compile this code offline.
///
/// The list has one symbol per line of the following format:
/// `<namespace>,<class>,<symbol>\n`.
///
/// The list has one symbol per line of the following format: `<namespace>,<class>,<symbol>\n`.
/// Here are some examples:
///
/// ```
Expand Down
Loading

0 comments on commit a1d8499

Please sign in to comment.