2 * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
14 * its contributors may be used to endorse or promote products derived
15 * from this software without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #import <Foundation/Foundation.h>
30 #import <Foundation/NSURLRequest.h>
31 #import <WebKit/WebKitAvailability.h>
34 #import <AppKit/AppKit.h>
36 #import <WebKit/WAKAppKitStubs.h>
41 @discussion Each menu item in the default menu items array passed in
42 contextMenuItemsForElement:defaultMenuItems: has its tag set to one of the WebMenuItemTags.
43 When iterating through the default menu items array, use the tag to differentiate between them.
47 WebMenuItemTagOpenLinkInNewWindow=1,
48 WebMenuItemTagDownloadLinkToDisk,
49 WebMenuItemTagCopyLinkToClipboard,
50 WebMenuItemTagOpenImageInNewWindow,
51 WebMenuItemTagDownloadImageToDisk,
52 WebMenuItemTagCopyImageToClipboard,
53 WebMenuItemTagOpenFrameInNewWindow,
56 WebMenuItemTagGoForward,
61 WebMenuItemTagSpellingGuess,
62 WebMenuItemTagNoGuessesFound,
63 WebMenuItemTagIgnoreSpelling,
64 WebMenuItemTagLearnSpelling,
66 WebMenuItemTagSearchInSpotlight,
67 WebMenuItemTagSearchWeb,
68 WebMenuItemTagLookUpInDictionary,
69 WebMenuItemTagOpenWithDefaultApplication,
70 WebMenuItemPDFActualSize,
72 WebMenuItemPDFZoomOut,
73 WebMenuItemPDFAutoSize,
74 WebMenuItemPDFSinglePage,
75 WebMenuItemPDFFacingPages,
76 WebMenuItemPDFContinuous,
77 WebMenuItemPDFNextPage,
78 WebMenuItemPDFPreviousPage,
82 @enum WebDragDestinationAction
83 @abstract Actions that the destination of a drag can perform.
84 @constant WebDragDestinationActionNone No action
85 @constant WebDragDestinationActionDHTML Allows DHTML (such as JavaScript) to handle the drag
86 @constant WebDragDestinationActionEdit Allows editable documents to be edited from the drag
87 @constant WebDragDestinationActionLoad Allows a location change from the drag
88 @constant WebDragDestinationActionAny Allows any of the above to occur
90 typedef NS_OPTIONS(NSUInteger, WebDragDestinationAction) {
91 WebDragDestinationActionNone = 0,
92 WebDragDestinationActionDHTML = 1,
93 WebDragDestinationActionEdit = 2,
94 WebDragDestinationActionLoad = 4,
95 WebDragDestinationActionAny = UINT_MAX
99 @enum WebDragSourceAction
100 @abstract Actions that the source of a drag can perform.
101 @constant WebDragSourceActionNone No action
102 @constant WebDragSourceActionDHTML Allows DHTML (such as JavaScript) to start a drag
103 @constant WebDragSourceActionImage Allows an image drag to occur
104 @constant WebDragSourceActionLink Allows a link drag to occur
105 @constant WebDragSourceActionSelection Allows a selection drag to occur
106 @constant WebDragSourceActionAny Allows any of the above to occur
108 typedef NS_OPTIONS(NSUInteger, WebDragSourceAction) {
109 WebDragSourceActionNone = 0,
110 WebDragSourceActionDHTML = 1,
111 WebDragSourceActionImage = 2,
112 WebDragSourceActionLink = 4,
113 WebDragSourceActionSelection = 8,
114 WebDragSourceActionAny = UINT_MAX
118 @protocol WebOpenPanelResultListener
119 @discussion This protocol is used to call back with the results of
120 the file open panel requested by runOpenPanelForFileButtonWithResultListener:
122 @protocol WebOpenPanelResultListener <NSObject>
125 @method chooseFilename:
126 @abstract Call this method to return a filename from the file open panel.
129 - (void)chooseFilename:(NSString *)fileName;
132 @method chooseFilenames:
133 @abstract Call this method to return an array of filenames from the file open panel.
136 - (void)chooseFilenames:(NSArray *)fileNames WEBKIT_AVAILABLE_MAC(10_6);
140 @abstract Call this method to indicate that the file open panel was cancelled.
145 - (void)chooseFilename:(NSString *)filename displayString:(NSString *)displayString iconImage:(CGImageRef)imageRef;
146 - (void)chooseFilenames:(NSArray *)filenames displayString:(NSString *)displayString iconImage:(CGImageRef)imageRef;
156 @category WebUIDelegate
157 @discussion A class that implements WebUIDelegate provides
158 window-related methods that may be used by Javascript, plugins and
159 other aspects of web pages. These methods are used to open new
160 windows and control aspects of existing windows.
162 @interface NSObject (WebUIDelegate)
165 @method webView:createWebViewWithRequest:
166 @abstract Create a new window and begin to load the specified request.
167 @discussion The newly created window is hidden, and the window operations delegate on the
168 new WebViews will get a webViewShow: call.
169 @param sender The WebView sending the delegate method.
170 @param request The request to load.
171 @result The WebView for the new window.
173 - (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request;
177 @param sender The WebView sending the delegate method.
178 @abstract Show the window that contains the top level view of the WebView,
179 ordering it frontmost.
180 @discussion This will only be called just after createWindowWithRequest:
181 is used to create a new window.
183 - (void)webViewShow:(WebView *)sender;
186 @method webView:createWebViewModalDialogWithRequest:
187 @abstract Create a new window and begin to load the specified request.
188 @discussion The newly created window is hidden, and the window operations delegate on the
189 new WebViews will get a webViewShow: call.
190 @param sender The WebView sending the delegate method.
191 @param request The request to load.
192 @result The WebView for the new window.
194 - (WebView *)webView:(WebView *)sender createWebViewModalDialogWithRequest:(NSURLRequest *)request;
197 @method webViewRunModal:
198 @param sender The WebView sending the delegate method.
199 @abstract Show the window that contains the top level view of the WebView,
200 ordering it frontmost. The window should be run modal in the application.
201 @discussion This will only be called just after createWebViewModalDialogWithRequest:
202 is used to create a new window.
204 - (void)webViewRunModal:(WebView *)sender;
207 @method webViewClose:
208 @abstract Close the current window.
209 @param sender The WebView sending the delegate method.
210 @discussion Clients showing multiple views in one window may
211 choose to close only the one corresponding to this
212 WebView. Other clients may choose to ignore this method
215 - (void)webViewClose:(WebView *)sender;
218 @method webViewFocus:
219 @abstract Focus the current window (i.e. makeKeyAndOrderFront:).
220 @param The WebView sending the delegate method.
221 @discussion Clients showing multiple views in one window may want to
222 also do something to focus the one corresponding to this WebView.
224 - (void)webViewFocus:(WebView *)sender;
227 @method webViewUnfocus:
228 @abstract Unfocus the current window.
229 @param sender The WebView sending the delegate method.
230 @discussion Clients showing multiple views in one window may want to
231 also do something to unfocus the one corresponding to this WebView.
233 - (void)webViewUnfocus:(WebView *)sender;
236 @method webViewFirstResponder:
237 @abstract Get the first responder for this window.
238 @param sender The WebView sending the delegate method.
239 @discussion This method should return the focused control in the
240 WebView's view, if any. If the view is out of the window
241 hierarchy, this might return something than calling firstResponder
242 on the real NSWindow would. It's OK to return either nil or the
243 real first responder if some control not in the window has focus.
245 - (NSResponder *)webViewFirstResponder:(WebView *)sender;
248 @method webView:makeFirstResponder:
249 @abstract Set the first responder for this window.
250 @param sender The WebView sending the delegate method.
251 @param responder The responder to make first (will always be a view)
252 @discussion responder will always be a view that is in the view
253 subhierarchy of the top-level web view for this WebView. If the
254 WebView's top level view is currently out of the view
255 hierarchy, it may be desirable to save the first responder
256 elsewhere, or possibly ignore this call.
258 - (void)webView:(WebView *)sender makeFirstResponder:(NSResponder *)responder;
261 @method webView:setStatusText:
262 @abstract Set the window's status display, if any, to the specified string.
263 @param sender The WebView sending the delegate method.
264 @param text The status text to set
266 - (void)webView:(WebView *)sender setStatusText:(NSString *)text;
269 @method webViewStatusText:
270 @abstract Get the currently displayed status text.
271 @param sender The WebView sending the delegate method.
272 @result The status text
274 - (NSString *)webViewStatusText:(WebView *)sender;
277 @method webViewAreToolbarsVisible:
278 @abstract Determine whether the window's toolbars are currently visible
279 @param sender The WebView sending the delegate method.
280 @discussion This method should return YES if the window has any
281 toolbars that are currently on, besides the status bar. If the app
282 has more than one toolbar per window, for example a regular
283 command toolbar and a favorites bar, it should return YES from
284 this method if at least one is on.
285 @result YES if at least one toolbar is visible, otherwise NO.
287 - (BOOL)webViewAreToolbarsVisible:(WebView *)sender;
290 @method webView:setToolbarsVisible:
291 @param sender The WebView sending the delegate method.
292 @abstract Set whether the window's toolbars are currently visible.
293 @param visible New value for toolbar visibility
294 @discussion Setting this to YES should turn on all toolbars
295 (except for a possible status bar). Setting it to NO should turn
296 off all toolbars (with the same exception).
298 - (void)webView:(WebView *)sender setToolbarsVisible:(BOOL)visible;
301 @method webViewIsStatusBarVisible:
302 @abstract Determine whether the status bar is visible.
303 @param sender The WebView sending the delegate method.
304 @result YES if the status bar is visible, otherwise NO.
306 - (BOOL)webViewIsStatusBarVisible:(WebView *)sender;
309 @method webView:setStatusBarVisible:
310 @abstract Set whether the status bar is currently visible.
311 @param visible The new visibility value
312 @discussion Setting this to YES should show the status bar,
313 setting it to NO should hide it.
315 - (void)webView:(WebView *)sender setStatusBarVisible:(BOOL)visible;
318 @method webViewIsResizable:
319 @abstract Determine whether the window is resizable or not.
320 @param sender The WebView sending the delegate method.
321 @result YES if resizable, NO if not.
322 @discussion If there are multiple views in the same window, they
323 have have their own separate resize controls and this may need to
324 be handled specially.
326 - (BOOL)webViewIsResizable:(WebView *)sender;
329 @method webView:setResizable:
330 @abstract Set the window to resizable or not
331 @param sender The WebView sending the delegate method.
332 @param resizable YES if the window should be made resizable, NO if not.
333 @discussion If there are multiple views in the same window, they
334 have have their own separate resize controls and this may need to
335 be handled specially.
337 - (void)webView:(WebView *)sender setResizable:(BOOL)resizable;
340 @method webView:setFrame:
341 @abstract Set the window's frame rect
342 @param sender The WebView sending the delegate method.
343 @param frame The new window frame size
344 @discussion Even though a caller could set the frame directly using the NSWindow,
345 this method is provided so implementors of this protocol can do special
346 things on programmatic move/resize, like avoiding autosaving of the size.
348 - (void)webView:(WebView *)sender setFrame:(NSRect)frame;
351 @method webViewFrame:
352 @param sender The WebView sending the delegate method.
353 @abstract REturn the window's frame rect
356 - (NSRect)webViewFrame:(WebView *)sender;
359 @method webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:
360 @abstract Display a JavaScript alert panel.
361 @param sender The WebView sending the delegate method.
362 @param message The message to display.
363 @param frame The WebFrame whose JavaScript initiated this call.
364 @discussion Clients should visually indicate that this panel comes
365 from JavaScript initiated by the specified frame. The panel should have
368 - (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
371 @method webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:
372 @abstract Display a JavaScript confirm panel.
373 @param sender The WebView sending the delegate method.
374 @param message The message to display.
375 @param frame The WebFrame whose JavaScript initiated this call.
376 @result YES if the user hit OK, NO if the user chose Cancel.
377 @discussion Clients should visually indicate that this panel comes
378 from JavaScript initiated by the specified frame. The panel should have
379 two buttons, e.g. "OK" and "Cancel".
381 - (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
384 @method webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:
385 @abstract Display a JavaScript text input panel.
386 @param sender The WebView sending the delegate method.
387 @param message The message to display.
388 @param defaultText The initial text for the text entry area.
389 @param frame The WebFrame whose JavaScript initiated this call.
390 @result The typed text if the user hit OK, otherwise nil.
391 @discussion Clients should visually indicate that this panel comes
392 from JavaScript initiated by the specified frame. The panel should have
393 two buttons, e.g. "OK" and "Cancel", and an area to type text.
395 - (NSString *)webView:(WebView *)sender runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText initiatedByFrame:(WebFrame *)frame;
398 @method webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:
399 @abstract Display a confirm panel by an "before unload" event handler.
400 @param sender The WebView sending the delegate method.
401 @param message The message to display.
402 @param frame The WebFrame whose JavaScript initiated this call.
403 @result YES if the user hit OK, NO if the user chose Cancel.
404 @discussion Clients should include a message in addition to the one
405 supplied by the web page that indicates. The panel should have
406 two buttons, e.g. "OK" and "Cancel".
408 - (BOOL)webView:(WebView *)sender runBeforeUnloadConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
411 @method webView:runOpenPanelForFileButtonWithResultListener:
412 @abstract Display a file open panel for a file input control.
413 @param sender The WebView sending the delegate method.
414 @param resultListener The object to call back with the results.
415 @discussion This method is passed a callback object instead of giving a return
416 value so that it can be handled with a sheet.
418 - (void)webView:(WebView *)sender runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener;
421 @method webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles
422 @abstract Display a file open panel for a file input control that may allow multiple files to be selected.
423 @param sender The WebView sending the delegate method.
424 @param resultListener The object to call back with the results.
425 @param allowMultipleFiles YES if the open panel should allow myltiple files to be selected, NO if not.
426 @discussion This method is passed a callback object instead of giving a return
427 value so that it can be handled with a sheet.
429 - (void)webView:(WebView *)sender runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener allowMultipleFiles:(BOOL)allowMultipleFiles WEBKIT_AVAILABLE_MAC(10_6);
432 @method webView:mouseDidMoveOverElement:modifierFlags:
433 @abstract Update the window's feedback for mousing over links to reflect a new item the mouse is over
434 or new modifier flags.
435 @param sender The WebView sending the delegate method.
436 @param elementInformation Dictionary that describes the element that the mouse is over, or nil.
437 @param modifierFlags The modifier flags as in NSEvent.
439 - (void)webView:(WebView *)sender mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(NSUInteger)modifierFlags;
442 @method webView:contextMenuItemsForElement:defaultMenuItems:
443 @abstract Returns the menu items to display in an element's contextual menu.
444 @param sender The WebView sending the delegate method.
445 @param element A dictionary representation of the clicked element.
446 @param defaultMenuItems An array of default NSMenuItems to include in all contextual menus.
447 @result An array of NSMenuItems to include in the contextual menu.
449 - (NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray *)defaultMenuItems;
451 #if !TARGET_OS_IPHONE
453 @method webView:validateUserInterfaceItem:defaultValidation:
454 @abstract Controls UI validation
455 @param webView The WebView sending the delegate method
456 @param item The user interface item being validated
457 @pararm defaultValidation Whether or not the WebView thinks the item is valid
458 @discussion This method allows the UI delegate to control WebView's validation of user interface items.
459 See WebView.h to see the methods to that WebView can currently validate. See NSUserInterfaceValidations and
460 NSValidatedUserInterfaceItem for information about UI validation.
462 - (BOOL)webView:(WebView *)webView validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item defaultValidation:(BOOL)defaultValidation;
466 @method webView:shouldPerformAction:fromSender:
467 @abstract Controls actions
468 @param webView The WebView sending the delegate method
469 @param action The action being sent
470 @param sender The sender of the action
471 @discussion This method allows the UI delegate to control WebView's behavior when an action is being sent.
472 For example, if the action is copy:, the delegate can return YES to allow WebView to perform its default
473 copy behavior or return NO and perform copy: in some other way. See WebView.h to see the actions that
476 - (BOOL)webView:(WebView *)webView shouldPerformAction:(SEL)action fromSender:(id)sender;
478 #if !TARGET_OS_IPHONE
480 @method webView:dragDestinationActionMaskForDraggingInfo:
481 @abstract Controls behavior when dragging to a WebView
482 @param webView The WebView sending the delegate method
483 @param draggingInfo The dragging info of the drag
484 @discussion This method is called periodically as something is dragged over a WebView. The UI delegate can return a mask
485 indicating which drag destination actions can occur, WebDragDestinationActionAny to allow any kind of action or
486 WebDragDestinationActionNone to not accept the drag.
488 - (NSUInteger)webView:(WebView *)webView dragDestinationActionMaskForDraggingInfo:(id <NSDraggingInfo>)draggingInfo;
491 @method webView:willPerformDragDestinationAction:forDraggingInfo:
492 @abstract Informs that WebView will perform a drag destination action
493 @param webView The WebView sending the delegate method
494 @param action The drag destination action
495 @param draggingInfo The dragging info of the drag
496 @discussion This method is called after the last call to webView:dragDestinationActionMaskForDraggingInfo: after something is dropped on a WebView.
497 This method informs the UI delegate of the drag destination action that WebView will perform.
499 - (void)webView:(WebView *)webView willPerformDragDestinationAction:(WebDragDestinationAction)action forDraggingInfo:(id <NSDraggingInfo>)draggingInfo;
502 @method webView:dragSourceActionMaskForPoint:
503 @abstract Controls behavior when dragging from a WebView
504 @param webView The WebView sending the delegate method
505 @param point The point where the drag started in the coordinates of the WebView
506 @discussion This method is called after the user has begun a drag from a WebView. The UI delegate can return a mask indicating
507 which drag source actions can occur, WebDragSourceActionAny to allow any kind of action or WebDragSourceActionNone to not begin a drag.
509 - (NSUInteger)webView:(WebView *)webView dragSourceActionMaskForPoint:(NSPoint)point;
512 @method webView:willPerformDragSourceAction:fromPoint:withPasteboard:
513 @abstract Informs that a drag a has begun from a WebView
514 @param webView The WebView sending the delegate method
515 @param action The drag source action
516 @param point The point where the drag started in the coordinates of the WebView
517 @param pasteboard The drag pasteboard
518 @discussion This method is called after webView:dragSourceActionMaskForPoint: is called after the user has begun a drag from a WebView.
519 This method informs the UI delegate of the drag source action that will be performed and gives the delegate an opportunity to modify
520 the contents of the dragging pasteboard.
522 - (void)webView:(WebView *)webView willPerformDragSourceAction:(WebDragSourceAction)action fromPoint:(NSPoint)point withPasteboard:(NSPasteboard *)pasteboard;
523 #endif /* !TARGET_OS_IPHONE */
526 @method webView:printFrameView:
527 @abstract Informs that a WebFrameView needs to be printed
528 @param webView The WebView sending the delegate method
529 @param frameView The WebFrameView needing to be printed
530 @discussion This method is called when a script or user requests the page to be printed.
531 In this method the delegate can prepare the WebFrameView to be printed. Some content that WebKit
532 displays can be printed directly by the WebFrameView, other content will need to be handled by
533 the delegate. To determine if the WebFrameView can handle printing the delegate should check
534 WebFrameView's documentViewShouldHandlePrint, if YES then the delegate can call printDocumentView
535 on the WebFrameView. Otherwise the delegate will need to request a NSPrintOperation from
536 the WebFrameView's printOperationWithPrintInfo to handle the printing.
538 - (void)webView:(WebView *)sender printFrameView:(WebFrameView *)frameView;
541 @method webViewHeaderHeight:
542 @param webView The WebView sending the delegate method
543 @abstract Reserve a height for the printed page header.
544 @result The height to reserve for the printed page header, return 0.0 to not reserve any space for a header.
545 @discussion The height returned will be used to calculate the rect passed to webView:drawHeaderInRect:.
547 - (float)webViewHeaderHeight:(WebView *)sender;
550 @method webViewFooterHeight:
551 @param webView The WebView sending the delegate method
552 @abstract Reserve a height for the printed page footer.
553 @result The height to reserve for the printed page footer, return 0.0 to not reserve any space for a footer.
554 @discussion The height returned will be used to calculate the rect passed to webView:drawFooterInRect:.
556 - (float)webViewFooterHeight:(WebView *)sender;
559 @method webView:drawHeaderInRect:
560 @param webView The WebView sending the delegate method
561 @param rect The NSRect reserved for the header of the page
562 @abstract The delegate should draw a header for the sender in the supplied rect.
564 - (void)webView:(WebView *)sender drawHeaderInRect:(NSRect)rect;
567 @method webView:drawFooterInRect:
568 @param webView The WebView sending the delegate method
569 @param rect The NSRect reserved for the footer of the page
570 @abstract The delegate should draw a footer for the sender in the supplied rect.
572 - (void)webView:(WebView *)sender drawFooterInRect:(NSRect)rect;
574 // The following delegate methods are deprecated in favor of the ones above that specify
575 // the WebFrame whose JavaScript initiated this call.
576 - (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message WEBKIT_DEPRECATED_MAC(10_3, 10_5);
577 - (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message WEBKIT_DEPRECATED_MAC(10_3, 10_5);
578 - (NSString *)webView:(WebView *)sender runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText WEBKIT_DEPRECATED_MAC(10_3, 10_5);
580 // The following delegate methods are deprecated. Content rect calculations are now done automatically.
581 - (void)webView:(WebView *)sender setContentRect:(NSRect)frame WEBKIT_DEPRECATED_MAC(10_3, 10_5);
582 - (NSRect)webViewContentRect:(WebView *)sender WEBKIT_DEPRECATED_MAC(10_3, 10_5);