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

Side by Side Diff: Source/core/svg/SVGFEConvolveMatrixElement.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) 2009 Dirk Schulze <krit@webkit.org> 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 REGISTER_LOCAL_ANIMATED_PROPERTY(bias) 55 REGISTER_LOCAL_ANIMATED_PROPERTY(bias)
56 REGISTER_LOCAL_ANIMATED_PROPERTY(targetX) 56 REGISTER_LOCAL_ANIMATED_PROPERTY(targetX)
57 REGISTER_LOCAL_ANIMATED_PROPERTY(targetY) 57 REGISTER_LOCAL_ANIMATED_PROPERTY(targetY)
58 REGISTER_LOCAL_ANIMATED_PROPERTY(edgeMode) 58 REGISTER_LOCAL_ANIMATED_PROPERTY(edgeMode)
59 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthX) 59 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthX)
60 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthY) 60 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthY)
61 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAlpha) 61 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAlpha)
62 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) 62 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
63 END_REGISTER_ANIMATED_PROPERTIES 63 END_REGISTER_ANIMATED_PROPERTIES
64 64
65 inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(const QualifiedNam e& tagName, Document* document) 65 inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(const QualifiedNam e& tagName, Document& document)
66 : SVGFilterPrimitiveStandardAttributes(tagName, document) 66 : SVGFilterPrimitiveStandardAttributes(tagName, document)
67 , m_edgeMode(EDGEMODE_DUPLICATE) 67 , m_edgeMode(EDGEMODE_DUPLICATE)
68 { 68 {
69 ASSERT(hasTagName(SVGNames::feConvolveMatrixTag)); 69 ASSERT(hasTagName(SVGNames::feConvolveMatrixTag));
70 ScriptWrappable::init(this); 70 ScriptWrappable::init(this);
71 registerAnimatedPropertiesForSVGFEConvolveMatrixElement(); 71 registerAnimatedPropertiesForSVGFEConvolveMatrixElement();
72 } 72 }
73 73
74 PassRefPtr<SVGFEConvolveMatrixElement> SVGFEConvolveMatrixElement::create(const QualifiedName& tagName, Document* document) 74 PassRefPtr<SVGFEConvolveMatrixElement> SVGFEConvolveMatrixElement::create(const QualifiedName& tagName, Document& document)
75 { 75 {
76 return adoptRef(new SVGFEConvolveMatrixElement(tagName, document)); 76 return adoptRef(new SVGFEConvolveMatrixElement(tagName, document));
77 } 77 }
78 78
79 const AtomicString& SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier() 79 const AtomicString& SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier()
80 { 80 {
81 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthX", Ato micString::ConstructFromLiteral)); 81 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthX", Ato micString::ConstructFromLiteral));
82 return s_identifier; 82 return s_identifier;
83 } 83 }
84 84
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 RefPtr<FilterEffect> effect = FEConvolveMatrix::create(filter, 340 RefPtr<FilterEffect> effect = FEConvolveMatrix::create(filter,
341 IntSize(orderXValue, orderYValue), divisorValue, 341 IntSize(orderXValue, orderYValue), divisorValue,
342 biasCurrentValue(), IntPoint(targetXValue, targetYValue), ed geModeCurrentValue(), 342 biasCurrentValue(), IntPoint(targetXValue, targetYValue), ed geModeCurrentValue(),
343 FloatPoint(kernelUnitLengthXValue, kernelUnitLengthYValue), preserveAlphaCurrentValue(), kernelMatrix.toFloatVector()); 343 FloatPoint(kernelUnitLengthXValue, kernelUnitLengthYValue), preserveAlphaCurrentValue(), kernelMatrix.toFloatVector());
344 effect->inputEffects().append(input1); 344 effect->inputEffects().append(input1);
345 return effect.release(); 345 return effect.release();
346 } 346 }
347 347
348 } // namespace WebCore 348 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFEConvolveMatrixElement.h ('k') | Source/core/svg/SVGFEDiffuseLightingElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698