Closed Bug 511163 Opened 11 years ago Closed 8 years ago
We repaint the whole video while controls are visible and video is playing
The whole page, like, scroll down and take the video off screen and we repaint you. This is pretty easy to see in Fennec with paint flashing on, but should also be easy to see in Firefox with platform-specific paint flashing on. This isn't helping performance.
Component: Video/Audio → Video/Audio Controls
Product: Core → Toolkit
QA Contact: video.audio → video.audio
Stuart mentioned that this might have been a case of the video inside a table. It seems like the container for the videocontrols should probably be a reflow root. What are the possible children of a video frame? It seems like we'd want either the video frame or its child that holds the controls to be a reflow root.
I think in theory we should just make video frames be reflow roots. The question is whether that might cause problems like bug 366791 or bug 430887; I probably need to go through existing reflow root logic a bit.
I've tested this out and I can only reproduce the invalidation within the <video> bounding rectangle while the controls are visible. To reproduce, I enabled the nglayout.debug.paint_flashing preference and viewed the video at http://clips.vorwaerts-gmbh.de/big_buck_bunny.webm.
This attachment narrows down the cause of our invalidations. When the <label class="timeLabel"/> has a value attribute set, the video bounding rectangle will invalidate nonstop while the controls are visible. If the |.timeLabel| is set to |visibility:collapse;| or |display:none;| then these unnecessary invalidations disappear. To see this, you can apply the patch and rebuild, and enable the nglayout.debug.paint_flashing and play a webm video with the controls enabled. This should only show the control bar invalidating. Then set a value attribute or a textContent on the <label class="timeLabel"/> and the invalidations will come back. David: Could this be an issue with the layout here?
Attachment #590092 - Flags: feedback?(dbaron)
Summary: We repaint the whole page while controls are visible and video is playing → We repaint the whole video while controls are visible and video is playing
I think making video frames or the controls be reflow roots has already been tested to fix the invalidation -- I think somebody else may have filed a second bug on this as well. The question is whether it's safe to do that -- and I think it isn't quite, but might be if we had a variant of reflow root that did overflow propagation (which we could do now).
Attachment #590092 - Flags: feedback?(dbaron) → feedback-
Appears to be fixed by DLBI.
Depends on: dlbi
Confirmed fixed :)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.