I think it would be cleaner to create and instert a new track div for every cue. That way you only have to remove on previous child.

If you really wanted the two-level container to be static, add it to nsVideoFrame::CreateAnonymousContent instead. However, I think that's not the way we want to go. Absolute positioning might have us wanting multiple sub-DIVs eventually, so it makes sense to keep that under the control of the WebVTT/TextTrack objects.