Index: Source/WebCore/dom/StyledElement.cpp |
=================================================================== |
--- Source/WebCore/dom/StyledElement.cpp (revision 88860) |
+++ Source/WebCore/dom/StyledElement.cpp (working copy) |
@@ -439,7 +439,22 @@ |
style->addSubresourceStyleURLs(urls); |
} |
+void StyledElement::insertedIntoDocument() |
+{ |
+ Element::insertedIntoDocument(); |
+ if (m_inlineStyleDecl) |
+ m_inlineStyleDecl->setParent(document()->elementSheet()); |
+} |
+ |
+void StyledElement::removedFromDocument() |
+{ |
+ if (m_inlineStyleDecl) |
+ m_inlineStyleDecl->setParent(0); |
+ |
+ Element::removedFromDocument(); |
+} |
+ |
void StyledElement::didMoveToNewOwnerDocument() |
{ |
if (m_inlineStyleDecl) |