Reviewed by Darin.
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Dec 2004 21:33:09 +0000 (21:33 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Dec 2004 21:33:09 +0000 (21:33 +0000)
commit96d565feb6634416b8e98b593e39914974787df6
tree02a30c41614d934eb0e66dc4cdcdec6eeaa67c43
parentb9bcc7652decaf7f848a6e353faa8a2b1bbaa05b
    Reviewed by Darin.

        - fixed <rdar://problem/3913523> Mail needs SPI for adding tooltips to links
        - cleaned up some calls to +[WebPreferences standardPreferences] that should
          have been using -[WebView preferences]

        This adds a (currently SPI-only) new feature that shows the URL of the link
        under the mouse in a toolTip. I tested this in Safari, but we're adding this
        feature for Mail, and Safari won't use it (unless of course you know the
        magic defaults command)

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView start]):
        use -[WebView preferences] instead of +[WebPreferences standardPreferences]

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge getObjectCacheSize]):
        ditto
        (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]):
        ditto

        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (-[WebBaseResourceHandleDelegate willCacheResponse:]):
        ditto

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToCommitted:]):
        ditto
        (-[WebFrame _loadItem:withLoadType:]):
        ditto

        * WebView.subproj/WebHTMLViewInternal.h:
        private struct now keeps ivar for cached value of showsURLsInToolTips
        so it doesn't have look it up in preferences a zillion times

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _updateMouseoverWithEvent:]):
        if private->showsURLsInToolTips is true, set the toolTip from the URL.
        Fall back to showing the title attribute in case some element has a title
        attribute but no URL.
        (-[WebHTMLView _mayStartDragAtEventLocation:]):
        use -[WebView preferences] instead of +[WebPreferences standardPreferences]
        (-[WebHTMLView _resetCachedWebPreferences:]):
        get a fresh value for private->showsURLsInToolTips
        (-[WebHTMLView initWithFrame:]):
        call _resetCachedWebPreferences the first time, and listen for WebPreferencesChanged notifications
        (-[WebHTMLView _handleStyleKeyEquivalent:]):
        use -[WebView preferences] instead of +[WebPreferences standardPreferences]

        * WebView.subproj/WebPreferenceKeysPrivate.h:
        added WebKitShowsURLsInToolTipsPreferenceKey

        * WebView.subproj/WebPreferences.m:
        (+[WebPreferences initialize]):
        initialize WebKitShowsURLsInToolTipsPreferenceKey to 0
        (-[WebPreferences showsURLsInToolTips]):
        return WebKitShowsURLsInToolTipsPreferenceKey value
        (-[WebPreferences setShowsURLsInToolTips:]):
        set WebKitShowsURLsInToolTipsPreferenceKey value

        * WebView.subproj/WebPreferencesPrivate.h:
        add declarations for showsURLsInToolTips and setter

        * WebView.subproj/WebTextView.m:
        (-[WebTextView _preferences]):
        new helper method that gets preferences from webView if there is a webView,
        otherwise gets global preferences
        (-[WebTextView setFixedWidthFont]):
        use new helper method rather than always using global preferences
        (-[WebTextView initWithFrame:]):
        observe WebPreferencesChangedNotification instead of unnecessarily general
        NSUserDefaultsChangedNotification

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
WebKit/ChangeLog
WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
WebKit/WebCoreSupport.subproj/WebBridge.m
WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
WebKit/WebView.subproj/WebFrame.m
WebKit/WebView.subproj/WebHTMLView.m
WebKit/WebView.subproj/WebHTMLViewInternal.h
WebKit/WebView.subproj/WebLoader.m
WebKit/WebView.subproj/WebPreferenceKeysPrivate.h
WebKit/WebView.subproj/WebPreferences.m
WebKit/WebView.subproj/WebPreferencesPrivate.h
WebKit/WebView.subproj/WebTextView.m