Skip to content

Commit

Permalink
Reverts "Make lib/ui/{text|window}/... compatible with `.clang_tidy…
Browse files Browse the repository at this point in the history
…`." (flutter#48083)

Reverts flutter#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`).
  • Loading branch information
auto-submit[bot] committed Nov 15, 2023
1 parent a0a1a1d commit e4c49da
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 5 deletions.
2 changes: 2 additions & 0 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -3744,6 +3744,7 @@ ORIGIN: ../../../flutter/lib/ui/text/paragraph.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/ui/text/paragraph.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/ui/text/paragraph_builder.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/ui/text/paragraph_builder.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/ui/text/text_box.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/ui/ui.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/ui/ui_benchmarks.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/ui/ui_dart_state.cc + ../../../flutter/LICENSE
Expand Down Expand Up @@ -6512,6 +6513,7 @@ FILE: ../../../flutter/lib/ui/text/paragraph.cc
FILE: ../../../flutter/lib/ui/text/paragraph.h
FILE: ../../../flutter/lib/ui/text/paragraph_builder.cc
FILE: ../../../flutter/lib/ui/text/paragraph_builder.h
FILE: ../../../flutter/lib/ui/text/text_box.h
FILE: ../../../flutter/lib/ui/ui.dart
FILE: ../../../flutter/lib/ui/ui_benchmarks.cc
FILE: ../../../flutter/lib/ui/ui_dart_state.cc
Expand Down
1 change: 1 addition & 0 deletions lib/ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ source_set("ui") {
"text/paragraph.h",
"text/paragraph_builder.cc",
"text/paragraph_builder.h",
"text/text_box.h",
"ui_dart_state.cc",
"ui_dart_state.h",
"volatile_path_tracker.cc",
Expand Down
1 change: 1 addition & 0 deletions lib/ui/text/paragraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "flutter/lib/ui/dart_wrapper.h"
#include "flutter/lib/ui/painting/canvas.h"
#include "flutter/lib/ui/text/line_metrics.h"
#include "flutter/lib/ui/text/text_box.h"
#include "flutter/third_party/txt/src/txt/paragraph.h"

namespace flutter {
Expand Down
28 changes: 28 additions & 0 deletions lib/ui/text/text_box.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef FLUTTER_LIB_UI_TEXT_TEXT_BOX_H_
#define FLUTTER_LIB_UI_TEXT_TEXT_BOX_H_

#include "third_party/dart/runtime/include/dart_api.h"
#include "third_party/skia/include/core/SkRect.h"
#include "third_party/tonic/converter/dart_converter.h"

namespace flutter {

enum class TextDirection {
rtl,
ltr,
};

struct TextBox {
SkRect rect;
TextDirection direction;

TextBox(SkRect r, TextDirection d) : rect(r), direction(d) {}
};

} // namespace flutter

#endif // FLUTTER_LIB_UI_TEXT_TEXT_BOX_H_
4 changes: 2 additions & 2 deletions lib/ui/window/platform_message.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ PlatformMessage::PlatformMessage(std::string channel,
fml::RefPtr<PlatformMessageResponse> response)
: channel_(std::move(channel)),
data_(std::move(data)),
has_data_(true),
hasData_(true),
response_(std::move(response)) {}
PlatformMessage::PlatformMessage(std::string channel,
fml::RefPtr<PlatformMessageResponse> response)
: channel_(std::move(channel)),
data_(),
has_data_(false),
hasData_(false),
response_(std::move(response)) {}

PlatformMessage::~PlatformMessage() = default;
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/window/platform_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PlatformMessage {

const std::string& channel() const { return channel_; }
const fml::MallocMapping& data() const { return data_; }
bool hasData() { return has_data_; }
bool hasData() { return hasData_; }

const fml::RefPtr<PlatformMessageResponse>& response() const {
return response_;
Expand All @@ -36,7 +36,7 @@ class PlatformMessage {
private:
std::string channel_;
fml::MallocMapping data_;
bool has_data_;
bool hasData_;
fml::RefPtr<PlatformMessageResponse> response_;
};

Expand Down
2 changes: 1 addition & 1 deletion lib/ui/window/pointer_data_packet_converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class PointerDataPacketConverter {
private:
std::map<int64_t, PointerState> states_;

int64_t pointer_ = 0;
int64_t pointer_;

void ConvertPointerData(PointerData pointer_data,
std::vector<PointerData>& converted_pointers);
Expand Down

0 comments on commit e4c49da

Please sign in to comment.