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

Commit e4c49da

Browse files
Reverts "Make lib/ui/{text|window}/... compatible with .clang_tidy." (#48083)
Reverts #48000 Initiated by: jonahwilliams This change reverts the following previous change: Original Description: I just ... deleted `text_box.h` as it appears unused and unreferenced? --- Work towards flutter/flutter#134969. All changes were made automatically (i.e. with `--fix`).
1 parent a0a1a1d commit e4c49da

File tree

7 files changed

+37
-5
lines changed

7 files changed

+37
-5
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3744,6 +3744,7 @@ ORIGIN: ../../../flutter/lib/ui/text/paragraph.cc + ../../../flutter/LICENSE
37443744
ORIGIN: ../../../flutter/lib/ui/text/paragraph.h + ../../../flutter/LICENSE
37453745
ORIGIN: ../../../flutter/lib/ui/text/paragraph_builder.cc + ../../../flutter/LICENSE
37463746
ORIGIN: ../../../flutter/lib/ui/text/paragraph_builder.h + ../../../flutter/LICENSE
3747+
ORIGIN: ../../../flutter/lib/ui/text/text_box.h + ../../../flutter/LICENSE
37473748
ORIGIN: ../../../flutter/lib/ui/ui.dart + ../../../flutter/LICENSE
37483749
ORIGIN: ../../../flutter/lib/ui/ui_benchmarks.cc + ../../../flutter/LICENSE
37493750
ORIGIN: ../../../flutter/lib/ui/ui_dart_state.cc + ../../../flutter/LICENSE
@@ -6512,6 +6513,7 @@ FILE: ../../../flutter/lib/ui/text/paragraph.cc
65126513
FILE: ../../../flutter/lib/ui/text/paragraph.h
65136514
FILE: ../../../flutter/lib/ui/text/paragraph_builder.cc
65146515
FILE: ../../../flutter/lib/ui/text/paragraph_builder.h
6516+
FILE: ../../../flutter/lib/ui/text/text_box.h
65156517
FILE: ../../../flutter/lib/ui/ui.dart
65166518
FILE: ../../../flutter/lib/ui/ui_benchmarks.cc
65176519
FILE: ../../../flutter/lib/ui/ui_dart_state.cc

lib/ui/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ source_set("ui") {
128128
"text/paragraph.h",
129129
"text/paragraph_builder.cc",
130130
"text/paragraph_builder.h",
131+
"text/text_box.h",
131132
"ui_dart_state.cc",
132133
"ui_dart_state.h",
133134
"volatile_path_tracker.cc",

lib/ui/text/paragraph.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "flutter/lib/ui/dart_wrapper.h"
1010
#include "flutter/lib/ui/painting/canvas.h"
1111
#include "flutter/lib/ui/text/line_metrics.h"
12+
#include "flutter/lib/ui/text/text_box.h"
1213
#include "flutter/third_party/txt/src/txt/paragraph.h"
1314

1415
namespace flutter {

lib/ui/text/text_box.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Copyright 2013 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
#ifndef FLUTTER_LIB_UI_TEXT_TEXT_BOX_H_
6+
#define FLUTTER_LIB_UI_TEXT_TEXT_BOX_H_
7+
8+
#include "third_party/dart/runtime/include/dart_api.h"
9+
#include "third_party/skia/include/core/SkRect.h"
10+
#include "third_party/tonic/converter/dart_converter.h"
11+
12+
namespace flutter {
13+
14+
enum class TextDirection {
15+
rtl,
16+
ltr,
17+
};
18+
19+
struct TextBox {
20+
SkRect rect;
21+
TextDirection direction;
22+
23+
TextBox(SkRect r, TextDirection d) : rect(r), direction(d) {}
24+
};
25+
26+
} // namespace flutter
27+
28+
#endif // FLUTTER_LIB_UI_TEXT_TEXT_BOX_H_

lib/ui/window/platform_message.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ PlatformMessage::PlatformMessage(std::string channel,
1313
fml::RefPtr<PlatformMessageResponse> response)
1414
: channel_(std::move(channel)),
1515
data_(std::move(data)),
16-
has_data_(true),
16+
hasData_(true),
1717
response_(std::move(response)) {}
1818
PlatformMessage::PlatformMessage(std::string channel,
1919
fml::RefPtr<PlatformMessageResponse> response)
2020
: channel_(std::move(channel)),
2121
data_(),
22-
has_data_(false),
22+
hasData_(false),
2323
response_(std::move(response)) {}
2424

2525
PlatformMessage::~PlatformMessage() = default;

lib/ui/window/platform_message.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class PlatformMessage {
2525

2626
const std::string& channel() const { return channel_; }
2727
const fml::MallocMapping& data() const { return data_; }
28-
bool hasData() { return has_data_; }
28+
bool hasData() { return hasData_; }
2929

3030
const fml::RefPtr<PlatformMessageResponse>& response() const {
3131
return response_;
@@ -36,7 +36,7 @@ class PlatformMessage {
3636
private:
3737
std::string channel_;
3838
fml::MallocMapping data_;
39-
bool has_data_;
39+
bool hasData_;
4040
fml::RefPtr<PlatformMessageResponse> response_;
4141
};
4242

lib/ui/window/pointer_data_packet_converter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class PointerDataPacketConverter {
9999
private:
100100
std::map<int64_t, PointerState> states_;
101101

102-
int64_t pointer_ = 0;
102+
int64_t pointer_;
103103

104104
void ConvertPointerData(PointerData pointer_data,
105105
std::vector<PointerData>& converted_pointers);

0 commit comments

Comments
 (0)