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

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

Issue 2354773003: Make stylesheet owner node a reference instead of pointer. (Closed)
Patch Set: const Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 m_sheet->setTitle(value); 104 m_sheet->setTitle(value);
105 105
106 return; 106 return;
107 } 107 }
108 108
109 SVGElement::parseAttribute(name, oldValue, value); 109 SVGElement::parseAttribute(name, oldValue, value);
110 } 110 }
111 111
112 void SVGStyleElement::finishParsingChildren() 112 void SVGStyleElement::finishParsingChildren()
113 { 113 {
114 StyleElement::ProcessingResult result = StyleElement::finishParsingChildren( this); 114 StyleElement::ProcessingResult result = StyleElement::finishParsingChildren( *this);
115 SVGElement::finishParsingChildren(); 115 SVGElement::finishParsingChildren();
116 if (result == StyleElement::ProcessingFatalError) 116 if (result == StyleElement::ProcessingFatalError)
117 notifyLoadedSheetAndAllCriticalSubresources(ErrorOccurredLoadingSubresou rce); 117 notifyLoadedSheetAndAllCriticalSubresources(ErrorOccurredLoadingSubresou rce);
118 } 118 }
119 119
120 Node::InsertionNotificationRequest SVGStyleElement::insertedInto(ContainerNode* insertionPoint) 120 Node::InsertionNotificationRequest SVGStyleElement::insertedInto(ContainerNode* insertionPoint)
121 { 121 {
122 SVGElement::insertedInto(insertionPoint); 122 SVGElement::insertedInto(insertionPoint);
123 StyleElement::insertedInto(this, insertionPoint); 123 StyleElement::insertedInto(*this, insertionPoint);
124 return InsertionShouldCallDidNotifySubtreeInsertions; 124 return InsertionShouldCallDidNotifySubtreeInsertions;
125 } 125 }
126 126
127 void SVGStyleElement::didNotifySubtreeInsertionsToDocument() 127 void SVGStyleElement::didNotifySubtreeInsertionsToDocument()
128 { 128 {
129 if (StyleElement::processStyleSheet(document(), this) == StyleElement::Proce ssingFatalError) 129 if (StyleElement::processStyleSheet(document(), *this) == StyleElement::Proc essingFatalError)
130 notifyLoadedSheetAndAllCriticalSubresources(ErrorOccurredLoadingSubresou rce); 130 notifyLoadedSheetAndAllCriticalSubresources(ErrorOccurredLoadingSubresou rce);
131 } 131 }
132 132
133 void SVGStyleElement::removedFrom(ContainerNode* insertionPoint) 133 void SVGStyleElement::removedFrom(ContainerNode* insertionPoint)
134 { 134 {
135 SVGElement::removedFrom(insertionPoint); 135 SVGElement::removedFrom(insertionPoint);
136 StyleElement::removedFrom(this, insertionPoint); 136 StyleElement::removedFrom(*this, insertionPoint);
137 } 137 }
138 138
139 void SVGStyleElement::childrenChanged(const ChildrenChange& change) 139 void SVGStyleElement::childrenChanged(const ChildrenChange& change)
140 { 140 {
141 SVGElement::childrenChanged(change); 141 SVGElement::childrenChanged(change);
142 if (StyleElement::childrenChanged(this) == StyleElement::ProcessingFatalErro r) 142 if (StyleElement::childrenChanged(*this) == StyleElement::ProcessingFatalErr or)
143 notifyLoadedSheetAndAllCriticalSubresources(ErrorOccurredLoadingSubresou rce); 143 notifyLoadedSheetAndAllCriticalSubresources(ErrorOccurredLoadingSubresou rce);
144 } 144 }
145 145
146 void SVGStyleElement::notifyLoadedSheetAndAllCriticalSubresources(LoadedSheetErr orStatus errorStatus) 146 void SVGStyleElement::notifyLoadedSheetAndAllCriticalSubresources(LoadedSheetErr orStatus errorStatus)
147 { 147 {
148 if (errorStatus != NoErrorLoadingSubresource) 148 if (errorStatus != NoErrorLoadingSubresource)
149 styleErrorEventSender().dispatchEventSoon(this); 149 styleErrorEventSender().dispatchEventSoon(this);
150 } 150 }
151 151
152 void SVGStyleElement::dispatchPendingEvent(SVGStyleEventSender* eventSender) 152 void SVGStyleElement::dispatchPendingEvent(SVGStyleEventSender* eventSender)
153 { 153 {
154 ASSERT_UNUSED(eventSender, eventSender == &styleErrorEventSender()); 154 ASSERT_UNUSED(eventSender, eventSender == &styleErrorEventSender());
155 dispatchEvent(Event::create(EventTypeNames::error)); 155 dispatchEvent(Event::create(EventTypeNames::error));
156 } 156 }
157 157
158 DEFINE_TRACE(SVGStyleElement) 158 DEFINE_TRACE(SVGStyleElement)
159 { 159 {
160 StyleElement::trace(visitor); 160 StyleElement::trace(visitor);
161 SVGElement::trace(visitor); 161 SVGElement::trace(visitor);
162 } 162 }
163 163
164 } // namespace blink 164 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698