Chromium Code Reviews| Index: Source/core/svg/SVGElement.cpp |
| diff --git a/Source/core/svg/SVGElement.cpp b/Source/core/svg/SVGElement.cpp |
| index 7f1904c2b9d4b2db6f74236dd3ac24ed2f8dae74..f22e0885c55b9cff899f07cb13c9ceb9000f55b8 100644 |
| --- a/Source/core/svg/SVGElement.cpp |
| +++ b/Source/core/svg/SVGElement.cpp |
| @@ -107,6 +107,20 @@ SVGElement::~SVGElement() |
| #endif |
| } |
| +void SVGElement::detach(const AttachContext& context) |
| +{ |
| + Element::detach(context); |
| + if (correspondingElement() && correspondingElement()->instancesForElement().contains(this)) |
|
pdr.
2014/06/04 04:07:52
Can we make instancesForElement protected and move
|
| + correspondingElement()->removeInstanceMapping(this); |
| +} |
| + |
| +void SVGElement::attach(const AttachContext& context) |
| +{ |
| + Element::attach(context); |
| + if (correspondingElement()) |
| + correspondingElement()->mapInstanceToElement(this); |
| +} |
| + |
| short SVGElement::tabIndex() const |
| { |
| if (supportsFocus()) |
| @@ -1042,6 +1056,8 @@ void SVGElement::invalidateInstances() |
| } |
| } |
| + svgRareData()->elementInstances().clear(); |
| + |
| document().updateRenderTreeIfNeeded(); |
| } |