Remove kernelUnitLength plumbing

'kernelUnitLength' is not supported in Blink, and is deprecated in the
spec [1][2][3].
Rip out the plumbing and (FilterEffect) storage for it, since it's dead
code for practical purposes (see below though...)

The svg/dynamic-updates/SVGFEConvolveMatrixElement-*-kernelUnitLength-*
tests now actually show something because the kernelUnitLength of 0.05
no longer truncate to 0 and trigger an error. (0.05 should have been a
valid value previously too.)

The tests for negative kernelUnitLengths are dropped because they're no
longer of any use.

[1] https://drafts.fxtf.org/filters/#element-attrdef-feconvolvematrix-kernelunitlength
[2] https://drafts.fxtf.org/filters/#element-attrdef-fediffuselighting-kernelunitlength
[3] https://drafts.fxtf.org/filters/#element-attrdef-fespecularlighting-kernelunitlength
    (feSpecularLighting seems to be missing the Note, but it's the same
     as for feDiffuseLighting anyhow.)

BUG=231613

Review URL: https://codereview.chromium.org/1354923003

git-svn-id: svn://svn.chromium.org/blink/trunk@202601 bbb929c8-8fbe-4397-9dbb-9b2b20218538
diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations
index 18395b9..6f9e1bd 100644
--- a/LayoutTests/TestExpectations
+++ b/LayoutTests/TestExpectations
@@ -186,6 +186,20 @@
 crbug.com/520737 [ Mac ] imported/csswg-test/css-writing-modes-3/writing-mode-vertical-rl-001.xht [ ImageOnlyFailure Pass Timeout ]
 crbug.com/520736 [ Win7 ] media/W3C/video/networkState/networkState_during_progress.html [ Failure Pass ]
 
+crbug.com/231613 css3/filters/effect-reference-hw.html [ NeedsRebaseline ]
+crbug.com/231613 css3/filters/effect-reference-subregion-hw.html [ NeedsRebaseline ]
+crbug.com/231613 css3/filters/effect-reference-subregion.html [ NeedsRebaseline ]
+crbug.com/231613 css3/filters/effect-reference.html [ NeedsRebaseline ]
+crbug.com/231613 svg/W3C-SVG-1.1-SE/types-dom-04-b.svg [ NeedsRebaseline ]
+crbug.com/231613 svg/W3C-SVG-1.1/filters-conv-01-f.svg [ NeedsRebaseline ]
+crbug.com/231613 svg/W3C-SVG-1.1/filters-diffuse-01-f.svg [ NeedsRebaseline ]
+crbug.com/231613 svg/W3C-SVG-1.1/filters-light-01-f.svg [ NeedsRebaseline ]
+crbug.com/231613 svg/W3C-SVG-1.1/filters-light-04-f.svg [ NeedsRebaseline ]
+crbug.com/231613 svg/custom/convolution-crash.svg [ NeedsRebaseline ]
+crbug.com/231613 svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-kernelUnitLength-attr.html [ NeedsRebaseline ]
+crbug.com/231613 svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-kernelUnitLength-prop.html [ NeedsRebaseline ]
+crbug.com/231613 svg/filters/feConvolveFilter-y-bounds.svg [ NeedsRebaseline ]
+
 crbug.com/522641 inspector/elements/styles-4/styles-update-links.html [ Pass Timeout ]
 crbug.com/522645 [ Linux ] virtual/android/fullscreen/video-fixed-background.html [ ImageOnlyFailure Pass ]
 crbug.com/522646 http/tests/media/encrypted-media/encrypted-media-encrypted-event-different-origin.html [ Pass Slow ]
