Source/WebCore: WebCore part of: Add WebKit preferences for text track settings
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Dec 2011 08:42:27 +0000 (08:42 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Dec 2011 08:42:27 +0000 (08:42 +0000)
commit3b180523815c2bb6268b0de172ef75916f9a569b
tree05bd4f73165c2ed82ae02a66a2d6f560d17b5df4
parentea15b0efe57761787afd2b26dc5d39de72aa96a2
Source/WebCore: WebCore part of: Add WebKit preferences for text track settings
https://bugs.webkit.org/show_bug.cgi?id=73721

Reviewed by John Sullivan.

No new tests yet, still nothing to test.

* page/Settings.cpp:
(WebCore::Settings::setShouldDisplaySubtitles): Move the setters to the .cpp file so they
    aren't inlined.
(WebCore::Settings::setShouldDisplayCaptions): Ditto.
(WebCore::Settings::setShouldDisplayTextDescriptions): Ditto.
* page/Settings.h:

Source/WebKit/chromium: WebKit/chromium part of: Add WebKit preferences for text track settings
https://bugs.webkit.org/show_bug.cgi?id=73721

Reviewed by John Sullivan.

* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::shouldDisplaySubtitles): Added.
(WebKit::WebSettingsImpl::shouldDisplayCaptions): Ditto.
(WebKit::WebSettingsImpl::shouldDisplayTextDescriptions): Ditto.
* src/WebSettingsImpl.h:

Source/WebKit/mac: Add WebKit preferences for text track settings
https://bugs.webkit.org/show_bug.cgi?id=73721

Reviewed by John Sullivan.

* WebView/WebPreferenceKeysPrivate.h: Added #define for shouldDisplaySubtitles, shouldDisplayCaptions,
and shouldDisplayTextDescriptions properties.

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Initialize new preferences to NO.
(-[WebPreferences setShouldDisplaySubtitles:]): Added.
(-[WebPreferences shouldDisplaySubtitles]): Ditto.
(-[WebPreferences setShouldDisplayCaptions:]): Ditto.
(-[WebPreferences shouldDisplayCaptions]): Ditto.
(-[WebPreferences setShouldDisplayTextDescriptions:]): Ditto.
(-[WebPreferences shouldDisplayTextDescriptions]): Ditto.
* WebView/WebPreferencesPrivate.h:

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Updates WebCore settings from WebKit prefs.

Source/WebKit/win: WebKit/mac part of: Add WebKit preferences for text track settings
https://bugs.webkit.org/show_bug.cgi?id=73721

Reviewed by John Sullivan.

* Interfaces/IWebPreferences.idl: Declare getters and setters for new properties.

* WebPreferenceKeysPrivate.h: Added #define for shouldDisplaySubtitles, shouldDisplayCaptions,
and shouldDisplayTextDescriptions properties.

* WebPreferences.cpp:
(WebPreferences::setShouldDisplaySubtitles): Added.
(WebPreferences::shouldDisplaySubtitles): Ditto.
(WebPreferences::setShouldDisplayCaptions): Ditto.
(WebPreferences::shouldDisplayCaptions): Ditto.
(WebPreferences::setShouldDisplayTextDescriptions): Ditto.
(WebPreferences::shouldDisplayTextDescriptions): Ditto.
* WebPreferences.h: Declare new methods.

* WebView.cpp:
(WebView::notifyPreferencesChanged): Updates WebCore settings from WebKit prefs.

Source/WebKit2: WebKit2 part of: Add WebKit preferences for text track settings
https://bugs.webkit.org/show_bug.cgi?id=73721

Reviewed by John Sullivan.

* Shared/WebPreferencesStore.h: Declared shouldDisplaySubtitles, shouldDisplayCaptions, and
shouldDisplayTextDescriptions properties with macros. All default to false.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetShouldDisplaySubtitles): Added.
(WKPreferencesGetShouldDisplaySubtitles): Ditto.
(WKPreferencesSetShouldDisplayCaptions): Ditto.
(WKPreferencesGetShouldDisplayCaptions): Ditto.
(WKPreferencesSetShouldDisplayTextDescriptions): Ditto.
(WKPreferencesGetShouldDisplayTextDescriptions): Ditto.
* UIProcess/API/C/WKPreferences.h:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Updates WebCore settings from WebKit2 prefs.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@101977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebSettingsImpl.cpp
Source/WebKit/chromium/src/WebSettingsImpl.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/Interfaces/IWebPreferences.idl
Source/WebKit/win/WebPreferenceKeysPrivate.h
Source/WebKit/win/WebPreferences.cpp
Source/WebKit/win/WebPreferences.h
Source/WebKit/win/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPreferencesStore.h
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
Source/WebKit2/UIProcess/API/C/WKPreferences.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp