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>
41 typedef WebCore::MacFrame WebCoreMacFrame;
42 typedef WebCore::RenderPart WebCoreRenderPart;
46 @class WebCoreMacFrame;
47 @class WebCoreRenderPart;
52 @class DOMCSSStyleDeclaration;
54 @class DOMDocumentFragment;
56 @class DOMHTMLElement;
57 @class DOMHTMLInputElement;
58 @class DOMHTMLTextAreaElement;
61 @class WebCorePageBridge;
62 @class WebCoreSettings;
63 @class WebScriptObject;
66 @protocol WebCoreRenderTreeCopier;
67 @protocol WebCoreResourceHandle;
68 @protocol WebCoreResourceLoader;
69 @protocol WebCoreFileButton;
70 @protocol WebCoreFileButtonDelegate;
72 extern NSString *WebCoreElementDOMNodeKey;
73 extern NSString *WebCoreElementFrameKey;
74 extern NSString *WebCoreElementImageAltStringKey;
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;
103 WebBridgeSelectForward,
104 WebBridgeSelectBackward,
105 WebBridgeSelectRight,
107 } WebBridgeSelectionDirection;
110 WebBridgeSelectByCharacter,
111 WebBridgeSelectByWord,
112 WebBridgeSelectByLine,
113 WebBridgeSelectByParagraph,
114 WebBridgeSelectToLineBoundary,
115 WebBridgeSelectToParagraphBoundary,
116 WebBridgeSelectToDocumentBoundary
117 } WebBridgeSelectionGranularity;
124 } WebScrollDirection;
131 } WebScrollGranularity;
134 WebUndoActionUnspecified,
135 WebUndoActionSetColor,
136 WebUndoActionSetBackgroundColor,
137 WebUndoActionTurnOffKerning,
138 WebUndoActionTightenKerning,
139 WebUndoActionLoosenKerning,
140 WebUndoActionUseStandardKerning,
141 WebUndoActionTurnOffLigatures,
142 WebUndoActionUseStandardLigatures,
143 WebUndoActionUseAllLigatures,
144 WebUndoActionRaiseBaseline,
145 WebUndoActionLowerBaseline,
146 WebUndoActionSetTraditionalCharacterShape,
147 WebUndoActionSetFont,
148 WebUndoActionChangeAttributes,
149 WebUndoActionAlignLeft,
150 WebUndoActionAlignRight,
152 WebUndoActionJustify,
153 WebUndoActionSetWritingDirection,
154 WebUndoActionSubscript,
155 WebUndoActionSuperscript,
156 WebUndoActionUnderline,
157 WebUndoActionOutline,
158 WebUndoActionUnscript,
162 WebUndoActionPasteFont,
163 WebUndoActionPasteRuler,
175 // WebCoreFrameBridge objects are used by WebCore to abstract away operations that need
176 // to be implemented by library clients, for example WebKit. The objects are also
177 // used in the opposite direction, for simple access to WebCore functions without dealing
178 // directly with the KHTML C++ classes.
180 // A WebCoreFrameBridge creates and holds a reference to a Frame.
182 // The WebCoreFrameBridge interface contains methods for use by the non-WebCore side of the bridge.
184 @interface WebCoreFrameBridge : NSObject
186 WebCoreMacFrame *m_frame;
187 BOOL _shouldCreateRenderers;
189 NSString *_frameNamespace;
192 + (WebCoreFrameBridge *)bridgeForDOMDocument:(DOMDocument *)document;
194 - (id)initMainFrameWithPage:(WebCorePageBridge *)page;
195 - (id)initSubframeWithRenderer:(WebCoreRenderPart *)renderer;
197 + (NSArray *)supportedMIMETypes;
199 - (void)initializeSettings:(WebCoreSettings *)settings;
201 - (void)setName:(NSString *)name;
203 /* Creates a name for an frame unnamed in the HTML. It should produce repeatable results for loads of the same frameset. */
204 - (NSString *)generateFrameName;
206 - (WebCorePageBridge *)page;
208 - (WebCoreFrameBridge *)parent;
210 - (WebCoreFrameBridge *)firstChild;
211 - (WebCoreFrameBridge *)lastChild;
212 - (WebCoreFrameBridge *)previousSibling;
213 - (WebCoreFrameBridge *)nextSibling;
215 - (void)appendChild:(WebCoreFrameBridge *)child;
216 - (void)removeChild:(WebCoreFrameBridge *)child;
218 - (unsigned)childCount;
219 - (BOOL)isDescendantOfFrame:(WebCoreFrameBridge *)ancestor;
220 - (WebCoreFrameBridge *)traverseNextFrameStayWithin:(WebCoreFrameBridge *)stayWithin;
222 - (WebCoreFrameBridge *)nextFrameWithWrap:(BOOL)wrap;
223 - (WebCoreFrameBridge *)previousFrameWithWrap:(BOOL)wrap;
225 - (WebCoreFrameBridge *)childFrameNamed:(NSString *)name;
226 - (WebCoreFrameBridge *)findFrameNamed:(NSString *)name;
227 - (void)setFrameNamespace:(NSString *)ns;
228 - (NSString *)frameNamespace;
230 - (void)provisionalLoadStarted;
232 - (void)openURL:(NSURL *)URL reload:(BOOL)reload
233 contentType:(NSString *)contentType refresh:(NSString *)refresh lastModified:(NSDate *)lastModified
234 pageCache:(NSDictionary *)pageCache;
235 - (void)setEncoding:(NSString *)encoding userChosen:(BOOL)userChosen;
236 - (void)addData:(NSData *)data;
240 - (void)didNotOpenURL:(NSURL *)URL pageCache:(NSDictionary *)pageCache;
242 - (BOOL)canLoadURL:(NSURL *)URL fromReferrer:(NSString *)referrer hideReferrer:(BOOL *)hideReferrer;
244 - (void)saveDocumentState;
245 - (void)restoreDocumentState;
247 - (BOOL)canCachePage;
248 - (BOOL)saveDocumentToPageCache;
254 - (void)handleFallbackContent;
258 - (NSString *)referrer;
259 - (NSString *)domain;
260 - (WebCoreFrameBridge *)opener;
261 - (void)setOpener:(WebCoreFrameBridge *)bridge;
263 - (void)installInFrame:(NSView *)view;
264 - (void)removeFromFrame;
266 - (void)scrollToAnchor:(NSString *)anchor;
267 - (void)scrollToAnchorWithURL:(NSURL *)URL;
269 - (BOOL)scrollOverflowInDirection:(WebScrollDirection)direction granularity:(WebScrollGranularity)granularity;
271 - (void)createFrameViewWithNSView:(NSView *)view marginWidth:(int)mw marginHeight:(int)mh;
275 - (void)reapplyStylesForDeviceType:(WebCoreDeviceType)deviceType;
276 - (void)forceLayoutAdjustingViewSize:(BOOL)adjustSizeFlag;
277 - (void)forceLayoutWithMinimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustingViewSize:(BOOL)adjustSizeFlag;
278 - (void)sendResizeEvent;
279 - (void)sendScrollEvent;
281 - (void)setNeedsLayout;
282 - (void)drawRect:(NSRect)rect;
283 - (void)adjustPageHeightNew:(float *)newBottom top:(float)oldTop bottom:(float)oldBottom limit:(float)bottomLimit;
284 - (NSArray*)computePageRectsWithPrintWidthScaleFactor:(float)printWidthScaleFactor printHeight:(float)printHeight;
286 - (void)setActivationEventNumber:(int)num;
287 - (void)mouseDown:(NSEvent *)event;
288 - (void)mouseUp:(NSEvent *)event;
289 - (void)mouseMoved:(NSEvent *)event;
290 - (void)mouseDragged:(NSEvent *)event;
292 // these return YES if event is eaten by WebCore
293 - (BOOL)sendScrollWheelEvent:(NSEvent *)event;
294 - (BOOL)sendContextMenuEvent:(NSEvent *)event;
296 - (NSView *)nextKeyView;
297 - (NSView *)previousKeyView;
299 - (NSView *)nextKeyViewInsideWebFrameViews;
300 - (NSView *)previousKeyViewInsideWebFrameViews;
302 - (NSObject *)copyRenderTree:(id <WebCoreRenderTreeCopier>)copier;
303 - (NSString *)renderTreeAsExternalRepresentation;
305 - (NSDictionary *)elementAtPoint:(NSPoint)point;
306 - (NSURL *)URLWithAttributeString:(NSString *)string;
308 - (DOMElement *)elementWithName:(NSString *)name inForm:(DOMElement *)form;
309 - (DOMElement *)elementForView:(NSView *)view;
310 - (BOOL)elementDoesAutoComplete:(DOMElement *)element;
311 - (BOOL)elementIsPassword:(DOMElement *)element;
312 - (DOMElement *)formForElement:(DOMElement *)element;
313 - (DOMElement *)currentForm;
314 - (NSArray *)controlsInForm:(DOMElement *)form;
315 - (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element;
316 - (NSString *)matchLabels:(NSArray *)labels againstElement:(DOMElement *)element;
318 - (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag;
319 - (unsigned)highlightAllMatchesForString:(NSString *)string caseSensitive:(BOOL)caseFlag;
320 - (void)clearHighlightedMatches;
322 - (NSString *)advanceToNextMisspelling;
323 - (NSString *)advanceToNextMisspellingStartingJustBeforeSelection;
324 - (void)unmarkAllMisspellings;
326 - (void)setTextSizeMultiplier:(float)multiplier;
328 - (CFStringEncoding)textEncoding;
330 - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)string;
331 - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)string forceUserGesture:(BOOL)forceUserGesture;
332 - (NSAppleEventDescriptor *)aeDescByEvaluatingJavaScriptFromString:(NSString *)string;
334 - (DOMDocument *)DOMDocument;
335 - (DOMHTMLElement *)frameElement;
337 - (BOOL)isSelectionEditable;
338 - (WebSelectionState)selectionState;
340 - (NSAttributedString *)selectedAttributedString;
341 - (NSString *)selectedString;
343 - (void)setSelectionFromNone;
344 - (void)setDisplaysWithFocusAttributes:(BOOL)flag;
346 - (void)setWindowHasFocus:(BOOL)flag;
348 - (NSString *)stringForRange:(DOMRange *)range;
350 - (NSString *)markupStringFromNode:(DOMNode *)node nodes:(NSArray **)nodes;
351 - (NSString *)markupStringFromRange:(DOMRange *)range nodes:(NSArray **)nodes;
355 - (void)deselectText;
357 - (NSRect)selectionRect;
358 - (NSRect)visibleSelectionRect;
359 - (void)centerSelectionInVisibleArea;
360 - (NSImage *)selectionImage;
361 - (NSRect)caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity;
362 - (NSRect)firstRectForDOMRange:(DOMRange *)range;
364 - (void)setSelectedDOMRange:(DOMRange *)range affinity:(NSSelectionAffinity)selectionAffinity closeTyping:(BOOL)closeTyping;
365 - (DOMRange *)selectedDOMRange;
366 - (NSSelectionAffinity)selectionAffinity;
368 // Emacs-style-editing "mark"
369 - (void)setMarkDOMRange:(DOMRange *)range;
370 - (DOMRange *)markDOMRange;
372 // international text input "marked text"
373 - (void)setMarkedTextDOMRange:(DOMRange *)range customAttributes:(NSArray *)attributes ranges:(NSArray *)ranges;
374 - (DOMRange *)markedTextDOMRange;
375 - (void)replaceMarkedTextWithText:(NSString *)text;
377 - (NSAttributedString *)attributedStringFrom:(DOMNode *)startNode startOffset:(int)startOffset to:(DOMNode *)endNode endOffset:(int)endOffset;
379 - (NSFont *)fontForSelection:(BOOL *)hasMultipleFonts;
380 - (NSDictionary *)fontAttributesForSelectionStart;
381 - (NSWritingDirection)baseWritingDirectionForSelectionStart;
383 + (NSString *)stringWithData:(NSData *)data textEncoding:(CFStringEncoding)textEncoding;
384 + (NSString *)stringWithData:(NSData *)data textEncodingName:(NSString *)textEncodingName;
386 - (BOOL)interceptKeyEvent:(NSEvent *)event toView:(NSView *)view;
388 - (void)setShouldCreateRenderers:(BOOL)f;
389 - (BOOL)shouldCreateRenderers;
391 - (int)numPendingOrLoadingRequests;
392 - (BOOL)doneProcessingData;
395 - (void)setDrawsBackground:(BOOL)drawsBackround;
397 - (NSColor *)bodyBackgroundColor;
398 - (NSColor *)selectionColor;
400 - (void)adjustViewSize;
402 - (id)accessibilityTree;
404 - (void)undoEditing:(id)arg;
405 - (void)redoEditing:(id)arg;
407 - (DOMRange *)rangeByExpandingSelectionWithGranularity:(WebBridgeSelectionGranularity)granularity;
408 - (DOMRange *)rangeOfCharactersAroundCaret;
409 - (DOMRange *)rangeByAlteringCurrentSelection:(WebSelectionAlteration)alteration direction:(WebBridgeSelectionDirection)direction granularity:(WebBridgeSelectionGranularity)granularity;
410 - (void)alterCurrentSelection:(WebSelectionAlteration)alteration direction:(WebBridgeSelectionDirection)direction granularity:(WebBridgeSelectionGranularity)granularity;
411 - (DOMRange *)rangeByAlteringCurrentSelection:(WebSelectionAlteration)alteration verticalDistance:(float)distance;
412 - (void)alterCurrentSelection:(WebSelectionAlteration)alteration verticalDistance:(float)distance;
413 - (WebBridgeSelectionGranularity)selectionGranularity;
414 - (DOMRange *)smartDeleteRangeForProposedRange:(DOMRange *)proposedCharRange;
415 - (void)smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)charRangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString;
416 - (BOOL)canDeleteRange:(DOMRange *)range;
417 - (void)selectNSRange:(NSRange)range;
418 - (NSRange)selectedNSRange;
419 - (NSRange)markedTextNSRange;
420 - (DOMRange *)convertNSRangeToDOMRange:(NSRange)range;
421 - (NSRange)convertDOMRangeToNSRange:(DOMRange *)range;
423 - (DOMDocumentFragment *)documentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString;
424 - (DOMDocumentFragment *)documentFragmentWithText:(NSString *)text;
425 - (DOMDocumentFragment *)documentFragmentWithNodesAsParagraphs:(NSArray *)nodes;
427 - (void)replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
428 - (void)replaceSelectionWithNode:(DOMNode *)node selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
429 - (void)replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
430 - (void)replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
432 - (void)insertLineBreak;
433 - (void)insertParagraphSeparator;
434 - (void)insertParagraphSeparatorInQuotedContent;
435 - (void)insertText:(NSString *)text selectInsertedText:(BOOL)selectInsertedText;
437 - (void)setSelectionToDragCaret;
438 - (void)moveSelectionToDragCaret:(DOMDocumentFragment *)selectionFragment smartMove:(BOOL)smartMove;
439 - (void)moveDragCaretToPoint:(NSPoint)point;
440 - (void)removeDragCaret;
441 - (DOMRange *)dragCaretDOMRange;
442 - (DOMRange *)editableDOMRangeForPoint:(NSPoint)point;
443 - (DOMRange *)characterRangeAtPoint:(NSPoint)point;
445 - (void)deleteSelectionWithSmartDelete:(BOOL)smartDelete;
446 - (void)deleteKeyPressedWithSmartDelete:(BOOL)smartDelete;
447 - (void)forwardDeleteKeyPressedWithSmartDelete:(BOOL)smartDelete;
449 - (DOMCSSStyleDeclaration *)typingStyle;
450 - (void)setTypingStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(WebUndoAction)undoAction;
451 - (void)applyStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(WebUndoAction)undoAction;
452 - (void)applyParagraphStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(WebUndoAction)undoAction;
453 - (BOOL)selectionStartHasStyle:(DOMCSSStyleDeclaration *)style;
454 - (NSCellStateValue)selectionHasStyle:(DOMCSSStyleDeclaration *)style;
455 - (void)applyEditingStyleToBodyElement;
456 - (void)removeEditingStyleFromBodyElement;
457 - (void)applyEditingStyleToElement:(DOMElement *)element;
458 - (void)removeEditingStyleFromElement:(DOMElement *)element;
460 - (void)ensureSelectionVisible;
462 - (WebScriptObject *)windowScriptObject;
463 - (NPObject *)windowScriptNPObject;
465 - (BOOL)eventMayStartDrag:(NSEvent *)event;
466 - (NSDragOperation)dragOperationForDraggingInfo:(id <NSDraggingInfo>)info;
467 - (void)dragExitedWithDraggingInfo:(id <NSDraggingInfo>)info;
468 - (BOOL)concludeDragForDraggingInfo:(id <NSDraggingInfo>)info;
469 - (void)dragSourceMovedTo:(NSPoint)windowLoc;
470 - (void)dragSourceEndedAt:(NSPoint)windowLoc operation:(NSDragOperation)operation;
473 - (BOOL)mayDHTMLCopy;
474 - (BOOL)mayDHTMLPaste;
476 - (BOOL)tryDHTMLCopy;
477 - (BOOL)tryDHTMLPaste;
479 - (NSMutableDictionary *)dashboardRegions;
485 // The WebCoreFrameBridge protocol contains methods for use by the WebCore side of the bridge.
487 // In NSArray objects for post data, NSData objects represent literal data, and NSString objects represent encoded files.
488 // The encoding is the standard form encoding for uploading files.
490 @protocol WebCoreFrameBridge
492 - (WebCoreFrameBridge *)mainFrame;
493 - (void)frameDetached;
494 - (NSView *)documentView;
495 - (WebView *)webView;
497 - (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;
498 - (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;
500 - (WebCoreFrameBridge *)createWindowWithURL:(NSURL *)URL frameName:(NSString *)name;
504 - (BOOL)canRunModalNow;
505 - (WebCoreFrameBridge *)createModalDialogWithURL:(NSURL *)URL;
508 - (NSString *)userAgentForURL:(NSURL *)URL;
510 - (void)setTitle:(NSString *)title;
511 - (void)setStatusText:(NSString *)status;
513 - (void)setIconURL:(NSURL *)URL;
514 - (void)setIconURL:(NSURL *)URL withType:(NSString *)string;
516 - (WebCoreFrameBridge *)createChildFrameNamed:(NSString *)frameName withURL:(NSURL *)URL
517 referrer:(NSString *)referrer
518 renderPart:(WebCoreRenderPart *)renderPart
519 allowsScrolling:(BOOL)allowsScrolling marginWidth:(int)width marginHeight:(int)height;
521 - (BOOL)areToolbarsVisible;
522 - (void)setToolbarsVisible:(BOOL)visible;
523 - (BOOL)isStatusbarVisible;
524 - (void)setStatusbarVisible:(BOOL)visible;
525 - (BOOL)areScrollbarsVisible;
526 - (void)setScrollbarsVisible:(BOOL)visible;
527 - (NSWindow *)window;
528 - (void)setWindowFrame:(NSRect)frame;
529 - (NSRect)windowFrame;
530 - (void)setWindowContentRect:(NSRect)frame;
531 - (NSRect)windowContentRect;
533 - (void)setWindowIsResizable:(BOOL)resizable;
534 - (BOOL)windowIsResizable;
536 - (NSResponder *)firstResponder;
537 - (void)makeFirstResponder:(NSResponder *)responder;
539 - (BOOL)wasFirstResponderAtMouseDownTime:(NSResponder *)responder;
541 - (void)closeWindowSoon;
543 - (void)runJavaScriptAlertPanelWithMessage:(NSString *)message;
544 - (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message;
545 - (BOOL)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText returningText:(NSString **)result;
546 - (BOOL)canRunBeforeUnloadConfirmPanel;
547 - (BOOL)runBeforeUnloadConfirmPanelWithMessage:(NSString *)message;
548 - (void)addMessageToConsole:(NSDictionary *)message;
550 - (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)loader withURL:(NSURL *)URL customHeaders:(NSDictionary *)customHeaders;
551 - (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)loader withURL:(NSURL *)URL customHeaders:(NSDictionary *)customHeaders postData:(NSArray *)data;
552 - (void)objectLoadedFromCacheWithURL:(NSURL *)URL response:(NSURLResponse *)response data:(NSData *)data;
554 - (NSData *)syncLoadResourceWithURL:(NSURL *)URL customHeaders:(NSDictionary *)requestHeaders postData:(NSArray *)postData finalURL:(NSURL **)finalNSURL responseHeaders:(NSDictionary **)responseHeaderDict statusCode:(int *)statusCode;
557 - (time_t)expiresTimeForResponse:(NSURLResponse *)response;
559 - (void)reportClientRedirectToURL:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date lockHistory:(BOOL)lockHistory isJavaScriptFormAction:(BOOL)isJavaScriptFormAction;
560 - (void)reportClientRedirectCancelled:(BOOL)cancelWithLoadInProgress;
563 - (void)unfocusWindow;
565 - (void)formControlIsResigningFirstResponder:(NSView *)formControl;
567 - (NSView *)nextKeyViewOutsideWebFrameViews;
568 - (NSView *)nextValidKeyViewOutsideWebFrameViews;
569 - (NSView *)previousKeyViewOutsideWebFrameViews;
571 - (BOOL)defersLoading;
572 - (void)setDefersLoading:(BOOL)loading;
573 - (void)saveDocumentState:(NSArray *)documentState;
574 - (NSArray *)documentState;
576 - (void)setNeedsReapplyStyles;
578 - (void)tokenizerProcessedData;
580 // OK to be an NSString rather than an NSURL.
581 // This URL is only used for coloring visited links.
582 - (NSString *)requestedURLString;
583 - (NSString *)incomingReferrer;
585 - (NSView *)viewForPluginWithURL:(NSURL *)URL
586 attributeNames:(NSArray *)attributeNames
587 attributeValues:(NSArray *)attributeValues
588 MIMEType:(NSString *)MIMEType;
589 - (NSView *)viewForJavaAppletWithFrame:(NSRect)frame
590 attributeNames:(NSArray *)attributeNames
591 attributeValues:(NSArray *)attributeValues
592 baseURL:(NSURL *)baseURL;
594 - (BOOL)saveDocumentToPageCache:(id)documentInfo;
596 - (int)getObjectCacheSize;
598 - (ObjectElementType)determineObjectFromMIMEType:(NSString*)MIMEType URL:(NSURL*)URL;
600 - (void)loadEmptyDocumentSynchronously;
602 - (NSString *)MIMETypeForPath:(NSString *)path;
604 - (void)allowDHTMLDrag:(BOOL *)flagDHTML UADrag:(BOOL *)flagUA;
605 - (BOOL)startDraggingImage:(NSImage *)dragImage at:(NSPoint)dragLoc operation:(NSDragOperation)op event:(NSEvent *)event sourceIsDHTML:(BOOL)flag DHTMLWroteData:(BOOL)dhtmlWroteData;
606 - (void)handleAutoscrollForMouseDragged:(NSEvent *)event;
607 - (BOOL)mayStartDragAtEventLocation:(NSPoint)location;
609 - (BOOL)selectWordBeforeMenuEvent;
611 - (int)historyLength;
612 - (void)goBackOrForward:(int)distance;
613 - (BOOL)canGoBackOrForward:(int)distance;
615 - (void)textFieldDidBeginEditing:(DOMHTMLInputElement *)element;
616 - (void)textFieldDidEndEditing:(DOMHTMLInputElement *)element;
617 - (void)textDidChangeInTextField:(DOMHTMLInputElement *)element;
618 - (void)textDidChangeInTextArea:(DOMHTMLTextAreaElement *)element;
620 - (BOOL)textField:(DOMHTMLInputElement *)element doCommandBySelector:(SEL)commandSelector;
621 - (BOOL)textField:(DOMHTMLInputElement *)element shouldHandleEvent:(NSEvent *)event;
623 - (NSView <WebCoreFileButton> *)fileButtonWithDelegate:(id <WebCoreFileButtonDelegate>)delegate;
625 - (void)setHasBorder:(BOOL)hasBorder;
627 - (WebCoreKeyboardUIMode)keyboardUIMode;
629 - (NSFileWrapper *)fileWrapperForURL:(NSURL *)URL;
633 - (jobject)getAppletInView:(NSView *)view;
635 // Deprecated, use getAppletInView: instead.
636 - (jobject)pollForAppletInView:(NSView *)view;
638 - (NSUndoManager *)undoManager;
639 - (NSString *)nameForUndoAction:(WebUndoAction)undoAction;
640 - (void)issueCutCommand;
641 - (void)issueCopyCommand;
642 - (void)issuePasteCommand;
643 - (void)issuePasteAndMatchStyleCommand;
644 - (void)issueTransposeCommand;
645 - (void)respondToChangedSelection;
646 - (void)respondToChangedContents;
647 - (void)setIsSelected:(BOOL)isSelected forView:(NSView *)view;
649 - (BOOL)shouldChangeSelectedDOMRange:(DOMRange *)currentRange toDOMRange:(DOMRange *)proposedRange affinity:(NSSelectionAffinity)selectionAffinity stillSelecting:(BOOL)flag;
650 - (BOOL)shouldBeginEditing:(DOMRange *)range;
651 - (BOOL)shouldEndEditing:(DOMRange *)range;
652 - (void)didBeginEditing;
653 - (void)didEndEditing;
656 - (NSString *)overrideMediaType;
658 - (void)windowObjectCleared;
660 - (int)spellCheckerDocumentTag;
661 - (BOOL)isContinuousSpellCheckingEnabled;
663 - (void)didFirstLayout;
665 - (void)dashboardRegionsChanged:(NSMutableDictionary *)regions;
667 - (BOOL)isCharacterSmartReplaceExempt:(unichar)c isPreviousCharacter:(BOOL)isPreviousCharacter;
669 - (void)handledOnloadEvents;
673 // This interface definition allows those who hold a WebCoreFrameBridge * to call all the methods
674 // in the WebCoreFrameBridge protocol without requiring the base implementation to supply the methods.
675 // This idiom is appropriate because WebCoreFrameBridge is an abstract class.
677 @interface WebCoreFrameBridge (SubclassResponsibility) <WebCoreFrameBridge>
680 // One method for internal use within WebCore itself.
681 // Could move this to another header, but would be a pity to create an entire header just for that.
683 @interface WebCoreFrameBridge (WebCoreInternalUse)
684 - (WebCoreMacFrame*)impl;
687 // Protocols that make up part of the interaces above.
689 @protocol WebCoreRenderTreeCopier <NSObject>
690 - (NSObject *)nodeWithName:(NSString *)name position:(NSPoint)p rect:(NSRect)rect view:(NSView *)view children:(NSArray *)children;
693 @protocol WebCoreFileButton <NSObject>
694 - (void)setFilename:(NSString *)filename;
695 - (void)performClick;
696 - (NSString *)filename;
698 - (void)setVisualFrame:(NSRect)rect;
699 - (NSRect)visualFrame;
700 - (NSSize)bestVisualFrameSizeForCharacterCount:(int)count;
703 @protocol WebCoreFileButtonDelegate <NSObject>
704 - (void)filenameChanged:(NSString *)filename;
705 - (void)focusChanged:(BOOL)nowHasFocus;