summaryrefslogtreecommitdiffstats
path: root/chromecast
diff options
context:
space:
mode:
authorhalliwell <halliwell@chromium.org>2016-03-18 11:33:40 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-18 18:36:29 +0000
commit4002be4a5242810875dffd8020239c55f2c7268f (patch)
tree41e460a6df7b1b274024438011524853be2976f3 /chromecast
parente57e397685d65eb6d1f88745432edcd59612e94c (diff)
downloadchromium_src-4002be4a5242810875dffd8020239c55f2c7268f.zip
chromium_src-4002be4a5242810875dffd8020239c55f2c7268f.tar.gz
chromium_src-4002be4a5242810875dffd8020239c55f2c7268f.tar.bz2
Implement 'margin' for keeping WebVTT cues in title-safe area
WebVTT spec describes a user-agent-defined margin for keeping cues within the title-safe area. Previously, the margin was hardcoded to 0, which can place cues in invisible positions when overscan is present. Note, WebVTT spec also describes an 'edge-margin', which is not implemented here. For horizontal text, margin is for top+bottom and therefore typically affects all subtitles - whereas edge-margin is for left/right and therefore only affects very long text lines. BUG=503233 Review URL: https://codereview.chromium.org/1766383003 Cr-Commit-Position: refs/heads/master@{#382023}
Diffstat (limited to 'chromecast')
-rw-r--r--chromecast/browser/cast_content_browser_client.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chromecast/browser/cast_content_browser_client.cc b/chromecast/browser/cast_content_browser_client.cc
index cf34a67..8827e85 100644
--- a/chromecast/browser/cast_content_browser_client.cc
+++ b/chromecast/browser/cast_content_browser_client.cc
@@ -270,6 +270,9 @@ void CastContentBrowserClient::OverrideWebkitPrefs(
// to retrieve media data chunks while running in a https page. This pref
// should be disabled once all the content providers are no longer doing that.
prefs->allow_running_insecure_content = true;
+
+ // Enable 5% margins for WebVTT cues to keep within title-safe area
+ prefs->text_track_margin_percentage = 5;
}
void CastContentBrowserClient::ResourceDispatcherHostCreated() {