diff --git a/LayoutTests/svg/filters/feConvolveMatrix-negative-kernelUnitLengthX-expected.svg b/LayoutTests/svg/filters/feConvolveMatrix-negative-kernelUnitLengthX-expected.svg
deleted file mode 100644
index 99f0c56..0000000
--- a/LayoutTests/svg/filters/feConvolveMatrix-negative-kernelUnitLengthX-expected.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg">
-  <text x="20" y="20">Test PASSES if it does not crash and has no red rectangle.</text>
-</svg>
-
diff --git a/LayoutTests/svg/filters/feConvolveMatrix-negative-kernelUnitLengthX.svg b/LayoutTests/svg/filters/feConvolveMatrix-negative-kernelUnitLengthX.svg
deleted file mode 100644
index 9c54aa8..0000000
--- a/LayoutTests/svg/filters/feConvolveMatrix-negative-kernelUnitLengthX.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg">
-  <filter id="f1">
-    <feConvolveMatrix order="3" kernelUnitLength="-5.0" kernelMatrix="0 1 0   1 1 1   0 1 0"/>
-  </filter>
-  <text x="20" y="20">Test PASSES if it does not crash and has no red rectangle.</text>
-  <g filter="url(#f1)">
-    <rect x="0" y="0" width="50" height="50" fill="red" />
-  </g>
-</svg>
diff --git a/LayoutTests/svg/filters/feConvolveMatrix-negative-kernelUnitLengthY-expected.svg b/LayoutTests/svg/filters/feConvolveMatrix-negative-kernelUnitLengthY-expected.svg
deleted file mode 100644
index 99f0c56..0000000
--- a/LayoutTests/svg/filters/feConvolveMatrix-negative-kernelUnitLengthY-expected.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg">
-  <text x="20" y="20">Test PASSES if it does not crash and has no red rectangle.</text>
-</svg>
-
diff --git a/LayoutTests/svg/filters/feConvolveMatrix-negative-kernelUnitLengthY.svg b/LayoutTests/svg/filters/feConvolveMatrix-negative-kernelUnitLengthY.svg
deleted file mode 100644
index 11aa734..0000000
--- a/LayoutTests/svg/filters/feConvolveMatrix-negative-kernelUnitLengthY.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg">
-  <filter id="f1">
-    <feConvolveMatrix order="3" kernelUnitLength="5.0 -5.0" kernelMatrix="0 1 0   1 1 1   0 1 0"/>
-  </filter>
-  <text x="20" y="20">Test PASSES if it does not crash and has no red rectangle.</text>
-  <g filter="url(#f1)">
-    <rect x="0" y="0" width="50" height="50" fill="red" />
-  </g>
-</svg>
diff --git a/Source/core/svg/SVGFEConvolveMatrixElement.cpp b/Source/core/svg/SVGFEConvolveMatrixElement.cpp
index 82070e8..dc04baf 100644
--- a/Source/core/svg/SVGFEConvolveMatrixElement.cpp
+++ b/Source/core/svg/SVGFEConvolveMatrixElement.cpp
@@ -126,8 +126,6 @@
         return convolveMatrix->setTargetOffset(IntPoint(m_targetX->currentValue()->value(), m_targetY->currentValue()->value()));
     if (attrName == SVGNames::targetYAttr)
         return convolveMatrix->setTargetOffset(IntPoint(m_targetX->currentValue()->value(), m_targetY->currentValue()->value()));
-    if (attrName == SVGNames::kernelUnitLengthAttr)
-        return convolveMatrix->setKernelUnitLength(FloatPoint(kernelUnitLengthX()->currentValue()->value(), kernelUnitLengthY()->currentValue()->value()));
     if (attrName == SVGNames::preserveAlphaAttr)
         return convolveMatrix->setPreserveAlpha(m_preserveAlpha->currentValue()->value());
 
@@ -142,7 +140,6 @@
         || attrName == SVGNames::biasAttr
         || attrName == SVGNames::targetXAttr
         || attrName == SVGNames::targetYAttr
