Reverts "Make lib/ui/{text|window}/... compatible with .clang_tidy." (flutter/engine#48083)

Reverts flutter/engine#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 https://github.com/flutter/flutter/issues/134969.

All changes were made automatically (i.e. with `--fix`).
This commit is contained in:
auto-submit[bot]
2023-11-15 19:55:17 +00:00
committed by GitHub
parent 058ffbe73f
commit ff90f25a41
7 changed files with 37 additions and 5 deletions

View File

@@ -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
@@ -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

View File

@@ -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",

View File

@@ -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 {

View File

@@ -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_

View File

@@ -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;

View File

@@ -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_;
@@ -36,7 +36,7 @@ class PlatformMessage {
private:
std::string channel_;
fml::MallocMapping data_;
bool has_data_;
bool hasData_;
fml::RefPtr<PlatformMessageResponse> response_;
};

View File

@@ -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);