Created attachment 638175 [details]
Repainting issue on Youtube html5 player
Please check attachment for more info:
Video control on html5 video repaint to often on Youtube player:
Step to reproduce:
Enable Html5 video on page:
Open example video:
look at the video controls button:
Confirmed - setting to New
Smells like a DLBI regression.
This happens on all platforms.
Initial testing of this shows this for the invalidation log:
This means that the elapsed time text frame was deleted when we painted, and we didn't have the new text frame created (or at least, it didn't create an nsDisplayText display item).
Unsure how this could have changed under DLBI, unless we just weren't invalidating (or painting) previously until the text frame is created.
Created attachment 638584 [details] [diff] [review]
Call WillPaint/DidPaint in the right place
Ok, confirmed this to be the latter.
The original text frame is removed, and we invalidate part of the layer. Then we paint on a refresh driver tick, draw with missing text and send an invalidate event to the widget. Then the new text frame is created before the widget paint event fires.
With the old code, we didn't paint until the widget event, so we would have drawn the text.
I think we need to move the code for WillPaint/DidPaint into being called around the refresh driver paint, instead of being called by the OS surrounding the widget paint (composite).
This patch fixes the flicker for me.
*** Bug 770083 has been marked as a duplicate of this bug. ***
Backed out as part of DLBI: