Skip to content
  • timothy@apple.com's avatar
    Make the user agent generation method a class method and cache the WebKit · 1f58664f
    timothy@apple.com authored
            version in a static to prevent generating it every time. This is needed
            clean up to fix <rdar://problem/6292331>. Moved all code to WebPrivate so
            the class method can be in the WebViewPrivate.h header.
    
            Reviewed by John Sullivan.
    
            * WebView/WebView.mm:
            (callGestalt): Moved. Same code.
            (createMacOSXVersionString): Moved. Same code.
            (createUserVisibleWebKitVersionString): Moved from _userVisibleBundleVersionFromFullVersion:
            and returns a copied string.
            (+[WebView _standardUserAgentWithApplicationName:andWebKitVersion:]): Made into a class method.
            (-[WebView WebCore::_userAgentForURL:]): Changed to cache the WebKit version.
            * WebView/WebViewPrivate.h: Added +_standardUserAgentWithApplicationName:andWebKitVersion:.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    1f58664f