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 <JavaScriptCore/npruntime.h>
27 #import <JavaVM/jni.h>
28 #import <WebCore/WebCoreKeyboardAccess.h>
37 typedef WebCore::FrameMac WebCoreMacFrame;
38 typedef WebCore::Element WebCoreElement;
42 @class WebCoreMacFrame;
43 @class WebCoreElement;
47 @class DOMCSSStyleDeclaration;
49 @class DOMDocumentFragment;
51 @class DOMHTMLElement;
52 @class DOMHTMLInputElement;
53 @class DOMHTMLTextAreaElement;
56 @class WebCorePageBridge;
57 @class WebCoreSettings;
58 @class WebScriptObject;
61 @protocol WebCoreRenderTreeCopier;
62 @protocol WebCoreResourceHandle;
63 @protocol WebCoreResourceLoader;
65 extern NSString *WebCorePageCacheStateKey;
73 WebSelectionStateNone,
74 WebSelectionStateCaret,
75 WebSelectionStateRange
81 } WebSelectionAlteration;
84 WebBridgeSelectForward,
85 WebBridgeSelectBackward,
88 } WebBridgeSelectionDirection;
91 WebBridgeSelectByCharacter,
92 WebBridgeSelectByWord,
93 WebBridgeSelectBySentence,
94 WebBridgeSelectByLine,
95 WebBridgeSelectByParagraph,
96 WebBridgeSelectToSentenceBoundary,
97 WebBridgeSelectToLineBoundary,
98 WebBridgeSelectToParagraphBoundary,
99 WebBridgeSelectToDocumentBoundary
100 } WebBridgeSelectionGranularity;
107 } WebScrollDirection;
114 } WebScrollGranularity;
117 WebUndoActionUnspecified,
118 WebUndoActionSetColor,
119 WebUndoActionSetBackgroundColor,
120 WebUndoActionTurnOffKerning,
121 WebUndoActionTightenKerning,
122 WebUndoActionLoosenKerning,
123 WebUndoActionUseStandardKerning,
124 WebUndoActionTurnOffLigatures,
125 WebUndoActionUseStandardLigatures,
126 WebUndoActionUseAllLigatures,
127 WebUndoActionRaiseBaseline,
128 WebUndoActionLowerBaseline,
129 WebUndoActionSetTraditionalCharacterShape,
130 WebUndoActionSetFont,
131 WebUndoActionChangeAttributes,
132 WebUndoActionAlignLeft,
133 WebUndoActionAlignRight,
135 WebUndoActionJustify,
136 WebUndoActionSetWritingDirection,
137 WebUndoActionSubscript,
138 WebUndoActionSuperscript,
139 WebUndoActionUnderline,
140 WebUndoActionOutline,
141 WebUndoActionUnscript,
145 WebUndoActionPasteFont,
146 WebUndoActionPasteRuler,
148 WebUndoActionCreateLink,
150 WebUndoActionFormatBlock,
151 WebUndoActionInsertList,
163 @protocol WebCoreOpenPanelResultListener <NSObject>
164 - (void)chooseFilename:(NSString *)fileName;
168 // WebCoreFrameBridge objects are used by WebCore to abstract away operations that need
169 // to be implemented by library clients, for example WebKit. The objects are also
170 // used in the opposite direction, for simple access to WebCore functions without dealing
171 // directly with the KHTML C++ classes.
173 // A WebCoreFrameBridge creates and holds a reference to a Frame.
175 // The WebCoreFrameBridge interface contains methods for use by the non-WebCore side of the bridge.
177 @interface WebCoreFrameBridge : NSObject
179 WebCoreMacFrame *m_frame;
180 BOOL _shouldCreateRenderers;
184 + (WebCoreFrameBridge *)bridgeForDOMDocument:(DOMDocument *)document;
186 - (id)initMainFrameWithPage:(WebCorePageBridge *)page;
187 - (id)initSubframeWithOwnerElement:(WebCoreElement *)ownerElement;
191 + (NSArray *)supportedNonImageMIMETypes;
192 + (NSArray *)supportedImageMIMETypes;
193 + (NSArray *)supportedImageResourceMIMETypes; // includes types like PDF
195 - (void)initializeSettings:(WebCoreSettings *)settings;
197 - (void)setName:(NSString *)name;
200 - (WebCorePageBridge *)page;
202 - (WebCoreFrameBridge *)parent;
204 - (WebCoreFrameBridge *)firstChild;
205 - (WebCoreFrameBridge *)lastChild;
206 - (WebCoreFrameBridge *)previousSibling;
207 - (WebCoreFrameBridge *)nextSibling;
209 - (void)appendChild:(WebCoreFrameBridge *)child;
210 - (void)removeChild:(WebCoreFrameBridge *)child;
212 - (unsigned)childCount;
213 - (BOOL)isDescendantOfFrame:(WebCoreFrameBridge *)ancestor;
214 - (WebCoreFrameBridge *)traverseNextFrameStayWithin:(WebCoreFrameBridge *)stayWithin;
216 - (WebCoreFrameBridge *)nextFrameWithWrap:(BOOL)wrap;
217 - (WebCoreFrameBridge *)previousFrameWithWrap:(BOOL)wrap;
219 - (WebCoreFrameBridge *)childFrameNamed:(NSString *)name;
220 - (WebCoreFrameBridge *)findFrameNamed:(NSString *)name;
222 - (void)provisionalLoadStarted;
224 - (void)openURL:(NSURL *)URL reload:(BOOL)reload
225 contentType:(NSString *)contentType refresh:(NSString *)refresh lastModified:(NSDate *)lastModified
226 pageCache:(NSDictionary *)pageCache;
227 - (void)setEncoding:(NSString *)encoding userChosen:(BOOL)userChosen;
228 - (void)addData:(NSData *)data;
232 - (void)didNotOpenURL:(NSURL *)URL pageCache:(NSDictionary *)pageCache;
234 - (BOOL)canLoadURL:(NSURL *)URL fromReferrer:(NSString *)referrer hideReferrer:(BOOL *)hideReferrer;
235 - (BOOL)canTargetLoadInFrame:(WebCoreFrameBridge *)targetFrame;
237 - (void)saveDocumentState;
238 - (void)restoreDocumentState;
240 - (BOOL)canCachePage;
241 - (BOOL)saveDocumentToPageCache;
247 - (void)handleFallbackContent;
251 - (NSString *)referrer;
252 - (WebCoreFrameBridge *)opener;
253 - (void)setOpener:(WebCoreFrameBridge *)bridge;
255 - (void)installInFrame:(NSView *)view;
256 - (void)removeFromFrame;
258 - (void)scrollToAnchorWithURL:(NSURL *)URL;
260 - (BOOL)scrollOverflowInDirection:(WebScrollDirection)direction granularity:(WebScrollGranularity)granularity;
262 - (void)createFrameViewWithNSView:(NSView *)view marginWidth:(int)mw marginHeight:(int)mh;
266 - (void)reapplyStylesForDeviceType:(WebCoreDeviceType)deviceType;
267 - (void)forceLayoutAdjustingViewSize:(BOOL)adjustSizeFlag;
268 - (void)forceLayoutWithMinimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustingViewSize:(BOOL)adjustSizeFlag;
269 - (void)sendResizeEvent;
270 - (void)sendScrollEvent;
272 - (void)setNeedsLayout;
273 - (void)drawRect:(NSRect)rect;
274 - (void)adjustPageHeightNew:(float *)newBottom top:(float)oldTop bottom:(float)oldBottom limit:(float)bottomLimit;
275 - (NSArray*)computePageRectsWithPrintWidthScaleFactor:(float)printWidthScaleFactor printHeight:(float)printHeight;
277 - (void)setActivationEventNumber:(int)num;
278 - (void)mouseDown:(NSEvent *)event;
279 - (void)mouseUp:(NSEvent *)event;
280 - (void)mouseMoved:(NSEvent *)event;
281 - (void)mouseDragged:(NSEvent *)event;
283 // these return YES if event is eaten by WebCore
284 - (BOOL)sendScrollWheelEvent:(NSEvent *)event;
285 - (BOOL)sendContextMenuEvent:(NSEvent *)event;
287 - (NSView *)nextKeyView;
288 - (NSView *)previousKeyView;
290 - (NSView *)nextKeyViewInsideWebFrameViews;
291 - (NSView *)previousKeyViewInsideWebFrameViews;
293 - (NSObject *)copyRenderTree:(id <WebCoreRenderTreeCopier>)copier;
294 - (NSString *)renderTreeAsExternalRepresentation;
296 - (void)getInnerNonSharedNode:(DOMNode **)innerNonSharedNode innerNode:(DOMNode **)innerNode URLElement:(DOMElement **)URLElement atPoint:(NSPoint)point allowShadowContent:(BOOL)allow;
297 - (BOOL)isPointInsideSelection:(NSPoint)point;
299 - (NSURL *)URLWithAttributeString:(NSString *)string;
301 - (DOMElement *)elementWithName:(NSString *)name inForm:(DOMElement *)form;
302 - (DOMElement *)elementForView:(NSView *)view;
303 - (BOOL)elementDoesAutoComplete:(DOMElement *)element;
304 - (BOOL)elementIsPassword:(DOMElement *)element;
305 - (DOMElement *)formForElement:(DOMElement *)element;
306 - (DOMElement *)currentForm;
307 - (NSArray *)controlsInForm:(DOMElement *)form;
308 - (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element;
309 - (NSString *)matchLabels:(NSArray *)labels againstElement:(DOMElement *)element;
311 - (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag;
312 - (unsigned)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(unsigned)limit;
313 - (BOOL)markedTextMatchesAreHighlighted;
314 - (void)setMarkedTextMatchesAreHighlighted:(BOOL)doHighlight;
315 - (void)unmarkAllTextMatches;
316 - (NSArray *)rectsForTextMatches;
318 - (NSString *)advanceToNextMisspelling;
319 - (NSString *)advanceToNextMisspellingStartingJustBeforeSelection;
320 - (void)unmarkAllMisspellings;
322 - (void)setTextSizeMultiplier:(float)multiplier;
324 - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)string;
325 - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)string forceUserGesture:(BOOL)forceUserGesture;
326 - (NSAppleEventDescriptor *)aeDescByEvaluatingJavaScriptFromString:(NSString *)string;
328 - (DOMDocument *)DOMDocument;
329 - (DOMHTMLElement *)frameElement;
331 - (BOOL)isSelectionInPasswordField;
332 - (BOOL)isSelectionEditable;
333 - (BOOL)isSelectionRichlyEditable;
334 - (WebSelectionState)selectionState;
338 - (NSAttributedString *)selectedAttributedString;
339 - (NSString *)selectedString;
341 - (void)setSelectionFromNone;
342 - (void)setIsActive:(BOOL)flag;
344 - (void)setWindowHasFocus:(BOOL)flag;
346 - (NSString *)stringForRange:(DOMRange *)range;
348 - (NSString *)markupStringFromNode:(DOMNode *)node nodes:(NSArray **)nodes;
349 - (NSString *)markupStringFromRange:(DOMRange *)range nodes:(NSArray **)nodes;
353 - (void)deselectText;
355 - (NSRect)selectionRect;
356 - (NSRect)visibleSelectionRect;
357 - (void)centerSelectionInVisibleArea;
358 - (NSImage *)selectionImageForcingWhiteText:(BOOL)forceWhiteText;
359 - (NSRect)caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity;
360 - (NSRect)firstRectForDOMRange:(DOMRange *)range;
362 - (void)setSelectedDOMRange:(DOMRange *)range affinity:(NSSelectionAffinity)selectionAffinity closeTyping:(BOOL)closeTyping;
363 - (DOMRange *)selectedDOMRange;
364 - (NSSelectionAffinity)selectionAffinity;
366 // Emacs-style-editing "mark"
367 - (void)setMarkDOMRange:(DOMRange *)range;
368 - (DOMRange *)markDOMRange;
370 // international text input "marked text"
371 - (void)setMarkedTextDOMRange:(DOMRange *)range customAttributes:(NSArray *)attributes ranges:(NSArray *)ranges;
372 - (DOMRange *)markedTextDOMRange;
373 - (void)replaceMarkedTextWithText:(NSString *)text;
375 - (NSAttributedString *)attributedStringFrom:(DOMNode *)startNode startOffset:(int)startOffset to:(DOMNode *)endNode endOffset:(int)endOffset;
377 - (NSFont *)fontForSelection:(BOOL *)hasMultipleFonts;
378 - (NSDictionary *)fontAttributesForSelectionStart;
379 - (NSWritingDirection)baseWritingDirectionForSelectionStart;
381 - (NSString *)stringWithData:(NSData *)data; // using the encoding of the frame's main resource
382 + (NSString *)stringWithData:(NSData *)data textEncodingName:(NSString *)textEncodingName; // nil for textEncodingName means Latin-1
384 - (BOOL)interceptKeyEvent:(NSEvent *)event toView:(NSView *)view;
386 - (void)setShouldCreateRenderers:(BOOL)f;
387 - (BOOL)shouldCreateRenderers;
389 - (int)numPendingOrLoadingRequests;
390 - (BOOL)doneProcessingData;
393 - (void)setBaseBackgroundColor:(NSColor *)backgroundColor;
394 - (void)setDrawsBackground:(BOOL)drawsBackround;
396 - (NSColor *)bodyBackgroundColor;
397 - (NSColor *)selectionColor;
399 - (void)adjustViewSize;
401 - (id)accessibilityTree;
403 - (void)undoEditing:(id)arg;
404 - (void)redoEditing:(id)arg;
406 - (DOMRange *)rangeByExpandingSelectionWithGranularity:(WebBridgeSelectionGranularity)granularity;
407 - (DOMRange *)rangeOfCharactersAroundCaret;
408 - (DOMRange *)rangeByAlteringCurrentSelection:(WebSelectionAlteration)alteration direction:(WebBridgeSelectionDirection)direction granularity:(WebBridgeSelectionGranularity)granularity;
409 - (void)alterCurrentSelection:(WebSelectionAlteration)alteration direction:(WebBridgeSelectionDirection)direction granularity:(WebBridgeSelectionGranularity)granularity;
410 - (void)alterCurrentSelection:(WebSelectionAlteration)alteration verticalDistance:(float)distance;
411 - (WebBridgeSelectionGranularity)selectionGranularity;
412 - (DOMRange *)smartDeleteRangeForProposedRange:(DOMRange *)proposedCharRange;
413 - (void)smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)charRangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString;
414 - (BOOL)canDeleteRange:(DOMRange *)range;
415 - (void)selectNSRange:(NSRange)range;
416 - (NSRange)selectedNSRange;
417 - (NSRange)markedTextNSRange;
418 - (DOMRange *)convertNSRangeToDOMRange:(NSRange)range;
419 - (NSRange)convertDOMRangeToNSRange:(DOMRange *)range;
421 - (DOMDocumentFragment *)documentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString;
422 - (DOMDocumentFragment *)documentFragmentWithText:(NSString *)text inContext:(DOMRange *)context;
423 - (DOMDocumentFragment *)documentFragmentWithNodesAsParagraphs:(NSArray *)nodes;
425 - (void)replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
426 - (void)replaceSelectionWithNode:(DOMNode *)node selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
427 - (void)replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
428 - (void)replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
430 - (bool)canIncreaseSelectionListLevel;
431 - (bool)canDecreaseSelectionListLevel;
432 - (DOMNode *)increaseSelectionListLevel;
433 - (DOMNode *)increaseSelectionListLevelOrdered;
434 - (DOMNode *)increaseSelectionListLevelUnordered;
435 - (void)decreaseSelectionListLevel;
437 - (void)insertLineBreak;
438 - (void)insertParagraphSeparator;
439 - (void)insertParagraphSeparatorInQuotedContent;
440 - (void)insertText:(NSString *)text selectInsertedText:(BOOL)selectInsertedText;
442 - (void)setSelectionToDragCaret;
443 - (void)moveSelectionToDragCaret:(DOMDocumentFragment *)selectionFragment smartMove:(BOOL)smartMove;
444 - (void)moveDragCaretToPoint:(NSPoint)point;
445 - (void)removeDragCaret;
446 - (DOMRange *)dragCaretDOMRange;
447 - (BOOL)isDragCaretRichlyEditable;
448 - (DOMRange *)editableDOMRangeForPoint:(NSPoint)point;
449 - (DOMRange *)characterRangeAtPoint:(NSPoint)point;
451 - (void)deleteSelectionWithSmartDelete:(BOOL)smartDelete;
452 - (void)deleteKeyPressedWithSmartDelete:(BOOL)smartDelete granularity:(WebBridgeSelectionGranularity)granularity;
453 - (void)forwardDeleteKeyPressedWithSmartDelete:(BOOL)smartDelete granularity:(WebBridgeSelectionGranularity)granularity;
455 - (DOMCSSStyleDeclaration *)typingStyle;
456 - (void)setTypingStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(WebUndoAction)undoAction;
457 - (void)applyStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(WebUndoAction)undoAction;
458 - (void)applyParagraphStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(WebUndoAction)undoAction;
459 - (BOOL)selectionStartHasStyle:(DOMCSSStyleDeclaration *)style;
460 - (NSCellStateValue)selectionHasStyle:(DOMCSSStyleDeclaration *)style;
461 - (void)applyEditingStyleToBodyElement;
462 - (void)removeEditingStyleFromBodyElement;
463 - (void)applyEditingStyleToElement:(DOMElement *)element;
464 - (void)removeEditingStyleFromElement:(DOMElement *)element;
466 - (WebScriptObject *)windowScriptObject;
467 - (NPObject *)windowScriptNPObject;
469 - (BOOL)eventMayStartDrag:(NSEvent *)event;
470 - (NSDragOperation)dragOperationForDraggingInfo:(id <NSDraggingInfo>)info;
471 - (void)dragExitedWithDraggingInfo:(id <NSDraggingInfo>)info;
472 - (BOOL)concludeDragForDraggingInfo:(id <NSDraggingInfo>)info;
473 - (void)dragSourceMovedTo:(NSPoint)windowLoc;
474 - (void)dragSourceEndedAt:(NSPoint)windowLoc operation:(NSDragOperation)operation;
477 - (BOOL)mayDHTMLCopy;
478 - (BOOL)mayDHTMLPaste;
480 - (BOOL)tryDHTMLCopy;
481 - (BOOL)tryDHTMLPaste;
483 - (NSMutableDictionary *)dashboardRegions;
487 - (BOOL)isCharacterSmartReplaceExempt:(unichar)c isPreviousCharacter:(BOOL)isPreviousCharacter;
489 - (BOOL)getData:(NSData **)data andResponse:(NSURLResponse **)response forURL:(NSURL *)URL;
490 - (void)getAllResourceDatas:(NSArray **)datas andResponses:(NSArray **)responses;
492 - (BOOL)canProvideDocumentSource;
493 - (BOOL)canSaveAsWebArchive;
494 - (BOOL)containsPlugins;
496 - (void)setInViewSourceMode:(BOOL)flag;
497 - (BOOL)inViewSourceMode;
499 - (void)setProhibitsScrolling:(BOOL)prohibits;
503 // The WebCoreFrameBridge protocol contains methods for use by the WebCore side of the bridge.
505 // In NSArray objects for post data, NSData objects represent literal data, and NSString objects represent encoded files.
506 // The encoding is the standard form encoding for uploading files.
508 @protocol WebCoreFrameBridge
510 - (void)frameDetached;
511 - (NSView *)documentView;
513 - (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;
514 - (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;
516 - (WebCorePageBridge *)createWindowWithURL:(NSURL *)URL;
520 - (BOOL)canRunModalNow;
521 - (WebCorePageBridge *)createModalDialogWithURL:(NSURL *)URL;
524 - (NSString *)userAgentForURL:(NSURL *)URL;
526 - (void)setTitle:(NSString *)title;
527 - (void)setStatusText:(NSString *)status;
529 - (WebCoreFrameBridge *)createChildFrameNamed:(NSString *)frameName withURL:(NSURL *)URL
530 referrer:(NSString *)referrer
531 ownerElement:(WebCoreElement *)ownerElement
532 allowsScrolling:(BOOL)allowsScrolling marginWidth:(int)width marginHeight:(int)height;
534 - (BOOL)areToolbarsVisible;
535 - (void)setToolbarsVisible:(BOOL)visible;
536 - (BOOL)isStatusbarVisible;
537 - (void)setStatusbarVisible:(BOOL)visible;
538 - (BOOL)areScrollbarsVisible;
539 - (void)setScrollbarsVisible:(BOOL)visible;
540 - (NSWindow *)window;
542 - (void)setWindowIsResizable:(BOOL)resizable;
543 - (BOOL)windowIsResizable;
545 - (NSResponder *)firstResponder;
546 - (void)makeFirstResponder:(NSResponder *)responder;
547 - (void)willMakeFirstResponderForNodeFocus;
549 - (BOOL)textViewWasFirstResponderAtMouseDownTime:(NSTextView *)textView;
551 - (void)closeWindowSoon;
553 - (void)runJavaScriptAlertPanelWithMessage:(NSString *)message;
554 - (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message;
555 - (BOOL)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText returningText:(NSString **)result;
556 - (BOOL)shouldInterruptJavaScript;
557 - (BOOL)canRunBeforeUnloadConfirmPanel;
558 - (BOOL)runBeforeUnloadConfirmPanelWithMessage:(NSString *)message;
559 - (void)addMessageToConsole:(NSDictionary *)message;
560 - (void)runOpenPanelForFileButtonWithResultListener:(id <WebCoreOpenPanelResultListener>)resultListener;
562 - (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)loader withMethod:(NSString *)method URL:(NSURL *)URL customHeaders:(NSDictionary *)customHeaders;
563 - (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)loader withMethod:(NSString *)method URL:(NSURL *)URL customHeaders:(NSDictionary *)customHeaders postData:(NSArray *)data;
564 - (void)objectLoadedFromCacheWithURL:(NSURL *)URL response:(NSURLResponse *)response data:(NSData *)data;
566 - (NSData *)syncLoadResourceWithMethod:(NSString *)method URL:(NSURL *)URL customHeaders:(NSDictionary *)requestHeaders postData:(NSArray *)postData finalURL:(NSURL **)finalNSURL responseHeaders:(NSDictionary **)responseHeaderDict statusCode:(int *)statusCode;
569 - (time_t)expiresTimeForResponse:(NSURLResponse *)response;
571 - (void)reportClientRedirectToURL:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date lockHistory:(BOOL)lockHistory isJavaScriptFormAction:(BOOL)isJavaScriptFormAction;
572 - (void)reportClientRedirectCancelled:(BOOL)cancelWithLoadInProgress;
574 - (void)activateWindow;
575 - (void)deactivateWindow;
577 - (void)formControlIsBecomingFirstResponder:(NSView *)formControl;
578 - (void)formControlIsResigningFirstResponder:(NSView *)formControl;
580 - (NSView *)nextKeyViewOutsideWebFrameViews;
581 - (NSView *)nextValidKeyViewOutsideWebFrameViews;
582 - (NSView *)previousKeyViewOutsideWebFrameViews;
584 - (BOOL)defersLoading;
585 - (void)setDefersLoading:(BOOL)loading;
586 - (void)saveDocumentState:(NSArray *)documentState;
587 - (NSArray *)documentState;
589 - (void)setNeedsReapplyStyles;
591 - (void)tokenizerProcessedData;
593 - (NSString *)incomingReferrer;
595 - (NSView *)viewForPluginWithURL:(NSURL *)URL
596 attributeNames:(NSArray *)attributeNames
597 attributeValues:(NSArray *)attributeValues
598 MIMEType:(NSString *)MIMEType
599 DOMElement:(DOMElement *)element
600 loadManually:(BOOL)loadManually;
601 - (NSView *)viewForJavaAppletWithFrame:(NSRect)frame
602 attributeNames:(NSArray *)attributeNames
603 attributeValues:(NSArray *)attributeValues
604 baseURL:(NSURL *)baseURL
605 DOMElement:(DOMElement *)element;
606 - (void)redirectDataToPlugin:(NSView *)pluginView;
608 - (BOOL)saveDocumentToPageCache:(id)documentInfo;
610 - (int)getObjectCacheSize;
612 - (ObjectElementType)determineObjectFromMIMEType:(NSString*)MIMEType URL:(NSURL*)URL;
614 - (void)loadEmptyDocumentSynchronously;
616 - (NSString *)MIMETypeForPath:(NSString *)path;
618 - (void)allowDHTMLDrag:(BOOL *)flagDHTML UADrag:(BOOL *)flagUA;
619 - (BOOL)startDraggingImage:(NSImage *)dragImage at:(NSPoint)dragLoc operation:(NSDragOperation)op event:(NSEvent *)event sourceIsDHTML:(BOOL)flag DHTMLWroteData:(BOOL)dhtmlWroteData;
620 - (void)handleAutoscrollForMouseDragged:(NSEvent *)event;
621 - (BOOL)mayStartDragAtEventLocation:(NSPoint)location;
623 - (BOOL)selectWordBeforeMenuEvent;
625 - (int)historyLength;
626 - (void)goBackOrForward:(int)distance;
627 - (BOOL)canGoBackOrForward:(int)distance;
628 - (NSURL *)historyURL:(int)distance;
630 - (void)textFieldDidBeginEditing:(DOMHTMLInputElement *)element;
631 - (void)textFieldDidEndEditing:(DOMHTMLInputElement *)element;
632 - (void)textDidChangeInTextField:(DOMHTMLInputElement *)element;
633 - (void)textDidChangeInTextArea:(DOMHTMLTextAreaElement *)element;
635 - (BOOL)textField:(DOMHTMLInputElement *)element doCommandBySelector:(SEL)commandSelector;
636 - (BOOL)textField:(DOMHTMLInputElement *)element shouldHandleEvent:(NSEvent *)event;
638 - (void)setHasBorder:(BOOL)hasBorder;
640 - (NSFileWrapper *)fileWrapperForURL:(NSURL *)URL;
644 - (jobject)getAppletInView:(NSView *)view;
646 // Deprecated, use getAppletInView: instead.
647 - (jobject)pollForAppletInView:(NSView *)view;
649 - (NSUndoManager *)undoManager;
650 - (NSString *)nameForUndoAction:(WebUndoAction)undoAction;
651 - (void)issueCutCommand;
652 - (void)issueCopyCommand;
653 - (void)issuePasteCommand;
654 - (void)issuePasteAndMatchStyleCommand;
655 - (void)issueTransposeCommand;
656 - (void)respondToChangedSelection;
657 - (void)respondToChangedContents;
658 - (void)setIsSelected:(BOOL)isSelected forView:(NSView *)view;
660 - (BOOL)shouldChangeSelectedDOMRange:(DOMRange *)currentRange toDOMRange:(DOMRange *)proposedRange affinity:(NSSelectionAffinity)selectionAffinity stillSelecting:(BOOL)flag;
661 - (BOOL)shouldDeleteSelectedDOMRange:(DOMRange *)currentRange;
662 - (BOOL)shouldBeginEditing:(DOMRange *)range;
663 - (BOOL)shouldEndEditing:(DOMRange *)range;
664 - (void)didBeginEditing;
665 - (void)didEndEditing;
668 - (NSString *)overrideMediaType;
670 - (void)windowObjectCleared;
672 - (int)spellCheckerDocumentTag;
673 - (BOOL)isContinuousSpellCheckingEnabled;
675 - (void)didFirstLayout;
677 - (void)dashboardRegionsChanged:(NSMutableDictionary *)regions;
679 - (NSRect)customHighlightRect:(NSString*)type forLine:(NSRect)lineRect;
680 - (void)paintCustomHighlight:(NSString*)type forBox:(NSRect)boxRect onLine:(NSRect)lineRect behindText:(BOOL)text entireLine:(BOOL)line;
682 - (void)handledOnloadEvents;
684 - (WebCoreKeyboardUIMode)keyboardUIMode;
686 - (NSURLResponse*)mainResourceURLResponse;
687 - (NSString*)imageTitleForFilename:(NSString*)filename size:(NSSize)size;
689 - (void)notifyIconChanged:(NSURL*)iconURL;
690 - (NSURL*)originalRequestURL;
691 - (BOOL)isLoadTypeReload;
694 // This interface definition allows those who hold a WebCoreFrameBridge * to call all the methods
695 // in the WebCoreFrameBridge protocol without requiring the base implementation to supply the methods.
696 // This idiom is appropriate because WebCoreFrameBridge is an abstract class.
698 @interface WebCoreFrameBridge (SubclassResponsibility) <WebCoreFrameBridge>
701 // One method for internal use within WebCore itself.
702 // Could move this to another header, but would be a pity to create an entire header just for that.
704 @interface WebCoreFrameBridge (WebCoreInternalUse)
705 - (WebCoreMacFrame*)impl;
708 // Protocols that make up part of the interaces above.
710 @protocol WebCoreRenderTreeCopier <NSObject>
711 - (NSObject *)nodeWithName:(NSString *)name position:(NSPoint)p rect:(NSRect)rect view:(NSView *)view children:(NSArray *)children;