-        || attrName == SVGNames::kernelUnitLengthAttr
         || attrName == SVGNames::preserveAlphaAttr) {
         SVGElement::InvalidationGuard invalidationGuard(this);
         primitiveAttributeChanged(attrName);
@@ -195,17 +192,6 @@
     if (!hasAttribute(SVGNames::targetYAttr))
         targetYValue = static_cast<int>(floorf(orderYValue / 2));
 
-    // Spec says default kernelUnitLength is 1.0, and a specified length cannot be 0.
-    // FIXME: Why is this cast from float -> int -> float?
-    int kernelUnitLengthXValue = kernelUnitLengthX()->currentValue()->value();
-    int kernelUnitLengthYValue = kernelUnitLengthY()->currentValue()->value();
-    if (!hasAttribute(SVGNames::kernelUnitLengthAttr)) {
-        kernelUnitLengthXValue = 1;
-        kernelUnitLengthYValue = 1;
-    }
-    if (kernelUnitLengthXValue <= 0 || kernelUnitLengthYValue <= 0)
-        return nullptr;
-
     float divisorValue = m_divisor->currentValue()->value();
     if (hasAttribute(SVGNames::divisorAttr) && !divisorValue)
         return nullptr;
@@ -219,7 +205,7 @@
     RefPtrWillBeRawPtr<FilterEffect> effect = FEConvolveMatrix::create(filter,
         IntSize(orderXValue, orderYValue), divisorValue,
         m_bias->currentValue()->value(), IntPoint(targetXValue, targetYValue), m_edgeMode->currentValue()->enumValue(),
-        FloatPoint(kernelUnitLengthXValue, kernelUnitLengthYValue), m_preserveAlpha->currentValue()->value(), m_kernelMatrix->currentValue()->toFloatVector());
+        m_preserveAlpha->currentValue()->value(), m_kernelMatrix->currentValue()->toFloatVector());
     effect->inputEffects().append(input1);
     return effect.release();
 }
diff --git a/Source/core/svg/SVGFEDiffuseLightingElement.cpp b/Source/core/svg/SVGFEDiffuseLightingElement.cpp
index 9ccbbce..291e052 100644
--- a/Source/core/svg/SVGFEDiffuseLightingElement.cpp
+++ b/Source/core/svg/SVGFEDiffuseLightingElement.cpp
@@ -67,11 +67,6 @@
         return diffuseLighting->setSurfaceScale(m_surfaceScale->currentValue()->value());
     if (attrName == SVGNames::diffuseConstantAttr)
         return diffuseLighting->setDiffuseConstant(m_diffuseConstant->currentValue()->value());
-    if (attrName == SVGNames::kernelUnitLengthAttr) {
-        bool changedX = diffuseLighting->setKernelUnitLengthX(m_kernelUnitLength->firstNumber()->currentValue()->value());
-        bool changedY = diffuseLighting->setKernelUnitLengthY(m_kernelUnitLength->secondNumber()->currentValue()->value());
-        return changedX || changedY;
-    }
 
     LightSource* lightSource = const_cast<LightSource*>(diffuseLighting->lightSource());
     const SVGFELightElement* lightElement = SVGFELightElement::findLightElement(*this);
@@ -100,7 +95,6 @@
 {
     if (attrName == SVGNames::surfaceScaleAttr
         || attrName == SVGNames::diffuseConstantAttr
-        || attrName == SVGNames::kernelUnitLengthAttr
         || attrName == SVGNames::lighting_colorAttr) {
         SVGElement::InvalidationGuard invalidationGuard(this);
         primitiveAttributeChanged(attrName);
@@ -145,7 +139,7 @@
 
     RefPtr<LightSource> lightSource = lightNode->lightSource(filter);
     RefPtrWillBeRawPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, m_surfaceScale->currentValue()->value(), m_diffuseConstant->currentValue()->value(),
-        kernelUnitLengthX()->currentValue()->value(), kernelUnitLengthY()->currentValue()->value(), lightSource.release());
+        lightSource.release());
     effect->inputEffects().append(input1);
     return effect.release();
 }
diff --git a/Source/core/svg/SVGFESpecularLightingElement.cpp b/Source/core/svg/SVGFESpecularLightingElement.cpp
index 9f3d5bd..9184b43 100644
--- a/Source/core/svg/SVGFESpecularLightingElement.cpp
+++ b/Source/core/svg/SVGFESpecularLightingElement.cpp
@@ -73,11 +73,6 @@
         return specularLighting->setSpecularConstant(m_specularConstant->currentValue()->value());
     if (attrName == SVGNames::specularExponentAttr)
         return specularLighting->setSpecularExponent(m_specularExponent->currentValue()->value());
