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

David hyatt at opensource.apple.com
Tue Jul 26 13:29:08 PDT 2005


hyatt       05/07/26 13:29:07

  Modified:    .        ChangeLog
               WebView.subproj WebHTMLView.h WebHTMLView.m
  Log:
  	Make WebHTMLView inherit from NSControl instead of NSView.
  	This change is necessary because the theme renderer for
  	WebCore that draws controls with the Aqua appearance does so
  	using NSCells.  NSCells must be hosted within a control view
  	in order to paint properly.
  
  	The method updateCell must be overridden because it wants to
  	repaint the whole control when the windows resigns/becomes
  	key, and this would result in behavior that we don't want
  	(the repainting of the whole view).  We already have hooks
  	in WebHTMLView for the window resigning/becoming key so
  	we will do our proper control updating there instead (in a
  	future patch).
  
          Reviewed by john
  
          * WebView.subproj/WebHTMLView.h:
          * WebView.subproj/WebHTMLView.m:
          (-[WebHTMLView updateCell:]):
  
  Revision  Changes    Path
  1.3260    +22 -0     WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3259
  retrieving revision 1.3260
  diff -u -r1.3259 -r1.3260
  --- ChangeLog	26 Jul 2005 17:37:22 -0000	1.3259
  +++ ChangeLog	26 Jul 2005 20:29:03 -0000	1.3260
  @@ -1,3 +1,25 @@
  +2005-07-26  David Hyatt  <hyatt at apple.com>
  +
  +	Make WebHTMLView inherit from NSControl instead of NSView.
  +	This change is necessary because the theme renderer for
  +	WebCore that draws controls with the Aqua appearance does so
  +	using NSCells.  NSCells must be hosted within a control view
  +	in order to paint properly.
  +
  +	The method updateCell must be overridden because it wants to
  +	repaint the whole control when the windows resigns/becomes
  +	key, and this would result in behavior that we don't want
  +	(the repainting of the whole view).  We already have hooks
  +	in WebHTMLView for the window resigning/becoming key so
  +	we will do our proper control updating there instead (in a
  +	future patch).
  +
  +        Reviewed by john
  +
  +        * WebView.subproj/WebHTMLView.h:
  +        * WebView.subproj/WebHTMLView.m:
  +        (-[WebHTMLView updateCell:]):
  +        
   2005-07-26  John Sullivan  <sullivan at apple.com>
   
           Reviewed by Chris Blumenberg.
  
  
  
  1.20      +3 -1      WebKit/WebView.subproj/WebHTMLView.h
  
  Index: WebHTMLView.h
  ===================================================================
  RCS file: /cvs/root/WebKit/WebView.subproj/WebHTMLView.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- WebHTMLView.h	5 Jun 2005 17:54:47 -0000	1.19
  +++ WebHTMLView.h	26 Jul 2005 20:29:06 -0000	1.20
  @@ -38,8 +38,10 @@
   /*!
       @class WebHTMLView
       @discussion A document view of WebFrameView that displays HTML content.
  +    WebHTMLView is a NSControl because it hosts NSCells that are painted by WebCore's Aqua theme
  +    renderer (and those cells must be hosted by an enclosing NSControl in order to paint properly).
   */
  - at interface WebHTMLView : NSView <WebDocumentView, WebDocumentSearching, WebDocumentText, WebDocumentDragging, WebDocumentElement, WebDocumentSelection>
  + at interface WebHTMLView : NSControl <WebDocumentView, WebDocumentSearching, WebDocumentText, WebDocumentDragging, WebDocumentElement, WebDocumentSelection>
   {
   @private
       WebHTMLViewPrivate *_private;
  
  
  
  1.461     +7 -0      WebKit/WebView.subproj/WebHTMLView.m
  
  Index: WebHTMLView.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebView.subproj/WebHTMLView.m,v
  retrieving revision 1.460
  retrieving revision 1.461
  diff -u -r1.460 -r1.461
  --- WebHTMLView.m	25 Jul 2005 00:35:32 -0000	1.460
  +++ WebHTMLView.m	26 Jul 2005 20:29:06 -0000	1.461
  @@ -3006,6 +3006,13 @@
   {
   }
   
  +// This is an override of an NSControl method that wants to repaint the entire view when the window resigns/becomes
  +// key.  WebHTMLView is an NSControl only because it hosts NSCells that are painted by WebCore's Aqua theme
  +// renderer (and those cells must be hosted by an enclosing NSControl in order to paint properly).
  +- (void)updateCell:(NSCell*)cell
  +{
  +}
  +
   // Does setNeedsDisplay:NO as a side effect when printing is ending.
   // pageWidth != 0 implies we will relayout to a new width
   - (void)_setPrinting:(BOOL)printing minimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustViewSize:(BOOL)adjustViewSize
  
  
  



More information about the webkit-changes mailing list