Changeset 292059 in webkit


Ignore:
Timestamp:
Mar 29, 2022 12:49:08 PM (4 months ago)
Author:
Fujii Hironori
Message:

drop-shadow filter doesn't work correctly in tiled backing layer
https://bugs.webkit.org/show_bug.cgi?id=236800
<rdar://problem/89382612>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/filter-effects/filters-drop-shadow-003-expected.html: Added.
  • web-platform-tests/css/filter-effects/filters-drop-shadow-003.html: Added.

Source/WebCore:

If an element with drop-shadow filter wasn't placed in the
painting rect, the drop-shadow wasn't rendered correctly. This
issue tended to be observed in tiled backing layers becuase each
tile is painted separately. But, not necessary. If an element with
drop-shadow filter was placed in the outside of view, this issue
could arise.

Tests: css3/filters/drop-shadow-in-tiled-backing.html

imported/w3c/web-platform-tests/css/filter-effects/filters-drop-shadow-003.html

  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::beginFilterEffect): If the
drop-shadow is cast to the right direction, dirtyRect needs to be
extended to left direction to calculate targetBoundingBox.

LayoutTests:

  • css3/filters/drop-shadow-in-tiled-backing-expected.html: Added.
  • css3/filters/drop-shadow-in-tiled-backing.html: Added.
  • platform/ios-wk2/TestExpectations:
Location:
trunk
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r292052 r292059  
     12022-03-29  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        drop-shadow filter doesn't work correctly in tiled backing layer
     4        https://bugs.webkit.org/show_bug.cgi?id=236800
     5        <rdar://problem/89382612>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * css3/filters/drop-shadow-in-tiled-backing-expected.html: Added.
     10        * css3/filters/drop-shadow-in-tiled-backing.html: Added.
     11        * platform/ios-wk2/TestExpectations:
     12
    1132022-03-29  Matteo Flores  <matteo_flores@apple.com>
    214
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r292045 r292059  
     12022-03-29  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        drop-shadow filter doesn't work correctly in tiled backing layer
     4        https://bugs.webkit.org/show_bug.cgi?id=236800
     5        <rdar://problem/89382612>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * web-platform-tests/css/filter-effects/filters-drop-shadow-003-expected.html: Added.
     10        * web-platform-tests/css/filter-effects/filters-drop-shadow-003.html: Added.
     11
    1122022-03-29  Antti Koivisto  <antti@apple.com>
    213
  • trunk/LayoutTests/platform/ios-wk2/TestExpectations

    r292033 r292059  
    23262326
    23272327webkit.org/b/233621 http/tests/webgpu [ Skip ]
     2328
     2329webkit.org/b/237849 imported/w3c/web-platform-tests/css/filter-effects/filters-drop-shadow-003.html [ ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r292057 r292059  
     12022-03-29  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        drop-shadow filter doesn't work correctly in tiled backing layer
     4        https://bugs.webkit.org/show_bug.cgi?id=236800
     5        <rdar://problem/89382612>
     6
     7        Reviewed by Simon Fraser.
     8
     9        If an element with drop-shadow filter wasn't placed in the
     10        painting rect, the drop-shadow wasn't rendered correctly. This
     11        issue tended to be observed in tiled backing layers becuase each
     12        tile is painted separately. But, not necessary. If an element with
     13        drop-shadow filter was placed in the outside of view, this issue
     14        could arise.
     15
     16        Tests: css3/filters/drop-shadow-in-tiled-backing.html
     17               imported/w3c/web-platform-tests/css/filter-effects/filters-drop-shadow-003.html
     18
     19        * rendering/RenderLayerFilters.cpp:
     20        (WebCore::RenderLayerFilters::beginFilterEffect): If the
     21        drop-shadow is cast to the right direction, dirtyRect needs to be
     22        extended to left direction to calculate targetBoundingBox.
     23
    1242022-03-29  Chris Dumez  <cdumez@apple.com>
    225
  • trunk/Source/WebCore/rendering/RenderLayerFilters.cpp

    r290872 r292059  
    144144        return nullptr;
    145145
     146    auto expandedDirtyRect = dirtyRect;
     147    if (m_filter->hasFilterThatMovesPixels()) {
     148        auto outsets = m_filter->outsets();
     149        LayoutBoxExtent flippedOutsets { outsets.bottom(), outsets.left(), outsets.top(), outsets.right() };
     150        expandedDirtyRect.expand(flippedOutsets);
     151    }
    146152    // Calculate targetBoundingBox since it will be used if the filter is created.
    147     auto targetBoundingBox = intersection(filterBoxRect, dirtyRect);
     153    auto targetBoundingBox = intersection(filterBoxRect, expandedDirtyRect);
    148154    if (targetBoundingBox.isEmpty())
    149155        return nullptr;
Note: See TracChangeset for help on using the changeset viewer.