More updates to Caption user preferences
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Feb 2013 05:12:54 +0000 (05:12 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Feb 2013 05:12:54 +0000 (05:12 +0000)
commit4a09357e83d77e3d7fdf4936e1e6d724d6b9ac86
treeb405ea281dd8b109aa2d12deeec64c5bbe88cf9c
parent433b03666493bd962b6d65bf81364f65b40af314
More updates to Caption user preferences
https://bugs.webkit.org/show_bug.cgi?id=108997

Reviewed by Dean Jackson.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::captionPreferencesChanged): Give the media controls a chance
    to update for a preferences change.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateSizes): Add optional "force update"
    param to force font size recalc even when the video size hasn't changed.
* html/shadow/MediaControlElements.h:

* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::textTrackPreferencesChanged): New, force a font size recalc.
* html/shadow/MediaControls.h:

* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): Don't set width/size of cues
    that use default positioning. Use "start" as the default alignment.

* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Set padding when the window is visible
    so it shows around the cue background.
(WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Set padding to 0 when the background
    is visible.
(WebCore::CaptionUserPreferencesMac::windowRoundedCornerRadiusCSS): Add "px" to the border radius
    so it actually works.
* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::layout): Special case generic cues with default style.
(WebCore::RenderTextTrackCue::repositionGenericCue):
* rendering/RenderTextTrackCue.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@141966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/shadow/MediaControlElements.h
Source/WebCore/html/shadow/MediaControls.cpp
Source/WebCore/html/shadow/MediaControls.h
Source/WebCore/html/track/TextTrackCueGeneric.cpp
Source/WebCore/page/CaptionUserPreferencesMac.mm
Source/WebCore/rendering/RenderTextTrackCue.cpp
Source/WebCore/rendering/RenderTextTrackCue.h