Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/licenses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ then
echo "changed, no diffs are typically expected in the output of the"
echo "script. Verify the output, and if it looks correct, update the"
echo "license tool signature golden file:"
echo " ci/licences_golden/tool_signature"
echo " ci/licenses_golden/tool_signature"
echo "For more information, see the script in:"
echo " https://github.com/flutter/engine/tree/master/tools/licenses"
echo ""
Expand Down
2 changes: 1 addition & 1 deletion ci/licenses_golden/tool_signature
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Signature: ab4f82ed4f38f0d3821073855c220992
Signature: ad6590b867473860a1e6b08bf9e98667

2 changes: 1 addition & 1 deletion fml/platform/linux/timerfd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ bool TimerRearm(int fd, fml::TimePoint time_point) {
}

bool TimerDrain(int fd) {
// 8 bytes must be read from a signalled timer file descriptor when signalled.
// 8 bytes must be read from a signaled timer file descriptor when signaled.
uint64_t fire_count = 0;
ssize_t size = FML_HANDLE_EINTR(::read(fd, &fire_count, sizeof(uint64_t)));
if (size != sizeof(uint64_t)) {
Expand Down
2 changes: 1 addition & 1 deletion fml/platform/linux/timerfd.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace fml {
/// Rearms the timer to expire at the given time point.
bool TimerRearm(int fd, fml::TimePoint time_point);

/// Drains the timer FD and retuns true if it has expired. This may be false in
/// Drains the timer FD and returns true if it has expired. This may be false in
/// case the timer read is non-blocking and this routine was called before the
/// timer expiry.
bool TimerDrain(int fd);
Expand Down
2 changes: 1 addition & 1 deletion lib/stub_ui/lib/src/engine/dom_renderer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class DomRenderer {
html.Element get sceneElement => _sceneElement;
html.Element _sceneElement;

/// This is state persistant across hot restarts that indicates what
/// This is state persistent across hot restarts that indicates what
/// to clear. We delay removal of old visible state to make the
/// transition appear smooth.
static const String _staleHotRestartStore = '__flutter_state';
Expand Down
2 changes: 1 addition & 1 deletion lib/stub_ui/lib/src/engine/semantics/semantics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ class EngineSemanticsOwner {

/// Declares that the [child] must be attached to the [parent].
///
/// Attachments take precendence over detachments (see [_detachObject]). This
/// Attachments take precedence over detachments (see [_detachObject]). This
/// allows the same node to be detached from one parent in the tree and
/// reattached to another parent.
void _attachObject({SemanticsObject parent, SemanticsObject child}) {
Expand Down
6 changes: 3 additions & 3 deletions lib/stub_ui/lib/src/ui/painting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,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 Down Expand Up @@ -1804,7 +1804,7 @@ Future<void> _decodeImageFromListAsync(
/// [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].
void decodeImageFromPixels(Uint8List pixels, int width, int height,
PixelFormat format, ImageDecoderCallback callback,
Expand Down Expand Up @@ -1883,7 +1883,7 @@ class Shadow {
///
/// 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.
/// [toPaint] should be overridden in subclasses to provide this functionality.
Paint toPaint() {
return Paint()
..color = color
Expand Down
4 changes: 2 additions & 2 deletions lib/stub_ui/lib/src/ui/semantics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,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 @@ -431,7 +431,7 @@ class SemanticsFlag {
/// that the node's semantic label can be used to announce an edge triggered
/// semantics update.
///
/// Semantic nodes annotated with this flag will still recieve a11y focus.
/// Semantic nodes annotated with this flag will still receive a11y focus.
///
/// Updating this label within the same active route subtree will not cause
/// additional announcements.
Expand Down
2 changes: 1 addition & 1 deletion lib/stub_ui/lib/src/ui/text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,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
2 changes: 1 addition & 1 deletion lib/stub_ui/lib/src/ui/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ class Window {

/// Change the retained semantics data about this window.
///
/// If [semanticsEnabled] is true, the user has requested that this funciton
/// If [semanticsEnabled] is true, the user has requested that this function
/// be called whenever the semantic content of this window changes.
///
/// In either case, this function disposes the given update, which means the
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ bool _listEquals<T>(List<T> a, List<T> b) {
//
// The encoded array buffer has 8 elements.
//
// - Element 0: A bit field where the ith bit indicates wheter the ith element
// - Element 0: A bit field where the ith bit indicates whether the ith element
// has a non-null value. Bits 8 to 12 indicate whether |fontFamily|,
// |fontSize|, |letterSpacing|, |wordSpacing|, and |height| are non-null,
// respectively. Bit 0 is unused.
Expand Down
2 changes: 1 addition & 1 deletion runtime/runtime_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ RuntimeController::RuntimeController(
tonic::DartState::Scope scope(strong_root_isolate);
window->DidCreateIsolate();
if (!FlushRuntimeStateToIsolate()) {
FML_DLOG(ERROR) << "Could not setup intial isolate state.";
FML_DLOG(ERROR) << "Could not setup initial isolate state.";
}
} else {
FML_DCHECK(false) << "RuntimeController created without window binding.";
Expand Down
4 changes: 2 additions & 2 deletions shell/common/shell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ void Shell::OnPlatformViewCreated(std::unique_ptr<Surface> surface) {
latch.Signal();
});

// The normal flow exectued by this method is that the platform thread is
// The normal flow executed by this method is that the platform thread is
// starting the sequence and waiting on the latch. Later the UI thread posts
// gpu_task to the GPU thread which signals the latch. If the GPU the and
// platform threads are the same this results in a deadlock as the gpu_task
Expand Down Expand Up @@ -545,7 +545,7 @@ void Shell::OnPlatformViewDestroyed() {
fml::TaskRunner::RunNowOrPostTask(io_task_runner, io_task);
};

// The normal flow exectued by this method is that the platform thread is
// The normal flow executed by this method is that the platform thread is
// starting the sequence and waiting on the latch. Later the UI thread posts
// gpu_task to the GPU thread triggers signaling the latch(on the IO thread).
// If the GPU the and platform threads are the same this results in a deadlock
Expand Down
2 changes: 1 addition & 1 deletion shell/common/vsync_waiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class VsyncWaiter : public std::enable_shared_from_this<VsyncWaiter> {
static constexpr float kUnknownRefreshRateFPS = 0.0;

// Get the display's maximum refresh rate in the unit of frame per second.
// Return kUnknownRefreshRateFPS if the refresh rate is unkonwn.
// Return kUnknownRefreshRateFPS if the refresh rate is unknown.
virtual float GetDisplayRefreshRate() const;

protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ private void setSystemChromeSystemUIOverlayStyle(PlatformChannel.SystemChromeSty
}
}
if (systemChromeStyle.systemNavigationBarDividerColor != null) {
// Not availible until Android P.
// Not available until Android P.
// window.setNavigationBarDividerColor(systemNavigationBarDividerColor);
}
view.setSystemUiVisibility(flags);
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/android/io/flutter/view/VsyncWaiter.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class VsyncWaiter {
public static long refreshPeriodNanos = 1000000000 / 60;

// This should also be updated by FlutterView when it is attached to a Display.
// The initial value of 0.0 indicates unkonwn refresh rate.
// The initial value of 0.0 indicates unknown refresh rate.
public static float refreshRateFPS = 0.0f;

public static void asyncWaitForVsync(final long cookie) {
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/common/cpp/client_wrapper/README
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ This code is intended to be built into plugins and applications to provide
higher-level, C++ abstractions for interacting with the Flutter library.

Over time, the goal is to move more of this code into the library in a way that
provides a usable ABI (e.g., does not use standard libary in the interfaces).
provides a usable ABI (e.g., does not use standard library in the interfaces).

Note that this wrapper is still in early stages. Expect significant churn in
both the APIs and the structure of the wrapper (e.g., the exact set of files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ typedef void (*FlutterPluginRegistrantCallback)(NSObject<FlutterPluginRegistry>*
- (NSObject<FlutterTextureRegistry>*)textures;

/**
* Registers a `FlutterPlatformViewFactory` for creation of platfrom views.
* Registers a `FlutterPlatformViewFactory` for creation of platform views.
*
* Plugins expose `UIView` for embedding in Flutter apps by registering a view factory.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ FLUTTER_EXPORT

/**
* Instructs the Flutter Navigator (if any) to push a route on to the navigation
* stack. The setInitialRoute method should be prefered if this is called before the
* stack. The setInitialRoute method should be preferred if this is called before the
* FlutterViewController has come into view.
*
* @param route The name of the route to push to the navigation stack.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#if TARGET_IPHONE_SIMULATOR
#include <dns_sd.h> // nogncheck
#include <net/if.h> // nogncheck
#endif // TARGET_IPHONE_SIMLUATOR
#endif // TARGET_IPHONE_SIMULATOR

#import "FlutterObservatoryPublisher.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
void FlutterPlatformViewsController::OnCreate(FlutterMethodCall* call, FlutterResult& result) {
if (!flutter_view_.get()) {
// Right now we assume we have a reference to FlutterView when creating a new view.
// TODO(amirh): support this by setting the refernce to FlutterView when it becomes available.
// TODO(amirh): support this by setting the reference to FlutterView when it becomes available.
// https://github.com/flutter/flutter/issues/23787
result([FlutterError errorWithCode:@"create_failed"
message:@"can't create a view on a headless engine"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ - (void)deleteBackward {
// https://github.com/flutter/flutter/issues/21745
//
// This is needed for correct handling of the deletion of Thai vowel input.
// TODO(cbracken): Get a good understanding of expected behaviour of Thai
// TODO(cbracken): Get a good understanding of expected behavior of Thai
// input and ensure that this is the correct solution.
// https://github.com/flutter/flutter/issues/28962
if (_selectedTextRange.isEmpty && [self hasText]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/**
* These three static methods are necessary because Cocoa and Flutter have different idioms for
* signalling an empty range: Flutter uses {-1, -1} while Cocoa uses {NSNotFound, 0}. Also,
* signaling an empty range: Flutter uses {-1, -1} while Cocoa uses {NSNotFound, 0}. Also,
* despite the name, the "extent" fields are actually end indices, not lengths.
*/

Expand Down
2 changes: 1 addition & 1 deletion shell/platform/embedder/embedder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ FlutterEngineResult FlutterEngineSendPointerEvent(
pointer_data.scroll_delta_x = SAFE_ACCESS(current, scroll_delta_x, 0.0);
pointer_data.scroll_delta_y = SAFE_ACCESS(current, scroll_delta_y, 0.0);
FlutterPointerDeviceKind device_kind = SAFE_ACCESS(current, device_kind, 0);
// For backwards compatibilty with embedders written before the device kind
// For backwards compatibility with embedders written before the device kind
// and buttons were exposed, if the device kind is not set treat it as a
// mouse, with a synthesized primary button state based on the phase.
if (device_kind == 0) {
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/embedder/embedder.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ typedef struct {
size_t struct_size;
// The unique custom action or action override ID.
int32_t id;
// For overriden standard actions, corresponds to the
// For overridden standard actions, corresponds to the
// |FlutterSemanticsAction| to override.
FlutterSemanticsAction override_action;
// The user-readable name of this custom semantics action.
Expand Down
10 changes: 5 additions & 5 deletions shell/platform/embedder/tests/embedder_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,20 @@ TEST_F(EmbedderTest, CanSpecifyCustomTaskRunner) {
// pump its event loop while we wait for all the conditions to be checked.
fml::Thread thread;
UniqueEngine engine;
bool signalled = false;
bool signaled = false;

EmbedderTestTaskRunner runner([&](FlutterTask task) {
// There may be multiple tasks posted but we only need to check assertions
// once.
if (signalled) {
if (signaled) {
// Since we have the baton, return it back to the engine. We don't care
// about the return value because the engine could be shutting down an it
// may not actually be able to accept the same.
FlutterEngineRunTask(engine.get(), &task);
return;
}

signalled = true;
signaled = true;
FML_LOG(INFO) << "Checking assertions.";
ASSERT_TRUE(engine.is_valid());
ASSERT_EQ(FlutterEngineRunTask(engine.get(), &task), kSuccess);
Expand All @@ -182,7 +182,7 @@ TEST_F(EmbedderTest, CanSpecifyCustomTaskRunner) {
ASSERT_TRUE(engine.is_valid());
});

// Signalled when all the assertions are checked.
// Signaled when all the assertions are checked.
latch.Wait();
FML_LOG(INFO) << "Assertions checked. Killing engine.";
ASSERT_TRUE(engine.is_valid());
Expand All @@ -198,7 +198,7 @@ TEST_F(EmbedderTest, CanSpecifyCustomTaskRunner) {
}));
kill_latch.Wait();

ASSERT_TRUE(signalled);
ASSERT_TRUE(signaled);
}

TEST(EmbedderTestNoFixture, CanGetCurrentTimeInNanoseconds) {
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/fuchsia/flutter/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Flutter Application Runner
==========================

Implements the `fuchsia::sys::Runner` FIDL interface to launch and run mutliple Flutter applications within the same process.
Implements the `fuchsia::sys::Runner` FIDL interface to launch and run multiple Flutter applications within the same process.
4 changes: 2 additions & 2 deletions shell/platform/fuchsia/flutter/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ Engine::Engine(Delegate& delegate,
environment->GetServices(parent_environment_service_provider.NewRequest());
environment.Unbind();

// Grab the accessibilty context writer that can understand the semantics tree
// on the platform view.
// Grab the accessibility context writer that can understand the semantics
// tree on the platform view.
fidl::InterfaceHandle<fuchsia::modular::ContextWriter>
accessibility_context_writer;
svc->Connect(accessibility_context_writer.NewRequest());
Expand Down
4 changes: 2 additions & 2 deletions shell/platform/fuchsia/flutter/platform_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@ void PlatformView::HandlePlatformMessage(
if (found == platform_message_handlers_.end()) {
FML_LOG(ERROR)
<< "Platform view received message on channel '" << message->channel()
<< "' with no registed handler. And empty response will be generated. "
"Please implement the native message handler.";
<< "' with no registered handler. And empty response will be "
"generated. Please implement the native message handler.";
flutter::PlatformView::HandlePlatformMessage(std::move(message));
return;
}
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/fuchsia/flutter/runner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void Runner::StartComponent(

auto thread_application_pair = Application::Create(
std::move(termination_callback), // termination callback
std::move(package), // application pacakge
std::move(package), // application package
std::move(startup_info), // startup info
runner_context_->svc(), // runner incoming services
std::move(controller) // controller request
Expand Down
2 changes: 1 addition & 1 deletion third_party/txt/src/minikin/FontCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ uint32_t FontCollection::calcCoverageScore(
}

// Calculate font scores based on the script matching, subtag matching and
// primary langauge matching.
// primary language matching.
//
// 1. If only the font's language matches or there is no matches between
// requested font and
Expand Down
2 changes: 1 addition & 1 deletion third_party/txt/src/txt/paint_record.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
namespace txt {

// PaintRecord holds the layout data after Paragraph::Layout() is called. This
// stores all nessecary offsets, blobs, metrics, and more for Skia to draw the
// stores all necessary offsets, blobs, metrics, and more for Skia to draw the
// text.
class PaintRecord {
public:
Expand Down
4 changes: 2 additions & 2 deletions third_party/txt/src/txt/paragraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ namespace txt {

using GlyphID = uint32_t;

// Paragraph provides Layout, metrics, and painting capabilites for text. Once a
// Paragraph is constructed with ParagraphBuilder::Build(), an example basic
// Paragraph provides Layout, metrics, and painting capabilities for text. Once
// a Paragraph is constructed with ParagraphBuilder::Build(), an example basic
// workflow can be this:
//
// std::unique_ptr<Paragraph> paragraph = paragraph_builder.Build();
Expand Down
2 changes: 1 addition & 1 deletion third_party/txt/src/txt/paragraph_style.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ParagraphStyle {
std::string locale;

// Default strategy is kBreakStrategy_Greedy. Sometimes,
// kBreakStrategy_HighQuality will produce more desireable layouts (eg, very
// kBreakStrategy_HighQuality will produce more desirable layouts (e.g., very
// long words are more likely to be reasonably placed).
// kBreakStrategy_Balanced will balance between the two.
minikin::BreakStrategy break_strategy =
Expand Down
4 changes: 2 additions & 2 deletions third_party/txt/tests/CmapCoverageTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static std::vector<uint8_t> buildCmapFormat4Table(
size_t head = 0;
head = writeU16(4, out.data(), head); // format
head = writeU16(finalLength, out.data(), head); // length
head = writeU16(0, out.data(), head); // langauge
head = writeU16(0, out.data(), head); // language

const uint16_t searchRange =
2 * (1 << static_cast<int>(floor(log2(segmentCount))));
Expand Down Expand Up @@ -120,7 +120,7 @@ static std::vector<uint8_t> buildCmapFormat12Table(
head = writeU16(12, out.data(), head); // format
head = writeU16(0, out.data(), head); // reserved
head = writeU32(finalLength, out.data(), head); // length
head = writeU32(0, out.data(), head); // langauge
head = writeU32(0, out.data(), head); // language
head = writeU32(numGroups, out.data(), head); // numGroups

for (uint32_t i = 0; i < numGroups; ++i) {
Expand Down
Loading