| Differences between
and this patch
- Source/WebCore/ChangeLog +64 lines
Lines 1-3 Source/WebCore/ChangeLog_sec1
1
2013-02-25  Stephen Chenney  <schenney@chromium.org>
2
3
        feDisplacementMap filter gets color space wrong
4
        https://bugs.webkit.org/show_bug.cgi?id=105929
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Tests: svg/filters/feDisplacementMap-color-interpolation-filters-expected.svg
9
               svg/filters/feDisplacementMap-color-interpolation-filters.svg
10
               svg/filters/feDisplacementMap-filterUnits-expected.svg
11
               svg/filters/feDisplacementMap-filterUnits.svg
12
13
        According to the spec, the SVG feDisplacementMap filter should not
14
        change the color space on its first input, and other vendors seem to
15
        agree that this also means that the output should be in the first
16
        input's color space. That makes sense: we are displacing the input,
17
        not otherwise manipulating colors.
18
19
        This change improves color space handling for filters by more
20
        explicitly tracking which color space is used for the filter's
21
        operation and which is used for the filter's result. It provides a
22
        means for filter effects to override the color-interpolation-filters
23
        property as defined by the spec. feFlood and feDisplacementMap use
24
        this new feature to enforce the spec requirements.
25
26
        * platform/graphics/filters/FEDisplacementMap.cpp:
27
        (WebCore::FEDisplacementMap::setResultColorSpace): Override the default color space with the
28
            same color space as the first input filter.
29
        (WebCore):
30
        (WebCore::FEDisplacementMap::transformResultColorSpace): Only transform the color space on
31
            the second filter input.
32
        (WebCore::FEDisplacementMap::platformApplySoftware): Make the application code more efficient,
33
            and give slightly better numerical accuracy.
34
        * platform/graphics/filters/FEDisplacementMap.h:
35
        (FEDisplacementMap): Declare setResultColorSpace.
36
        * platform/graphics/filters/FEFlood.cpp:
37
        (WebCore::FEFlood::platformApplySoftware): Remove the call that forces
38
            the result color space. We do it now in the setResultColorSpace.
39
        * platform/graphics/filters/FEFlood.h:
40
        (FEFlood): Add setResultColorSPace override that enforces sRGB color space. But not if using
41
            CG, which apparently does this this already internally.
42
        * platform/graphics/filters/FilterEffect.cpp:
43
        (WebCore::FilterEffect::FilterEffect): Rename m_colorSpace to m_operatingColorSpace.
44
        (WebCore::FilterEffect::apply): Allow filter effects to
45
            override the color space conversion of their inputs.
46
        (WebCore::FilterEffect::createImageBufferResult): Always create the
47
            image buffer with the result color space.
48
        * platform/graphics/filters/FilterEffect.h:
49
        (WebCore::FilterEffect::operatingColorSpace): New accessor.
50
        (WebCore::FilterEffect::setOperatingColorSpace): New accessor.
51
        (WebCore::FilterEffect::resultColorSpace): New accessor.
52
        (WebCore::FilterEffect::setResultColorSpace): New accessor.
53
        (FilterEffect):
54
        (WebCore::FilterEffect::transformResultColorSpace): A new virtual
55
            method that allows filter effects individual control over the color
56
            space conversion of their inputs.
57
        * platform/graphics/filters/SourceGraphic.h:
58
        (WebCore::SourceGraphic::SourceGraphic): Variable rename.
59
        * rendering/FilterEffectRenderer.cpp:
60
        (WebCore::FilterEffectRenderer::build): Use accessors to set color
61
            space to enable per-effect overrides.
62
        * rendering/svg/RenderSVGResourceFilter.cpp:
63
        (WebCore::RenderSVGResourceFilter::buildPrimitives): Use accessors to set color.
64
1
2013-02-25  Kentaro Hara  <haraken@chromium.org>
65
2013-02-25  Kentaro Hara  <haraken@chromium.org>
2
66
3
        Unreviewed build fix after r143965.
67
        Unreviewed build fix after r143965.
