2 * Copyright (C) 2004 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
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 #import <Cocoa/Cocoa.h>
28 #import <JavaScriptCore/npruntime.h>
29 #import <JavaVM/jni.h>
30 #import <WebCore/WebCoreKeyboardAccess.h>
43 typedef khtml::RenderPart KHTMLRenderPart;
49 @class KHTMLRenderPart;
54 @class DOMCSSStyleDeclaration;
56 @class DOMDocumentFragment;
58 @class DOMHTMLElement;
61 @class WebCoreSettings;
62 @class WebScriptObject;
64 @protocol WebCoreDOMTreeCopier;
65 @protocol WebCoreRenderTreeCopier;
66 @protocol WebCoreResourceHandle;
67 @protocol WebCoreResourceLoader;
68 @protocol WebCoreFileButton;
69 @protocol WebCoreFileButtonDelegate;
71 extern NSString *WebCoreElementDOMNodeKey;
72 extern NSString *WebCoreElementFrameKey;
73 extern NSString *WebCoreElementImageAltStringKey;
74 extern NSString *WebCoreElementImageKey;
75 extern NSString *WebCoreElementImageRectKey;
76 extern NSString *WebCoreElementImageURLKey;
77 extern NSString *WebCoreElementIsSelectedKey;
78 extern NSString *WebCoreElementLinkURLKey;
79 extern NSString *WebCoreElementLinkTargetFrameKey;
80 extern NSString *WebCoreElementLinkLabelKey;
81 extern NSString *WebCoreElementLinkTitleKey;
82 extern NSString *WebCoreElementTitleKey;
84 extern NSString *WebCorePageCacheStateKey;
92 WebSelectionStateNone,
93 WebSelectionStateCaret,
94 WebSelectionStateRange,
100 } WebSelectionAlteration;
107 } WebSelectionDirection;
110 WebSelectByCharacter,
113 WebSelectByParagraph,
114 WebSelectToLineBoundary,
115 WebSelectToParagraphBoundary,
116 WebSelectToDocumentBoundary
117 } WebSelectionGranularity;
124 } WebScrollDirection;
131 } WebScrollGranularity;
133 // WebCoreBridge objects are used by WebCore to abstract away operations that need
134 // to be implemented by library clients, for example WebKit. The objects are also
135 // used in the opposite direction, for simple access to WebCore functions without dealing
136 // directly with the KHTML C++ classes.
138 // A WebCoreBridge creates and holds a reference to a KHTMLPart.
140 // The WebCoreBridge interface contains methods for use by the non-WebCore side of the bridge.
142 @interface WebCoreBridge : NSObject
145 KHTMLRenderPart *_renderPart;
146 RenderArena *_renderPartArena;
147 BOOL _shouldCreateRenderers;
150 + (WebCoreBridge *)bridgeForDOMDocument:(DOMDocument *)document;
152 - (void)initializeSettings:(WebCoreSettings *)settings;
154 - (void)setRenderPart:(KHTMLRenderPart *)renderPart;
155 - (KHTMLRenderPart *)renderPart;
157 - (void)setName:(NSString *)name;
160 - (KWQKHTMLPart *)part;
162 - (void)setParent:(WebCoreBridge *)parent;
164 - (void)provisionalLoadStarted;
166 - (void)openURL:(NSURL *)URL reload:(BOOL)reload
167 contentType:(NSString *)contentType refresh:(NSString *)refresh lastModified:(NSDate *)lastModified
168 pageCache:(NSDictionary *)pageCache;
169 - (void)setEncoding:(NSString *)encoding userChosen:(BOOL)userChosen;
170 - (void)addData:(NSData *)data;
173 - (void)didNotOpenURL:(NSURL *)URL pageCache:(NSDictionary *)pageCache;
175 - (void)saveDocumentState;
176 - (void)restoreDocumentState;
178 - (BOOL)canCachePage;
179 - (BOOL)saveDocumentToPageCache;
184 - (NSString *)referrer;
185 - (NSString *)domain;
187 - (void)installInFrame:(NSView *)view;
188 - (void)removeFromFrame;
190 - (void)scrollToAnchor:(NSString *)anchor;
191 - (void)scrollToAnchorWithURL:(NSURL *)URL;
193 - (BOOL)scrollOverflowInDirection:(WebScrollDirection)direction granularity:(WebScrollGranularity)granularity;
194 - (BOOL)scrollOverflowWithScrollWheelEvent:(NSEvent *)event;
196 - (void)createKHTMLViewWithNSView:(NSView *)view marginWidth:(int)mw marginHeight:(int)mh;
200 - (void)reapplyStylesForDeviceType:(WebCoreDeviceType)deviceType;
201 - (void)forceLayoutAdjustingViewSize:(BOOL)adjustSizeFlag;
202 - (void)forceLayoutWithMinimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustingViewSize:(BOOL)adjustSizeFlag;
203 - (void)sendResizeEvent;
204 - (void)sendScrollEvent;
206 - (void)setNeedsLayout;
207 - (void)drawRect:(NSRect)rect;
208 - (void)adjustPageHeightNew:(float *)newBottom top:(float)oldTop bottom:(float)oldBottom limit:(float)bottomLimit;
209 - (NSArray*)computePageRectsWithPrintWidthScaleFactor:(float)printWidthScaleFactor printHeight:(float)printHeight;
211 - (void)setActivationEventNumber:(int)num;
212 - (void)mouseDown:(NSEvent *)event;
213 - (void)mouseUp:(NSEvent *)event;
214 - (void)mouseMoved:(NSEvent *)event;
215 - (void)mouseDragged:(NSEvent *)event;
217 - (BOOL)sendContextMenuEvent:(NSEvent *)event; // return YES if event is eaten by WebCore
219 - (NSView *)nextKeyView;
220 - (NSView *)previousKeyView;
222 - (NSView *)nextKeyViewInsideWebFrameViews;
223 - (NSView *)previousKeyViewInsideWebFrameViews;
225 - (NSObject *)copyDOMTree:(id <WebCoreDOMTreeCopier>)copier;
226 - (NSObject *)copyRenderTree:(id <WebCoreRenderTreeCopier>)copier;
227 - (NSString *)renderTreeAsExternalRepresentation;
229 - (NSDictionary *)elementAtPoint:(NSPoint)point;
230 - (NSURL *)URLWithAttributeString:(NSString *)string;
232 - (DOMElement *)elementWithName:(NSString *)name inForm:(DOMElement *)form;
233 - (DOMElement *)elementForView:(NSView *)view;
234 - (BOOL)elementDoesAutoComplete:(DOMElement *)element;
235 - (BOOL)elementIsPassword:(DOMElement *)element;
236 - (DOMElement *)formForElement:(DOMElement *)element;
237 - (DOMElement *)currentForm;
238 - (NSArray *)controlsInForm:(DOMElement *)form;
239 - (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element;
240 - (NSString *)matchLabels:(NSArray *)labels againstElement:(DOMElement *)element;
242 - (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag;
243 - (void)jumpToSelection;
244 - (NSString *)advanceToNextMisspelling;
245 - (NSString *)advanceToNextMisspellingStartingJustBeforeSelection;
247 - (void)setTextSizeMultiplier:(float)multiplier;
249 - (CFStringEncoding)textEncoding;
251 - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)string;
253 - (DOMDocument *)DOMDocument;
254 - (DOMHTMLElement *)frameElement;
256 - (BOOL)isSelectionEditable;
257 - (WebSelectionState)selectionState;
259 - (NSAttributedString *)selectedAttributedString;
260 - (NSString *)selectedString;
262 - (void)setSelectionFromNone;
263 - (void)setDisplaysWithFocusAttributes:(BOOL)flag;
265 - (NSString *)stringForRange:(DOMRange *)range;
267 - (NSString *)markupStringFromNode:(DOMNode *)node nodes:(NSArray **)nodes;
268 - (NSString *)markupStringFromRange:(DOMRange *)range nodes:(NSArray **)nodes;
272 - (void)deselectText;
274 - (NSRect)selectionRect;
275 - (NSRect)visibleSelectionRect;
276 - (void)centerSelectionInVisibleArea;
277 - (NSImage *)selectionImage;
278 - (NSRect)caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity;
279 - (NSRect)firstRectForDOMRange:(DOMRange *)range;
281 - (void)setSelectedDOMRange:(DOMRange *)range affinity:(NSSelectionAffinity)selectionAffinity;
282 - (DOMRange *)selectedDOMRange;
283 - (NSSelectionAffinity)selectionAffinity;
285 // Emacs-style-editing "mark"
286 - (void)setMarkDOMRange:(DOMRange *)range;
287 - (DOMRange *)markDOMRange;
289 // spelling-checking "marked text"
290 - (void)setMarkedTextDOMRange:(DOMRange *)range;
291 - (DOMRange *)markedTextDOMRange;
293 - (NSAttributedString *)attributedStringFrom:(DOMNode *)startNode startOffset:(int)startOffset to:(DOMNode *)endNode endOffset:(int)endOffset;
295 - (NSFont *)fontForSelection:(BOOL *)hasMultipleFonts;
296 - (NSDictionary *)fontAttributesForSelectionStart;
298 + (NSString *)stringWithData:(NSData *)data textEncoding:(CFStringEncoding)textEncoding;
299 + (NSString *)stringWithData:(NSData *)data textEncodingName:(NSString *)textEncodingName;
301 - (BOOL)interceptKeyEvent:(NSEvent *)event toView:(NSView *)view;
303 - (void)setShouldCreateRenderers:(BOOL)f;
304 - (BOOL)shouldCreateRenderers;
306 - (int)numPendingOrLoadingRequests;
308 - (void)setDrawsBackground:(BOOL)drawsBackround;
310 - (NSColor *)bodyBackgroundColor;
311 - (NSColor *)selectionColor;
313 - (void)adjustViewSize;
315 - (id)accessibilityTree;
317 - (void)undoEditing:(id)arg;
318 - (void)redoEditing:(id)arg;
320 - (DOMRange *)rangeByExpandingSelectionWithGranularity:(WebSelectionGranularity)granularity;
321 - (DOMRange *)rangeOfCharactersAroundCaret;
322 - (DOMRange *)rangeByAlteringCurrentSelection:(WebSelectionAlteration)alteration direction:(WebSelectionDirection)direction granularity:(WebSelectionGranularity)granularity;
323 - (void)alterCurrentSelection:(WebSelectionAlteration)alteration direction:(WebSelectionDirection)direction granularity:(WebSelectionGranularity)granularity;
324 - (DOMRange *)rangeByAlteringCurrentSelection:(WebSelectionAlteration)alteration verticalDistance:(float)distance;
325 - (void)alterCurrentSelection:(WebSelectionAlteration)alteration verticalDistance:(float)distance;
326 - (WebSelectionGranularity)selectionGranularity;
328 - (DOMDocumentFragment *)documentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString;
329 - (DOMDocumentFragment *)documentFragmentWithText:(NSString *)text;
331 - (void)replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
332 - (void)replaceSelectionWithNode:(DOMNode *)node selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
333 - (void)replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
334 - (void)replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
336 - (void)insertLineBreak;
337 - (void)insertParagraphSeparator;
338 - (void)insertParagraphSeparatorInQuotedContent;
339 - (void)insertText:(NSString *)text selectInsertedText:(BOOL)selectInsertedText;
341 - (void)setSelectionToDragCaret;
342 - (void)moveSelectionToDragCaret:(DOMDocumentFragment *)selectionFragment smartMove:(BOOL)smartMove;
343 - (void)moveDragCaretToPoint:(NSPoint)point;
344 - (void)removeDragCaret;
345 - (DOMRange *)dragCaretDOMRange;
346 - (DOMRange *)editableDOMRangeForPoint:(NSPoint)point;
348 - (void)deleteSelectionWithSmartDelete:(BOOL)smartDelete;
349 - (void)deleteKeyPressed;
351 - (void)applyStyle:(DOMCSSStyleDeclaration *)style;
352 - (BOOL)selectionStartHasStyle:(DOMCSSStyleDeclaration *)style;
353 - (void)applyEditingStyleToBodyElement;
354 - (void)removeEditingStyleFromBodyElement;
355 - (void)applyEditingStyleToElement:(DOMElement *)element;
356 - (void)removeEditingStyleFromElement:(DOMElement *)element;
358 - (void)ensureSelectionVisible;
360 - (WebScriptObject *)windowScriptObject;
361 - (NPObject *)windowScriptNPObject;
363 - (BOOL)eventMayStartDrag:(NSEvent *)event;
364 - (NSDragOperation)dragOperationForDraggingInfo:(id <NSDraggingInfo>)info;
365 - (void)dragExitedWithDraggingInfo:(id <NSDraggingInfo>)info;
366 - (BOOL)concludeDragForDraggingInfo:(id <NSDraggingInfo>)info;
367 - (void)dragSourceMovedTo:(NSPoint)windowLoc;
368 - (void)dragSourceEndedAt:(NSPoint)windowLoc operation:(NSDragOperation)operation;
371 - (BOOL)mayDHTMLCopy;
372 - (BOOL)mayDHTMLPaste;
374 - (BOOL)tryDHTMLCopy;
375 - (BOOL)tryDHTMLPaste;
377 - (NSMutableDictionary *)dashboardRegions;
381 // The WebCoreBridge protocol contains methods for use by the WebCore side of the bridge.
383 // In NSArray objects for post data, NSData objects represent literal data, and NSString objects represent encoded files.
384 // The encoding is the standard form encoding for uploading files.
386 @protocol WebCoreBridge
388 - (NSArray *)childFrames; // WebCoreBridge objects
389 - (WebCoreBridge *)mainFrame;
390 - (WebCoreBridge *)findFrameNamed:(NSString *)name;
391 /* Creates a name for an frame unnamed in the HTML. It should produce repeatable results for loads of the same frameset. */
392 - (NSString *)generateFrameName;
393 - (void)frameDetached;
394 - (NSView *)documentView;
396 - (void)loadURL:(NSURL *)URL referrer:(NSString *)referrer reload:(BOOL)reload userGesture:(BOOL)forUser target:(NSString *)target triggeringEvent:(NSEvent *)event form:(DOMElement *)form formValues:(NSDictionary *)values;
397 - (void)postWithURL:(NSURL *)URL referrer:(NSString *)referrer target:(NSString *)target data:(NSArray *)data contentType:(NSString *)contentType triggeringEvent:(NSEvent *)event form:(DOMElement *)form formValues:(NSDictionary *)values;
399 - (WebCoreBridge *)createWindowWithURL:(NSURL *)URL frameName:(NSString *)name;
402 - (NSString *)userAgentForURL:(NSURL *)URL;
404 - (void)setTitle:(NSString *)title;
405 - (void)setStatusText:(NSString *)status;
407 - (void)setIconURL:(NSURL *)URL;
408 - (void)setIconURL:(NSURL *)URL withType:(NSString *)string;
410 - (WebCoreBridge *)createChildFrameNamed:(NSString *)frameName withURL:(NSURL *)URL
411 renderPart:(KHTMLRenderPart *)renderPart
412 allowsScrolling:(BOOL)allowsScrolling marginWidth:(int)width marginHeight:(int)height;
414 - (BOOL)areToolbarsVisible;
415 - (void)setToolbarsVisible:(BOOL)visible;
416 - (BOOL)isStatusBarVisible;
417 - (void)setStatusBarVisible:(BOOL)visible;
418 - (BOOL)areScrollbarsVisible;
419 - (void)setScrollbarsVisible:(BOOL)visible;
420 - (NSWindow *)window;
421 - (void)setWindowFrame:(NSRect)frame;
422 - (NSRect)windowFrame;
423 - (void)setWindowContentRect:(NSRect)frame;
424 - (NSRect)windowContentRect;
426 - (void)setWindowIsResizable:(BOOL)resizable;
427 - (BOOL)windowIsResizable;
429 - (NSResponder *)firstResponder;
430 - (void)makeFirstResponder:(NSResponder *)view;
432 - (void)closeWindowSoon;
434 - (void)runJavaScriptAlertPanelWithMessage:(NSString *)message;
435 - (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message;
436 - (BOOL)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText returningText:(NSString **)result;
437 - (void)addMessageToConsole:(NSDictionary *)message;
439 - (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)loader withURL:(NSURL *)URL customHeaders:(NSDictionary *)customHeaders;
440 - (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)loader withURL:(NSURL *)URL customHeaders:(NSDictionary *)customHeaders postData:(NSArray *)data;
441 - (void)objectLoadedFromCacheWithURL:(NSURL *)URL response:(id)response size:(unsigned)bytes;
443 - (NSData *)syncLoadResourceWithURL:(NSURL *)URL customHeaders:(NSDictionary *)requestHeaders postData:(NSArray *)postData finalURL:(NSURL **)finalNSURL responseHeaders:(NSDictionary **)responseHeaderDict statusCode:(int *)statusCode;
446 - (time_t)expiresTimeForResponse:(NSURLResponse *)response;
448 - (void)reportClientRedirectToURL:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date lockHistory:(BOOL)lockHistory isJavaScriptFormAction:(BOOL)isJavaScriptFormAction;
449 - (void)reportClientRedirectCancelled:(BOOL)cancelWithLoadInProgress;
452 - (void)unfocusWindow;
454 - (NSView *)nextKeyViewOutsideWebFrameViews;
455 - (NSView *)previousKeyViewOutsideWebFrameViews;
457 - (BOOL)defersLoading;
458 - (void)setDefersLoading:(BOOL)loading;
459 - (void)saveDocumentState:(NSArray *)documentState;
460 - (NSArray *)documentState;
462 - (void)setNeedsReapplyStyles;
464 // OK to be an NSString rather than an NSURL.
465 // This URL is only used for coloring visited links.
466 - (NSString *)requestedURLString;
467 - (NSString *)incomingReferrer;
469 - (NSView *)viewForPluginWithURL:(NSURL *)URL
470 attributeNames:(NSArray *)attributeNames
471 attributeValues:(NSArray *)attributeValues
472 MIMEType:(NSString *)MIMEType;
473 - (NSView *)viewForJavaAppletWithFrame:(NSRect)frame
474 attributeNames:(NSArray *)attributeNames
475 attributeValues:(NSArray *)attributeValues
476 baseURL:(NSURL *)baseURL;
478 - (BOOL)saveDocumentToPageCache:(id)documentInfo;
480 - (int)getObjectCacheSize;
482 - (BOOL)frameRequiredForMIMEType:(NSString*)MIMEType URL:(NSURL *)URL;
484 - (void)loadEmptyDocumentSynchronously;
486 - (NSString *)MIMETypeForPath:(NSString *)path;
488 - (void)allowDHTMLDrag:(BOOL *)flagDHTML UADrag:(BOOL *)flagUA;
489 - (BOOL)startDraggingImage:(NSImage *)dragImage at:(NSPoint)dragLoc operation:(NSDragOperation)op event:(NSEvent *)event sourceIsDHTML:(BOOL)flag DHTMLWroteData:(BOOL)dhtmlWroteData;
490 - (void)handleAutoscrollForMouseDragged:(NSEvent *)event;
491 - (BOOL)mayStartDragAtEventLocation:(NSPoint)location;
493 - (int)historyLength;
494 - (void)goBackOrForward:(int)distance;
495 - (BOOL)canGoBackOrForward:(int)distance;
497 - (void)controlTextDidBeginEditing:(NSNotification *)obj;
498 - (void)controlTextDidEndEditing:(NSNotification *)obj;
499 - (void)controlTextDidChange:(NSNotification *)obj;
501 - (BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)fieldEditor;
502 - (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor;
503 - (BOOL)control:(NSControl *)control didFailToFormatString:(NSString *)string errorDescription:(NSString *)error;
504 - (void)control:(NSControl *)control didFailToValidatePartialString:(NSString *)string errorDescription:(NSString *)error;
505 - (BOOL)control:(NSControl *)control isValidObject:(id)obj;
506 - (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector;
508 - (NSView <WebCoreFileButton> *)fileButtonWithDelegate:(id <WebCoreFileButtonDelegate>)delegate;
510 - (void)setHasBorder:(BOOL)hasBorder;
512 - (WebCoreKeyboardUIMode)keyboardUIMode;
514 - (void)didSetName:(NSString *)name;
516 - (NSFileWrapper *)fileWrapperForURL:(NSURL *)URL;
520 - (jobject)getAppletInView:(NSView *)view;
522 // Deprecated, use getAppletInView: instead.
523 - (jobject)pollForAppletInView:(NSView *)view;
525 - (NSUndoManager *)undoManager;
526 - (void)issueCutCommand;
527 - (void)issueCopyCommand;
528 - (void)issuePasteCommand;
529 - (void)respondToChangedSelection;
530 - (void)respondToChangedContents;
531 - (void)setIsSelected:(BOOL)isSelected forView:(NSView *)view;
533 - (BOOL)shouldBeginEditing:(DOMRange *)range;
534 - (BOOL)shouldEndEditing:(DOMRange *)range;
536 - (NSString *)overrideMediaType;
538 - (void)windowObjectCleared;
540 - (int)spellCheckerDocumentTag;
541 - (BOOL)isContinuousSpellCheckingEnabled;
543 - (void)didFirstLayout;
545 - (void)dashboardRegionsChanged:(NSMutableDictionary *)regions;
549 // This interface definition allows those who hold a WebCoreBridge * to call all the methods
550 // in the WebCoreBridge protocol without requiring the base implementation to supply the methods.
551 // This idiom is appropriate because WebCoreBridge is an abstract class.
553 @interface WebCoreBridge (SubclassResponsibility) <WebCoreBridge>
556 @protocol WebCoreDOMTreeCopier <NSObject>
557 - (NSObject *)nodeWithName:(NSString *)name value:(NSString *)value source:(NSString *)source children:(NSArray *)children;
560 @protocol WebCoreRenderTreeCopier <NSObject>
561 - (NSObject *)nodeWithName:(NSString *)name position:(NSPoint)p rect:(NSRect)rect view:(NSView *)view children:(NSArray *)children;
564 @protocol WebCoreFileButton <NSObject>
565 - (void)setFilename:(NSString *)filename;
566 - (void)performClick;
567 - (NSString *)filename;
569 - (void)setVisualFrame:(NSRect)rect;
570 - (NSRect)visualFrame;
571 - (NSSize)bestVisualFrameSizeForCharacterCount:(int)count;
574 @protocol WebCoreFileButtonDelegate <NSObject>
575 - (void)filenameChanged:(NSString *)filename;
576 - (void)focusChanged:(BOOL)nowHasFocus;