-    if (attrName == SVGNames::kernelUnitLengthAttr) {
-        bool changedX = specularLighting->setKernelUnitLengthX(m_kernelUnitLength->firstNumber()->currentValue()->value());
-        bool changedY = specularLighting->setKernelUnitLengthY(m_kernelUnitLength->secondNumber()->currentValue()->value());
-        return changedX || changedY;
-    }
 
     LightSource* lightSource = const_cast<LightSource*>(specularLighting->lightSource());
     SVGFELightElement* lightElement = SVGFELightElement::findLightElement(*this);
@@ -106,8 +101,7 @@
 {
     if (attrName == SVGNames::surfaceScaleAttr
         || attrName == SVGNames::specularConstantAttr
-        || attrName == SVGNames::specularExponentAttr
-        || attrName == SVGNames::kernelUnitLengthAttr) {
+        || attrName == SVGNames::specularExponentAttr) {
         SVGElement::InvalidationGuard invalidationGuard(this);
         primitiveAttributeChanged(attrName);
         return;
@@ -151,7 +145,7 @@
 
     RefPtr<LightSource> lightSource = lightNode->lightSource(filter);
     RefPtrWillBeRawPtr<FilterEffect> effect = FESpecularLighting::create(filter, color, m_surfaceScale->currentValue()->value(), m_specularConstant->currentValue()->value(),
-        m_specularExponent->currentValue()->value(), kernelUnitLengthX()->currentValue()->value(), kernelUnitLengthY()->currentValue()->value(), lightSource.release());
+        m_specularExponent->currentValue()->value(), lightSource.release());
     effect->inputEffects().append(input1);
     return effect.release();
 }
diff --git a/Source/core/svg/SVGFESpecularLightingElement.h b/Source/core/svg/SVGFESpecularLightingElement.h
index ad4fb3e..23f7f25 100644
--- a/Source/core/svg/SVGFESpecularLightingElement.h
+++ b/Source/core/svg/SVGFESpecularLightingElement.h
@@ -54,9 +54,6 @@
     void svgAttributeChanged(const QualifiedName&) override;
     PassRefPtrWillBeRawPtr<FilterEffect> build(SVGFilterBuilder*, Filter*) override;
 
-    static const AtomicString& kernelUnitLengthXIdentifier();
-    static const AtomicString& kernelUnitLengthYIdentifier();
-
     RefPtrWillBeMember<SVGAnimatedNumber> m_specularConstant;
     RefPtrWillBeMember<SVGAnimatedNumber> m_specularExponent;
     RefPtrWillBeMember<SVGAnimatedNumber> m_surfaceScale;
diff --git a/Source/platform/graphics/filters/FEConvolveMatrix.cpp b/Source/platform/graphics/filters/FEConvolveMatrix.cpp
index a3859f4..ba5df1f 100644
--- a/Source/platform/graphics/filters/FEConvolveMatrix.cpp
+++ b/Source/platform/graphics/filters/FEConvolveMatrix.cpp
@@ -34,14 +34,13 @@
 
 FEConvolveMatrix::FEConvolveMatrix(Filter* filter, const IntSize& kernelSize,
     float divisor, float bias, const IntPoint& targetOffset, EdgeModeType edgeMode,
-    const FloatPoint& kernelUnitLength, bool preserveAlpha, const Vector<float>& kernelMatrix)
+    bool preserveAlpha, const Vector<float>& kernelMatrix)
     : FilterEffect(filter)
     , m_kernelSize(kernelSize)
     , m_divisor(divisor)
     , m_bias(bias)
     , m_targetOffset(targetOffset)
     , m_edgeMode(edgeMode)
