2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
4
5
-
6
5
part of engine;
7
6
8
7
/// This composites HTML views into the [ui.Scene] .
@@ -255,7 +254,8 @@ class HtmlViewEmbedder {
255
254
final CkPath path = CkPath ();
256
255
path.addRRect (mutator.rrect! );
257
256
_ensureSvgPathDefs ();
258
- html.Element pathDefs = _svgPathDefs! .querySelector ('#sk_path_defs' )! ;
257
+ html.Element pathDefs =
258
+ _svgPathDefs! .querySelector ('#sk_path_defs' )! ;
259
259
_clipPathCount += 1 ;
260
260
html.Element newClipPath =
261
261
html.Element .html ('<clipPath id="svgClip$_clipPathCount ">'
@@ -266,7 +266,8 @@ class HtmlViewEmbedder {
266
266
} else if (mutator.path != null ) {
267
267
final CkPath path = mutator.path as CkPath ;
268
268
_ensureSvgPathDefs ();
269
- html.Element pathDefs = _svgPathDefs! .querySelector ('#sk_path_defs' )! ;
269
+ html.Element pathDefs =
270
+ _svgPathDefs! .querySelector ('#sk_path_defs' )! ;
270
271
_clipPathCount += 1 ;
271
272
html.Element newClipPath =
272
273
html.Element .html ('<clipPath id="svgClip$_clipPathCount ">'
@@ -369,6 +370,8 @@ class HtmlViewEmbedder {
369
370
if (_overlays[viewId] != null ) {
370
371
final Overlay overlay = _overlays[viewId]! ;
371
372
overlay.surface.htmlElement? .remove ();
373
+ overlay.surface.htmlElement = null ;
374
+ overlay.skSurface? .dispose ();
372
375
}
373
376
_overlays.remove (viewId);
374
377
_currentCompositionParams.remove (viewId);
@@ -402,10 +405,10 @@ class EmbeddedViewParams {
402
405
if (identical (this , other)) {
403
406
return true ;
404
407
}
405
- return other is EmbeddedViewParams
406
- && other.offset == offset
407
- && other.size == size
408
- && other.mutators == mutators;
408
+ return other is EmbeddedViewParams &&
409
+ other.offset == offset &&
410
+ other.size == size &&
411
+ other.mutators == mutators;
409
412
}
410
413
411
414
int get hashCode => ui.hashValues (offset, size, mutators);
@@ -524,8 +527,8 @@ class MutatorsStack extends Iterable<Mutator> {
524
527
if (identical (other, this )) {
525
528
return true ;
526
529
}
527
- return other is MutatorsStack
528
- && _listEquals <Mutator >(other._mutators, _mutators);
530
+ return other is MutatorsStack &&
531
+ _listEquals <Mutator >(other._mutators, _mutators);
529
532
}
530
533
531
534
int get hashCode => ui.hashList (_mutators);
0 commit comments