Commit ab0bcf22 authored by longsonr's avatar longsonr Committed by longsonr@gmail.com
Browse files

Bug 1964158 - If a filter is not valid, return the original dirty region r=emilio

parent 13387e6e
Loading
Loading
Loading
Loading
+1 −1
Changes for layout/svg/FilterInstance.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -1490,7 +1490,7 @@ nsRegion FilterInstance::GetPreFilterNeededArea(
                          /* InputIsTainted */ true, nullptr, tm,
                          &aPostFilterDirtyRegion);
  if (!instance.IsInitialized()) {
    return nsRect();
    return aPostFilterDirtyRegion;
  }

  // Now we can ask the instance to compute the area of the source
+14 −0
Changes for testing/web-platform/tests/css/filter-effects/zero-width-filter.html: 14 added lines, 0 removed lines.
Original line number Diff line number Diff line
<!DOCTYPE html>
<title>zero width filters are ignored</title>
<link rel="help" href="https://www.w3.org/TR/filter-effects-1/#filter-region">
<link rel="match" href="reference/green-100x100.html">
<svg width="200" height="200">
  <defs>
    <rect id="r" width="100" height="100" fill="green"/>
    <filter x="0" y="0" id="f_off" width="0" height="0">
      <feOffset/>
    </filter>
  </defs>
  <rect width="100" height="100" fill="red"/>
  <use style="filter:url(#f_off)" href="#r"/>
</svg>