head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.8 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.6 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.4 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.2 pkgsrc-2011Q2-base:1.2; locks; strict; comment @# @; 1.2 date 2011.06.09.11.00.03; author drochner; state dead; branches; next 1.1; 1.1 date 2011.04.14.18.11.45; author drochner; state Exp; branches; next ; desc @@ 1.2 log @update to 1.4.1 this switches to the new stable branch (shlib major changed -> PKGREV bumps needed) @ text @$NetBSD: patch-cp,v 1.1 2011/04/14 18:11:45 drochner Exp $ --- WebCore/svg/SVGUseElement.cpp.orig 2011-02-07 17:29:58.000000000 +0000 +++ WebCore/svg/SVGUseElement.cpp @@@@ -128,7 +128,7 @@@@ void SVGUseElement::insertedIntoDocument void SVGUseElement::removedFromDocument() { - m_targetElementInstance = 0; + detachInstance(); SVGElement::removedFromDocument(); } @@@@ -455,8 +455,7 @@@@ void SVGUseElement::buildShadowAndInstan if (targetElement && targetElement->isSVGElement()) target = static_cast(targetElement); - if (m_targetElementInstance) - m_targetElementInstance = 0; + detachInstance(); // Do not allow self-referencing. // 'target' may be null, if it's a non SVG namespaced element. @@@@ -482,7 +481,7 @@@@ void SVGUseElement::buildShadowAndInstan // SVG specification does not say a word about & cycles. My view on this is: just ignore it! // Non-appearing content is easier to debug, then half-appearing content. if (foundProblem) { - m_targetElementInstance = 0; + detachInstance(); return; } @@@@ -515,7 +514,7 @@@@ void SVGUseElement::buildShadowAndInstan // Do NOT leave an inconsistent instance tree around, instead destruct it. if (!m_targetElementInstance->shadowTreeElement()) { shadowRoot->removeAllChildren(); - m_targetElementInstance = 0; + detachInstance(); return; } @@@@ -551,6 +550,14 @@@@ void SVGUseElement::buildShadowAndInstan updateContainerSizes(); } +void SVGUseElement::detachInstance() +{ + if (!m_targetElementInstance) + return; + m_targetElementInstance->clearUseElement(); + m_targetElementInstance = 0; +} + RenderObject* SVGUseElement::createRenderer(RenderArena* arena, RenderStyle*) { return new (arena) RenderSVGShadowTreeRootContainer(this); @@@@ -572,7 +579,7 @@@@ void SVGUseElement::attach() void SVGUseElement::detach() { - m_targetElementInstance = 0; + detachInstance(); SVGStyledTransformableElement::detach(); } @ 1.1 log @add patches from upstream, mostly fixing pointer handling isses which can lead to crashes and possibly code injection (cve-2010-4205, cve-2011-0471, cve-2011-0473, cve-2011-0478, cve-2011-0981, cve-2011-0982) bump PKGREV @ text @d1 1 a1 1 $NetBSD$ @