Changeset 101977 in webkit
- Timestamp:
- Dec 5, 2011, 12:42:27 AM (14 years ago)
- Location:
- trunk/Source
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r101975 r101977 1 2011-12-05 Eric Carlson <eric.carlson@apple.com> 2 3 WebCore part of: Add WebKit preferences for text track settings 4 https://bugs.webkit.org/show_bug.cgi?id=73721 5 6 Reviewed by John Sullivan. 7 8 No new tests yet, still nothing to test. 9 10 * page/Settings.cpp: 11 (WebCore::Settings::setShouldDisplaySubtitles): Move the setters to the .cpp file so they 12 aren't inlined. 13 (WebCore::Settings::setShouldDisplayCaptions): Ditto. 14 (WebCore::Settings::setShouldDisplayTextDescriptions): Ditto. 15 * page/Settings.h: 16 1 17 2011-12-05 Noel Gordon <noel.gordon@gmail.com> 2 18 -
trunk/Source/WebCore/page/Settings.cpp
r101674 r101977 837 837 } 838 838 839 #if ENABLE(VIDEO_TRACK) 840 void Settings::setShouldDisplaySubtitles(bool flag) 841 { 842 m_shouldDisplaySubtitles = flag; 843 } 844 845 void Settings::setShouldDisplayCaptions(bool flag) 846 { 847 m_shouldDisplayCaptions = flag; 848 } 849 850 void Settings::setShouldDisplayTextDescriptions(bool flag) 851 { 852 m_shouldDisplayTextDescriptions = flag; 853 } 854 #endif 855 839 856 } // namespace WebCore -
trunk/Source/WebCore/page/Settings.h
r101674 r101977 488 488 489 489 #if ENABLE(VIDEO_TRACK) 490 void setShouldDisplaySubtitles(bool flag) { m_shouldDisplaySubtitles = flag; }490 void setShouldDisplaySubtitles(bool); 491 491 bool shouldDisplaySubtitles() const { return m_shouldDisplaySubtitles; } 492 492 493 void setShouldDisplayCaptions(bool flag) { m_shouldDisplayCaptions = flag; }493 void setShouldDisplayCaptions(bool); 494 494 bool shouldDisplayCaptions() const { return m_shouldDisplayCaptions; } 495 495 496 void setShouldDisplayTextDescriptions(bool flag) { m_shouldDisplayTextDescriptions = flag; }496 void setShouldDisplayTextDescriptions(bool); 497 497 bool shouldDisplayTextDescriptions() const { return m_shouldDisplayTextDescriptions; } 498 498 #endif -
trunk/Source/WebKit/chromium/ChangeLog
r101969 r101977 1 2011-12-05 Eric Carlson <eric.carlson@apple.com> 2 3 WebKit/chromium part of: Add WebKit preferences for text track settings 4 https://bugs.webkit.org/show_bug.cgi?id=73721 5 6 Reviewed by John Sullivan. 7 8 * src/WebSettingsImpl.cpp: 9 (WebKit::WebSettingsImpl::shouldDisplaySubtitles): Added. 10 (WebKit::WebSettingsImpl::shouldDisplayCaptions): Ditto. 11 (WebKit::WebSettingsImpl::shouldDisplayTextDescriptions): Ditto. 12 * src/WebSettingsImpl.h: 13 1 14 2011-12-04 Sheriff Bot <webkit.review.bot@gmail.com> 2 15 -
trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp
r101576 r101977 466 466 } 467 467 468 void WebSettingsImpl::setShouldDisplaySubtitles(bool enabled) 469 { 470 #if ENABLE(VIDEO_TRACK) 471 m_settings->setShouldDisplaySubtitles(enabled); 472 #else 473 UNUSED_PARAM(enabled); 474 #endif 475 } 476 477 void WebSettingsImpl::setShouldDisplayCaptions(bool enabled) 478 { 479 #if ENABLE(VIDEO_TRACK) 480 m_settings->setShouldDisplayCaptions(enabled); 481 #else 482 UNUSED_PARAM(enabled); 483 #endif 484 } 485 486 void WebSettingsImpl::setShouldDisplayTextDescriptions(bool enabled) 487 { 488 #if ENABLE(VIDEO_TRACK) 489 m_settings->setShouldDisplayTextDescriptions(enabled); 490 #else 491 UNUSED_PARAM(enabled); 492 #endif 493 } 494 495 468 496 } // namespace WebKit -
trunk/Source/WebKit/chromium/src/WebSettingsImpl.h
r101576 r101977 125 125 virtual void setHixie76WebSocketProtocolEnabled(bool); 126 126 virtual void setVisualWordMovementEnabled(bool); 127 virtual void setShouldDisplaySubtitles(bool); 128 virtual void setShouldDisplayCaptions(bool); 129 virtual void setShouldDisplayTextDescriptions(bool); 127 130 128 131 private: -
trunk/Source/WebKit/mac/ChangeLog
r101939 r101977 1 2011-12-05 Eric Carlson <eric.carlson@apple.com> 2 3 Add WebKit preferences for text track settings 4 https://bugs.webkit.org/show_bug.cgi?id=73721 5 6 Reviewed by John Sullivan. 7 8 * WebView/WebPreferenceKeysPrivate.h: Added #define for shouldDisplaySubtitles, shouldDisplayCaptions, 9 and shouldDisplayTextDescriptions properties. 10 11 * WebView/WebPreferences.mm: 12 (+[WebPreferences initialize]): Initialize new preferences to NO. 13 (-[WebPreferences setShouldDisplaySubtitles:]): Added. 14 (-[WebPreferences shouldDisplaySubtitles]): Ditto. 15 (-[WebPreferences setShouldDisplayCaptions:]): Ditto. 16 (-[WebPreferences shouldDisplayCaptions]): Ditto. 17 (-[WebPreferences setShouldDisplayTextDescriptions:]): Ditto. 18 (-[WebPreferences shouldDisplayTextDescriptions]): Ditto. 19 * WebView/WebPreferencesPrivate.h: 20 21 * WebView/WebView.mm: 22 (-[WebView _preferencesChanged:]): Updates WebCore settings from WebKit prefs. 23 1 24 2011-12-03 Dan Bernstein <mitz@apple.com> 2 25 -
trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
r98769 r101977 112 112 #define WebKitMediaPlaybackAllowsInlinePreferenceKey @"WebKitMediaPlaybackAllowsInline" 113 113 #define WebKitMockScrollbarsEnabledPreferenceKey @"WebKitMockScrollbarsEnabled" 114 #define WebKitShouldDisplaySubtitlesPreferenceKey @"WebKitShouldDisplaySubtitles" 115 #define WebKitShouldDisplayCaptionsPreferenceKey @"WebKitShouldDisplayCaptions" 116 #define WebKitShouldDisplayTextDescriptionsPreferenceKey @"WebKitShouldDisplayTextDescriptions" 114 117 115 118 // These are private both because callers should be using the cover methods and because the -
trunk/Source/WebKit/mac/WebView/WebPreferences.mm
r98769 r101977 388 388 [NSNumber numberWithBool:NO], WebKitSuppressIncrementalRenderingKey, 389 389 [NSNumber numberWithBool:YES], WebKitBackspaceKeyNavigationEnabledKey, 390 [NSNumber numberWithBool:NO], WebKitShouldDisplaySubtitlesPreferenceKey, 391 [NSNumber numberWithBool:NO], WebKitShouldDisplayCaptionsPreferenceKey, 392 [NSNumber numberWithBool:NO], WebKitShouldDisplayTextDescriptionsPreferenceKey, 390 393 391 394 [NSNumber numberWithLongLong:ApplicationCacheStorage::noQuota()], WebKitApplicationCacheTotalQuota, … … 1575 1578 } 1576 1579 1580 - (void)setShouldDisplaySubtitles:(BOOL)flag 1581 { 1582 [self _setBoolValue:flag forKey:WebKitShouldDisplaySubtitlesPreferenceKey]; 1583 } 1584 1585 - (BOOL)shouldDisplaySubtitles 1586 { 1587 return [self _boolValueForKey:WebKitShouldDisplaySubtitlesPreferenceKey]; 1588 } 1589 1590 - (void)setShouldDisplayCaptions:(BOOL)flag 1591 { 1592 [self _setBoolValue:flag forKey:WebKitShouldDisplayCaptionsPreferenceKey]; 1593 } 1594 1595 - (BOOL)shouldDisplayCaptions 1596 { 1597 return [self _boolValueForKey:WebKitShouldDisplayCaptionsPreferenceKey]; 1598 } 1599 1600 - (void)setShouldDisplayTextDescriptions:(BOOL)flag 1601 { 1602 [self _setBoolValue:flag forKey:WebKitShouldDisplayTextDescriptionsPreferenceKey]; 1603 } 1604 1605 - (BOOL)shouldDisplayTextDescriptions 1606 { 1607 return [self _boolValueForKey:WebKitShouldDisplayTextDescriptionsPreferenceKey]; 1608 } 1609 1577 1610 @end 1578 1611 -
trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
r98769 r101977 272 272 - (BOOL)backspaceKeyNavigationEnabled; 273 273 274 - (void)setShouldDisplaySubtitles:(BOOL)flag; 275 - (BOOL)shouldDisplaySubtitles; 276 277 - (void)setShouldDisplayCaptions:(BOOL)flag; 278 - (BOOL)shouldDisplayCaptions; 279 280 - (void)setShouldDisplayTextDescriptions:(BOOL)flag; 281 - (BOOL)shouldDisplayTextDescriptions; 282 274 283 @end -
trunk/Source/WebKit/mac/WebView/WebView.mm
r101939 r101977 1497 1497 settings->setBackspaceKeyNavigationEnabled([preferences backspaceKeyNavigationEnabled]); 1498 1498 1499 #if ENABLE(VIDEO_TRACK) 1500 settings->setShouldDisplaySubtitles([preferences shouldDisplaySubtitles]); 1501 settings->setShouldDisplayCaptions([preferences shouldDisplayCaptions]); 1502 settings->setShouldDisplayTextDescriptions([preferences shouldDisplayTextDescriptions]); 1503 #endif 1504 1499 1505 // Application Cache Preferences are stored on the global cache storage manager, not in Settings. 1500 1506 [WebApplicationCache setDefaultOriginQuota:[preferences applicationCacheDefaultOriginQuota]]; -
trunk/Source/WebKit/win/ChangeLog
r101808 r101977 1 2011-12-05 Eric Carlson <eric.carlson@apple.com> 2 3 WebKit/mac part of: Add WebKit preferences for text track settings 4 https://bugs.webkit.org/show_bug.cgi?id=73721 5 6 Reviewed by John Sullivan. 7 8 * Interfaces/IWebPreferences.idl: Declare getters and setters for new properties. 9 10 * WebPreferenceKeysPrivate.h: Added #define for shouldDisplaySubtitles, shouldDisplayCaptions, 11 and shouldDisplayTextDescriptions properties. 12 13 * WebPreferences.cpp: 14 (WebPreferences::setShouldDisplaySubtitles): Added. 15 (WebPreferences::shouldDisplaySubtitles): Ditto. 16 (WebPreferences::setShouldDisplayCaptions): Ditto. 17 (WebPreferences::shouldDisplayCaptions): Ditto. 18 (WebPreferences::setShouldDisplayTextDescriptions): Ditto. 19 (WebPreferences::shouldDisplayTextDescriptions): Ditto. 20 * WebPreferences.h: Declare new methods. 21 22 * WebView.cpp: 23 (WebView::notifyPreferencesChanged): Updates WebCore settings from WebKit prefs. 24 1 25 2011-12-02 Steve Falkenburg <sfalken@apple.com> 2 26 -
trunk/Source/WebKit/win/Interfaces/IWebPreferences.idl
r96549 r101977 206 206 HRESULT pictographFontFamily([out, retval] BSTR* family); 207 207 HRESULT setPictographFontFamily([in] BSTR family); 208 209 HRESULT setShouldDisplaySubtitles(BOOL shouldDisplaySubtitles); 210 HRESULT shouldDisplaySubtitles(BOOL *shouldDisplaySubtitles); 211 212 HRESULT setShouldDisplayCaptions(BOOL shouldDisplayCaptions); 213 HRESULT shouldDisplayCaptions(BOOL *shouldDisplayCaptions); 214 215 HRESULT setShouldDisplayTextDescriptions(BOOL shouldDisplayTextDescriptions); 216 HRESULT shouldDisplayTextDescriptions(BOOL *shouldDisplayTextDescriptions); 208 217 } -
trunk/Source/WebKit/win/WebPreferenceKeysPrivate.h
r96549 r101977 71 71 #define WebKitHyperlinkAuditingEnabledPreferenceKey "WebKitHyperlinkAuditingEnabled" 72 72 #define WebKitWebAudioEnabledPreferenceKey "WebKitWebAudioEnabled" 73 #define WebKitShouldDisplaySubtitlesPreferenceKey "WebKitShouldDisplaySubtitles" 74 #define WebKitShouldDisplayCaptionsPreferenceKey "WebKitShouldDisplayCaptions" 75 #define WebKitShouldDisplayTextDescriptionsPreferenceKey "WebKitShouldDisplayTextDescriptions" 73 76 74 77 // These are private both because callers should be using the cover methods and because the -
trunk/Source/WebKit/win/WebPreferences.cpp
r96549 r101977 229 229 CFDictionaryAddValue(defaults, CFSTR(WebKitPDFDisplayModePreferenceKey), CFSTR("1")); 230 230 CFDictionaryAddValue(defaults, CFSTR(WebKitPDFScaleFactorPreferenceKey), CFSTR("0")); 231 CFDictionaryAddValue(defaults, CFSTR(WebKitShouldDisplaySubtitlesPreferenceKey), kCFBooleanFalse); 232 CFDictionaryAddValue(defaults, CFSTR(WebKitShouldDisplayCaptionsPreferenceKey), kCFBooleanFalse); 233 CFDictionaryAddValue(defaults, CFSTR(WebKitShouldDisplayTextDescriptionsPreferenceKey), kCFBooleanFalse); 231 234 232 235 RetainPtr<CFStringRef> linkBehaviorStringRef(AdoptCF, CFStringCreateWithFormat(0, 0, CFSTR("%d"), WebKitEditableLinkDefaultBehavior)); … … 1650 1653 } 1651 1654 } 1655 1656 HRESULT WebPreferences::shouldDisplaySubtitles(BOOL* enabled) 1657 { 1658 #if ENABLE(VIDEO_TRACK) 1659 if (!enabled) 1660 return E_POINTER; 1661 1662 *enabled = boolValueForKey(CFSTR(WebKitShouldDisplaySubtitlesPreferenceKey)); 1663 return S_OK; 1664 #else 1665 return E_NOTIMPL; 1666 #endif 1667 } 1668 1669 HRESULT WebPreferences::setShouldDisplaySubtitles(BOOL enabled) 1670 { 1671 #if ENABLE(VIDEO_TRACK) 1672 setBoolValue(CFSTR(WebKitShouldDisplaySubtitlesPreferenceKey), enabled); 1673 return S_OK; 1674 #else 1675 return E_NOTIMPL; 1676 #endif 1677 } 1678 1679 HRESULT WebPreferences::shouldDisplayCaptions(BOOL* enabled) 1680 { 1681 #if ENABLE(VIDEO_TRACK) 1682 if (!enabled) 1683 return E_POINTER; 1684 1685 *enabled = boolValueForKey(CFSTR(WebKitShouldDisplayCaptionsPreferenceKey)); 1686 return S_OK; 1687 #else 1688 return E_NOTIMPL; 1689 #endif 1690 } 1691 1692 HRESULT WebPreferences::setShouldDisplayCaptions(BOOL enabled) 1693 { 1694 #if ENABLE(VIDEO_TRACK) 1695 setBoolValue(CFSTR(WebKitShouldDisplayCaptionsPreferenceKey), enabled); 1696 return S_OK; 1697 #else 1698 return E_NOTIMPL; 1699 #endif 1700 } 1701 1702 HRESULT WebPreferences::shouldDisplayTextDescriptions(BOOL* enabled) 1703 { 1704 #if ENABLE(VIDEO_TRACK) 1705 if (!enabled) 1706 return E_POINTER; 1707 1708 *enabled = boolValueForKey(CFSTR(WebKitShouldDisplayTextDescriptionsPreferenceKey)); 1709 return S_OK; 1710 #else 1711 return E_NOTIMPL; 1712 #endif 1713 } 1714 1715 HRESULT WebPreferences::setShouldDisplayTextDescriptions(BOOL enabled) 1716 { 1717 #if ENABLE(VIDEO_TRACK) 1718 setBoolValue(CFSTR(WebKitShouldDisplayTextDescriptionsPreferenceKey), enabled); 1719 return S_OK; 1720 #else 1721 return E_NOTIMPL; 1722 #endif 1723 } -
trunk/Source/WebKit/win/WebPreferences.h
r96549 r101977 296 296 /* [retval][out] */ BOOL*); 297 297 298 virtual HRESULT STDMETHODCALLTYPE setShouldDisplaySubtitles( 299 /* [in] */ BOOL); 300 301 virtual HRESULT STDMETHODCALLTYPE shouldDisplaySubtitles( 302 /* [retval][out] */ BOOL*); 303 304 virtual HRESULT STDMETHODCALLTYPE setShouldDisplayCaptions( 305 /* [in] */ BOOL); 306 307 virtual HRESULT STDMETHODCALLTYPE shouldDisplayCaptions( 308 /* [retval][out] */ BOOL*); 309 310 virtual HRESULT STDMETHODCALLTYPE setShouldDisplayTextDescriptions( 311 /* [in] */ BOOL); 312 313 virtual HRESULT STDMETHODCALLTYPE shouldDisplayTextDescriptions( 314 /* [retval][out] */ BOOL*); 315 298 316 // IWebPreferencesPrivate 299 317 virtual HRESULT STDMETHODCALLTYPE setDeveloperExtrasEnabled( -
trunk/Source/WebKit/win/WebView.cpp
r101808 r101977 4585 4585 SysFreeString(str); 4586 4586 4587 #if ENABLE(VIDEO_TRACK) 4588 hr = preferences->shouldDisplaySubtitles(&enabled); 4589 if (FAILED(hr)) 4590 return hr; 4591 settings->setShouldDisplaySubtitles(enabled); 4592 4593 hr = preferences->shouldDisplayCaptions(&enabled); 4594 if (FAILED(hr)) 4595 return hr; 4596 settings->setShouldDisplayCaptions(enabled); 4597 4598 hr = preferences->shouldDisplayTextDescriptions(&enabled); 4599 if (FAILED(hr)) 4600 return hr; 4601 settings->setShouldDisplayTextDescriptions(enabled); 4602 #endif 4603 4587 4604 COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences); 4588 4605 if (prefsPrivate) { -
trunk/Source/WebKit2/ChangeLog
r101963 r101977 1 2011-12-05 Eric Carlson <eric.carlson@apple.com> 2 3 WebKit2 part of: Add WebKit preferences for text track settings 4 https://bugs.webkit.org/show_bug.cgi?id=73721 5 6 Reviewed by John Sullivan. 7 8 * Shared/WebPreferencesStore.h: Declared shouldDisplaySubtitles, shouldDisplayCaptions, and 9 shouldDisplayTextDescriptions properties with macros. All default to false. 10 11 * UIProcess/API/C/WKPreferences.cpp: 12 (WKPreferencesSetShouldDisplaySubtitles): Added. 13 (WKPreferencesGetShouldDisplaySubtitles): Ditto. 14 (WKPreferencesSetShouldDisplayCaptions): Ditto. 15 (WKPreferencesGetShouldDisplayCaptions): Ditto. 16 (WKPreferencesSetShouldDisplayTextDescriptions): Ditto. 17 (WKPreferencesGetShouldDisplayTextDescriptions): Ditto. 18 * UIProcess/API/C/WKPreferences.h: 19 20 * WebProcess/WebPage/WebPage.cpp: 21 (WebKit::WebPage::updatePreferences): Updates WebCore settings from WebKit2 prefs. 22 1 23 2011-12-04 Gopal Raghavan <gopal.1.raghavan@nokia.com> 2 24 -
trunk/Source/WebKit2/Shared/WebPreferencesStore.h
r100153 r101977 99 99 macro(BackspaceKeyNavigationEnabled, backspaceKeyNavigationEnabled, Bool, bool, true) \ 100 100 macro(CaretBrowsingEnabled, caretBrowsingEnabled, Bool, bool, false) \ 101 macro(ShouldDisplaySubtitles, shouldDisplaySubtitles, Bool, bool, false) \ 102 macro(ShouldDisplayCaptions, shouldDisplayCaptions, Bool, bool, false) \ 103 macro(ShouldDisplayTextDescriptions, shouldDisplayTextDescriptions, Bool, bool, false) \ 101 104 \ 102 105 -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
r100153 r101977 672 672 return toImpl(preferencesRef)->caretBrowsingEnabled(); 673 673 } 674 675 void WKPreferencesSetShouldDisplaySubtitles(WKPreferencesRef preferencesRef, bool enabled) 676 { 677 toImpl(preferencesRef)->setShouldDisplaySubtitles(enabled); 678 } 679 680 bool WKPreferencesGetShouldDisplaySubtitles(WKPreferencesRef preferencesRef) 681 { 682 return toImpl(preferencesRef)->shouldDisplaySubtitles(); 683 } 684 685 void WKPreferencesSetShouldDisplayCaptions(WKPreferencesRef preferencesRef, bool enabled) 686 { 687 toImpl(preferencesRef)->setShouldDisplayCaptions(enabled); 688 } 689 690 bool WKPreferencesGetShouldDisplayCaptions(WKPreferencesRef preferencesRef) 691 { 692 return toImpl(preferencesRef)->shouldDisplayCaptions(); 693 } 694 695 void WKPreferencesSetShouldDisplayTextDescriptions(WKPreferencesRef preferencesRef, bool enabled) 696 { 697 toImpl(preferencesRef)->setShouldDisplayTextDescriptions(enabled); 698 } 699 700 bool WKPreferencesGetShouldDisplayTextDescriptions(WKPreferencesRef preferencesRef) 701 { 702 return toImpl(preferencesRef)->shouldDisplayTextDescriptions(); 703 } -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.h
r100153 r101977 182 182 WK_EXPORT bool WKPreferencesGetCaretBrowsingEnabled(WKPreferencesRef preferencesRef); 183 183 184 // Defaults to false 185 WK_EXPORT void WKPreferencesSetShouldDisplaySubtitles(WKPreferencesRef preferencesRef, bool enabled); 186 WK_EXPORT bool WKPreferencesGetShouldDisplaySubtitles(WKPreferencesRef preferencesRef); 187 188 // Defaults to false 189 WK_EXPORT void WKPreferencesSetShouldDisplayCaptions(WKPreferencesRef preferencesRef, bool enabled); 190 WK_EXPORT bool WKPreferencesGetShouldDisplayCaptions(WKPreferencesRef preferencesRef); 191 192 // Defaults to false 193 WK_EXPORT void WKPreferencesSetShouldDisplayTextDescriptions(WKPreferencesRef preferencesRef, bool enabled); 194 WK_EXPORT bool WKPreferencesGetShouldDisplayTextDescriptions(WKPreferencesRef preferencesRef); 195 184 196 #ifdef __cplusplus 185 197 } -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r101719 r101977 1814 1814 settings->setCaretBrowsingEnabled(store.getBoolValueForKey(WebPreferencesKey::caretBrowsingEnabledKey())); 1815 1815 1816 #if ENABLE(VIDEO_TRACK) 1817 settings->setShouldDisplaySubtitles(store.getBoolValueForKey(WebPreferencesKey::shouldDisplaySubtitlesKey())); 1818 settings->setShouldDisplayCaptions(store.getBoolValueForKey(WebPreferencesKey::shouldDisplayCaptionsKey())); 1819 settings->setShouldDisplayTextDescriptions(store.getBoolValueForKey(WebPreferencesKey::shouldDisplayTextDescriptionsKey())); 1820 #endif 1821 1816 1822 platformPreferencesDidChange(store); 1817 1823 }
Note:
See TracChangeset
for help on using the changeset viewer.