Bug 120135 - Setting -webkit-filter: in :active selector causes failure to redraw
Summary: Setting -webkit-filter: in :active selector causes failure to redraw
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
Depends on:
Reported: 2013-08-21 13:41 PDT by Jer Noble
Modified: 2013-08-21 17:14 PDT (History)
8 users (show)

See Also:

Reduced test case (779 bytes, text/html)
2013-08-21 13:41 PDT, Jer Noble
no flags Details
Simpler test (841 bytes, text/html)
2013-08-21 15:52 PDT, Simon Fraser (smfr)
no flags Details
Patch (8.36 KB, patch)
2013-08-21 16:54 PDT, Simon Fraser (smfr)
jer.noble: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2013-08-21 13:41:54 PDT
Created attachment 209300 [details]
Reduced test case

In the attached test case, clicking on the text will add a -webkit-filter to the active element. Releasing the mouse will remove that filter, but the text will not (always) redraw.

It is important that the text is inside a composited parent, which is a sibling of a composited element.
Comment 1 Jer Noble 2013-08-21 13:47:01 PDT
Bisecting shows this occurs as early as http://trac.webkit.org/r122636, and probably earlier.
Comment 2 Simon Fraser (smfr) 2013-08-21 15:43:25 PDT
There is something about being an inline with a filter, which gives you a RenderLayer and, in the test, a compositing layer, and then the filter is removed and the RenderLayer goes away and your enclosing compositing layer doesn't repaint the correct area.

So, in short, this will not be common.
Comment 3 Simon Fraser (smfr) 2013-08-21 15:52:37 PDT
Created attachment 209310 [details]
Simpler test
Comment 4 Simon Fraser (smfr) 2013-08-21 16:24:36 PDT
Ah, we need to do what we do when opacity goes from non-1 to 1 or v.v., which is return true from RenderStyle::changeRequiresLayout().
Comment 5 Simon Fraser (smfr) 2013-08-21 16:54:03 PDT
Created attachment 209314 [details]
Comment 6 Jer Noble 2013-08-21 16:57:46 PDT
Comment on attachment 209314 [details]

r=me.  Nice simple fix.
Comment 7 Simon Fraser (smfr) 2013-08-21 17:14:27 PDT