Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
removed unecessary params from pathToSvgElement
  • Loading branch information
alanwutang11 committed Jan 17, 2023
commit 89808af379f3980e3fda7367c2563f475b9889b7
4 changes: 1 addition & 3 deletions lib/web_ui/lib/src/engine/html/bitmap_canvas.dart
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,7 @@ class BitmapCanvas extends EngineCanvas {
drawRRect(pathAsRRect, paint);
return;
}
final ui.Rect pathBounds = surfacePath.getBounds();
final DomElement svgElm = pathToSvgElement(
surfacePath, paint, '${pathBounds.right}', '${pathBounds.bottom}');
final DomElement svgElm = pathToSvgElement(surfacePath, paint);
if (!_canvasPool.isClipped) {
final DomCSSStyleDeclaration style = svgElm.style;
style.position = 'absolute';
Expand Down
4 changes: 1 addition & 3 deletions lib/web_ui/lib/src/engine/html/clip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,7 @@ class PersistedPhysicalShape extends PersistedContainerSurface
path,
SurfacePaintData()
..style = ui.PaintingStyle.fill
..color = color.value,
'${pathBounds2.right}',
'${pathBounds2.bottom}');
..color = color.value);

/// Render element behind the clipped content.
rootElement!.insertBefore(_svgElement!, childContainer);
Expand Down
3 changes: 1 addition & 2 deletions lib/web_ui/lib/src/engine/html/dom_canvas.dart
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,7 @@ String _borderStrokeToCssUnit(double value) {
return '${value.toStringAsFixed(3)}px';
}

SVGSVGElement pathToSvgElement(
SurfacePath path, SurfacePaintData paint, String width, String height) {
SVGSVGElement pathToSvgElement(SurfacePath path, SurfacePaintData paint) {
// In Firefox some SVG typed attributes are returned as null without a
// setter. So we use strings here.
final SVGSVGElement root = createSVGSVGElement()
Expand Down