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

Side by Side Diff: Source/core/svg/SVGPatternElement.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
« no previous file with comments | « Source/core/svg/SVGPatternElement.h ('k') | Source/core/svg/SVGPolyElement.h » ('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, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 REGISTER_LOCAL_ANIMATED_PROPERTY(patternContentUnits) 55 REGISTER_LOCAL_ANIMATED_PROPERTY(patternContentUnits)
56 REGISTER_LOCAL_ANIMATED_PROPERTY(patternTransform) 56 REGISTER_LOCAL_ANIMATED_PROPERTY(patternTransform)
57 REGISTER_LOCAL_ANIMATED_PROPERTY(href) 57 REGISTER_LOCAL_ANIMATED_PROPERTY(href)
58 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) 58 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
59 REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox) 59 REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox)
60 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio) 60 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio)
61 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) 61 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
62 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests) 62 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests)
63 END_REGISTER_ANIMATED_PROPERTIES 63 END_REGISTER_ANIMATED_PROPERTIES
64 64
65 inline SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Docume nt* document) 65 inline SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Docume nt& document)
66 : SVGElement(tagName, document) 66 : SVGElement(tagName, document)
67 , m_x(LengthModeWidth) 67 , m_x(LengthModeWidth)
68 , m_y(LengthModeHeight) 68 , m_y(LengthModeHeight)
69 , m_width(LengthModeWidth) 69 , m_width(LengthModeWidth)
70 , m_height(LengthModeHeight) 70 , m_height(LengthModeHeight)
71 , m_patternUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) 71 , m_patternUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
72 , m_patternContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) 72 , m_patternContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
73 { 73 {
74 ASSERT(hasTagName(SVGNames::patternTag)); 74 ASSERT(hasTagName(SVGNames::patternTag));
75 ScriptWrappable::init(this); 75 ScriptWrappable::init(this);
76 registerAnimatedPropertiesForSVGPatternElement(); 76 registerAnimatedPropertiesForSVGPatternElement();
77 } 77 }
78 78
79 PassRefPtr<SVGPatternElement> SVGPatternElement::create(const QualifiedName& tag Name, Document* document) 79 PassRefPtr<SVGPatternElement> SVGPatternElement::create(const QualifiedName& tag Name, Document& document)
80 { 80 {
81 return adoptRef(new SVGPatternElement(tagName, document)); 81 return adoptRef(new SVGPatternElement(tagName, document));
82 } 82 }
83 83
84 bool SVGPatternElement::isSupportedAttribute(const QualifiedName& attrName) 84 bool SVGPatternElement::isSupportedAttribute(const QualifiedName& attrName)
85 { 85 {
86 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 86 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
87 if (supportedAttributes.isEmpty()) { 87 if (supportedAttributes.isEmpty()) {
88 SVGURIReference::addSupportedAttributes(supportedAttributes); 88 SVGURIReference::addSupportedAttributes(supportedAttributes);
89 SVGTests::addSupportedAttributes(supportedAttributes); 89 SVGTests::addSupportedAttributes(supportedAttributes);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 bool SVGPatternElement::selfHasRelativeLengths() const 241 bool SVGPatternElement::selfHasRelativeLengths() const
242 { 242 {
243 return xCurrentValue().isRelative() 243 return xCurrentValue().isRelative()
244 || yCurrentValue().isRelative() 244 || yCurrentValue().isRelative()
245 || widthCurrentValue().isRelative() 245 || widthCurrentValue().isRelative()
246 || heightCurrentValue().isRelative(); 246 || heightCurrentValue().isRelative();
247 } 247 }
248 248
249 } 249 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGPatternElement.h ('k') | Source/core/svg/SVGPolyElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698