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

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

Issue 1554903002: EventSender<T> singletons are better off on the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove no-op cancelEvent()s Created 4 years, 11 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 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005 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) 2006 Apple Inc. All rights reserved. 4 * Copyright (C) 2006 Apple Inc. All rights reserved.
5 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 5 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 13 matching lines...) Expand all
24 24
25 #include "core/MediaTypeNames.h" 25 #include "core/MediaTypeNames.h"
26 #include "core/css/CSSStyleSheet.h" 26 #include "core/css/CSSStyleSheet.h"
27 #include "core/events/Event.h" 27 #include "core/events/Event.h"
28 #include "wtf/StdLibExtras.h" 28 #include "wtf/StdLibExtras.h"
29 29
30 namespace blink { 30 namespace blink {
31 31
32 static SVGStyleEventSender& styleErrorEventSender() 32 static SVGStyleEventSender& styleErrorEventSender()
33 { 33 {
34 DEFINE_STATIC_LOCAL(SVGStyleEventSender, sharedErrorEventSender, (EventTypeN ames::error)); 34 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SVGStyleEventSender>, sharedError EventSender, (SVGStyleEventSender::create(EventTypeNames::error)));
35 return sharedErrorEventSender; 35 return *sharedErrorEventSender;
36 } 36 }
37 37
38 inline SVGStyleElement::SVGStyleElement(Document& document, bool createdByParser ) 38 inline SVGStyleElement::SVGStyleElement(Document& document, bool createdByParser )
39 : SVGElement(SVGNames::styleTag, document) 39 : SVGElement(SVGNames::styleTag, document)
40 , StyleElement(&document, createdByParser) 40 , StyleElement(&document, createdByParser)
41 { 41 {
42 } 42 }
43 43
44 SVGStyleElement::~SVGStyleElement() 44 SVGStyleElement::~SVGStyleElement()
45 { 45 {
46 #if !ENABLE(OILPAN) 46 #if !ENABLE(OILPAN)
47 StyleElement::clearDocumentData(document(), this); 47 StyleElement::clearDocumentData(document(), this);
48 #endif
49 48
50 styleErrorEventSender().cancelEvent(this); 49 styleErrorEventSender().cancelEvent(this);
50 #endif
51 } 51 }
52 52
53 PassRefPtrWillBeRawPtr<SVGStyleElement> SVGStyleElement::create(Document& docume nt, bool createdByParser) 53 PassRefPtrWillBeRawPtr<SVGStyleElement> SVGStyleElement::create(Document& docume nt, bool createdByParser)
54 { 54 {
55 return adoptRefWillBeNoop(new SVGStyleElement(document, createdByParser)); 55 return adoptRefWillBeNoop(new SVGStyleElement(document, createdByParser));
56 } 56 }
57 57
58 bool SVGStyleElement::disabled() const 58 bool SVGStyleElement::disabled() const
59 { 59 {
60 if (!m_sheet) 60 if (!m_sheet)
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 dispatchEvent(Event::create(EventTypeNames::error)); 160 dispatchEvent(Event::create(EventTypeNames::error));
161 } 161 }
162 162
163 DEFINE_TRACE(SVGStyleElement) 163 DEFINE_TRACE(SVGStyleElement)
164 { 164 {
165 StyleElement::trace(visitor); 165 StyleElement::trace(visitor);
166 SVGElement::trace(visitor); 166 SVGElement::trace(visitor);
167 } 167 }
168 168
169 } 169 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGStyleElement.h ('k') | third_party/WebKit/Source/core/svg/SVGUseElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698