Skip to content

Commit

Permalink
Don't update the text track override CSS every time a media element i…
Browse files Browse the repository at this point in the history
…s created.

<http://webkit.org/b/119199>
<rdar://problem/14572855>

Reviewed by Darin Adler.

We should only have to update the CSS if the accessibility caption preferences are changed.
This was forcing a full style recalc in every Document any time a media element is instantiated.

* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):


Canonical link: https://commits.webkit.org/137189@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Andreas Kling committed Jul 29, 2013
1 parent 22e63f3 commit 3153fa6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
14 changes: 14 additions & 0 deletions Source/WebCore/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
2013-07-28 Andreas Kling <[email protected]>

Don't update the text track override CSS every time a media element is created.
<http://webkit.org/b/119199>
<rdar://problem/14572855>

Reviewed by Darin Adler.

We should only have to update the CSS if the accessibility caption preferences are changed.
This was forcing a full style recalc in every Document any time a media element is instantiated.

* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):

2013-07-28 Andy Estes <[email protected]>

Stop exporting Widget::frameRectsChanged()
Expand Down
3 changes: 1 addition & 2 deletions Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,8 @@ void CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges()
if (!m_listeningForPreferenceChanges) {
m_listeningForPreferenceChanges = true;
CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, userCaptionPreferencesChangedNotificationCallback, kMAXCaptionAppearanceSettingsChangedNotification, 0, CFNotificationSuspensionBehaviorCoalesce);
updateCaptionStyleSheetOveride();
}

updateCaptionStyleSheetOveride();
}

void CaptionUserPreferencesMediaAF::captionPreferencesChanged()
Expand Down

0 comments on commit 3153fa6

Please sign in to comment.