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

Side by Side Diff: Source/core/svg/SVGElementInstance.cpp

Issue 21042009: [SVG2] Merge SVGStyledElement into SVGElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGElementInstance.h ('k') | Source/core/svg/SVGFEBlendElement.idl » ('j') | 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) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
4 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 void SVGElementInstance::appendChild(PassRefPtr<SVGElementInstance> child) 165 void SVGElementInstance::appendChild(PassRefPtr<SVGElementInstance> child)
166 { 166 {
167 appendChildToContainer<SVGElementInstance, SVGElementInstance>(child.get(), this); 167 appendChildToContainer<SVGElementInstance, SVGElementInstance>(child.get(), this);
168 } 168 }
169 169
170 void SVGElementInstance::invalidateAllInstancesOfElement(SVGElement* element) 170 void SVGElementInstance::invalidateAllInstancesOfElement(SVGElement* element)
171 { 171 {
172 if (!element || !element->inDocument()) 172 if (!element || !element->inDocument())
173 return; 173 return;
174 174
175 if (element->isSVGStyledElement() && toSVGStyledElement(element)->instanceUp datesBlocked()) 175 if (element->instanceUpdatesBlocked())
176 return; 176 return;
177 177
178 const HashSet<SVGElementInstance*>& set = element->instancesForElement(); 178 const HashSet<SVGElementInstance*>& set = element->instancesForElement();
179 if (set.isEmpty()) 179 if (set.isEmpty())
180 return; 180 return;
181 181
182 // Mark all use elements referencing 'element' for rebuilding 182 // Mark all use elements referencing 'element' for rebuilding
183 const HashSet<SVGElementInstance*>::const_iterator end = set.end(); 183 const HashSet<SVGElementInstance*>::const_iterator end = set.end();
184 for (HashSet<SVGElementInstance*>::const_iterator it = set.begin(); it != en d; ++it) { 184 for (HashSet<SVGElementInstance*>::const_iterator it = set.begin(); it != en d; ++it) {
185 ASSERT((*it)->shadowTreeElement()); 185 ASSERT((*it)->shadowTreeElement());
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 EventTargetData* SVGElementInstance::ensureEventTargetData() 250 EventTargetData* SVGElementInstance::ensureEventTargetData()
251 { 251 {
252 // EventTarget would use these methods if we were actually using its add/rem oveEventListener logic. 252 // EventTarget would use these methods if we were actually using its add/rem oveEventListener logic.
253 // As we're forwarding those calls to the correspondingElement(), no one sho uld ever call this function. 253 // As we're forwarding those calls to the correspondingElement(), no one sho uld ever call this function.
254 ASSERT_NOT_REACHED(); 254 ASSERT_NOT_REACHED();
255 return 0; 255 return 0;
256 } 256 }
257 257
258 SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker(SVGElement* tar getElement) 258 SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker(SVGElement* tar getElement)
259 : m_targetElement(targetElement->isSVGStyledElement() ? toSVGStyledElement(t argetElement) : 0) 259 : m_targetElement(targetElement)
260 { 260 {
261 if (m_targetElement) 261 if (m_targetElement)
262 m_targetElement->setInstanceUpdatesBlocked(true); 262 m_targetElement->setInstanceUpdatesBlocked(true);
263 } 263 }
264 264
265 SVGElementInstance::InstanceUpdateBlocker::~InstanceUpdateBlocker() 265 SVGElementInstance::InstanceUpdateBlocker::~InstanceUpdateBlocker()
266 { 266 {
267 if (m_targetElement) 267 if (m_targetElement)
268 m_targetElement->setInstanceUpdatesBlocked(false); 268 m_targetElement->setInstanceUpdatesBlocked(false);
269 } 269 }
270 270
271 } 271 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGElementInstance.h ('k') | Source/core/svg/SVGFEBlendElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698