Patch by Trey Matteson <trey@usa.net>
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Aug 2005 17:50:35 +0000 (17:50 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Aug 2005 17:50:35 +0000 (17:50 +0000)
commit2ad6db31ecd2a3f7f3dfb47f9b9712be711f850e
tree12e1a931bad24088c653d77128025719033f9aff
parent5046fb9ba527236e8a55b83eacf65ce0103b6e12
    Patch by Trey Matteson <trey@usa.net>
        Reviewed by me.

        Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4014
          PDF files by default load with a poor choice of sizing

        For now the various PDF viewing settings are sticky, stored in 2 new defaults.  Since
        there are a number of ways these settings are changed, I made a proxy for the PDFView
        through which all view changing messages are sent.  The proxy adds the behavior of
        updating the defaults upon any change.

        * Misc.subproj/WebNSDictionaryExtras.h:
        * Misc.subproj/WebNSDictionaryExtras.m:
        (-[NSMutableDictionary _webkit_setFloat:forKey:]):  New support method.
        * WebView.subproj/WebPDFView.h:
        * WebView.subproj/WebPDFView.m:
        (-[WebPDFView initWithFrame:]):  Create proxy for PDFView.
        (-[WebPDFView dealloc]):  Free proxy.
        (-[WebPDFView _menuItemsFromPDFKitForEvent:]):  For relevant context menu items, set the
            target to the proxy instead of the PDFView.
        (-[WebPDFView _readPDFDefaults]):  Init PDFView with settings from defaults.
        (-[WebPDFView layout]):  Call _readPDFDefaults, once.  This turned out to be the best hook.
        (-[WebPDFView _makeTextSmaller:]):  Change PDFView via proxy
        (-[WebPDFView _makeTextLarger:]):  Ditto
        (-[WebPDFView _makeTextStandardSize:]):  Ditto
        (-[PDFPrefUpdatingProxy initWithView:]):  trivial
        (-[PDFPrefUpdatingProxy forwardInvocation:]):  Forward the msg, then update defaults
        (-[PDFPrefUpdatingProxy methodSignatureForSelector:]):  Simple forwarding support.
        * WebView.subproj/WebPreferenceKeysPrivate.h:
        * WebView.subproj/WebPreferences.m:
        (+[WebPreferences initialize]):  Set initial values for new PDF viewing defaults.
        (-[WebPreferences _integerValueForKey:]):  Nuke stray comment.
        (-[WebPreferences _floatValueForKey:]):  New simple support method.
        (-[WebPreferences _setFloatValue:forKey:]):  Ditto.
        (-[WebPreferences PDFScaleFactor]):  4 accessors for new defaults
        (-[WebPreferences setPDFScaleFactor:]):
        (-[WebPreferences PDFDisplayMode]):
        (-[WebPreferences setPDFDisplayMode:]):
        * WebView.subproj/WebPreferencesPrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9996 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit/ChangeLog
WebKit/Misc.subproj/WebNSDictionaryExtras.h
WebKit/Misc.subproj/WebNSDictionaryExtras.m
WebKit/WebView.subproj/WebPDFView.h
WebKit/WebView.subproj/WebPDFView.m
WebKit/WebView.subproj/WebPreferenceKeysPrivate.h
WebKit/WebView.subproj/WebPreferences.m
WebKit/WebView.subproj/WebPreferencesPrivate.h