[web] Delete unused files in the engine (#172035)

Delete unused files.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
This commit is contained in:
Harry Terkelsen 2025-07-14 10:10:41 -07:00 committed by GitHub
parent a930ec1a6c
commit f58c4cf385
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 0 additions and 344 deletions

View File

@ -52663,7 +52663,6 @@ ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart + ../../.
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/path_metrics.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/picture.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/picture_recorder.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/platform_message.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/raster_cache.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/rasterizer.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/render_canvas.dart + ../../../flutter/LICENSE
@ -52719,7 +52718,6 @@ ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/pointer_converter.dart + ../.
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/profiler.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/raw_keyboard.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/renderer.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/rrect_renderer.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/safe_browser_api.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/scene_builder.dart + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/scene_painting.dart + ../../../flutter/LICENSE
@ -55738,7 +55736,6 @@ FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/path_metrics.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/picture.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/picture_recorder.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/platform_message.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/raster_cache.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/rasterizer.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/render_canvas.dart
@ -55794,7 +55791,6 @@ FILE: ../../../flutter/lib/web_ui/lib/src/engine/pointer_converter.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/profiler.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/raw_keyboard.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/renderer.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/rrect_renderer.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/safe_browser_api.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/scene_builder.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/scene_painting.dart

View File

@ -100,7 +100,6 @@ export 'engine/pointer_converter.dart';
export 'engine/profiler.dart';
export 'engine/raw_keyboard.dart';
export 'engine/renderer.dart';
export 'engine/rrect_renderer.dart';
export 'engine/safe_browser_api.dart';
export 'engine/scene_builder.dart';
export 'engine/scene_painting.dart';

View File

@ -1,19 +0,0 @@
// 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.
import 'dart:typed_data';
// TODO(hterkelsen): Delete this once the slots change lands?
class PlatformMessage {
PlatformMessage(this.channel, this.data, this.response);
final String channel;
final ByteData data;
final PlatformMessageResponse response;
}
class PlatformMessageResponse {
void complete(Uint8List data) {}
void completeEmpty() {}
}

View File

@ -1,320 +0,0 @@
// 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.
import 'dart:math' as math;
import 'package:ui/ui.dart' as ui;
import 'dom.dart';
import 'util.dart';
/// Renders an RRect using path primitives.
abstract class RRectRenderer {
// To draw the rounded rectangle, perform the following steps:
// 0. Ensure border radius don't overlap
// 1. Flip left,right top,bottom since web doesn't support flipped
// coordinates with negative radii.
// 2. draw the line for the top
// 3. draw the arc for the top-right corner
// 4. draw the line for the right side
// 5. draw the arc for the bottom-right corner
// 6. draw the line for the bottom of the rectangle
// 7. draw the arc for the bottom-left corner
// 8. draw the line for the left side
// 9. draw the arc for the top-left corner
//
// After drawing, the current point will be the left side of the top of the
// rounded rectangle (after the corner).
// TODO(het): Confirm that this is the end point in Flutter for RRect
void render(ui.RRect inputRRect, {bool startNewPath = true, bool reverse = false}) {
// Ensure border radius curves never overlap
final ui.RRect rrect = inputRRect.scaleRadii();
double left = rrect.left;
double right = rrect.right;
double top = rrect.top;
double bottom = rrect.bottom;
if (left > right) {
left = right;
right = rrect.left;
}
if (top > bottom) {
top = bottom;
bottom = rrect.top;
}
final double trRadiusX = rrect.trRadiusX.abs();
final double tlRadiusX = rrect.tlRadiusX.abs();
final double trRadiusY = rrect.trRadiusY.abs();
final double tlRadiusY = rrect.tlRadiusY.abs();
final double blRadiusX = rrect.blRadiusX.abs();
final double brRadiusX = rrect.brRadiusX.abs();
final double blRadiusY = rrect.blRadiusY.abs();
final double brRadiusY = rrect.brRadiusY.abs();
if (!reverse) {
if (startNewPath) {
beginPath();
}
moveTo(left + trRadiusX, top);
// Top side and top-right corner
lineTo(right - trRadiusX, top);
ellipse(
right - trRadiusX,
top + trRadiusY,
trRadiusX,
trRadiusY,
0,
1.5 * math.pi,
2.0 * math.pi,
false,
);
// Right side and bottom-right corner
lineTo(right, bottom - brRadiusY);
ellipse(
right - brRadiusX,
bottom - brRadiusY,
brRadiusX,
brRadiusY,
0,
0,
0.5 * math.pi,
false,
);
// Bottom side and bottom-left corner
lineTo(left + blRadiusX, bottom);
ellipse(
left + blRadiusX,
bottom - blRadiusY,
blRadiusX,
blRadiusY,
0,
0.5 * math.pi,
math.pi,
false,
);
// Left side and top-left corner
lineTo(left, top + tlRadiusY);
ellipse(
left + tlRadiusX,
top + tlRadiusY,
tlRadiusX,
tlRadiusY,
0,
math.pi,
1.5 * math.pi,
false,
);
} else {
// Draw the rounded rectangle, counterclockwise.
moveTo(right - trRadiusX, top);
if (startNewPath) {
beginPath();
}
// Top side and top-left corner
lineTo(left + tlRadiusX, top);
ellipse(
left + tlRadiusX,
top + tlRadiusY,
tlRadiusX,
tlRadiusY,
0,
1.5 * math.pi,
1 * math.pi,
true,
);
// Left side and bottom-left corner
lineTo(left, bottom - blRadiusY);
ellipse(
left + blRadiusX,
bottom - blRadiusY,
blRadiusX,
blRadiusY,
0,
1 * math.pi,
0.5 * math.pi,
true,
);
// Bottom side and bottom-right corner
lineTo(right - brRadiusX, bottom);
ellipse(
right - brRadiusX,
bottom - brRadiusY,
brRadiusX,
brRadiusY,
0,
0.5 * math.pi,
0 * math.pi,
true,
);
// Right side and top-right corner
lineTo(right, top + trRadiusY);
ellipse(
right - trRadiusX,
top + trRadiusY,
trRadiusX,
trRadiusY,
0,
0 * math.pi,
1.5 * math.pi,
true,
);
}
}
void beginPath();
void moveTo(double x, double y);
void lineTo(double x, double y);
void ellipse(
double centerX,
double centerY,
double radiusX,
double radiusY,
double rotation,
double startAngle,
double endAngle,
bool antiClockwise,
);
}
/// Renders RRect to a 2d canvas.
class RRectToCanvasRenderer extends RRectRenderer {
RRectToCanvasRenderer(this.context);
final DomCanvasRenderingContext2D context;
@override
void beginPath() {
context.beginPath();
}
@override
void moveTo(double x, double y) {
context.moveTo(x, y);
}
@override
void lineTo(double x, double y) {
context.lineTo(x, y);
}
@override
void ellipse(
double centerX,
double centerY,
double radiusX,
double radiusY,
double rotation,
double startAngle,
double endAngle,
bool antiClockwise,
) {
drawEllipse(
context,
centerX,
centerY,
radiusX,
radiusY,
rotation,
startAngle,
endAngle,
antiClockwise,
);
}
}
/// Renders RRect to a path.
class RRectToPathRenderer extends RRectRenderer {
RRectToPathRenderer(this.path);
final ui.Path path;
@override
void beginPath() {}
@override
void moveTo(double x, double y) {
path.moveTo(x, y);
}
@override
void lineTo(double x, double y) {
path.lineTo(x, y);
}
@override
void ellipse(
double centerX,
double centerY,
double radiusX,
double radiusY,
double rotation,
double startAngle,
double endAngle,
bool antiClockwise,
) {
path.addArc(
ui.Rect.fromLTRB(centerX - radiusX, centerY - radiusY, centerX + radiusX, centerY + radiusY),
startAngle,
antiClockwise ? startAngle - endAngle : endAngle - startAngle,
);
}
}
typedef RRectRendererEllipseCallback =
void Function(
double centerX,
double centerY,
double radiusX,
double radiusY,
double rotation,
double startAngle,
double endAngle,
bool antiClockwise,
);
typedef RRectRendererCallback = void Function(double x, double y);
/// Converts RRect to path primitives with callbacks.
class RRectMetricsRenderer extends RRectRenderer {
RRectMetricsRenderer({this.moveToCallback, this.lineToCallback, this.ellipseCallback});
final RRectRendererEllipseCallback? ellipseCallback;
final RRectRendererCallback? lineToCallback;
final RRectRendererCallback? moveToCallback;
@override
void beginPath() {}
@override
void ellipse(
double centerX,
double centerY,
double radiusX,
double radiusY,
double rotation,
double startAngle,
double endAngle,
bool antiClockwise,
) => ellipseCallback!(
centerX,
centerY,
radiusX,
radiusY,
rotation,
startAngle,
endAngle,
antiClockwise,
);
@override
void lineTo(double x, double y) => lineToCallback!(x, y);
@override
void moveTo(double x, double y) => moveToCallback!(x, y);
}