[webkit-changes] cvs commit: WebKit/WebView.subproj WebPDFView.m

John sullivan at opensource.apple.com
Tue Jul 5 11:37:37 PDT 2005


sullivan    05/07/05 11:37:37

  Modified:    .        ChangeLog
               WebView.subproj WebPDFView.m
  Log:
          Reviewed by Chris Blumenberg.
  
          - fixed <rdar://problem/4158230> Zoom In/Zoom Out in PDF context menu don't update window's notion of text size
  
          * WebView.subproj/WebPDFView.m:
          (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
          Redirect Actual Size, Zoom In, and Zoom Out context menu items so that they behave exactly like Make Text Standard Size,
          Make Text Larger, and Make Text Smaller.
  
  Revision  Changes    Path
  1.3211    +11 -0     WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3210
  retrieving revision 1.3211
  diff -u -r1.3210 -r1.3211
  --- ChangeLog	1 Jul 2005 21:30:50 -0000	1.3210
  +++ ChangeLog	5 Jul 2005 18:37:34 -0000	1.3211
  @@ -1,3 +1,14 @@
  +2005-07-05  John Sullivan  <sullivan at apple.com>
  +
  +        Reviewed by Chris Blumenberg.
  +        
  +        - fixed <rdar://problem/4158230> Zoom In/Zoom Out in PDF context menu don't update window's notion of text size
  +
  +        * WebView.subproj/WebPDFView.m:
  +        (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
  +        Redirect Actual Size, Zoom In, and Zoom Out context menu items so that they behave exactly like Make Text Standard Size,
  +        Make Text Larger, and Make Text Smaller.
  +
   2005-07-01  John Sullivan  <sullivan at apple.com>
   
           Reviewed by Darin Adler.
  
  
  
  1.16      +21 -1     WebKit/WebView.subproj/WebPDFView.m
  
  Index: WebPDFView.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebView.subproj/WebPDFView.m,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- WebPDFView.m	1 Jul 2005 21:30:52 -0000	1.15
  +++ WebPDFView.m	5 Jul 2005 18:37:37 -0000	1.16
  @@ -223,7 +223,27 @@
               [itemCopy setTag:tag];
           } else {
               ERROR("PDF context menu item %@ came with tag %d, so no WebKit tag was applied. This could mean that the item doesn't appear in clients such as Safari.", [itemCopy title], [itemCopy tag]);
  -        }        
  +        }
  +        
  +        // Intercept some of these menu items for better WebKit integration.
  +        switch (tag) {
  +            // Convert the scale-factor-related items to use WebKit's text sizing API instead, so they match other
  +            // UI that uses the text sizing API (such as Make Text Larger/Smaller menu items in Safari).
  +            case WebMenuItemPDFActualSize:
  +                [itemCopy setTarget:[[dataSource webFrame] webView]];
  +                [itemCopy setAction:@selector(makeTextStandardSize:)];
  +                break;
  +            case WebMenuItemPDFZoomIn:
  +                [itemCopy setTarget:[[dataSource webFrame] webView]];
  +                [itemCopy setAction:@selector(makeTextLarger:)];
  +                break;
  +            case WebMenuItemPDFZoomOut:
  +                [itemCopy setTarget:[[dataSource webFrame] webView]];
  +                [itemCopy setAction:@selector(makeTextSmaller:)];
  +                break;
  +            default:
  +                break;
  +        }
       }
       
       [actionsToTags release];
  
  
  



More information about the webkit-changes mailing list