-    , m_kernelUnitLength(kernelUnitLength)
     , m_preserveAlpha(preserveAlpha)
     , m_kernelMatrix(kernelMatrix)
 {
@@ -51,9 +50,9 @@
 
 PassRefPtrWillBeRawPtr<FEConvolveMatrix> FEConvolveMatrix::create(Filter* filter, const IntSize& kernelSize,
     float divisor, float bias, const IntPoint& targetOffset, EdgeModeType edgeMode,
-    const FloatPoint& kernelUnitLength, bool preserveAlpha, const Vector<float>& kernelMatrix)
+    bool preserveAlpha, const Vector<float>& kernelMatrix)
 {
-    return adoptRefWillBeNoop(new FEConvolveMatrix(filter, kernelSize, divisor, bias, targetOffset, edgeMode, kernelUnitLength,
+    return adoptRefWillBeNoop(new FEConvolveMatrix(filter, kernelSize, divisor, bias, targetOffset, edgeMode,
         preserveAlpha, kernelMatrix));
 }
 
@@ -141,21 +140,6 @@
     return true;
 }
 
-FloatPoint FEConvolveMatrix::kernelUnitLength() const
-{
-    return m_kernelUnitLength;
-}
-
-bool FEConvolveMatrix::setKernelUnitLength(const FloatPoint& kernelUnitLength)
-{
-    ASSERT(kernelUnitLength.x() > 0);
-    ASSERT(kernelUnitLength.y() > 0);
-    if (m_kernelUnitLength == kernelUnitLength)
-        return false;
-    m_kernelUnitLength = kernelUnitLength;
-    return true;
-}
-
 bool FEConvolveMatrix::preserveAlpha() const
 {
     return m_preserveAlpha;
@@ -231,7 +215,6 @@
        << "bias=\"" << m_bias << "\" "
        << "target=\"" << m_targetOffset << "\" "
        << "edgeMode=\"" << m_edgeMode << "\" "
-       << "kernelUnitLength=\"" << m_kernelUnitLength << "\" "
        << "preserveAlpha=\"" << m_preserveAlpha << "\"]\n";
     inputEffect(0)->externalRepresentation(ts, indent + 1);
     return ts;
diff --git a/Source/platform/graphics/filters/FEConvolveMatrix.h b/Source/platform/graphics/filters/FEConvolveMatrix.h
index b29b0a7..07be8da 100644
--- a/Source/platform/graphics/filters/FEConvolveMatrix.h
+++ b/Source/platform/graphics/filters/FEConvolveMatrix.h
@@ -24,8 +24,8 @@
 #ifndef FEConvolveMatrix_h
 #define FEConvolveMatrix_h
 
-#include "platform/geometry/FloatPoint.h"
-#include "platform/geometry/FloatSize.h"
+#include "platform/geometry/IntPoint.h"
+#include "platform/geometry/IntSize.h"
 #include "platform/graphics/filters/Filter.h"
 #include "platform/graphics/filters/FilterEffect.h"
 #include "wtf/Vector.h"
@@ -42,8 +42,7 @@
 class PLATFORM_EXPORT FEConvolveMatrix : public FilterEffect {
 public:
     static PassRefPtrWillBeRawPtr<FEConvolveMatrix> create(Filter*, const IntSize&,
-            float, float, const IntPoint&, EdgeModeType, const FloatPoint&,
-            bool, const Vector<float>&);
+        float, float, const IntPoint&, EdgeModeType, bool, const Vector<float>&);
 
     IntSize kernelSize() const;
     void setKernelSize(const IntSize&);
@@ -63,9 +62,6 @@
     EdgeModeType edgeMode() const;
     bool setEdgeMode(EdgeModeType);
 
-    FloatPoint kernelUnitLength() const;
-    bool setKernelUnitLength(const FloatPoint&);
-
     bool preserveAlpha() const;
     bool setPreserveAlpha(bool);
 
@@ -76,16 +72,14 @@
     TextStream& externalRepresentation(TextStream&, int indention) const override;
 
 private:
-
     FEConvolveMatrix(Filter*, const IntSize&, float, float,
-            const IntPoint&, EdgeModeType, const FloatPoint&, bool, const Vector<float>&);
+        const IntPoint&, EdgeModeType, bool, const Vector<float>&);
 
     IntSize m_kernelSize;
     float m_divisor;
     float m_bias;
     IntPoint m_targetOffset;
     EdgeModeType m_edgeMode;
-    FloatPoint m_kernelUnitLength;
     bool m_preserveAlpha;
     Vector<float> m_kernelMatrix;
 };
