| Conforms to | |
| Framework | /System/Library/Frameworks/WebKit.framework |
| Availability | Available in Mac OS X v10.2 with Safari 1.0 and later. Available in Mac OS X v10.2.7 and later. |
| Companion guide | |
| Declared in | WebDocument.h |
This protocol is adopted by the document view of a WebFrameView. You can extend WebKit to support additional MIME types by implementing your own document view and document representation classes to render data for specific MIME types. You register those classes using the WebFrame registerViewClass:representationClass:forMIMEType: method. Classes that adopt this protocol are expected to be subclasses of NSView.
– setDataSource: required method
– dataSourceUpdated: required method
– setNeedsLayout: required method
– layout required method
– viewDidMoveToHostWindow required method
– viewWillMoveToHostWindow: required method
Invoked when additional data has been received. (required)
- (void)dataSourceUpdated:(WebDataSource *)dataSource
The source of the new data.
WebDocument.hInvoked when the receiver should change its layout immediately. (required)
- (void)layout
This message is sent to the view as a hint to perform any calculations and update rendering information. For example, at a minimum, the receiver might set the frame rectangle. This method should not perform any drawing operations.
WebDocument.hInvoked when the data source for this document has been changed. (required)
- (void)setDataSource:(WebDataSource *)dataSource
The new data source for the document.
WebDocument.hSets whether or not the receiver should change its layout. (required)
- (void)setNeedsLayout:(BOOL)flag
Sets whether the receiver needs to update its layout in the next call to its drawRect: method.
A view conforming to this protocol should store the most recent value of this flag in an internal variable. Then, in its drawRect method, if the most recent value of this flag was YES, it should invoke layout and reset the internal variable before updating the contents of the view.
WebDocument.hInvoked when a web view's host window is set. (required)
- (void)viewDidMoveToHostWindow
WebDocument.hInvoked when a web view’s host window is about to change. (required)
- (void)viewWillMoveToHostWindow:(NSWindow *)hostWindow
The new host window for the view.
WebDocument.hLast updated: 2009-08-19