Reviewed by Adele
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Mar 2007 17:25:09 +0000 (17:25 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Mar 2007 17:25:09 +0000 (17:25 +0000)
commit5e7241fa625621b93d268293d050e8a08da3fb17
tree727dedb9e4d5b12ceec24d707999fce61e264eaa
parent0cf4b218f455b8fae33d03735400858602da7a84
    Reviewed by Adele

        - fixed <rdar://problem/5084872> Need to add flickr to spoof list in WebKit
        - only do site-specific spoofing if a preference is set

        * WebView/WebPreferenceKeysPrivate.h:
        added WebKitUseSiteSpecificSpoofingPreferenceKey

        * WebView/WebPreferences.m:
        (+[WebPreferences initialize]):
        initialize WebKitUseSiteSpecificSpoofingPreferenceKey to false
        (-[WebPreferences _useSiteSpecificSpoofing]):
        get value of WebKitUseSiteSpecificSpoofingPreferenceKey
        (-[WebPreferences _setUseSiteSpecificSpoofing:]):
        set value of WebKitUseSiteSpecificSpoofingPreferenceKey

        * WebView/WebPreferencesPrivate.h:
        declare _useSiteSpecificSpoofing and _setUseSiteSpecificSpoofing

        * WebView/WebView.mm:
        cache the value of WebKitUseSiteSpecificSpoofingPreferenceKey in a bool in _private
        (-[WebView _preferencesChangedNotification:]):
        update the cached value
        (-[WebView setPreferences:]):
        ditto
        (-[WebView WebCore::_userAgentForURL:WebCore::]):
        Only spoof here if the new site-specific spoofing preference is enabled. If it is, pass
        Safari 2.0.4's user agent string for flickr.com. We can remove this case when 5081617 is addressed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit/ChangeLog
WebKit/WebView/WebPreferenceKeysPrivate.h
WebKit/WebView/WebPreferences.m
WebKit/WebView/WebPreferencesPrivate.h
WebKit/WebView/WebView.mm