Skip to content
Permalink
Browse files
Add Settings for text track types
https://bugs.webkit.org/show_bug.cgi?id=73383

Reviewed by Darin Adler.

No new tests, settings are not used yet.

* page/Settings.cpp:
(WebCore::Settings::Settings): Initialize new settings.
* page/Settings.h:
(WebCore::Settings::setShouldDisplaySubtitles): New.
(WebCore::Settings::shouldDisplaySubtitles): Ditto.
(WebCore::Settings::setShouldDisplayCaptions): Ditto.
(WebCore::Settings::shouldDisplayCaptions): Ditto.
(WebCore::Settings::setShouldDisplayTextDescriptions): Ditto.
(WebCore::Settings::shouldDisplayTextDescriptions): Ditto.


Canonical link: https://commits.webkit.org/90146@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@101674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eric-carlson committed Dec 1, 2011
1 parent 698f119 commit 1cbab89db9aec52d46605c5c3edd53a74b93d7ea
Showing 3 changed files with 41 additions and 0 deletions.
@@ -1,3 +1,22 @@
2011-12-01 Eric Carlson <eric.carlson@apple.com>

Add Settings for text track types
https://bugs.webkit.org/show_bug.cgi?id=73383

Reviewed by Darin Adler.

No new tests, settings are not used yet.

* page/Settings.cpp:
(WebCore::Settings::Settings): Initialize new settings.
* page/Settings.h:
(WebCore::Settings::setShouldDisplaySubtitles): New.
(WebCore::Settings::shouldDisplaySubtitles): Ditto.
(WebCore::Settings::setShouldDisplayCaptions): Ditto.
(WebCore::Settings::shouldDisplayCaptions): Ditto.
(WebCore::Settings::setShouldDisplayTextDescriptions): Ditto.
(WebCore::Settings::shouldDisplayTextDescriptions): Ditto.

2011-12-01 Eric Carlson <eric.carlson@apple.com>

HTMLTrackElement.readyState should return TextTrack "readiness state".
@@ -229,6 +229,11 @@ Settings::Settings(Page* page)
, m_suppressIncrementalRendering(false)
, m_backspaceKeyNavigationEnabled(true)
, m_visualWordMovementEnabled(false)
#if ENABLE(VIDEO_TRACK)
, m_shouldDisplaySubtitles(false)
, m_shouldDisplayCaptions(false)
, m_shouldDisplayTextDescriptions(false)
#endif
, m_loadsImagesAutomaticallyTimer(this, &Settings::loadsImagesAutomaticallyTimerFired)
{
// A Frame may not have been created yet, so we initialize the AtomicString
@@ -486,6 +486,17 @@ namespace WebCore {
void setVisualWordMovementEnabled(bool enabled) { m_visualWordMovementEnabled = enabled; }
bool visualWordMovementEnabled() const { return m_visualWordMovementEnabled; }

#if ENABLE(VIDEO_TRACK)
void setShouldDisplaySubtitles(bool flag) { m_shouldDisplaySubtitles = flag; }
bool shouldDisplaySubtitles() const { return m_shouldDisplaySubtitles; }

void setShouldDisplayCaptions(bool flag) { m_shouldDisplayCaptions = flag; }
bool shouldDisplayCaptions() const { return m_shouldDisplayCaptions; }

void setShouldDisplayTextDescriptions(bool flag) { m_shouldDisplayTextDescriptions = flag; }
bool shouldDisplayTextDescriptions() const { return m_shouldDisplayTextDescriptions; }
#endif

private:
Page* m_page;

@@ -612,6 +623,12 @@ namespace WebCore {
bool m_backspaceKeyNavigationEnabled : 1;
bool m_visualWordMovementEnabled : 1;

#if ENABLE(VIDEO_TRACK)
bool m_shouldDisplaySubtitles : 1;
bool m_shouldDisplayCaptions : 1;
bool m_shouldDisplayTextDescriptions : 1;
#endif

Timer<Settings> m_loadsImagesAutomaticallyTimer;
void loadsImagesAutomaticallyTimerFired(Timer<Settings>*);

0 comments on commit 1cbab89

Please sign in to comment.