22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
44
5-
65part of engine;
76
87/// This composites HTML views into the [ui.Scene] .
@@ -255,7 +254,8 @@ class HtmlViewEmbedder {
255254 final CkPath path = CkPath ();
256255 path.addRRect (mutator.rrect! );
257256 _ensureSvgPathDefs ();
258- html.Element pathDefs = _svgPathDefs! .querySelector ('#sk_path_defs' )! ;
257+ html.Element pathDefs =
258+ _svgPathDefs! .querySelector ('#sk_path_defs' )! ;
259259 _clipPathCount += 1 ;
260260 html.Element newClipPath =
261261 html.Element .html ('<clipPath id="svgClip$_clipPathCount ">'
@@ -266,7 +266,8 @@ class HtmlViewEmbedder {
266266 } else if (mutator.path != null ) {
267267 final CkPath path = mutator.path as CkPath ;
268268 _ensureSvgPathDefs ();
269- html.Element pathDefs = _svgPathDefs! .querySelector ('#sk_path_defs' )! ;
269+ html.Element pathDefs =
270+ _svgPathDefs! .querySelector ('#sk_path_defs' )! ;
270271 _clipPathCount += 1 ;
271272 html.Element newClipPath =
272273 html.Element .html ('<clipPath id="svgClip$_clipPathCount ">'
@@ -369,6 +370,8 @@ class HtmlViewEmbedder {
369370 if (_overlays[viewId] != null ) {
370371 final Overlay overlay = _overlays[viewId]! ;
371372 overlay.surface.htmlElement? .remove ();
373+ overlay.surface.htmlElement = null ;
374+ overlay.skSurface? .dispose ();
372375 }
373376 _overlays.remove (viewId);
374377 _currentCompositionParams.remove (viewId);
@@ -402,10 +405,10 @@ class EmbeddedViewParams {
402405 if (identical (this , other)) {
403406 return true ;
404407 }
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;
409412 }
410413
411414 int get hashCode => ui.hashValues (offset, size, mutators);
@@ -524,8 +527,8 @@ class MutatorsStack extends Iterable<Mutator> {
524527 if (identical (other, this )) {
525528 return true ;
526529 }
527- return other is MutatorsStack
528- && _listEquals <Mutator >(other._mutators, _mutators);
530+ return other is MutatorsStack &&
531+ _listEquals <Mutator >(other._mutators, _mutators);
529532 }
530533
531534 int get hashCode => ui.hashList (_mutators);
0 commit comments