diff --git a/Source/platform/graphics/filters/FEDiffuseLighting.cpp b/Source/platform/graphics/filters/FEDiffuseLighting.cpp
index ba154b9..8429690 100644
--- a/Source/platform/graphics/filters/FEDiffuseLighting.cpp
+++ b/Source/platform/graphics/filters/FEDiffuseLighting.cpp
@@ -29,16 +29,15 @@
 namespace blink {
 
 FEDiffuseLighting::FEDiffuseLighting(Filter* filter, const Color& lightingColor, float surfaceScale,
-    float diffuseConstant, float kernelUnitLengthX, float kernelUnitLengthY, PassRefPtr<LightSource> lightSource)
-    : FELighting(filter, DiffuseLighting, lightingColor, surfaceScale, diffuseConstant, 0, 0, kernelUnitLengthX, kernelUnitLengthY, lightSource)
+    float diffuseConstant, PassRefPtr<LightSource> lightSource)
+    : FELighting(filter, DiffuseLighting, lightingColor, surfaceScale, diffuseConstant, 0, 0, lightSource)
 {
 }
 
 PassRefPtrWillBeRawPtr<FEDiffuseLighting> FEDiffuseLighting::create(Filter* filter, const Color& lightingColor,
-    float surfaceScale, float diffuseConstant, float kernelUnitLengthX,
-    float kernelUnitLengthY, PassRefPtr<LightSource> lightSource)
+    float surfaceScale, float diffuseConstant, PassRefPtr<LightSource> lightSource)
 {
-    return adoptRefWillBeNoop(new FEDiffuseLighting(filter, lightingColor, surfaceScale, diffuseConstant, kernelUnitLengthX, kernelUnitLengthY, lightSource));
+    return adoptRefWillBeNoop(new FEDiffuseLighting(filter, lightingColor, surfaceScale, diffuseConstant, lightSource));
 }
 
 FEDiffuseLighting::~FEDiffuseLighting()
@@ -85,32 +84,6 @@
     return true;
 }
 
-float FEDiffuseLighting::kernelUnitLengthX() const
-{
-    return m_kernelUnitLengthX;
-}
-
-bool FEDiffuseLighting::setKernelUnitLengthX(float kernelUnitLengthX)
-{
-    if (m_kernelUnitLengthX == kernelUnitLengthX)
-        return false;
-    m_kernelUnitLengthX = kernelUnitLengthX;
-    return true;
-}
-
-float FEDiffuseLighting::kernelUnitLengthY() const
-{
-    return m_kernelUnitLengthY;
-}
-
-bool FEDiffuseLighting::setKernelUnitLengthY(float kernelUnitLengthY)
-{
-    if (m_kernelUnitLengthY == kernelUnitLengthY)
-        return false;
-    m_kernelUnitLengthY = kernelUnitLengthY;
-    return true;
-}
-
 const LightSource* FEDiffuseLighting::lightSource() const
 {
     return m_lightSource.get();
@@ -126,9 +99,7 @@
     writeIndent(ts, indent);
     ts << "[feDiffuseLighting";
     FilterEffect::externalRepresentation(ts);
-    ts << " surfaceScale=\"" << m_surfaceScale << "\" "
-       << "diffuseConstant=\"" << m_diffuseConstant << "\" "
-       << "kernelUnitLength=\"" << m_kernelUnitLengthX << ", " << m_kernelUnitLengthY << "\"]\n";
+    ts << " surfaceScale=\"" << m_surfaceScale << "\" " << "diffuseConstant=\"" << m_diffuseConstant << "\"]\n";
     inputEffect(0)->externalRepresentation(ts, indent + 1);
     return ts;
 }
