Skip to content
  • schenney@chromium.org's avatar
    SVG Filter Effect sub-region not applied for some filters · 7fc37892
    schenney@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=89767
    
    Reviewed by Dirk Schulze.
    
    Source/WebCore: 
    
    The filter effect region for SVG feGaussian and feDropShadow filters
    was incorrectly set, failing to account for the radius of the blur.
    This patch fixes the problem and removes an unneccessary clip
    operation when the filter result is blitted into the target. That clip
    was clipping the shadow from webkit-shadow.
    
    Tests: svg/filters/feDropShadow-subregion.svg
           svg/filters/feGaussianBlur-subregion.svg
    
    * platform/graphics/filters/FEDropShadow.cpp:
    (WebCore::FEDropShadow::determineAbsolutePaintRect): Moved the code
    that clips the paint rect by the filter effect subregion to come after
    the paint is modified by the filter radius.
    * platform/graphics/filters/FEGaussianBlur.cpp:
    (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
    Moved the code that clips the paint rect by the filter effect subregion to
    come after the paint is modified by the filter radius.
    * rendering/svg/RenderSVGResourceFilter.cpp:
    (WebCore::RenderSVGResourceFilter::postApplyResource):
    Removed a clip that is unnecessary and that was incorrectly clipping drop shadows.
    
    LayoutTests: 
    
    The filter effect region for SVG feGaussian and feDropShadow filters was incorrectly set,
    failing to account for the radius of the blur. This patch fixes the problem and removes an
    unneccessary clip operation when the filter result is blitted into the target. That clip
    was clipping the shadow from webkit-shadow.
    
    * platform/chromium/TestExpectations: Added temp entries for affected
    tests. Will rebaseline later (not closing the bug in the meantime).
    * svg/filters/feDropShadow-subregion-expected.png: Added.
    * svg/filters/feDropShadow-subregion-expected.txt: Added.
    * svg/filters/feDropShadow-subregion.svg: This verifies the subregion for feDropShadow.
    * svg/filters/feGaussianBlur-subregion-expected.png: Added.
    * svg/filters/feGaussianBlur-subregion-expected.txt: Added.
    * svg/filters/feGaussianBlur-subregion.svg: This verifies the subregion for feGaussianBlur.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7fc37892