Bug 120135

Summary: Setting -webkit-filter: in :active selector causes failure to redraw
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dino, esprehn+autocc, glenn, kondapallykalyan, krit, simon.fraser, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Reduced test case
none
Simpler test
none
Patch jer.noble: review+

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]
Patch
Comment 6 Jer Noble 2013-08-21 16:57:46 PDT
Comment on attachment 209314 [details]
Patch

r=me.  Nice simple fix.
Comment 7 Simon Fraser (smfr) 2013-08-21 17:14:27 PDT
https://trac.webkit.org/r154430