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

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

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
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 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 REGISTER_LOCAL_ANIMATED_PROPERTY(x) 52 REGISTER_LOCAL_ANIMATED_PROPERTY(x)
53 REGISTER_LOCAL_ANIMATED_PROPERTY(y) 53 REGISTER_LOCAL_ANIMATED_PROPERTY(y)
54 REGISTER_LOCAL_ANIMATED_PROPERTY(width) 54 REGISTER_LOCAL_ANIMATED_PROPERTY(width)
55 REGISTER_LOCAL_ANIMATED_PROPERTY(height) 55 REGISTER_LOCAL_ANIMATED_PROPERTY(height)
56 REGISTER_LOCAL_ANIMATED_PROPERTY(filterResX) 56 REGISTER_LOCAL_ANIMATED_PROPERTY(filterResX)
57 REGISTER_LOCAL_ANIMATED_PROPERTY(filterResY) 57 REGISTER_LOCAL_ANIMATED_PROPERTY(filterResY)
58 REGISTER_LOCAL_ANIMATED_PROPERTY(href) 58 REGISTER_LOCAL_ANIMATED_PROPERTY(href)
59 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) 59 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
60 END_REGISTER_ANIMATED_PROPERTIES 60 END_REGISTER_ANIMATED_PROPERTIES
61 61
62 inline SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document * document) 62 inline SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document & document)
63 : SVGElement(tagName, document) 63 : SVGElement(tagName, document)
64 , m_filterUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) 64 , m_filterUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
65 , m_primitiveUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) 65 , m_primitiveUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
66 , m_x(LengthModeWidth, "-10%") 66 , m_x(LengthModeWidth, "-10%")
67 , m_y(LengthModeHeight, "-10%") 67 , m_y(LengthModeHeight, "-10%")
68 , m_width(LengthModeWidth, "120%") 68 , m_width(LengthModeWidth, "120%")
69 , m_height(LengthModeHeight, "120%") 69 , m_height(LengthModeHeight, "120%")
70 { 70 {
71 // Spec: If the x/y attribute is not specified, the effect is as if a value of "-10%" were specified. 71 // Spec: If the x/y attribute is not specified, the effect is as if a value of "-10%" were specified.
72 // Spec: If the width/height attribute is not specified, the effect is as if a value of "120%" were specified. 72 // Spec: If the width/height attribute is not specified, the effect is as if a value of "120%" were specified.
73 ASSERT(hasTagName(SVGNames::filterTag)); 73 ASSERT(hasTagName(SVGNames::filterTag));
74 ScriptWrappable::init(this); 74 ScriptWrappable::init(this);
75 registerAnimatedPropertiesForSVGFilterElement(); 75 registerAnimatedPropertiesForSVGFilterElement();
76 } 76 }
77 77
78 PassRefPtr<SVGFilterElement> SVGFilterElement::create(const QualifiedName& tagNa me, Document* document) 78 PassRefPtr<SVGFilterElement> SVGFilterElement::create(const QualifiedName& tagNa me, Document& document)
79 { 79 {
80 return adoptRef(new SVGFilterElement(tagName, document)); 80 return adoptRef(new SVGFilterElement(tagName, document));
81 } 81 }
82 82
83 const AtomicString& SVGFilterElement::filterResXIdentifier() 83 const AtomicString& SVGFilterElement::filterResXIdentifier()
84 { 84 {
85 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGFilterResX", AtomicStri ng::ConstructFromLiteral)); 85 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGFilterResX", AtomicStri ng::ConstructFromLiteral));
86 return s_identifier; 86 return s_identifier;
87 } 87 }
88 88
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 bool SVGFilterElement::selfHasRelativeLengths() const 231 bool SVGFilterElement::selfHasRelativeLengths() const
232 { 232 {
233 return xCurrentValue().isRelative() 233 return xCurrentValue().isRelative()
234 || yCurrentValue().isRelative() 234 || yCurrentValue().isRelative()
235 || widthCurrentValue().isRelative() 235 || widthCurrentValue().isRelative()
236 || heightCurrentValue().isRelative(); 236 || heightCurrentValue().isRelative();
237 } 237 }
238 238
239 } 239 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFilterElement.h ('k') | Source/core/svg/SVGFilterPrimitiveStandardAttributes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698