CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges is called whenever a audio or video element is created. It calls updateCaptionStyleSheetOveride which generates and inserts a user style sheet. This is an expensive operation and it can happen during document parsing/creation, so it should be done after a brief delay.
Created attachment 240351 [details] Proposed patch.
Created attachment 240355 [details] Updated patch
Comment on attachment 240355 [details] Updated patch Clearing flags on attachment: 240355 Committed r175139: <http://trac.webkit.org/changeset/175139>
All reviewed patches have been landed. Closing bug.