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

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

Issue 1025883002: Oilpan: revert SVG GC mixin constructor workaround. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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/SVGMarkerElement.cpp ('k') | Source/core/svg/SVGPatternElement.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) 2005 Alexander Kellett <lypanov@kde.org> 4 * Copyright (C) 2005 Alexander Kellett <lypanov@kde.org>
5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
6 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 13 matching lines...) Expand all
24 #include "config.h" 24 #include "config.h"
25 25
26 #include "core/svg/SVGMaskElement.h" 26 #include "core/svg/SVGMaskElement.h"
27 27
28 #include "core/layout/svg/LayoutSVGResourceMasker.h" 28 #include "core/layout/svg/LayoutSVGResourceMasker.h"
29 29
30 namespace blink { 30 namespace blink {
31 31
32 inline SVGMaskElement::SVGMaskElement(Document& document) 32 inline SVGMaskElement::SVGMaskElement(Document& document)
33 : SVGElement(SVGNames::maskTag, document) 33 : SVGElement(SVGNames::maskTag, document)
34 , SVGTests(this)
34 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(SVG LengthMode::Width), AllowNegativeLengths)) 35 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(SVG LengthMode::Width), AllowNegativeLengths))
35 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(SVG LengthMode::Height), AllowNegativeLengths)) 36 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(SVG LengthMode::Height), AllowNegativeLengths))
36 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(SVGLengthMode::Width), ForbidNegativeLengths)) 37 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr eate(SVGLengthMode::Width), ForbidNegativeLengths))
37 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(SVGLengthMode::Height), ForbidNegativeLengths)) 38 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength:: create(SVGLengthMode::Height), ForbidNegativeLengths))
38 , m_maskUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(this , SVGNames::maskUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)) 39 , m_maskUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(this , SVGNames::maskUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX))
39 , m_maskContentUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::crea te(this, SVGNames::maskContentUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEON USE)) 40 , m_maskContentUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::crea te(this, SVGNames::maskContentUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEON USE))
40 { 41 {
41 SVGTests::initialize(this);
42
43 // Spec: If the x/y attribute is not specified, the effect is as if a value of "-10%" were specified. 42 // Spec: If the x/y attribute is not specified, the effect is as if a value of "-10%" were specified.
44 m_x->setDefaultValueAsString("-10%"); 43 m_x->setDefaultValueAsString("-10%");
45 m_y->setDefaultValueAsString("-10%"); 44 m_y->setDefaultValueAsString("-10%");
46 45
47 // Spec: If the width/height attribute is not specified, the effect is as if a value of "120%" were specified. 46 // Spec: If the width/height attribute is not specified, the effect is as if a value of "120%" were specified.
48 m_width->setDefaultValueAsString("120%"); 47 m_width->setDefaultValueAsString("120%");
49 m_height->setDefaultValueAsString("120%"); 48 m_height->setDefaultValueAsString("120%");
50 49
51 addToPropertyMap(m_x); 50 addToPropertyMap(m_x);
52 addToPropertyMap(m_y); 51 addToPropertyMap(m_y);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 157
159 bool SVGMaskElement::selfHasRelativeLengths() const 158 bool SVGMaskElement::selfHasRelativeLengths() const
160 { 159 {
161 return m_x->currentValue()->isRelative() 160 return m_x->currentValue()->isRelative()
162 || m_y->currentValue()->isRelative() 161 || m_y->currentValue()->isRelative()
163 || m_width->currentValue()->isRelative() 162 || m_width->currentValue()->isRelative()
164 || m_height->currentValue()->isRelative(); 163 || m_height->currentValue()->isRelative();
165 } 164 }
166 165
167 } // namespace blink 166 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGMarkerElement.cpp ('k') | Source/core/svg/SVGPatternElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698