Index: third_party/WebKit/Source/core/dom/Element.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp |
index c90996423c64ee535a9fbb6f0bc9b831a0b76b33..3a09355d61c796e0833f719d4d19cf9a74a89941 100644 |
--- a/third_party/WebKit/Source/core/dom/Element.cpp |
+++ b/third_party/WebKit/Source/core/dom/Element.cpp |
@@ -1636,7 +1636,8 @@ void Element::detach(const AttachContext& context) |
document().userActionElements().didDetach(*this); |
} |
- document().styleEngine().styleInvalidator().clearInvalidation(*this); |
+ if (context.clearInvalidation) |
+ document().styleEngine().styleInvalidator().clearInvalidation(*this); |
if (svgFilterNeedsLayerUpdate()) |
document().unscheduleSVGFilterLayerUpdateHack(*this); |