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

Commit 0dc9627

Browse files
Merge branch 'main' into remove_physical_whatever_layer
2 parents 13a7519 + 92a16fa commit 0dc9627

27 files changed

+88
-74
lines changed

.ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ targets:
9191

9292
- name: Linux Android Debug Engine
9393
recipe: engine/engine
94+
bringup: true
9495
properties:
9596
add_recipes_cq: "true"
9697
build_android_debug: "true"

DEPS

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ vars = {
1818
'llvm_git': 'https://llvm.googlesource.com',
1919
# OCMock is for testing only so there is no google clone
2020
'ocmock_git': 'https://github.com/erikdoe/ocmock.git',
21-
'skia_revision': '089b9cca26fec8d8bfcc8c7393f39520f5636b07',
21+
'skia_revision': '887e58fff02f976206c2d6e401a92b448448817d',
2222

2323
# WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY
2424
# See `lib/web_ui/README.md` for how to roll CanvasKit to a new version.
@@ -53,7 +53,7 @@ vars = {
5353
# Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS
5454
# You can use //tools/dart/create_updated_flutter_deps.py to produce
5555
# updated revision list of existing dependencies.
56-
'dart_revision': '7c061d8c9dc0cc11245f1eed26f15bae37e11d0b',
56+
'dart_revision': '3cfcfb24bc6a4455a218066cea1644d4c9ff302e',
5757

5858
# WARNING: DO NOT EDIT MANUALLY
5959
# The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py
@@ -336,7 +336,7 @@ deps = {
336336
Var('dart_git') + '/args.git@5ac2ba1d93f037c7aee2975703bf071f88597a76',
337337

338338
'src/third_party/dart/third_party/pkg/async':
339-
Var('dart_git') + '/async.git@ce650b0ce8fa95fc13d4744a293f3e9b00266bee',
339+
Var('dart_git') + '/async.git@b9ed21948754001e31e209612b6ef8a5b2ad8e9f',
340340

341341
'src/third_party/dart/third_party/pkg/bazel_worker':
342342
Var('dart_git') + '/bazel_worker.git@d5f88375b41def124aa65be1d4da8a2c9e82e076',
@@ -881,7 +881,7 @@ deps = {
881881
'packages': [
882882
{
883883
'package': 'fuchsia/sdk/core/mac-amd64',
884-
'version': 'ubfKertFqqUj0WD8I-cswrBU6FQN-Miz6-_u_KkUu3UC'
884+
'version': 'WAfNudyWPOGyWSpZDFfDotSJek6a0yu0q-WRyM8Tz1YC'
885885
}
886886
],
887887
'condition': 'host_os == "mac" and not download_fuchsia_sdk',
@@ -891,7 +891,7 @@ deps = {
891891
'packages': [
892892
{
893893
'package': 'fuchsia/sdk/core/linux-amd64',
894-
'version': '9T4mGpfsJZO0KPtfpRWsm6kCSZaX6_ky6pWGK_fB_8QC'
894+
'version': 'n1UnzmslAzt04yRv6kgirxxobiXp9Hti65DpaI-Mu88C'
895895
}
896896
],
897897
'condition': 'host_os == "linux" and not download_fuchsia_sdk',

ci/builders/linux_android_debug_engine.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"include_paths": [
1010
"out/android_jit_release_x86/zip_archives/android-x86-jit-release/artifacts.zip",
1111
"out/android_jit_release_x86/zip_archives/download.flutter.io"
12-
]
12+
],
13+
"realm": "production"
1314
}
1415
],
1516
"drone_dimensions": [
@@ -60,7 +61,8 @@
6061
"out/android_debug/zip_archives/download.flutter.io",
6162
"out/android_debug/zip_archives/sky_engine.zip",
6263
"out/android_debug/zip_archives/android-javadoc.zip"
63-
]
64+
],
65+
"realm": "production"
6466
}
6567
],
6668
"drone_dimensions": [
@@ -110,7 +112,8 @@
110112
"out/android_debug_arm64/zip_archives/android-arm64/artifacts.zip",
111113
"out/android_debug_arm64/zip_archives/android-arm64/symbols.zip",
112114
"out/android_debug_arm64/zip_archives/download.flutter.io"
113-
]
115+
],
116+
"realm": "production"
114117
}
115118
],
116119
"drone_dimensions": [
@@ -141,7 +144,8 @@
141144
"out/android_debug_x86/zip_archives/android-x86/artifacts.zip",
142145
"out/android_debug_x86/zip_archives/android-x86/symbols.zip",
143146
"out/android_debug_x86/zip_archives/download.flutter.io"
144-
]
147+
],
148+
"realm": "production"
145149
}
146150
],
147151
"drone_dimensions": [
@@ -172,7 +176,8 @@
172176
"out/android_debug_x64/zip_archives/android-x64/artifacts.zip",
173177
"out/android_debug_x64/zip_archives/android-x64/symbols.zip",
174178
"out/android_debug_x64/zip_archives/download.flutter.io"
175-
]
179+
],
180+
"realm": "production"
176181
}
177182
],
178183
"drone_dimensions": [

ci/licenses_golden/licenses_fuchsia

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: 3c2ca726df921aebd2cbe83506fe1dce
1+
Signature: 9153b4cf6bbe888a5d6551b187a85d00
22

33
====================================================================================================
44
LIBRARY: fuchsia_sdk

ci/licenses_golden/licenses_skia

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: 36a984751221a669495519706f39910f
1+
Signature: 8b7e5ae462e33752ff99f502dcdd4d79
22

33
====================================================================================================
44
LIBRARY: etc1

ci/licenses_golden/licenses_third_party

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: f0b15edc61d41509a42c286eeb2cd4f4
1+
Signature: db7cfd0b7841f5e219a485c8ef3bf57b
22

33
====================================================================================================
44
LIBRARY: angle

lib/web_ui/lib/src/engine/canvas_pool.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ class CanvasPool extends _SaveStackTracking {
541541
void drawColor(ui.Color color, ui.BlendMode blendMode) {
542542
final DomCanvasRenderingContext2D ctx = context;
543543
contextHandle.blendMode = blendMode;
544-
contextHandle.fillStyle = colorToCssString(color);
544+
contextHandle.fillStyle = color.toCssString();
545545
contextHandle.strokeStyle = '';
546546
ctx.beginPath();
547547
// Fill a virtually infinite rect with the color.
@@ -997,7 +997,7 @@ class ContextStateHandle {
997997
}
998998
}
999999
} else {
1000-
final String? colorString = colorValueToCssString(paint.color);
1000+
final String colorString = colorValueToCssString(paint.color);
10011001
fillStyle = colorString;
10021002
strokeStyle = colorString;
10031003
}
@@ -1019,7 +1019,7 @@ class ContextStateHandle {
10191019
context.save();
10201020
context.shadowBlur = convertSigmaToRadius(maskFilter.webOnlySigma);
10211021
// Shadow color must be fully opaque.
1022-
context.shadowColor = colorToCssString(ui.Color(paint.color).withAlpha(255));
1022+
context.shadowColor = ui.Color(paint.color).withAlpha(255).toCssString();
10231023

10241024
// On the web a shadow must always be painted together with the shape
10251025
// that casts it. In order to paint just the shadow, we offset the shape

lib/web_ui/lib/src/engine/embedder.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ class FlutterViewEmbedder {
192192
shadowRoot.appendChild(shadowRootStyleElement);
193193
applyGlobalCssRulesToSheet(
194194
shadowRootStyleElement,
195-
hasAutofillOverlay: browserHasAutofillOverlay(),
196195
defaultCssFont: defaultCssFont,
197196
);
198197

@@ -433,7 +432,6 @@ DomElement createTextEditingHostNode(DomElement root, String defaultFont) {
433432
root.appendChild(styleElement);
434433
applyGlobalCssRulesToSheet(
435434
styleElement,
436-
hasAutofillOverlay: browserHasAutofillOverlay(),
437435
cssSelectorPrefix: FlutterViewEmbedder.flutterViewTagName,
438436
defaultCssFont: defaultFont,
439437
);

lib/web_ui/lib/src/engine/global_styles.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import 'text_editing/text_editing.dart';
99
// Applies the required global CSS to an incoming [DomCSSStyleSheet] `sheet`.
1010
void applyGlobalCssRulesToSheet(
1111
DomHTMLStyleElement styleElement, {
12-
required bool hasAutofillOverlay,
1312
String cssSelectorPrefix = '',
1413
required String defaultCssFont,
1514
}) {

lib/web_ui/lib/src/engine/html/bitmap_canvas.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ class BitmapCanvas extends EngineCanvas {
572572
void _applyFilter(DomElement element, SurfacePaintData paint) {
573573
if (paint.maskFilter != null) {
574574
final bool isStroke = paint.style == ui.PaintingStyle.stroke;
575-
final String cssColor = colorValueToCssString(paint.color)!;
575+
final String cssColor = colorValueToCssString(paint.color);
576576
final double sigma = paint.maskFilter!.webOnlySigma;
577577
if (browserEngine == BrowserEngine.webkit && !isStroke) {
578578
// A bug in webkit leaves artifacts when this element is animated
@@ -808,7 +808,7 @@ class BitmapCanvas extends EngineCanvas {
808808
case ui.BlendMode.srcOver:
809809
style
810810
..position = 'absolute'
811-
..backgroundColor = colorToCssString(filterColor)!;
811+
..backgroundColor = filterColor!.toCssString();
812812
case ui.BlendMode.dst:
813813
case ui.BlendMode.dstIn:
814814
style
@@ -820,7 +820,7 @@ class BitmapCanvas extends EngineCanvas {
820820
..backgroundImage = "url('${image.imgElement.src}')"
821821
..backgroundBlendMode =
822822
blendModeToCssMixBlendMode(colorFilterBlendMode) ?? ''
823-
..backgroundColor = colorToCssString(filterColor)!;
823+
..backgroundColor = filterColor!.toCssString();
824824
break;
825825
}
826826
return imgElement;
@@ -839,7 +839,7 @@ class BitmapCanvas extends EngineCanvas {
839839
final DomHTMLElement imgElement = _reuseOrCreateImage(image);
840840
imgElement.style.filter = 'url(#${svgFilter.id})';
841841
if (colorFilterBlendMode == ui.BlendMode.saturation) {
842-
imgElement.style.backgroundColor = colorToCssString(filterColor)!;
842+
imgElement.style.backgroundColor = filterColor!.toCssString();
843843
}
844844
return imgElement;
845845
}
@@ -900,7 +900,7 @@ class BitmapCanvas extends EngineCanvas {
900900
if (shadows != null) {
901901
ctx.save();
902902
for (final ui.Shadow shadow in shadows) {
903-
ctx.shadowColor = colorToCssString(shadow.color);
903+
ctx.shadowColor = shadow.color.toCssString();
904904
ctx.shadowBlur = shadow.blurRadius;
905905
ctx.shadowOffsetX = shadow.offset.dx;
906906
ctx.shadowOffsetY = shadow.offset.dy;
@@ -1009,7 +1009,7 @@ class BitmapCanvas extends EngineCanvas {
10091009
final ui.Color color = ui.Color(paint.color);
10101010
_canvasPool.contextHandle
10111011
..fillStyle = null
1012-
..strokeStyle = colorToCssString(color);
1012+
..strokeStyle = color.toCssString();
10131013
glRenderer!.drawHairline(ctx, positions);
10141014
restore();
10151015
return;

lib/web_ui/lib/src/engine/html/color_filter.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ SvgFilter _srcInColorFilterToSvg(ui.Color? color) {
352352
result: 'destalpha',
353353
);
354354
builder.setFeFlood(
355-
floodColor: colorToCssString(color) ?? '',
355+
floodColor: color?.toCssString() ?? '',
356356
floodOpacity: '1',
357357
result: 'flood',
358358
);
@@ -374,7 +374,7 @@ SvgFilter _srcInColorFilterToSvg(ui.Color? color) {
374374
SvgFilter _dstATopColorFilterToSvg(ui.Color? color) {
375375
final SvgFilterBuilder builder = SvgFilterBuilder();
376376
builder.setFeFlood(
377-
floodColor: colorToCssString(color) ?? '',
377+
floodColor: color?.toCssString() ?? '',
378378
floodOpacity: '1',
379379
result: 'flood',
380380
);
@@ -390,7 +390,7 @@ SvgFilter _dstATopColorFilterToSvg(ui.Color? color) {
390390
SvgFilter _srcOutColorFilterToSvg(ui.Color? color) {
391391
final SvgFilterBuilder builder = SvgFilterBuilder();
392392
builder.setFeFlood(
393-
floodColor: colorToCssString(color) ?? '',
393+
floodColor: color?.toCssString() ?? '',
394394
floodOpacity: '1',
395395
result: 'flood',
396396
);
@@ -406,7 +406,7 @@ SvgFilter _srcOutColorFilterToSvg(ui.Color? color) {
406406
SvgFilter _xorColorFilterToSvg(ui.Color? color) {
407407
final SvgFilterBuilder builder = SvgFilterBuilder();
408408
builder.setFeFlood(
409-
floodColor: colorToCssString(color) ?? '',
409+
floodColor: color?.toCssString() ?? '',
410410
floodOpacity: '1',
411411
result: 'flood',
412412
);
@@ -425,7 +425,7 @@ SvgFilter _compositeColorFilterToSvg(
425425
ui.Color? color, double k1, double k2, double k3, double k4) {
426426
final SvgFilterBuilder builder = SvgFilterBuilder();
427427
builder.setFeFlood(
428-
floodColor: colorToCssString(color) ?? '',
428+
floodColor: color?.toCssString() ?? '',
429429
floodOpacity: '1',
430430
result: 'flood',
431431
);
@@ -478,7 +478,7 @@ SvgFilter _blendColorFilterToSvg(ui.Color? color, SvgBlendMode svgBlendMode,
478478
{bool swapLayers = false}) {
479479
final SvgFilterBuilder builder = SvgFilterBuilder();
480480
builder.setFeFlood(
481-
floodColor: colorToCssString(color) ?? '',
481+
floodColor: color?.toCssString() ?? '',
482482
floodOpacity: '1',
483483
result: 'flood',
484484
);

lib/web_ui/lib/src/engine/html/dom_canvas.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class DomCanvas extends EngineCanvas with SaveElementStackTracking {
6060
..right = '0'
6161
..bottom = '0'
6262
..left = '0'
63-
..backgroundColor = colorToCssString(color)!;
63+
..backgroundColor = color.toCssString();
6464
currentElement.append(box);
6565
}
6666

@@ -257,15 +257,15 @@ DomHTMLElement buildDrawRectElement(
257257
..transformOrigin = '0 0 0'
258258
..transform = effectiveTransform;
259259

260-
String cssColor = colorValueToCssString(paint.color)!;
260+
String cssColor = colorValueToCssString(paint.color);
261261

262262
if (paint.maskFilter != null) {
263263
final double sigma = paint.maskFilter!.webOnlySigma;
264264
if (browserEngine == BrowserEngine.webkit && !isStroke) {
265265
// A bug in webkit leaves artifacts when this element is animated
266266
// with filter: blur, we use boxShadow instead.
267267
style.boxShadow = '0px 0px ${sigma * 2.0}px $cssColor';
268-
cssColor = colorToCssString(blurColor(ui.Color(paint.color), sigma))!;
268+
cssColor = blurColor(ui.Color(paint.color), sigma).toCssString();
269269
} else {
270270
style.filter = 'blur(${sigma}px)';
271271
}
@@ -345,14 +345,14 @@ SVGSVGElement pathToSvgElement(SurfacePath path, SurfacePaintData paint) {
345345
(paint.style != ui.PaintingStyle.fill &&
346346
paint.strokeWidth != 0 &&
347347
paint.strokeWidth != null)) {
348-
svgPath.setAttribute('stroke', colorValueToCssString(paint.color)!);
348+
svgPath.setAttribute('stroke', colorValueToCssString(paint.color));
349349
svgPath.setAttribute('stroke-width', '${paint.strokeWidth ?? 1.0}');
350350
if (paint.strokeCap != null) {
351351
svgPath.setAttribute('stroke-linecap', '${stringForStrokeCap(paint.strokeCap)}');
352352
}
353353
svgPath.setAttribute('fill', 'none');
354354
} else {
355-
svgPath.setAttribute('fill', colorValueToCssString(paint.color)!);
355+
svgPath.setAttribute('fill', colorValueToCssString(paint.color));
356356
}
357357
if (path.fillType == ui.PathFillType.evenOdd) {
358358
svgPath.setAttribute('fill-rule', 'evenodd');

lib/web_ui/lib/src/engine/html/painting.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class SurfacePaintData {
268268
if (strokeJoin != null) {
269269
buffer.write('strokeJoin = $strokeJoin; ');
270270
}
271-
buffer.write('color = ${colorToCssString(ui.Color(color))}; ');
271+
buffer.write('color = ${ui.Color(color).toCssString()}; ');
272272
if (shader != null) {
273273
buffer.write('shader = $shader; ');
274274
}

lib/web_ui/lib/src/engine/html/shaders/shader.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,13 @@ void _addColorStopsToCanvasGradient(DomCanvasGradient gradient,
407407
}
408408
if (colorStops == null) {
409409
assert(colors.length == 2);
410-
gradient.addColorStop(offset, colorToCssString(colors[0])!);
411-
gradient.addColorStop(1 - offset, colorToCssString(colors[1])!);
410+
gradient.addColorStop(offset, colors[0].toCssString());
411+
gradient.addColorStop(1 - offset, colors[1].toCssString());
412412
} else {
413413
for (int i = 0; i < colors.length; i++) {
414414
final double colorStop = colorStops[i].clamp(0.0, 1.0);
415415
gradient.addColorStop(
416-
colorStop * scale + offset, colorToCssString(colors[i])!);
416+
colorStop * scale + offset, colors[i].toCssString());
417417
}
418418
}
419419
if (isDecal) {
@@ -841,7 +841,7 @@ class ModeHtmlColorFilter extends EngineHtmlColorFilter {
841841
if (blendMode == ui.BlendMode.saturation ||
842842
blendMode == ui.BlendMode.multiply ||
843843
blendMode == ui.BlendMode.modulate) {
844-
filterElement!.style.backgroundColor = colorToCssString(color)!;
844+
filterElement!.style.backgroundColor = color.toCssString();
845845
}
846846
return svgFilter.element;
847847
}

lib/web_ui/lib/src/engine/text/paragraph.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -791,13 +791,13 @@ void applyTextStyleToElement({
791791
final double adaptedWidth = strokeWidth != null && strokeWidth > 0
792792
? strokeWidth
793793
: 1.0 / ui.window.devicePixelRatio;
794-
cssStyle.textStroke = '${adaptedWidth}px ${colorToCssString(color)}';
794+
cssStyle.textStroke = '${adaptedWidth}px ${color?.toCssString()}';
795795
} else if (color != null) {
796-
cssStyle.color = colorToCssString(color)!;
796+
cssStyle.color = color.toCssString();
797797
}
798798
final ui.Color? background = style.background?.color;
799799
if (background != null) {
800-
cssStyle.backgroundColor = colorToCssString(background)!;
800+
cssStyle.backgroundColor = background.toCssString();
801801
}
802802
final double? fontSize = style.fontSize;
803803
if (fontSize != null) {
@@ -843,7 +843,7 @@ void applyTextStyleToElement({
843843
}
844844
final ui.Color? decorationColor = style.decorationColor;
845845
if (decorationColor != null) {
846-
cssStyle.textDecorationColor = colorToCssString(decorationColor)!;
846+
cssStyle.textDecorationColor = decorationColor.toCssString();
847847
}
848848
}
849849
}
@@ -878,7 +878,7 @@ String _shadowListToCss(List<ui.Shadow> shadows) {
878878
}
879879
final ui.Shadow shadow = shadows[i];
880880
sb.write('${shadow.offset.dx}px ${shadow.offset.dy}px '
881-
'${shadow.blurRadius}px ${colorToCssString(shadow.color)}');
881+
'${shadow.blurRadius}px ${shadow.color.toCssString()}');
882882
}
883883
return sb.toString();
884884
}

0 commit comments

Comments
 (0)