Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: WebCore/svg/SVGElement.cpp

Issue 5545007: Merge 73432 - 2010-12-07 Justin Schuh <jschuh@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « WebCore/svg/SVGElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/svg/SVGElement.cpp
===================================================================
--- WebCore/svg/SVGElement.cpp (revision 73472)
+++ WebCore/svg/SVGElement.cpp (working copy)
@@ -196,14 +196,38 @@
void SVGElement::setCursorElement(SVGCursorElement* cursorElement)
{
- ensureRareSVGData()->setCursorElement(cursorElement);
+ SVGElementRareData* rareData = ensureRareSVGData();
+ if (SVGCursorElement* oldCursorElement = rareData->cursorElement()) {
+ if (cursorElement == oldCursorElement)
+ return;
+ oldCursorElement->removeReferencedElement(this);
+ }
+ rareData->setCursorElement(cursorElement);
}
+void SVGElement::cursorElementRemoved()
+{
+ ASSERT(hasRareSVGData());
+ rareSVGData()->setCursorElement(0);
+}
+
void SVGElement::setCursorImageValue(CSSCursorImageValue* cursorImageValue)
{
- ensureRareSVGData()->setCursorImageValue(cursorImageValue);
+ SVGElementRareData* rareData = ensureRareSVGData();
+ if (CSSCursorImageValue* oldCursorImageValue = rareData->cursorImageValue()) {
+ if (cursorImageValue == oldCursorImageValue)
+ return;
+ oldCursorImageValue->removeReferencedElement(this);
+ }
+ rareData->setCursorImageValue(cursorImageValue);
}
+void SVGElement::cursorImageElementRemoved()
+{
+ ASSERT(hasRareSVGData());
+ rareSVGData()->setCursorImageValue(0);
+}
+
void SVGElement::parseMappedAttribute(Attribute* attr)
{
// standard events
« no previous file with comments | « WebCore/svg/SVGElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698