void HTMLStyleElement::unregisterWithScopingNode() { // Note: We cannot rely on the 'scoped' element still being present when this method is invoked. // Therefore we cannot rely on scoped()! ASSERT(m_isRegisteredWithScopingNode || !RuntimeEnabledFeatures::styleScopedEnabled()); if (!m_isRegisteredWithScopingNode) return; if (!RuntimeEnabledFeatures::styleScopedEnabled()) return; ContainerNode* scope = parentNode(); ASSERT(scope); if (scope) { ASSERT(scope->hasScopedHTMLStyleChild()); scope->unregisterScopedHTMLStyleChild(); scope->setNeedsStyleRecalc(); } if (inDocument() && !document()->parsing() && document()->renderer()) document()->styleResolverChanged(DeferRecalcStyle); m_isRegisteredWithScopingNode = false; }