- Source/WebCore/platform/graphics/filters/FEDisplacementMap.cpp -6 / +24 lines
Lines 88-93 bool FEDisplacementMap::setScale(float s Source/WebCore/platform/graphics/filters/FEDisplacementMap.cpp_sec1
88
    return true;
88
    return true;
89
}
89
}
90
90
91
void FEDisplacementMap::setResultColorSpace(ColorSpace)
92
{
93
    // Spec: The 'color-interpolation-filters' property only applies to the 'in2' source image
94
    // and does not apply to the 'in' source image. The 'in' source image must remain in its
95
    // current color space.
96
    // The result is in that smae color space because it is a displacement of the 'in' image.
97
    FilterEffect::setResultColorSpace(inputEffect(0)->resultColorSpace());
98
}
99
100
void FEDisplacementMap::transformResultColorSpace(FilterEffect* in, const int index)
101
{
102
    // Do not transform the 0th input, as per the spec.
103
    if (index)
104
        in->transformResultColorSpace(operatingColorSpace());
105
}
106
91
void FEDisplacementMap::platformApplySoftware()
107
void FEDisplacementMap::platformApplySoftware()
92
{
108
{
93
    FilterEffect* in = inputEffect(0);
109
    FilterEffect* in = inputEffect(0);
Lines 110-126 void FEDisplacementMap::platformApplySof Source/WebCore/platform/graphics/filters/FEDisplacementMap.cpp_sec2
110
126
111
    Filter* filter = this->filter();
127
    Filter* filter = this->filter();
112
    IntSize paintSize = absolutePaintRect().size();
128
    IntSize paintSize = absolutePaintRect().size();
113
    float scaleX = filter->applyHorizontalScale(m_scale / 255);
129
    float scaleX = filter->applyHorizontalScale(m_scale);
114
    float scaleY = filter->applyVerticalScale(m_scale / 255);
130
    float scaleY = filter->applyVerticalScale(m_scale);
115
    float scaleAdjustmentX = filter->applyHorizontalScale(0.5f - 0.5f * m_scale);
131
    float scaleForColorX = scaleX / 255.0f;
116
    float scaleAdjustmentY = filter->applyVerticalScale(0.5f - 0.5f * m_scale);
132
    float scaleForColorY = scaleY / 255.0f;
133
    float scaledOffsetX = 0.5 - scaleX * 0.5f;
134
    float scaledOffsetY = 0.5 - scaleY * 0.5f;
117
    int stride = paintSize.width() * 4;
135
    int stride = paintSize.width() * 4;
118
    for (int y = 0; y < paintSize.height(); ++y) {
136
    for (int y = 0; y < paintSize.height(); ++y) {
119
        int line = y * stride;
137
        int line = y * stride;
120
        for (int x = 0; x < paintSize.width(); ++x) {
138
        for (int x = 0; x < paintSize.width(); ++x) {
121
            int dstIndex = line + x * 4;
139
            int dstIndex = line + x * 4;
122
            int srcX = x + static_cast<int>(scaleX * srcPixelArrayB->item(dstIndex + m_xChannelSelector - 1) + scaleAdjustmentX);
140
            int srcX = x + static_cast<int>(scaleForColorX * srcPixelArrayB->item(dstIndex + m_xChannelSelector - 1) + scaledOffsetX);
123
            int srcY = y + static_cast<int>(scaleY * srcPixelArrayB->item(dstIndex + m_yChannelSelector - 1) + scaleAdjustmentY);
141
            int srcY = y + static_cast<int>(scaleForColorY * srcPixelArrayB->item(dstIndex + m_yChannelSelector - 1) + scaledOffsetY);
124
            for (unsigned channel = 0; channel < 4; ++channel) {
142
            for (unsigned channel = 0; channel < 4; ++channel) {
125
                if (srcX < 0 || srcX >= paintSize.width() || srcY < 0 || srcY >= paintSize.height())
143
                if (srcX < 0 || srcX >= paintSize.width() || srcY < 0 || srcY >= paintSize.height())
126
                    dstPixelArray->set(dstIndex + channel, static_cast<unsigned char>(0));
144
                    dstPixelArray->set(dstIndex + channel, static_cast<unsigned char>(0));
- Source/WebCore/platform/graphics/filters/FEDisplacementMap.h +3 lines
Lines 50-55 public: Source/WebCore/platform/graphics/filters/FEDisplacementMap.h_sec1
50
    float scale() const;
50
    float scale() const;
51
    bool setScale(float);
51
    bool setScale(float);
52
52
53
    void setResultColorSpace(ColorSpace) OVERRIDE;
54
    virtual void transformResultColorSpace(FilterEffect*, const int) OVERRIDE;
55
53
    virtual void platformApplySoftware();
56
    virtual void platformApplySoftware();
54
    virtual void dump();
57
    virtual void dump();
55
58
- Source/WebCore/platform/graphics/filters/FEFlood.cpp -3 lines
Lines 78-86 void FEFlood::platformApplySoftware() Source/WebCore/platform/graphics/filters/FEFlood.cpp_sec1
78
78
79
    Color color = colorWithOverrideAlpha(floodColor().rgb(), floodOpacity());
79
    Color color = colorWithOverrideAlpha(floodColor().rgb(), floodOpacity());
80
    resultImage->context()->fillRect(FloatRect(FloatPoint(), absolutePaintRect().size()), color, ColorSpaceDeviceRGB);
80
    resultImage->context()->fillRect(FloatRect(FloatPoint(), absolutePaintRect().size()), color, ColorSpaceDeviceRGB);
81
    // feFlood does not perform color interpolation of any kind, so the result is always in ColorSpaceDeviceRGB
82
    // regardless of the value of color-interpolation-filters.
83
    setResultColorSpace(ColorSpaceDeviceRGB);
84
}
81
}
85
82
86
void FEFlood::dump()
83
void FEFlood::dump()
- Source/WebCore/platform/graphics/filters/FEFlood.h +7 lines
Lines 39-44 public: Source/WebCore/platform/graphics/filters/FEFlood.h_sec1
39
    float floodOpacity() const;
39
    float floodOpacity() const;
40
    bool setFloodOpacity(float);
40
    bool setFloodOpacity(float);
41
41
42
#if !USE(CG)
43
    // feFlood does not perform color interpolation of any kind, so the result is always in ColorSpaceDeviceRGB
44
    // regardless of the value of color-interpolation-filters.
45
    void setOperatingColorSpace(ColorSpace) OVERRIDE { FilterEffect::setResultColorSpace(ColorSpaceDeviceRGB); }
46
    void setResultColorSpace(ColorSpace) OVERRIDE { FilterEffect::setResultColorSpace(ColorSpaceDeviceRGB); }
47
#endif
48
42
    virtual void platformApplySoftware();
49
    virtual void platformApplySoftware();
43
#if ENABLE(OPENCL)
50
#if ENABLE(OPENCL)
44
    virtual bool platformApplyOpenCL();
51
    virtual bool platformApplyOpenCL();
- Source/WebCore/platform/graphics/filters/FilterEffect.cpp -4 / +4 lines
Lines 44-50 FilterEffect::FilterEffect(Filter* filte Source/WebCore/platform/graphics/filters/FilterEffect.cpp_sec1
44
    , m_hasWidth(false)
44
    , m_hasWidth(false)
45
    , m_hasHeight(false)
45
    , m_hasHeight(false)
46
    , m_clipsToBounds(true)
46
    , m_clipsToBounds(true)
47
    , m_colorSpace(ColorSpaceLinearRGB)
47
    , m_operatingColorSpace(ColorSpaceLinearRGB)
48
    , m_resultColorSpace(ColorSpaceDeviceRGB)
48
    , m_resultColorSpace(ColorSpaceDeviceRGB)
49
{
49
{
50
    ASSERT(m_filter);
50
    ASSERT(m_filter);
Lines 127-137 void FilterEffect::apply() Source/WebCore/platform/graphics/filters/FilterEffect.cpp_sec2
127
            return;
127
            return;
128
128
129
        // Convert input results to the current effect's color space.
129
        // Convert input results to the current effect's color space.
130
        in->transformResultColorSpace(m_colorSpace);
130
        transformResultColorSpace(in, i);
131
    }
131
    }
132
132
133
    determineAbsolutePaintRect();
133
    determineAbsolutePaintRect();
134
    m_resultColorSpace = m_colorSpace;
134
    setResultColorSpace(m_operatingColorSpace);
135
135
136
    if (!isFilterSizeValid(m_absolutePaintRect))
136
    if (!isFilterSizeValid(m_absolutePaintRect))
137
        return;
137
        return;
Lines 428-434 ImageBuffer* FilterEffect::createImageBu Source/WebCore/platform/graphics/filters/FilterEffect.cpp_sec3
428
    ASSERT(!hasResult());
428
    ASSERT(!hasResult());
429
    if (m_absolutePaintRect.isEmpty())
429
    if (m_absolutePaintRect.isEmpty())
430
        return 0;
430
        return 0;
431
    m_imageBufferResult = ImageBuffer::create(m_absolutePaintRect.size(), 1, m_colorSpace, m_filter->renderingMode());
431
    m_imageBufferResult = ImageBuffer::create(m_absolutePaintRect.size(), 1, m_resultColorSpace, m_filter->renderingMode());
432
    if (!m_imageBufferResult)
432
    if (!m_imageBufferResult)
433
        return 0;
433
        return 0;
434
    ASSERT(m_imageBufferResult->context());
434
    ASSERT(m_imageBufferResult->context());
- Source/WebCore/platform/graphics/filters/FilterEffect.h -5 / +7 lines
Lines 164-178 public: Source/WebCore/platform/graphics/filters/FilterEffect.h_sec1
164
    bool clipsToBounds() const { return m_clipsToBounds; }
164
    bool clipsToBounds() const { return m_clipsToBounds; }
165
    void setClipsToBounds(bool value) { m_clipsToBounds = value; }
165
    void setClipsToBounds(bool value) { m_clipsToBounds = value; }
166
166
167
    ColorSpace colorSpace() const { return m_colorSpace; }
167
    ColorSpace operatingColorSpace() const { return m_operatingColorSpace; }
168
    void setColorSpace(ColorSpace colorSpace) { m_colorSpace = colorSpace; }
168
    virtual void setOperatingColorSpace(ColorSpace colorSpace) { m_operatingColorSpace = colorSpace; }
169
    ColorSpace resultColorSpace() const { return m_resultColorSpace; }
170
    virtual void setResultColorSpace(ColorSpace colorSpace) { m_resultColorSpace = colorSpace; }
171
172
    virtual void transformResultColorSpace(FilterEffect* in, const int) { in->transformResultColorSpace(m_operatingColorSpace); }
169
    void transformResultColorSpace(ColorSpace);
173
    void transformResultColorSpace(ColorSpace);
170
174
171
protected:
175
protected:
172
    FilterEffect(Filter*);
176
    FilterEffect(Filter*);
173
177
174
    void setResultColorSpace(ColorSpace colorSpace) { m_resultColorSpace = colorSpace; }
175
176
    ImageBuffer* createImageBufferResult();
178
    ImageBuffer* createImageBufferResult();
177
    Uint8ClampedArray* createUnmultipliedImageResult();
179
    Uint8ClampedArray* createUnmultipliedImageResult();
178
    Uint8ClampedArray* createPremultipliedImageResult();
180
    Uint8ClampedArray* createPremultipliedImageResult();
Lines 226-232 private: Source/WebCore/platform/graphics/filters/FilterEffect.h_sec2
226
    // Should the effect clip to its primitive region, or expand to use the combined region of its inputs.
228
    // Should the effect clip to its primitive region, or expand to use the combined region of its inputs.
227
    bool m_clipsToBounds;
229
    bool m_clipsToBounds;
228
230
229
    ColorSpace m_colorSpace;
231
    ColorSpace m_operatingColorSpace;
230
    ColorSpace m_resultColorSpace;
232
    ColorSpace m_resultColorSpace;
231
};
233
};
232
234
- Source/WebCore/platform/graphics/filters/SourceGraphic.h -1 / +1 lines
Lines 49-55 private: Source/WebCore/platform/graphics/filters/SourceGraphic.h_sec1
49
    SourceGraphic(Filter* filter)
49
    SourceGraphic(Filter* filter)
50
        : FilterEffect(filter)
50
        : FilterEffect(filter)
51
    {
51
    {
52
        setColorSpace(ColorSpaceDeviceRGB);
52
        setOperatingColorSpace(ColorSpaceDeviceRGB);
53
    }
53
    }
54
};
54
};
55
55
- Source/WebCore/rendering/FilterEffectRenderer.cpp -1 / +1 lines
Lines 363-369 bool FilterEffectRenderer::build(RenderO Source/WebCore/rendering/FilterEffectRenderer.cpp_sec1
363
        if (effect) {
363
        if (effect) {
364
            // Unlike SVG, filters applied here should not clip to their primitive subregions.
364
            // Unlike SVG, filters applied here should not clip to their primitive subregions.
365
            effect->setClipsToBounds(false);
365
            effect->setClipsToBounds(false);
366
            effect->setColorSpace(ColorSpaceDeviceRGB);
366
            effect->setOperatingColorSpace(ColorSpaceDeviceRGB);
367
            
367
            
368
            if (filterOperation->getOperationType() != FilterOperation::REFERENCE) {
368
            if (filterOperation->getOperationType() != FilterOperation::REFERENCE) {
369
                effect->inputEffects().append(previousEffect);
369
                effect->inputEffects().append(previousEffect);
- Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp -2 / +2 lines
Lines 121-128 PassRefPtr<SVGFilterBuilder> RenderSVGRe Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp_sec1
121
        builder->appendEffectToEffectReferences(effect, effectElement->renderer());
121
        builder->appendEffectToEffectReferences(effect, effectElement->renderer());
122
        effectElement->setStandardAttributes(effect.get());
122
        effectElement->setStandardAttributes(effect.get());
123
        effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilterPrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnits(), targetBoundingBox));
123
        effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilterPrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnits(), targetBoundingBox));
124
        effect->setColorSpace(effectElement->renderer()->style()->svgStyle()->colorInterpolationFilters() == CI_LINEARRGB
124
        effect->setOperatingColorSpace(
125
                ? ColorSpaceLinearRGB : ColorSpaceDeviceRGB);
125
            effectElement->renderer()->style()->svgStyle()->colorInterpolationFilters() == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceDeviceRGB);
126
        builder->add(effectElement->result(), effect);
126
        builder->add(effectElement->result(), effect);
127
    }
127
    }
128
    return builder.release();
128
    return builder.release();
- LayoutTests/ChangeLog +27 lines
Lines 1-3 LayoutTests/ChangeLog_sec1
1
2013-02-25  Stephen Chenney  <schenney@chromium.org>
2
3
        feDisplacementMap filter gets color space wrong
4
        https://bugs.webkit.org/show_bug.cgi?id=105929
5
6
        Reviewed by NOBODY (OOPS!).
7
8
       Add two new feDisplacementMap tests to get better coverage. And update some results.
9
10
        * platform/chromium-linux/svg/W3C-SVG-1.1/filters-displace-01-f-expected.png:
11
        * platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-in-attr-expected.png:
12
        * platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-in2-attr-expected.png:
13
        * platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-scale-attr-expected.png:
14
        * platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-xChannelSelector-attr-expected.png:
15
        * platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-yChannelSelector-attr-expected.png:
16
        * platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-in-prop-expected.png:
17
        * platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-in2-prop-expected.png:
18
        * platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-scale-prop-expected.png:
19
        * platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-xChannelSelector-prop-expected.png:
20
        * platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-yChannelSelector-prop-expected.png:
21
        * platform/chromium-linux/svg/filters/feDisplacementMap-expected.png:
22
        * platform/chromium-linux/svg/filters/filterRes-expected.png:
23
        * svg/filters/feDisplacementMap-color-interpolation-filters-expected.svg: Added.
24
        * svg/filters/feDisplacementMap-color-interpolation-filters.svg: Added.
25
        * svg/filters/feDisplacementMap-filterUnits-expected.svg: Added.
26
        * svg/filters/feDisplacementMap-filterUnits.svg: Added.
27
1
2013-02-25  Eric Seidel  <eric@webkit.org>
28
2013-02-25  Eric Seidel  <eric@webkit.org>
2
29
3
        Move html5lib/run-test* into html5lib/generated in preparation for generating these harnesses
30
        Move html5lib/run-test* into html5lib/generated in preparation for generating these harnesses
- LayoutTests/svg/filters/feDisplacementMap-color-interpolation-filters-expected.svg +4 lines
Line 0 LayoutTests/svg/filters/feDisplacementMap-color-interpolation-filters-expected.svg_sec1
1
<svg version="1.2" width="600" height="300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
  <rect fill="rgb(50%,50%,50%)" stroke="green" x="50" y="50" width="200" height="200"/>
3
  <rect fill="rgb(50%,50%,50%)" stroke="green" x="350" y="50" width="200" height="200"/>
4
</svg>
0
  + LF
5
  + LF
- LayoutTests/svg/filters/feDisplacementMap-color-interpolation-filters.svg +18 lines
Line 0 LayoutTests/svg/filters/feDisplacementMap-color-interpolation-filters.svg_sec1
1
<svg version="1.2" width="600" height="300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
  <defs>
3
    <filter id="sRGB" filterUnits="objectBoundingBox" primitiveUnits="userSpaceOnUse" x="0" y="0" width="1" height="1">
4
      <feFlood flood-color="rgb(50%,50%,50%)" flood-opacity="1.0" x="50" y="50" height="200" width="200" result="grey-input"/>
5
      <feFlood flood-color="rgb(50%,50%,50%)" flood-opacity="1.0" x="50" y="50" width="200" height="200" result="displacement-map"/>
6
      <feDisplacementMap color-interpolation-filters="sRGB" scale ="1.0" in="grey-input" in2="displacement-map" xChannelSelector="R" yChannelSelector="G"/>
7
    </filter>
8
    <filter id="linearRGB" filterUnits="objectBoundingBox" primitiveUnits="userSpaceOnUse" x="0" y="0" width="1" height="1">
9
      <feFlood flood-color="rgb(50%,50%,50%)" flood-opacity="1.0" x="350" y="50" height="200" width="200" result="grey-input"/>
10
      <feFlood flood-color="rgb(187,187,187)" flood-opacity="1.0" x="350" y="50" width="200" height="200" result="displacement-map"/>
11
      <feDisplacementMap color-interpolation-filters="linearRGB" scale ="1.0" in="grey-input" in2="displacement-map" xChannelSelector="R" yChannelSelector="G"/>
12
    </filter>
13
  </defs>
14
  <rect filter="url(#sRGB)" fill="none" stroke="green" x="50" y="50" width="200" height="200"/>
15
  <rect fill="none" stroke="green" x="50" y="50" width="200" height="200"/>
16
  <rect filter="url(#linearRGB)" fill="none" stroke="green" x="350" y="50" width="200" height="200"/>
17
  <rect fill="none" stroke="green" x="350" y="50" width="200" height="200"/>
18
</svg>
0
  + LF
19
  + LF
- LayoutTests/svg/filters/feDisplacementMap-filterUnits-expected.svg +9 lines
Line 0 LayoutTests/svg/filters/feDisplacementMap-filterUnits-expected.svg_sec1
1
<svg version="1.2" width="500" height="300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
  <rect fill="rgb(50%,50%,50%)" stroke="green" x="20" y="20" width="75" height="75"/>
3
  <rect fill="rgb(50%,50%,50%)" stroke="green" x="186" y="20" width="54" height="75"/>
4
  <rect fill="rgb(50%,50%,50%)" stroke="green" x="304" y="64" width="56" height="56"/>
5
6
  <rect fill="rgb(50%,50%,50%)" stroke="green" x="44" y="164" width="76" height="76"/>
7
  <rect fill="rgb(50%,50%,50%)" stroke="green" x="140" y="140" width="75" height="75"/>
8
  <rect fill="rgb(50%,50%,50%)" stroke="green" x="287" y="167" width="73" height="73"/>
9
</svg>
0
  + LF
10
  + LF
- LayoutTests/svg/filters/feDisplacementMap-filterUnits.svg +49 lines
Line 0 LayoutTests/svg/filters/feDisplacementMap-filterUnits.svg_sec1
1
<svg version="1.2" width="500" height="300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
  <defs>
3
    <filter id="oBBoBBWhiteScale" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
4
      <feFlood flood-color="rgb(50%,50%,50%)" flood-opacity="1.0" x="0" y="0" height="1" width="1" result="grey-input"/>
5
      <feFlood flood-color="rgb(100%,100%,0%)" flood-opacity="1.0" x="0" y="0" width="1" height="1" result="displacement-map"/>
6
      <feDisplacementMap x="0" y="0" width="1" height="1" scale ="0.5" in="grey-input" in2="displacement-map" xChannelSelector="R" yChannelSelector="G"/>
7
    </filter>
8
    <filter id="oBBoBBLight" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
9
      <feFlood flood-color="rgb(50%,50%,50%)" flood-opacity="1.0" x="0" y="0" height="1" width="1" result="grey-input"/>
10
      <feFlood flood-color="rgb(0%,0%,19%)" flood-opacity="0.75" x="0" y="0" width="1" height="1" result="displacement-map"/>
11
      <feDisplacementMap x="0" y="0" width="1" height="1" scale ="1.0" in="grey-input" in2="displacement-map" xChannelSelector="B" yChannelSelector="A"/>
12
    </filter>
13
    <filter id="oBBoBBDark" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
14
      <feFlood flood-color="rgb(50%,50%,50%)" flood-opacity="1.0" x="0" y="0" height="1" width="1" result="grey-input"/>
15
      <feFlood flood-color="rgb(25%,100%,25%)" flood-opacity="1.0" x="0" y="0" width="1" height="1" result="displacement-map"/>
16
      <feDisplacementMap x="0" y="0" width="1" height="1" scale ="1.0" in="grey-input" in2="displacement-map" xChannelSelector="R" yChannelSelector="B"/>
17
    </filter>
18
19
    <filter id="USOUOBBBlackScale" filterUnits="userSpaceOnUse" primitiveUnits="objectBoundingBox" x="20" y="140" width="100" height="100">
20
      <feFlood flood-color="rgb(50%,50%,50%)" flood-opacity="1.0" x="0" y="0" height="1" width="1" result="grey-input"/>
21
      <feFlood flood-color="rgb(100%,0%,0%)" flood-opacity="1.0" x="0" y="0" width="1" height="1" result="displacement-map"/>
22
      <feDisplacementMap x="0" y="0" width="1" height="1" scale ="0.5" in="grey-input" in2="displacement-map" xChannelSelector="G" yChannelSelector="B"/>
23
    </filter>
24
    <filter id="OBBUSOUWhite" filterUnits="objectBoundingBox" primitiveUnits="userSpaceOnUse" x="0" y="0" width="1" height="1">
25
      <feFlood flood-color="rgb(50%,50%,50%)" flood-opacity="1.0" x="140" y="140" height="100" width="100" result="grey-input"/>
26
      <feFlood flood-color="rgb(100%,100%,50%)" flood-opacity="1.0" x="140" y="140" width="100" height="100" result="displacement-map"/>
27
      <feDisplacementMap x="140" y="140" height="100" width="100" scale ="50.0" in="grey-input" in2="displacement-map" xChannelSelector="R" yChannelSelector="G"/>
28
    </filter>
29
    <filter id="USOUUSOUGrey" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse" x="260" y="140" width="100" height="100">
30
      <feFlood flood-color="rgb(50%,50%,50%)" flood-opacity="1.0" x="260" y="140" height="100" width="100" result="grey-input"/>
31
      <feFlood flood-color="rgb(50%,50%,50%)" flood-opacity="1.0" x="260" y="140" width="100" height="100" result="displacement-map"/>
32
      <feDisplacementMap x="260" y="140" width="100" height="100" scale ="100" in="grey-input" in2="displacement-map" xChannelSelector="R" yChannelSelector="G"/>
33
    </filter>
34
  </defs>
35
36
  <rect filter="url(#oBBoBBWhiteScale)" fill="none" stroke="none" x="20" y="20" width="100" height="100"/>
37
  <rect fill="none" stroke="green" x="20" y="20" width="75" height="75"/>
38
  <rect filter="url(#oBBoBBLight)" fill="none" stroke="none" x="140" y="20" width="100" height="100"/>
39
  <rect fill="none" stroke="green" x="186" y="20" width="54" height="75"/>
40
  <rect filter="url(#oBBoBBDark)" fill="none" stroke="none" x="260" y="20" width="100" height="100"/>
41
  <rect fill="none" stroke="green" x="304" y="64" width="56" height="56"/>
42
43
  <rect filter="url(#USOUOBBBlackScale)" fill="none" stroke="green" x="20" y="140" width="100" height="100"/>
44
  <rect fill="none" stroke="green" x="44" y="164" width="76" height="76"/>
45
  <rect filter="url(#OBBUSOUWhite)" fill="none" stroke="none" x="140" y="140" width="100" height="100"/>
46
  <rect fill="none" stroke="green" x="140" y="140" width="75" height="75"/>
47
  <rect filter="url(#USOUUSOUGrey)" fill="none" stroke="none" x="260" y="140" width="100" height="100"/>
48
  <rect fill="none" stroke="green" x="287" y="167" width="73" height="73"/>
49
</svg>
0
  + LF
50
  + LF
- LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-displace-01-f-expected.png +1 lines
Line 33 LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-displace-01-f-expected.png_sec1
6
eWXOQWnU6dOTzzxRMwd0R4+trS01NfX//zzzytWrJgzZ87ZZ58N9NGnT58nnnhi79695v1mjF16
Line 7 LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-displace-01-f-expected.png_sec2
- LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-in-attr-expected.png +11 lines
Line 10 LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-in-attr-expected.png_sec1
8
/2GQ1B8ULouqggfDAYL7x/D/hS6Qq8AAAAwuewJsAxHUEZaz0nTNGVnLozuGEZrNiuFGOTELLNE
9
vp6jp+8Xm82m5UDkUQiIcdP8hKESs4770BDO0omeOFFGZT7BOldHKtFo9FQKGS2mKC8KCFnhlGN
10
FgsJhcppdE12lNZOjqRSHg8HhozSyQSx44d03epvj8BAACgONkTYBlGHhb1nPT7c5pRSUkJhSwc
11
vp4UkzJ5pbz3w1v6GtubqYHHo9HjnLMzkTOstcvlWOR1U63CspVvuQ3msVzvDgjj+Hp5xzlUzWM
Line 9 LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-in-attr-expected.png_sec2
9
v5kytI9AAAAMLnsCbB48WPCgYLhEjQW9bGOHTsmJ11RBVElKKEBHp/PR/twzhYls6dSKZqMo50L
10
IPZf4KOxYR1yEi///aemF2/PoAz1CiT3Pv7+7/85S+XlZWtWrUqHA7Txl/96ldlZWU33XQT5Rl8
11
s3swg03yubOndvW1jY0NPTGG2+Ul5eP7kCVlZVCiD//+c+0g3wVBX4cMsO+NesHQ5TY4bzTSf/7
12
3HZ3INzr5uvXzdff+e7d3b8vGNEuxF9m/cVQlRZqg5lHxJCHMo+VFFVEfJwyPPBz2cXZo9oN6KO
13
63z+i3x+AXwm9O6gvXQPc7j96bad1UDvxNRUVFRUVG/dRa/Lzx+AfxuPUAvEQIAANwbFFgAAACS
14
/bs7GyDwXD69Gmbi5EO2+vEtaorfRaLpU4dBye59X5pjVvt/t7Lt75J5OTjxUn35jwEgPtOzW7T
15
80334yNjbVpaZ+k1n5pzc/s2bPT09P9/Py6d++ufHSx2vfvO9wvneOrJSEhITo62s/Pb/ny5atW
- LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-scale-attr-expected.png +1 lines
Line 7 LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-scale-attr-expected.png_sec1
Line 5 LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-scale-attr-expected.png_sec2
Line 79 LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-scale-attr-expected.png_sec3
3
T+/CqkYfL3d2LFjrVZrRkbG6dOnrVZrQUGBeXzMmDGLFi1Sv0w6MjJy9OjR5vs1imdlZWkXk1Tm
- LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-in2-prop-expected.png +6 lines
Line 3 LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-in2-prop-expected.png_sec1
6
t3k/cmlNaWlNaWzPpu187udk3tPvr/r/UKIeqX+QN4BIcSBvAN19XVhLcMGhA7IK8ub3HtyE1MT
Line 5 LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-in2-prop-expected.png_sec2
7
+lw/S4gIMChWYcFvfoOPdFbduj5mTNnfHx8Lly4oNXR67/bedBjPPMOz+7YseP8+fMeNltQcDln
8
Pi0tLRNmzZFRUUFBQUZty+Lh8ehh35R+xcA0FANu01DpbVy1792CSGKny9WZigfxH0ghNhyeotN
9
Pj4mM3mu+66y5P6erey9PAWl1pNk8nk4+MzZMiQH3/8sWE9lsHz3gruIAAA+P3RDViF0wvVBWWG
10
4B14cKF1q1bNy5g6W3XwxZqamp8fX2Nx+Vy/o33OwAAjSDny54rrZW7/rVLCFH8fLEyQ/kg7gMh
11
+8XLlx4vTsCAAAc6V0ibHqN+4EG0U7MELAAAPgVIWD9ol35LToBAMC1x3cRAgAASEbAAgAAkIyA
- LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-in-prop-expected.png +4 lines
Line 4 LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-in-prop-expected.png_sec1
1
tukQ6WHNv2/TXdH3q32PG47vuCbBWsOrLE77G/e/eb4G8cbt3u0adOm0aNH2+32tm3btmvXbvXq
2
YsWLfI6uN5+6c1PUlLSokWL1Fts8+bNa/ZONXs+7Xb7xx9/PGjQIB/7u8y/3n4BACCd0cc0qAum
3
UuPA8ZHxQshahtqjbert19NnQcAAPAHZxSw9K7xqEwzTeo9Mq19+d3LzX7mmLdiXvj8hdLqUh/H
4
1OmmaYxmWMm9p6Y/2S+L0O575fc/gAA4HfvvN5FqF6zUW+QqcJDwhcOX7jv0X22etuUj6Y0b9iA
- LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-xChannelSelector-prop-expected.png +11 lines
Line 4 LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-xChannelSelector-prop-expected.png_sec1
985
mqv13vzzTcbXRaHzbF8+nJxyo21NzLG+tJ9fEr8bHz7ie02Zvt5w88zWkZc+A8H/sAY++vFf+1y
986
13VTmZ8N8PDl5xVVla6PP7tdntD58fljDnvuMDAwKqqKnXTXbp0adAmZPTT7nbXaAuylsbHvyzb
987
PgPP/ywdevWajLqVtasWaMuFxYW9u3b1yB5vaqqqubNmx85cqRjx441NTURERFbt26Ni4vTGgjP
988
vatoooiW70t+0z2yM9Ghlsv3hG8t+29f7nvL4t2L5r1/awLNRcu1FyY+s3UL45+8cydzzzc6WEh
989
KrsVVrktW2vqcHMQ5n6lh/s+kD9zPs7/3gn7J2wsHfCUr5IqbXXaj3LXpImIzn+GzE/zhGXO07/
990
d69exvXj6y97Hhw7kH14osvLlq0SF1euHDh2LFj9e379u27bNmyioqKTZs2Oa/rkN60adNOnz59
991
Pj4Bq17bZLVUe7fIlQmKvY37EseXhIZHCkuvT8ohIhbFHeg6IAQIjPn328JRQZHzh4wO2tMVllt
992
CJ1QZmorB62eknWklvm3qJG3nrgLSGEfxP/Wnvt50c+11Z5JOOR9Oz0WQNmFfyxICEmoaS6xDju
993
5Wfw8wDcO186+J8VDEPetfO8QkT3cgFFuetinkArh2cjyrmATc8nkUIAMA1pFmzZhYnzZo1u9p5
994
lhjF8a+9uVrRRVF2uqyuMyIESMGDx5ss9nOnDnzpz/9qbT04ruQiuSxSi+99JLVas3Ly/v555+t
995
POf//zNN9+88cYb+sb6PjUffPDBiBEjQkJCxo0bN2LECIeWzknKxiWbn5kzZx45ciQsLKx///7q
- LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-yChannelSelector-prop-expected.png +12 lines
Line 3 LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-yChannelSelector-prop-expected.png_sec1
3
Xw+XiLL7/dLq4+0PhYAAAAUlYJ0EeZfz4limrq6OnF8G03TjHLVxcwk3u+WSCSoCYrppdvnzA0X
Line 36 LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-yChannelSelector-prop-expected.png_sec2
5
/nozvzUamtrOzo6xKcOpRqkiUSCrzcz1AAAIABJREFUajdQT6LT6TRvrgMAAIAiUajBnm3KGDUU
6
Van05nNZvOvfwEAAADjyfoAK5FIUGBBUYvUHUaRk1iynCqbU8xBQQYPs3TTjKjFSy2SzjsZeRkq
7
bDQbLhrTy2XJb6w5RrCmfcwEurotNlslFbFj58Hjl6v1+FwqMMvivXumdChyVu8eCF4ca3CFVMF
8
FC/Id+CVeeru7x0ggAAAFAkCpvQM9J6TiNdPpPJMMay2Sx1yVHeFX/AkAnp6vSMoXmOlxToJJNJ
9
MEPfqBp2vbt26+66ipN0wYGBvjcdDot7mJgYODxxx9fuXIlTezr69NdMpPJ0Ov+/n4+cfbs2b29
10
Fb3zo70AIw2PsZPHRFvItm2bduNN96oadpNN920bds2cdbNN9/80EMP5X9UJovlnPXEE0/ceeed
11
ew95w8IXHQsDrDo+R3yzDPPiLNef/312bNnG60ozhV97nOf+8tf/kKvY7EYY4z+b6Rp2g033PCr
12
j/39Pf09Pc88MYD4kdaG/4Af2/H9872ne3p7/mnV/+JPcD+8eV/pLlZLbuvcx97gC19dKnzO87O
13
NFHHy0tLb3jjjtsNhtjzGaz0QvpdTabvffee/1+fyAQ+OUvf2kycWBg4Atf+EJpaeny5ctDoZDu
14
+47Yd5YjKWkpBw+fDgzMzMvL2/UqFHaQK7M1mXz5rz1+Pj45OTksrKyrKwsPz+/0tLShvVj3N4l
15
9C/9PmLQ7f6H7XeLFMs+r/IIMvfYFz1nQcAAPArZ0lMTHT5wMqVK69wKgAAANeXpKQkl3H+kjsA
- LayoutTests/platform/chromium-linux/svg/filters/filterRes-expected.png +2 lines
Line 1 LayoutTests/platform/chromium-linux/svg/filters/filterRes-expected.png_sec1
6
sVB7SCfzA9qB/NJtURzmYdlYBVZX8qSTE0ymVtf0+rPe94OZsUynqU8m5Q7CgHgriKwPqkPPvjg
7
SMA3F0E1tPL8XZJ3/nOd7iF8NlbA2t3/NVuACtLq4YUUZtayCJaM1nMFjbJihWXF/NJdZIdzPte

Return to Bug 105929