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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGUseElement.cpp

Issue 1850413002: Improve DEFINE_STATIC_LOCAL()'s handling of Blink GCed objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address compilation failure Created 4 years, 8 months 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
6 * Copyright (C) 2012 University of Szeged 6 * Copyright (C) 2012 University of Szeged
7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org> 7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org>
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 30 matching lines...) Expand all
41 #include "core/svg/SVGLengthContext.h" 41 #include "core/svg/SVGLengthContext.h"
42 #include "core/svg/SVGSVGElement.h" 42 #include "core/svg/SVGSVGElement.h"
43 #include "core/svg/SVGSymbolElement.h" 43 #include "core/svg/SVGSymbolElement.h"
44 #include "core/xml/parser/XMLDocumentParser.h" 44 #include "core/xml/parser/XMLDocumentParser.h"
45 #include "wtf/Vector.h" 45 #include "wtf/Vector.h"
46 46
47 namespace blink { 47 namespace blink {
48 48
49 static SVGUseEventSender& svgUseLoadEventSender() 49 static SVGUseEventSender& svgUseLoadEventSender()
50 { 50 {
51 DEFINE_STATIC_LOCAL(Persistent<SVGUseEventSender>, sharedLoadEventSender, (S VGUseEventSender::create(EventTypeNames::load))); 51 DEFINE_STATIC_LOCAL(SVGUseEventSender, sharedLoadEventSender, (SVGUseEventSe nder::create(EventTypeNames::load)));
52 return *sharedLoadEventSender; 52 return sharedLoadEventSender;
53 } 53 }
54 54
55 inline SVGUseElement::SVGUseElement(Document& document) 55 inline SVGUseElement::SVGUseElement(Document& document)
56 : SVGGraphicsElement(SVGNames::useTag, document) 56 : SVGGraphicsElement(SVGNames::useTag, document)
57 , SVGURIReference(this) 57 , SVGURIReference(this)
58 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(SVG LengthMode::Width))) 58 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(SVG LengthMode::Width)))
59 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(SVG LengthMode::Height))) 59 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(SVG LengthMode::Height)))
60 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(SVGLengthMode::Width))) 60 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(SVGLengthMode::Width)))
61 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(SVGLengthMode::Height))) 61 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(SVGLengthMode::Height)))
62 , m_haveFiredLoadEvent(false) 62 , m_haveFiredLoadEvent(false)
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 751
752 if (m_resource) 752 if (m_resource)
753 m_resource->removeClient(this); 753 m_resource->removeClient(this);
754 754
755 m_resource = resource; 755 m_resource = resource;
756 if (m_resource) 756 if (m_resource)
757 m_resource->addClient(this); 757 m_resource->addClient(this);
758 } 758 }
759 759
760 } // namespace blink 760 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698