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

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

Issue 860063002: Initialize GC mixin bases only when leftmost vtable has been initialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add comments explaining purpose Created 5 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
« no previous file with comments | « Source/core/svg/SVGFitToViewBox.cpp ('k') | Source/core/svg/SVGGraphicsElement.cpp » ('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) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 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 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. 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 29 matching lines...) Expand all
40 if (entries.isEmpty()) { 40 if (entries.isEmpty()) {
41 entries.append(std::make_pair(SVGSpreadMethodPad, "pad")); 41 entries.append(std::make_pair(SVGSpreadMethodPad, "pad"));
42 entries.append(std::make_pair(SVGSpreadMethodReflect, "reflect")); 42 entries.append(std::make_pair(SVGSpreadMethodReflect, "reflect"));
43 entries.append(std::make_pair(SVGSpreadMethodRepeat, "repeat")); 43 entries.append(std::make_pair(SVGSpreadMethodRepeat, "repeat"));
44 } 44 }
45 return entries; 45 return entries;
46 } 46 }
47 47
48 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document& d ocument) 48 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document& d ocument)
49 : SVGElement(tagName, document) 49 : SVGElement(tagName, document)
50 , SVGURIReference(this)
51 , m_gradientTransform(SVGAnimatedTransformList::create(this, SVGNames::gradi entTransformAttr, SVGTransformList::create())) 50 , m_gradientTransform(SVGAnimatedTransformList::create(this, SVGNames::gradi entTransformAttr, SVGTransformList::create()))
52 , m_spreadMethod(SVGAnimatedEnumeration<SVGSpreadMethodType>::create(this, S VGNames::spreadMethodAttr, SVGSpreadMethodPad)) 51 , m_spreadMethod(SVGAnimatedEnumeration<SVGSpreadMethodType>::create(this, S VGNames::spreadMethodAttr, SVGSpreadMethodPad))
53 , m_gradientUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create( this, SVGNames::gradientUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX )) 52 , m_gradientUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create( this, SVGNames::gradientUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX ))
54 { 53 {
54 SVGURIReference::initialize(this);
55
55 addToPropertyMap(m_gradientTransform); 56 addToPropertyMap(m_gradientTransform);
56 addToPropertyMap(m_spreadMethod); 57 addToPropertyMap(m_spreadMethod);
57 addToPropertyMap(m_gradientUnits); 58 addToPropertyMap(m_gradientUnits);
58 } 59 }
59 60
60 void SVGGradientElement::trace(Visitor* visitor) 61 void SVGGradientElement::trace(Visitor* visitor)
61 { 62 {
62 visitor->trace(m_gradientTransform); 63 visitor->trace(m_gradientTransform);
63 visitor->trace(m_spreadMethod); 64 visitor->trace(m_spreadMethod);
64 visitor->trace(m_gradientUnits); 65 visitor->trace(m_gradientUnits);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 offset = std::min(std::max(previousOffset, offset), 1.0f); 120 offset = std::min(std::max(previousOffset, offset), 1.0f);
120 previousOffset = offset; 121 previousOffset = offset;
121 122
122 stops.append(Gradient::ColorStop(offset, stop->stopColorIncludingOpacity ())); 123 stops.append(Gradient::ColorStop(offset, stop->stopColorIncludingOpacity ()));
123 } 124 }
124 125
125 return stops; 126 return stops;
126 } 127 }
127 128
128 } 129 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFitToViewBox.cpp ('k') | Source/core/svg/SVGGraphicsElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698