Setting -webkit-filter: in :active selector causes failure to redraw
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Aug 2013 00:15:08 +0000 (00:15 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Aug 2013 00:15:08 +0000 (00:15 +0000)
commiteb57fb018a7ae0db2393c3f32295ff112bbb4b27
tree8ce7b944b6aa86c16033e99b6577960dc0c53ca4
parent5409f2399a6b0d493bd7bf3179a347ac11195f89
Setting -webkit-filter: in :active selector causes failure to redraw
https://bugs.webkit.org/show_bug.cgi?id=120135

Source/WebCore:

Reviewed by Jer Noble.

When removing a filter on an inline child of a compositing layer,
the inline loses its RenderLayer and compositing layer, but we fail to
repaint the compositing layer that the inline is now painting into.

This worked correctly for opacity, because opacity toggles cause
layouts (which then paint the correct layer), so do the same for filters.

Test: css3/filters/remove-filter-repaint.html

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout): Return true if we toggled
between having filters and not. Drive-by cleanup, making use of new convenience
function for hasOpacity().
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::hasFilters): Returns true if we have any
filters.
* rendering/style/StyleRareNonInheritedData.h:
(WebCore::StyleRareNonInheritedData::hasOpacity): Convenience function that
returns true if opacity is < 1.

LayoutTests:

Reviewed by Jer Noble.

Ref test for removing a filter on an inline.

* css3/filters/remove-filter-repaint-expected.html: Added.
* css3/filters/remove-filter-repaint.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/filters/remove-filter-repaint-expected.html [new file with mode: 0644]
LayoutTests/css3/filters/remove-filter-repaint.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
Source/WebCore/rendering/style/StyleRareNonInheritedData.h