diff --git a/Source/platform/graphics/filters/FEDiffuseLighting.h b/Source/platform/graphics/filters/FEDiffuseLighting.h
index 0155b75..41100d9 100644
--- a/Source/platform/graphics/filters/FEDiffuseLighting.h
+++ b/Source/platform/graphics/filters/FEDiffuseLighting.h
@@ -32,7 +32,7 @@
 class PLATFORM_EXPORT FEDiffuseLighting : public FELighting {
 public:
     static PassRefPtrWillBeRawPtr<FEDiffuseLighting> create(Filter*, const Color&, float, float,
-        float, float, PassRefPtr<LightSource>);
+        PassRefPtr<LightSource>);
     ~FEDiffuseLighting() override;
 
     Color lightingColor() const;
@@ -44,19 +44,13 @@
     float diffuseConstant() const;
     bool setDiffuseConstant(float);
 
-    float kernelUnitLengthX() const;
-    bool setKernelUnitLengthX(float);
-
-    float kernelUnitLengthY() const;
-    bool setKernelUnitLengthY(float);
-
     const LightSource* lightSource() const;
     void setLightSource(PassRefPtr<LightSource>);
 
     TextStream& externalRepresentation(TextStream&, int indention) const override;
 
 private:
-    FEDiffuseLighting(Filter*, const Color&, float, float, float, float, PassRefPtr<LightSource>);
+    FEDiffuseLighting(Filter*, const Color&, float, float, PassRefPtr<LightSource>);
 };
 
 } // namespace blink
diff --git a/Source/platform/graphics/filters/FELighting.cpp b/Source/platform/graphics/filters/FELighting.cpp
index 4301e3a..6204756 100644
--- a/Source/platform/graphics/filters/FELighting.cpp
+++ b/Source/platform/graphics/filters/FELighting.cpp
@@ -39,7 +39,7 @@
 
 FELighting::FELighting(Filter* filter, LightingType lightingType, const Color& lightingColor, float surfaceScale,
     float diffuseConstant, float specularConstant, float specularExponent,
-    float kernelUnitLengthX, float kernelUnitLengthY, PassRefPtr<LightSource> lightSource)
+    PassRefPtr<LightSource> lightSource)
     : FilterEffect(filter)
     , m_lightingType(lightingType)
     , m_lightSource(lightSource)
@@ -48,8 +48,6 @@
     , m_diffuseConstant(std::max(diffuseConstant, 0.0f))
     , m_specularConstant(std::max(specularConstant, 0.0f))
     , m_specularExponent(std::min(std::max(specularExponent, 1.0f), 128.0f))
-    , m_kernelUnitLengthX(kernelUnitLengthX)
-    , m_kernelUnitLengthY(kernelUnitLengthY)
 {
 }
 
diff --git a/Source/platform/graphics/filters/FELighting.h b/Source/platform/graphics/filters/FELighting.h
index b5ba280..b9e88c0 100644
--- a/Source/platform/graphics/filters/FELighting.h
+++ b/Source/platform/graphics/filters/FELighting.h
@@ -50,7 +50,7 @@
     FloatRect mapPaintRect(const FloatRect&, bool forward = true) final;
     bool affectsTransparentPixels() override { return true; }
 
-    FELighting(Filter*, LightingType, const Color&, float, float, float, float, float, float, PassRefPtr<LightSource>);
+    FELighting(Filter*, LightingType, const Color&, float, float, float, float, PassRefPtr<LightSource>);
 
     LightingType m_lightingType;
     RefPtr<LightSource> m_lightSource;
@@ -60,8 +60,6 @@
     float m_diffuseConstant;
     float m_specularConstant;
     float m_specularExponent;
-    float m_kernelUnitLengthX;
-    float m_kernelUnitLengthY;
 };
 
 } // namespace blink
