Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit ad1c965

Browse files
committed
Review Changes
1 parent d79f18d commit ad1c965

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

lib/ui/text/paragraph_builder.cc

+12-11
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ fml::RefPtr<ParagraphBuilder> ParagraphBuilder::create(
169169
// parameter passed directly.
170170
void decodeStrut(Dart_Handle strut_data,
171171
const std::vector<std::string>& strut_font_families,
172-
txt::ParagraphStyle& paragraph_style) { // NOLINT
172+
txt::ParagraphStyle& paragraph_style) { // NOLINT
173173
if (strut_data == Dart_Null()) {
174174
return;
175175
}
@@ -305,8 +305,9 @@ ParagraphBuilder::ParagraphBuilder(
305305

306306
ParagraphBuilder::~ParagraphBuilder() = default;
307307

308-
void decodeTextShadows(Dart_Handle shadows_data,
309-
std::vector<txt::TextShadow>& decoded_shadows) { // NOLINT
308+
void decodeTextShadows(
309+
Dart_Handle shadows_data,
310+
std::vector<txt::TextShadow>& decoded_shadows) { // NOLINT
310311
decoded_shadows.clear();
311312

312313
tonic::DartByteData byte_data(shadows_data);
@@ -330,7 +331,7 @@ void decodeTextShadows(Dart_Handle shadows_data,
330331
}
331332

332333
void decodeFontFeatures(Dart_Handle font_features_data,
333-
txt::FontFeatures& font_features) { // NOLINT
334+
txt::FontFeatures& font_features) { // NOLINT
334335
tonic::DartByteData byte_data(font_features_data);
335336
FML_CHECK(byte_data.length_in_bytes() % kBytesPerFontFeature == 0);
336337

@@ -403,23 +404,23 @@ void ParagraphBuilder::pushStyle(tonic::Int32List& encoded,
403404
if (mask & tsFontWeightMask) {
404405
style.font_weight =
405406
static_cast<txt::FontWeight>(encoded[tsFontWeightIndex]);
406-
}
407+
}
407408

408409
if (mask & tsFontStyleMask) {
409410
style.font_style = static_cast<txt::FontStyle>(encoded[tsFontStyleIndex]);
410-
}
411+
}
411412

412413
if (mask & tsFontSizeMask) {
413414
style.font_size = fontSize;
414-
}
415+
}
415416

416417
if (mask & tsLetterSpacingMask) {
417418
style.letter_spacing = letterSpacing;
418-
}
419+
}
419420

420421
if (mask & tsWordSpacingMask) {
421422
style.word_spacing = wordSpacing;
422-
}
423+
}
423424
}
424425

425426
if (mask & tsHeightMask) {
@@ -472,7 +473,7 @@ void ParagraphBuilder::pop() {
472473
Dart_Handle ParagraphBuilder::addText(const std::u16string& text) {
473474
if (text.empty()) {
474475
return Dart_Null();
475-
}
476+
}
476477

477478
// Use ICU to validate the UTF-16 input. Calling u_strToUTF8 with a null
478479
// output buffer will return U_BUFFER_OVERFLOW_ERROR if the input is well
@@ -482,7 +483,7 @@ Dart_Handle ParagraphBuilder::addText(const std::u16string& text) {
482483
u_strToUTF8(nullptr, 0, nullptr, text_ptr, text.size(), &error_code);
483484
if (error_code != U_BUFFER_OVERFLOW_ERROR) {
484485
return tonic::ToDart("string is not well-formed UTF-16");
485-
}
486+
}
486487

487488
m_paragraphBuilder->AddText(text);
488489

lib/ui/window/platform_configuration_unittests.cc

+12-13
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,20 @@ class DummyPlatformConfigurationClient : public PlatformConfigurationClient {
2525
std::vector<uint8_t> data;
2626
isolate_data_.reset(new ::fml::DataMapping(data));
2727
}
28-
virtual std::string DefaultRouteName() { return "TestRoute"; }
29-
virtual void ScheduleFrame() {}
30-
virtual void Render(Scene* scene) {}
31-
virtual void UpdateSemantics(SemanticsUpdate* update) {}
32-
virtual void HandlePlatformMessage(fml::RefPtr<PlatformMessage> message) {}
33-
virtual FontCollection& GetFontCollection() { return font_collection_; }
34-
virtual void UpdateIsolateDescription(const std::string isolate_name,
35-
int64_t isolate_port) {}
36-
virtual void SetNeedsReportTimings(bool value) {}
37-
virtual std::shared_ptr<const fml::Mapping> GetPersistentIsolateData() {
28+
std::string DefaultRouteName() override { return "TestRoute"; }
29+
void ScheduleFrame() override {}
30+
void Render(Scene* scene) override {}
31+
void UpdateSemantics(SemanticsUpdate* update) override {}
32+
void HandlePlatformMessage(fml::RefPtr<PlatformMessage> message) override {}
33+
FontCollection& GetFontCollection() override { return font_collection_; }
34+
void UpdateIsolateDescription(const std::string isolate_name,
35+
int64_t isolate_port) override {}
36+
void SetNeedsReportTimings(bool value) override {}
37+
std::shared_ptr<const fml::Mapping> GetPersistentIsolateData() override {
3838
return isolate_data_;
3939
}
40-
virtual std::unique_ptr<std::vector<std::string>>
41-
ComputePlatformResolvedLocale(
42-
const std::vector<std::string>& supported_locale_data) {
40+
std::unique_ptr<std::vector<std::string>> ComputePlatformResolvedLocale(
41+
const std::vector<std::string>& supported_locale_data) override {
4342
return nullptr;
4443
};
4544

0 commit comments

Comments
 (0)