From 52372ce89b502e92b434321c5908928263006bc5 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Fri, 24 May 2019 16:13:42 -0700 Subject: [PATCH 1/3] Correct typos, adopt US spellings Corects a bnuch of typeos throughout teh engien codebsae. Also makes a couple minor Commonwealth -> US spelling adjustments for consistency with the rest of Flutter's codebase. Made use of `misspell` tool: https://github.com/client9/misspell --- ci/licenses.sh | 2 +- fml/platform/linux/timerfd.cc | 2 +- fml/platform/linux/timerfd.h | 2 +- lib/stub_ui/lib/src/engine/dom_renderer.dart | 2 +- lib/stub_ui/lib/src/engine/semantics/semantics.dart | 2 +- lib/stub_ui/lib/src/ui/painting.dart | 6 +++--- lib/stub_ui/lib/src/ui/semantics.dart | 4 ++-- lib/stub_ui/lib/src/ui/text.dart | 2 +- lib/stub_ui/lib/src/ui/window.dart | 2 +- lib/ui/text.dart | 2 +- runtime/runtime_controller.cc | 2 +- shell/common/shell.cc | 4 ++-- shell/common/vsync_waiter.h | 2 +- .../io/flutter/plugin/platform/PlatformPlugin.java | 2 +- .../android/io/flutter/view/VsyncWaiter.java | 2 +- shell/platform/common/cpp/client_wrapper/README | 2 +- .../darwin/ios/framework/Headers/FlutterPlugin.h | 2 +- .../ios/framework/Headers/FlutterViewController.h | 2 +- .../framework/Source/FlutterObservatoryPublisher.mm | 2 +- .../ios/framework/Source/FlutterPlatformViews.mm | 2 +- .../ios/framework/Source/FlutterTextInputPlugin.mm | 2 +- .../macos/framework/Source/FLETextInputModel.mm | 2 +- shell/platform/embedder/embedder.cc | 2 +- shell/platform/embedder/embedder.h | 2 +- shell/platform/embedder/tests/embedder_unittests.cc | 10 +++++----- shell/platform/fuchsia/flutter/README.md | 2 +- shell/platform/fuchsia/flutter/engine.cc | 2 +- shell/platform/fuchsia/flutter/platform_view.cc | 4 ++-- shell/platform/fuchsia/flutter/runner.cc | 2 +- third_party/txt/src/minikin/FontCollection.cpp | 2 +- third_party/txt/src/txt/paint_record.h | 2 +- third_party/txt/src/txt/paragraph.h | 2 +- third_party/txt/src/txt/paragraph_style.h | 2 +- third_party/txt/tests/CmapCoverageTest.cpp | 4 ++-- third_party/txt/tests/FontCollectionItemizeTest.cpp | 4 ++-- third_party/txt/tests/GraphemeBreakTests.cpp | 8 ++++---- .../txt/tests/old/perftests/GraphemeBreak.cpp | 2 +- third_party/txt/tests/paragraph_unittests.cc | 12 ++++++------ third_party/txt/third_party/fonts/NoCmapFormat14.ttx | 2 +- tools/gn | 2 +- tools/gn_test.py | 2 +- tools/licenses/lib/main.dart | 2 +- 42 files changed, 61 insertions(+), 61 deletions(-) diff --git a/ci/licenses.sh b/ci/licenses.sh index 9b7e9896688bb..a87e0dc190d6f 100755 --- a/ci/licenses.sh +++ b/ci/licenses.sh @@ -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 "" diff --git a/fml/platform/linux/timerfd.cc b/fml/platform/linux/timerfd.cc index 0a2cc5311d846..f20ffc7c5ed7b 100644 --- a/fml/platform/linux/timerfd.cc +++ b/fml/platform/linux/timerfd.cc @@ -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)) { diff --git a/fml/platform/linux/timerfd.h b/fml/platform/linux/timerfd.h index 6d5ab1a939434..7ec58ae9df16a 100644 --- a/fml/platform/linux/timerfd.h +++ b/fml/platform/linux/timerfd.h @@ -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); diff --git a/lib/stub_ui/lib/src/engine/dom_renderer.dart b/lib/stub_ui/lib/src/engine/dom_renderer.dart index f6d48aa68d2b0..6b15ecba132a1 100644 --- a/lib/stub_ui/lib/src/engine/dom_renderer.dart +++ b/lib/stub_ui/lib/src/engine/dom_renderer.dart @@ -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'; diff --git a/lib/stub_ui/lib/src/engine/semantics/semantics.dart b/lib/stub_ui/lib/src/engine/semantics/semantics.dart index 238deaa2b89d3..113e14a8313d3 100644 --- a/lib/stub_ui/lib/src/engine/semantics/semantics.dart +++ b/lib/stub_ui/lib/src/engine/semantics/semantics.dart @@ -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}) { diff --git a/lib/stub_ui/lib/src/ui/painting.dart b/lib/stub_ui/lib/src/ui/painting.dart index fe6c8e8938cdf..3f6addebd53cc 100644 --- a/lib/stub_ui/lib/src/ui/painting.dart +++ b/lib/stub_ui/lib/src/ui/painting.dart @@ -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]. @@ -1804,7 +1804,7 @@ Future _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, @@ -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 diff --git a/lib/stub_ui/lib/src/ui/semantics.dart b/lib/stub_ui/lib/src/ui/semantics.dart index 1a3ccf1e03a0c..7d2826c02c8df 100644 --- a/lib/stub_ui/lib/src/ui/semantics.dart +++ b/lib/stub_ui/lib/src/ui/semantics.dart @@ -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); @@ -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. diff --git a/lib/stub_ui/lib/src/ui/text.dart b/lib/stub_ui/lib/src/ui/text.dart index 899ee591c0188..d2612271d1447 100644 --- a/lib/stub_ui/lib/src/ui/text.dart +++ b/lib/stub_ui/lib/src/ui/text.dart @@ -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 diff --git a/lib/stub_ui/lib/src/ui/window.dart b/lib/stub_ui/lib/src/ui/window.dart index a22d2aaa3d072..57f5432fbf4dd 100644 --- a/lib/stub_ui/lib/src/ui/window.dart +++ b/lib/stub_ui/lib/src/ui/window.dart @@ -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 diff --git a/lib/ui/text.dart b/lib/ui/text.dart index e48e16d771687..74d82bae34713 100644 --- a/lib/ui/text.dart +++ b/lib/ui/text.dart @@ -381,7 +381,7 @@ bool _listEquals(List a, List 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. diff --git a/runtime/runtime_controller.cc b/runtime/runtime_controller.cc index 45267ecc3e820..62c717e0c2779 100644 --- a/runtime/runtime_controller.cc +++ b/runtime/runtime_controller.cc @@ -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."; diff --git a/shell/common/shell.cc b/shell/common/shell.cc index 5a33f0d388eed..7bb1b6ce8bd14 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -452,7 +452,7 @@ void Shell::OnPlatformViewCreated(std::unique_ptr 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 @@ -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 diff --git a/shell/common/vsync_waiter.h b/shell/common/vsync_waiter.h index 54fbf827bfcd4..3d2cd7aca8a0c 100644 --- a/shell/common/vsync_waiter.h +++ b/shell/common/vsync_waiter.h @@ -27,7 +27,7 @@ class VsyncWaiter : public std::enable_shared_from_this { 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: diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java b/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java index e1e5f9f9cdbaa..4f2672a82cb7f 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java @@ -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); diff --git a/shell/platform/android/io/flutter/view/VsyncWaiter.java b/shell/platform/android/io/flutter/view/VsyncWaiter.java index cce4a96f868da..ee7d6dc91e70b 100644 --- a/shell/platform/android/io/flutter/view/VsyncWaiter.java +++ b/shell/platform/android/io/flutter/view/VsyncWaiter.java @@ -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) { diff --git a/shell/platform/common/cpp/client_wrapper/README b/shell/platform/common/cpp/client_wrapper/README index a7f8764867088..56c93050ef075 100644 --- a/shell/platform/common/cpp/client_wrapper/README +++ b/shell/platform/common/cpp/client_wrapper/README @@ -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 diff --git a/shell/platform/darwin/ios/framework/Headers/FlutterPlugin.h b/shell/platform/darwin/ios/framework/Headers/FlutterPlugin.h index 4b340bf7b9e78..9f5c8c3541db0 100644 --- a/shell/platform/darwin/ios/framework/Headers/FlutterPlugin.h +++ b/shell/platform/darwin/ios/framework/Headers/FlutterPlugin.h @@ -246,7 +246,7 @@ typedef void (*FlutterPluginRegistrantCallback)(NSObject* - (NSObject*)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. * diff --git a/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h b/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h index b38b118fff9cd..a173853b952af 100644 --- a/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h +++ b/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h @@ -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. diff --git a/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm b/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm index 67b961da37fac..9d52b5de029eb 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm @@ -12,7 +12,7 @@ #if TARGET_IPHONE_SIMULATOR #include // nogncheck #include // nogncheck -#endif // TARGET_IPHONE_SIMLUATOR +#endif // TARGET_IPHONE_SIMULATOR #import "FlutterObservatoryPublisher.h" diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index d912e0d136f22..0deada0add6f7 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -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" diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm index 90c1a90765711..1a056f365c996 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm @@ -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]) { diff --git a/shell/platform/darwin/macos/framework/Source/FLETextInputModel.mm b/shell/platform/darwin/macos/framework/Source/FLETextInputModel.mm index 79a5cda5e138f..4e222b02568ec 100644 --- a/shell/platform/darwin/macos/framework/Source/FLETextInputModel.mm +++ b/shell/platform/darwin/macos/framework/Source/FLETextInputModel.mm @@ -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. */ diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index 25b7152b0ad26..81e17127bdc5e 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -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) { diff --git a/shell/platform/embedder/embedder.h b/shell/platform/embedder/embedder.h index 54af56fbe00b8..1bbc7735193ee 100644 --- a/shell/platform/embedder/embedder.h +++ b/shell/platform/embedder/embedder.h @@ -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. diff --git a/shell/platform/embedder/tests/embedder_unittests.cc b/shell/platform/embedder/tests/embedder_unittests.cc index f762594820a44..eb915d3d28da9 100644 --- a/shell/platform/embedder/tests/embedder_unittests.cc +++ b/shell/platform/embedder/tests/embedder_unittests.cc @@ -151,12 +151,12 @@ 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. @@ -164,7 +164,7 @@ TEST_F(EmbedderTest, CanSpecifyCustomTaskRunner) { return; } - signalled = true; + signaled = true; FML_LOG(INFO) << "Checking assertions."; ASSERT_TRUE(engine.is_valid()); ASSERT_EQ(FlutterEngineRunTask(engine.get(), &task), kSuccess); @@ -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()); @@ -198,7 +198,7 @@ TEST_F(EmbedderTest, CanSpecifyCustomTaskRunner) { })); kill_latch.Wait(); - ASSERT_TRUE(signalled); + ASSERT_TRUE(signaled); } TEST(EmbedderTestNoFixture, CanGetCurrentTimeInNanoseconds) { diff --git a/shell/platform/fuchsia/flutter/README.md b/shell/platform/fuchsia/flutter/README.md index a11d50b3fd92c..1fa8eb6599567 100644 --- a/shell/platform/fuchsia/flutter/README.md +++ b/shell/platform/fuchsia/flutter/README.md @@ -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. diff --git a/shell/platform/fuchsia/flutter/engine.cc b/shell/platform/fuchsia/flutter/engine.cc index 44869ac008e8e..6184c97450165 100644 --- a/shell/platform/fuchsia/flutter/engine.cc +++ b/shell/platform/fuchsia/flutter/engine.cc @@ -80,7 +80,7 @@ Engine::Engine(Delegate& delegate, environment->GetServices(parent_environment_service_provider.NewRequest()); environment.Unbind(); - // Grab the accessibilty context writer that can understand the semantics tree + // Grab the accessibility context writer that can understand the semantics tree // on the platform view. fidl::InterfaceHandle accessibility_context_writer; diff --git a/shell/platform/fuchsia/flutter/platform_view.cc b/shell/platform/fuchsia/flutter/platform_view.cc index 0e5267d1eade8..fbb0d8ea7a7be 100644 --- a/shell/platform/fuchsia/flutter/platform_view.cc +++ b/shell/platform/fuchsia/flutter/platform_view.cc @@ -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; } diff --git a/shell/platform/fuchsia/flutter/runner.cc b/shell/platform/fuchsia/flutter/runner.cc index 7b5d158974fa1..c61f59bc3d34a 100644 --- a/shell/platform/fuchsia/flutter/runner.cc +++ b/shell/platform/fuchsia/flutter/runner.cc @@ -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 diff --git a/third_party/txt/src/minikin/FontCollection.cpp b/third_party/txt/src/minikin/FontCollection.cpp index ff07778cb88c5..db33da1f21b06 100644 --- a/third_party/txt/src/minikin/FontCollection.cpp +++ b/third_party/txt/src/minikin/FontCollection.cpp @@ -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 diff --git a/third_party/txt/src/txt/paint_record.h b/third_party/txt/src/txt/paint_record.h index e0623d1e89790..1302735c4d9c0 100644 --- a/third_party/txt/src/txt/paint_record.h +++ b/third_party/txt/src/txt/paint_record.h @@ -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: diff --git a/third_party/txt/src/txt/paragraph.h b/third_party/txt/src/txt/paragraph.h index ef16c20f91aab..fe7ccf7fdcd55 100644 --- a/third_party/txt/src/txt/paragraph.h +++ b/third_party/txt/src/txt/paragraph.h @@ -39,7 +39,7 @@ namespace txt { using GlyphID = uint32_t; -// Paragraph provides Layout, metrics, and painting capabilites for text. Once a +// Paragraph provides Layout, metrics, and painting capabilities for text. Once a // Paragraph is constructed with ParagraphBuilder::Build(), an example basic // workflow can be this: // diff --git a/third_party/txt/src/txt/paragraph_style.h b/third_party/txt/src/txt/paragraph_style.h index a286b4a02327f..514037d41fd93 100644 --- a/third_party/txt/src/txt/paragraph_style.h +++ b/third_party/txt/src/txt/paragraph_style.h @@ -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 = diff --git a/third_party/txt/tests/CmapCoverageTest.cpp b/third_party/txt/tests/CmapCoverageTest.cpp index 08c5521cf06a6..b85a9e0777563 100644 --- a/third_party/txt/tests/CmapCoverageTest.cpp +++ b/third_party/txt/tests/CmapCoverageTest.cpp @@ -59,7 +59,7 @@ static std::vector 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(floor(log2(segmentCount)))); @@ -120,7 +120,7 @@ static std::vector 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) { diff --git a/third_party/txt/tests/FontCollectionItemizeTest.cpp b/third_party/txt/tests/FontCollectionItemizeTest.cpp index 9494d8f3d0e4f..8315ebea2167a 100644 --- a/third_party/txt/tests/FontCollectionItemizeTest.cpp +++ b/third_party/txt/tests/FontCollectionItemizeTest.cpp @@ -1311,12 +1311,12 @@ TEST_F(FontCollectionItemizeTest, itemize_emojiSelection_withFE0F) { const FontStyle kDefaultFontStyle; // U+00A9 is a text default emoji which is available only in - // TextEmojiFont.ttf. TextEmojiFont.ttf shoudl be selected. + // TextEmojiFont.ttf. TextEmojiFont.ttf should be selected. itemize(collection, "U+00A9 U+FE0F", kDefaultFontStyle, &runs); ASSERT_EQ(1U, runs.size()); EXPECT_EQ(0, runs[0].start); EXPECT_EQ(2, runs[0].end); - // Color emoji is specified but it is not available. Use text representaion + // Color emoji is specified but it is not available. Use text representation // instead. EXPECT_EQ(kTextEmojiFont, getFontPath(runs[0])); diff --git a/third_party/txt/tests/GraphemeBreakTests.cpp b/third_party/txt/tests/GraphemeBreakTests.cpp index a31a0d90f6aca..09330fe030a1e 100644 --- a/third_party/txt/tests/GraphemeBreakTests.cpp +++ b/third_party/txt/tests/GraphemeBreakTests.cpp @@ -289,7 +289,7 @@ TEST(GraphemeBreak, DISABLED_emojiModifiers) { EXPECT_FALSE(IsBreak("U+1F466 | U+1F3FF")); // boy + modifier EXPECT_FALSE(IsBreak("U+1F918 | U+1F3FF")); // sign of the horns + modifier EXPECT_FALSE(IsBreak("U+1F933 | U+1F3FF")); // selfie (Unicode 9) + modifier - // Reptition of the tests above, with the knowledge that they are ligated. + // Repetition of the tests above, with the knowledge that they are ligated. const float ligated1_2[] = {1.0, 0.0, 0.0}; const float ligated2_2[] = {1.0, 0.0, 0.0, 0.0}; EXPECT_FALSE(IsBreakWithAdvances(ligated1_2, "U+261D | U+1F3FB")); @@ -301,7 +301,7 @@ TEST(GraphemeBreak, DISABLED_emojiModifiers) { EXPECT_FALSE(IsBreakWithAdvances(ligated2_2, "U+1F466 | U+1F3FF")); EXPECT_FALSE(IsBreakWithAdvances(ligated2_2, "U+1F918 | U+1F3FF")); EXPECT_FALSE(IsBreakWithAdvances(ligated2_2, "U+1F933 | U+1F3FF")); - // Reptition of the tests above, with the knowledge that they are not ligated. + // Repetition of the tests above, with the knowledge that they are not ligated. const float unligated1_2[] = {1.0, 1.0, 0.0}; const float unligated2_2[] = {1.0, 0.0, 1.0, 0.0}; EXPECT_TRUE(IsBreakWithAdvances(unligated1_2, "U+261D | U+1F3FB")); @@ -320,11 +320,11 @@ TEST(GraphemeBreak, DISABLED_emojiModifiers) { "U+270C U+FE0E | U+1F3FB")); // victory hand + text style + modifier EXPECT_FALSE( IsBreak("U+270C U+FE0F | U+1F3FB")); // heart + emoji style + modifier - // Reptition of the two tests above, with the knowledge that they are ligated. + // Repetition of the two tests above, with the knowledge that they are ligated. const float ligated1_1_2[] = {1.0, 0.0, 0.0, 0.0}; EXPECT_FALSE(IsBreakWithAdvances(ligated1_1_2, "U+270C U+FE0E | U+1F3FB")); EXPECT_FALSE(IsBreakWithAdvances(ligated1_1_2, "U+270C U+FE0F | U+1F3FB")); - // Reptition of the first two tests, with the knowledge that they are not + // Repetition of the first two tests, with the knowledge that they are not // ligated. const float unligated1_1_2[] = {1.0, 0.0, 1.0, 0.0}; EXPECT_TRUE(IsBreakWithAdvances(unligated1_1_2, "U+270C U+FE0E | U+1F3FB")); diff --git a/third_party/txt/tests/old/perftests/GraphemeBreak.cpp b/third_party/txt/tests/old/perftests/GraphemeBreak.cpp index a7e4a01e6352f..5fc1e3cbf6a44 100644 --- a/third_party/txt/tests/old/perftests/GraphemeBreak.cpp +++ b/third_party/txt/tests/old/perftests/GraphemeBreak.cpp @@ -43,7 +43,7 @@ static void BM_GraphemeBreak_Ascii(benchmark::State& state) { } } BENCHMARK(BM_GraphemeBreak_Ascii) - ->Arg(0) // Begining of the text. + ->Arg(0) // Beginning of the text. ->Arg(1) // Middle of the text. ->Arg(12); // End of the text. diff --git a/third_party/txt/tests/paragraph_unittests.cc b/third_party/txt/tests/paragraph_unittests.cc index 93590753ce0a5..448cfdf47193a 100644 --- a/third_party/txt/tests/paragraph_unittests.cc +++ b/third_party/txt/tests/paragraph_unittests.cc @@ -283,7 +283,7 @@ TEST_F(ParagraphTest, DISABLE_ON_WINDOWS(LeftAlignParagraph)) { const char* text = "This is a very long sentence to test if the text will properly wrap " "around and go to the next line. Sometimes, short sentence. Longer " - "sentences are okay too because they are nessecary. Very short. " + "sentences are okay too because they are necessary. Very short. " "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod " "tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim " "veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea " @@ -380,7 +380,7 @@ TEST_F(ParagraphTest, DISABLE_ON_WINDOWS(RightAlignParagraph)) { const char* text = "This is a very long sentence to test if the text will properly wrap " "around and go to the next line. Sometimes, short sentence. Longer " - "sentences are okay too because they are nessecary. Very short. " + "sentences are okay too because they are necessary. Very short. " "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod " "tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim " "veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea " @@ -499,7 +499,7 @@ TEST_F(ParagraphTest, DISABLE_ON_WINDOWS(CenterAlignParagraph)) { const char* text = "This is a very long sentence to test if the text will properly wrap " "around and go to the next line. Sometimes, short sentence. Longer " - "sentences are okay too because they are nessecary. Very short. " + "sentences are okay too because they are necessary. Very short. " "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod " "tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim " "veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea " @@ -610,7 +610,7 @@ TEST_F(ParagraphTest, DISABLE_ON_WINDOWS(JustifyAlignParagraph)) { const char* text = "This is a very long sentence to test if the text will properly wrap " "around and go to the next line. Sometimes, short sentence. Longer " - "sentences are okay too because they are nessecary. Very short. " + "sentences are okay too because they are necessary. Very short. " "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod " "tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim " "veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea " @@ -1224,7 +1224,7 @@ TEST_F(ParagraphTest, DISABLE_ON_WINDOWS(GetRectsForRangeParagraph)) { EXPECT_FLOAT_EQ(boxes[0].rect.right(), 463.61719); EXPECT_FLOAT_EQ(boxes[0].rect.bottom(), 118); - // TODO(garyq): The following set of vals are definetly wrong and + // TODO(garyq): The following set of vals are definitely wrong and // end of paragraph handling needs to be fixed in a later patch. EXPECT_FLOAT_EQ(boxes[3].rect.left(), 0); EXPECT_FLOAT_EQ(boxes[3].rect.top(), 236.40625); @@ -2775,7 +2775,7 @@ TEST_F(ParagraphTest, Ellipsize) { const char* text = "This is a very long sentence to test if the text will properly wrap " "around and go to the next line. Sometimes, short sentence. Longer " - "sentences are okay too because they are nessecary. Very short. "; + "sentences are okay too because they are necessary. Very short. "; auto icu_text = icu::UnicodeString::fromUTF8(text); std::u16string u16_text(icu_text.getBuffer(), icu_text.getBuffer() + icu_text.length()); diff --git a/third_party/txt/third_party/fonts/NoCmapFormat14.ttx b/third_party/txt/third_party/fonts/NoCmapFormat14.ttx index 3c7411b194e6b..e034f77d32a8f 100644 --- a/third_party/txt/third_party/fonts/NoCmapFormat14.ttx +++ b/third_party/txt/third_party/fonts/NoCmapFormat14.ttx @@ -144,7 +144,7 @@ - + diff --git a/tools/gn b/tools/gn index ebf8be7bff424..fba95fdb302ca 100755 --- a/tools/gn +++ b/tools/gn @@ -86,7 +86,7 @@ def to_gn_args(args): # Skia GN args. gn_args['skia_enable_flutter_defines'] = True # Enable Flutter API guards in Skia. gn_args['skia_use_dng_sdk'] = False # RAW image handling. - gn_args['skia_use_sfntly'] = False # PDF handling depedency. + gn_args['skia_use_sfntly'] = False # PDF handling dependency. gn_args['skia_enable_pdf'] = False # PDF handling. gn_args['skia_use_x11'] = False # Never add the X11 dependency (only takes effect on Linux). gn_args['skia_use_expat'] = args.target_os == 'android' diff --git a/tools/gn_test.py b/tools/gn_test.py index f0d671984ddba..3f490cf6cf05d 100644 --- a/tools/gn_test.py +++ b/tools/gn_test.py @@ -27,7 +27,7 @@ def _gn_args(self, arg_list): return gn.to_gn_args(args) def test_to_gn_args(self): - # This would not necesarily be true on a 32-bit machine? + # This would not necessarily be true on a 32-bit machine? self.assertEquals(self._gn_args(['--ios', '--simulator'])['target_cpu'], 'x64') self.assertEquals(self._gn_args(['--ios'])['target_cpu'], 'arm') diff --git a/tools/licenses/lib/main.dart b/tools/licenses/lib/main.dart index f5a7d174a6360..62662313bf34b 100644 --- a/tools/licenses/lib/main.dart +++ b/tools/licenses/lib/main.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// See README in this directory for information on how this code is organised. +// See README in this directory for information on how this code is organized. import 'dart:async'; import 'dart:collection'; From a74f163798381843efab39c80025d04f91256588 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Fri, 24 May 2019 16:44:49 -0700 Subject: [PATCH 2/3] Apply clang-format --- shell/platform/fuchsia/flutter/engine.cc | 4 ++-- third_party/txt/src/txt/paragraph.h | 4 ++-- third_party/txt/tests/GraphemeBreakTests.cpp | 6 ++++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/shell/platform/fuchsia/flutter/engine.cc b/shell/platform/fuchsia/flutter/engine.cc index 6184c97450165..687ef213e7e85 100644 --- a/shell/platform/fuchsia/flutter/engine.cc +++ b/shell/platform/fuchsia/flutter/engine.cc @@ -80,8 +80,8 @@ Engine::Engine(Delegate& delegate, environment->GetServices(parent_environment_service_provider.NewRequest()); environment.Unbind(); - // Grab the accessibility 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 accessibility_context_writer; svc->Connect(accessibility_context_writer.NewRequest()); diff --git a/third_party/txt/src/txt/paragraph.h b/third_party/txt/src/txt/paragraph.h index fe7ccf7fdcd55..1c3567659ab4f 100644 --- a/third_party/txt/src/txt/paragraph.h +++ b/third_party/txt/src/txt/paragraph.h @@ -39,8 +39,8 @@ namespace txt { using GlyphID = uint32_t; -// Paragraph provides Layout, metrics, and painting capabilities 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_builder.Build(); diff --git a/third_party/txt/tests/GraphemeBreakTests.cpp b/third_party/txt/tests/GraphemeBreakTests.cpp index 09330fe030a1e..072630ad3b35a 100644 --- a/third_party/txt/tests/GraphemeBreakTests.cpp +++ b/third_party/txt/tests/GraphemeBreakTests.cpp @@ -301,7 +301,8 @@ TEST(GraphemeBreak, DISABLED_emojiModifiers) { EXPECT_FALSE(IsBreakWithAdvances(ligated2_2, "U+1F466 | U+1F3FF")); EXPECT_FALSE(IsBreakWithAdvances(ligated2_2, "U+1F918 | U+1F3FF")); EXPECT_FALSE(IsBreakWithAdvances(ligated2_2, "U+1F933 | U+1F3FF")); - // Repetition of the tests above, with the knowledge that they are not ligated. + // Repetition of the tests above, with the knowledge that they are not + // ligated. const float unligated1_2[] = {1.0, 1.0, 0.0}; const float unligated2_2[] = {1.0, 0.0, 1.0, 0.0}; EXPECT_TRUE(IsBreakWithAdvances(unligated1_2, "U+261D | U+1F3FB")); @@ -320,7 +321,8 @@ TEST(GraphemeBreak, DISABLED_emojiModifiers) { "U+270C U+FE0E | U+1F3FB")); // victory hand + text style + modifier EXPECT_FALSE( IsBreak("U+270C U+FE0F | U+1F3FB")); // heart + emoji style + modifier - // Repetition of the two tests above, with the knowledge that they are ligated. + // Repetition of the two tests above, with the knowledge that they are + // ligated. const float ligated1_1_2[] = {1.0, 0.0, 0.0, 0.0}; EXPECT_FALSE(IsBreakWithAdvances(ligated1_1_2, "U+270C U+FE0E | U+1F3FB")); EXPECT_FALSE(IsBreakWithAdvances(ligated1_1_2, "U+270C U+FE0F | U+1F3FB")); From c461c9ebaf8d3fd80fb8676416db136607a42d62 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Fri, 24 May 2019 19:10:29 -0700 Subject: [PATCH 3/3] Update licence tool signature --- ci/licenses_golden/tool_signature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/licenses_golden/tool_signature b/ci/licenses_golden/tool_signature index 580f119ff4ab5..1b97f5a8b2fd9 100644 --- a/ci/licenses_golden/tool_signature +++ b/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: ab4f82ed4f38f0d3821073855c220992 +Signature: ad6590b867473860a1e6b08bf9e98667