diff --git a/Source/platform/graphics/filters/FESpecularLighting.cpp b/Source/platform/graphics/filters/FESpecularLighting.cpp
index 224ce63..b4b3960 100644
--- a/Source/platform/graphics/filters/FESpecularLighting.cpp
+++ b/Source/platform/graphics/filters/FESpecularLighting.cpp
@@ -29,18 +29,16 @@
 namespace blink {
 
 FESpecularLighting::FESpecularLighting(Filter* filter, const Color& lightingColor, float surfaceScale,
-    float specularConstant, float specularExponent, float kernelUnitLengthX,
-    float kernelUnitLengthY, PassRefPtr<LightSource> lightSource)
-    : FELighting(filter, SpecularLighting, lightingColor, surfaceScale, 0, specularConstant, specularExponent, kernelUnitLengthX, kernelUnitLengthY, lightSource)
+    float specularConstant, float specularExponent, PassRefPtr<LightSource> lightSource)
+    : FELighting(filter, SpecularLighting, lightingColor, surfaceScale, 0, specularConstant, specularExponent, lightSource)
 {
 }
 
 PassRefPtrWillBeRawPtr<FESpecularLighting> FESpecularLighting::create(Filter* filter, const Color& lightingColor,
-    float surfaceScale, float specularConstant, float specularExponent,
-    float kernelUnitLengthX, float kernelUnitLengthY, PassRefPtr<LightSource> lightSource)
+    float surfaceScale, float specularConstant, float specularExponent, PassRefPtr<LightSource> lightSource)
 {
     return adoptRefWillBeNoop(new FESpecularLighting(filter, lightingColor, surfaceScale, specularConstant, specularExponent,
-        kernelUnitLengthX, kernelUnitLengthY, lightSource));
+        lightSource));
 }
 
 FESpecularLighting::~FESpecularLighting()
@@ -101,32 +99,6 @@
     return true;
 }
 
-float FESpecularLighting::kernelUnitLengthX() const
-{
-    return m_kernelUnitLengthX;
-}
-
-bool FESpecularLighting::setKernelUnitLengthX(float kernelUnitLengthX)
-{
-    if (m_kernelUnitLengthX == kernelUnitLengthX)
-        return false;
-    m_kernelUnitLengthX = kernelUnitLengthX;
-    return true;
-}
-
-float FESpecularLighting::kernelUnitLengthY() const
-{
-    return m_kernelUnitLengthY;
-}
-
-bool FESpecularLighting::setKernelUnitLengthY(float kernelUnitLengthY)
-{
-    if (m_kernelUnitLengthY == kernelUnitLengthY)
-        return false;
-    m_kernelUnitLengthY = kernelUnitLengthY;
-    return true;
-}
-
 const LightSource* FESpecularLighting::lightSource() const
 {
     return m_lightSource.get();
diff --git a/Source/platform/graphics/filters/FESpecularLighting.h b/Source/platform/graphics/filters/FESpecularLighting.h
index b051de6..1f8c6ac 100644
--- a/Source/platform/graphics/filters/FESpecularLighting.h
+++ b/Source/platform/graphics/filters/FESpecularLighting.h
@@ -30,7 +30,7 @@
 class PLATFORM_EXPORT FESpecularLighting : public FELighting {
 public:
     static PassRefPtrWillBeRawPtr<FESpecularLighting> create(Filter*, const Color&, float, float,
-        float, float, float, PassRefPtr<LightSource>);
+        float, PassRefPtr<LightSource>);
     ~FESpecularLighting() override;
 
     Color lightingColor() const;
@@ -45,19 +45,13 @@
     float specularExponent() const;
     bool setSpecularExponent(float);
 
-    float kernelUnitLengthX() const;
-    bool setKernelUnitLengthX(float);
-
-    float kernelUnitLengthY() const;
-    bool setKernelUnitLengthY(float);
-
     const LightSource* lightSource() const;
     void setLightSource(PassRefPtr<LightSource>);
 
     TextStream& externalRepresentation(TextStream&, int indention) const override;
 
 private:
-    FESpecularLighting(Filter*, const Color&, float, float, float, float, float, PassRefPtr<LightSource>);
+    FESpecularLighting(Filter*, const Color&, float, float, float, PassRefPtr<LightSource>);
 };
 
 } // namespace blink