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

Side by Side Diff: Source/core/rendering/svg/RenderSVGResourceContainer.cpp

Issue 423093002: Oilpan: Prepare to move RenderObject and RenderObjectChildList to Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add more trace Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 , m_isInLayout(false) 42 , m_isInLayout(false)
43 , m_id(node->getIdAttribute()) 43 , m_id(node->getIdAttribute())
44 , m_invalidationMask(0) 44 , m_invalidationMask(0)
45 , m_registered(false) 45 , m_registered(false)
46 , m_isInvalidating(false) 46 , m_isInvalidating(false)
47 { 47 {
48 } 48 }
49 49
50 RenderSVGResourceContainer::~RenderSVGResourceContainer() 50 RenderSVGResourceContainer::~RenderSVGResourceContainer()
51 { 51 {
52 if (m_registered)
53 svgExtensionsFromElement(element()).removeResource(m_id);
54 } 52 }
55 53
56 void RenderSVGResourceContainer::layout() 54 void RenderSVGResourceContainer::layout()
57 { 55 {
58 // FIXME: Investigate a way to detect and break resource layout dependency c ycles early. 56 // FIXME: Investigate a way to detect and break resource layout dependency c ycles early.
59 // Then we can remove this method altogether, and fall back onto RenderSVGHi ddenContainer::layout(). 57 // Then we can remove this method altogether, and fall back onto RenderSVGHi ddenContainer::layout().
60 ASSERT(needsLayout()); 58 ASSERT(needsLayout());
61 if (m_isInLayout) 59 if (m_isInLayout)
62 return; 60 return;
63 61
64 TemporaryChange<bool> inLayoutChange(m_isInLayout, true); 62 TemporaryChange<bool> inLayoutChange(m_isInLayout, true);
65 63
66 RenderSVGHiddenContainer::layout(); 64 RenderSVGHiddenContainer::layout();
67 65
68 clearInvalidationMask(); 66 clearInvalidationMask();
69 } 67 }
70 68
71 void RenderSVGResourceContainer::willBeDestroyed() 69 void RenderSVGResourceContainer::willBeDestroyed()
72 { 70 {
73 SVGResourcesCache::resourceDestroyed(this); 71 SVGResourcesCache::resourceDestroyed(this);
74 RenderSVGHiddenContainer::willBeDestroyed(); 72 RenderSVGHiddenContainer::willBeDestroyed();
73 if (m_registered)
74 svgExtensionsFromElement(element()).removeResource(m_id);
75 } 75 }
76 76
77 void RenderSVGResourceContainer::styleDidChange(StyleDifference diff, const Rend erStyle* oldStyle) 77 void RenderSVGResourceContainer::styleDidChange(StyleDifference diff, const Rend erStyle* oldStyle)
78 { 78 {
79 RenderSVGHiddenContainer::styleDidChange(diff, oldStyle); 79 RenderSVGHiddenContainer::styleDidChange(diff, oldStyle);
80 80
81 if (!m_registered) { 81 if (!m_registered) {
82 m_registered = true; 82 m_registered = true;
83 registerResource(); 83 registerResource();
84 } 84 }
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 if (!object->isSVGShape()) 278 if (!object->isSVGShape())
279 return resourceTransform; 279 return resourceTransform;
280 280
281 SVGGraphicsElement* element = toSVGGraphicsElement(object->node()); 281 SVGGraphicsElement* element = toSVGGraphicsElement(object->node());
282 AffineTransform transform = element->getScreenCTM(SVGGraphicsElement::Disall owStyleUpdate); 282 AffineTransform transform = element->getScreenCTM(SVGGraphicsElement::Disall owStyleUpdate);
283 transform *= resourceTransform; 283 transform *= resourceTransform;
284 return transform; 284 return transform;
285 } 285 }
286 286
287 } 287 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698