2bdc309a1d298be25908cc2bdaf95d3382007258
[WebKit-https.git] / WebCore / bridge / mac / WebCoreFrameBridge.h
1 /*
2  * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.  All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
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.
12  *
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. 
24  */
25
26 #import <Cocoa/Cocoa.h>
27 #import <JavaScriptCore/npruntime.h>
28 #import <JavaVM/jni.h>
29 #import <WebCore/WebCoreKeyboardAccess.h>
30 #import <WebCore/TextAffinity.h>
31 #ifdef __cplusplus
32
33 namespace WebCore {
34     class EditorClient;
35     class Element;
36     class FrameMac;
37     class String;
38 }
39
40 typedef WebCore::EditorClient WebCoreEditorClient;
41 typedef WebCore::Element WebCoreElement;
42 typedef WebCore::FrameMac WebCoreFrameMac;
43
44 #else
45
46 @class NSMenu;
47 @class WebCoreEditorClient;
48 @class WebCoreElement;
49 @class WebCoreFrameMac;
50
51 #endif
52
53 @class DOMCSSStyleDeclaration;
54 @class DOMDocument;
55 @class DOMDocumentFragment;
56 @class DOMElement;
57 @class DOMHTMLElement;
58 @class DOMHTMLInputElement;
59 @class DOMHTMLTextAreaElement;
60 @class DOMNode;
61 @class DOMRange;
62 @class NSMenu;
63 @class WebCorePageBridge;
64 @class WebCoreSettings;
65 @class WebFrame;
66 @class WebScriptObject;
67 @class WebView;
68
69 @protocol WebCoreRenderTreeCopier;
70
71 extern NSString *WebCorePageCacheStateKey;
72
73 typedef enum {
74     WebCoreDeviceScreen,
75     WebCoreDevicePrinter
76 } WebCoreDeviceType;
77
78 typedef enum {
79     WebSelectionStateNone,
80     WebSelectionStateCaret,
81     WebSelectionStateRange
82 } WebSelectionState;
83
84 typedef enum {
85     WebSelectByMoving,
86     WebSelectByExtending
87 } WebSelectionAlteration;
88
89 typedef enum {
90     WebBridgeSelectForward,
91     WebBridgeSelectBackward,
92     WebBridgeSelectRight,
93     WebBridgeSelectLeft
94 } WebBridgeSelectionDirection;
95
96 typedef enum {
97     WebBridgeSelectByCharacter,
98     WebBridgeSelectByWord,
99     WebBridgeSelectBySentence,
100     WebBridgeSelectByLine,
101     WebBridgeSelectByParagraph,
102     WebBridgeSelectToSentenceBoundary,
103     WebBridgeSelectToLineBoundary,
104     WebBridgeSelectToParagraphBoundary,
105     WebBridgeSelectToDocumentBoundary
106 } WebBridgeSelectionGranularity;
107
108 typedef enum {
109     WebScrollUp,
110     WebScrollDown,
111     WebScrollLeft,
112     WebScrollRight
113 } WebScrollDirection;
114
115 typedef enum {
116     WebScrollLine,
117     WebScrollPage,
118     WebScrollDocument,
119     WebScrollWheel
120 } WebScrollGranularity;
121
122 typedef enum {
123     WebUndoActionUnspecified,
124     WebUndoActionSetColor,
125     WebUndoActionSetBackgroundColor,
126     WebUndoActionTurnOffKerning,
127     WebUndoActionTightenKerning,
128     WebUndoActionLoosenKerning,
129     WebUndoActionUseStandardKerning,
130     WebUndoActionTurnOffLigatures,
131     WebUndoActionUseStandardLigatures,
132     WebUndoActionUseAllLigatures,
133     WebUndoActionRaiseBaseline,
134     WebUndoActionLowerBaseline,
135     WebUndoActionSetTraditionalCharacterShape,
136     WebUndoActionSetFont,
137     WebUndoActionChangeAttributes,
138     WebUndoActionAlignLeft,
139     WebUndoActionAlignRight,
140     WebUndoActionCenter,
141     WebUndoActionJustify,
142     WebUndoActionSetWritingDirection,
143     WebUndoActionSubscript,
144     WebUndoActionSuperscript,
145     WebUndoActionUnderline,
146     WebUndoActionOutline,
147     WebUndoActionUnscript,
148     WebUndoActionDrag,
149     WebUndoActionCut,
150     WebUndoActionPaste,
151     WebUndoActionPasteFont,
152     WebUndoActionPasteRuler,
153     WebUndoActionTyping,
154     WebUndoActionCreateLink,
155     WebUndoActionUnlink,
156     WebUndoActionFormatBlock,
157     WebUndoActionInsertList,
158     WebUndoActionIndent,
159     WebUndoActionOutdent
160 } WebUndoAction;
161
162 typedef enum {
163     ObjectElementNone,
164     ObjectElementImage,
165     ObjectElementFrame,
166     ObjectElementPlugin
167 } ObjectElementType;
168
169 @protocol WebCoreOpenPanelResultListener <NSObject>
170 - (void)chooseFilename:(NSString *)fileName;
171 - (void)cancel;
172 @end
173
174 // WebCoreFrameBridge objects are used by WebCore to abstract away operations that need
175 // to be implemented by library clients, for example WebKit. The objects are also
176 // used in the opposite direction, for simple access to WebCore functions without dealing
177 // directly with the KHTML C++ classes.
178
179 // A WebCoreFrameBridge creates and holds a reference to a Frame.
180
181 // The WebCoreFrameBridge interface contains methods for use by the non-WebCore side of the bridge.
182
183 @interface WebCoreFrameBridge : NSObject
184 {
185 @public
186     WebCoreFrameMac* m_frame;
187
188     BOOL _shouldCreateRenderers;
189     BOOL _closed;
190 }
191
192 - (WebCoreFrameMac*)_frame; // underscore to prevent conflict with -[NSView frame]
193
194 + (WebCoreFrameBridge *)bridgeForDOMDocument:(DOMDocument *)document;
195
196 - (id)initMainFrameWithPage:(WebCorePageBridge *)page withEditorClient:(WebCoreEditorClient *)client;
197 - (id)initSubframeWithOwnerElement:(WebCoreElement *)ownerElement withEditorClient:(WebCoreEditorClient *)client;
198
199 - (void)close;
200
201 + (NSArray *)supportedNonImageMIMETypes;
202 + (NSArray *)supportedImageMIMETypes;
203 + (NSArray *)supportedImageResourceMIMETypes; // includes types like PDF
204
205 - (void)addData:(NSData *)data;
206
207 - (void)saveDocumentState;
208 - (void)restoreDocumentState;
209
210 - (void)clearFrame;
211
212 - (NSURL *)baseURL;
213
214 - (void)installInFrame:(NSView *)view;
215 - (void)removeFromFrame;
216
217 - (BOOL)scrollOverflowInDirection:(WebScrollDirection)direction granularity:(WebScrollGranularity)granularity;
218
219 - (void)createFrameViewWithNSView:(NSView *)view marginWidth:(int)mw marginHeight:(int)mh;
220
221 - (void)reapplyStylesForDeviceType:(WebCoreDeviceType)deviceType;
222 - (void)forceLayoutAdjustingViewSize:(BOOL)adjustSizeFlag;
223 - (void)forceLayoutWithMinimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustingViewSize:(BOOL)adjustSizeFlag;
224 - (void)sendResizeEvent;
225 - (void)sendScrollEvent;
226 - (BOOL)needsLayout;
227 - (void)setNeedsLayout;
228 - (void)drawRect:(NSRect)rect;
229 - (void)adjustPageHeightNew:(float *)newBottom top:(float)oldTop bottom:(float)oldBottom limit:(float)bottomLimit;
230 - (NSArray*)computePageRectsWithPrintWidthScaleFactor:(float)printWidthScaleFactor printHeight:(float)printHeight;
231
232 - (NSView *)nextKeyView;
233 - (NSView *)previousKeyView;
234
235 - (NSView *)nextKeyViewInsideWebFrameViews;
236 - (NSView *)previousKeyViewInsideWebFrameViews;
237
238 - (NSObject *)copyRenderTree:(id <WebCoreRenderTreeCopier>)copier;
239 - (NSString *)renderTreeAsExternalRepresentation;
240
241 - (NSURL *)URLWithAttributeString:(NSString *)string;
242
243 - (DOMElement *)elementWithName:(NSString *)name inForm:(DOMElement *)form;
244 - (DOMElement *)elementForView:(NSView *)view;
245 - (BOOL)elementDoesAutoComplete:(DOMElement *)element;
246 - (BOOL)elementIsPassword:(DOMElement *)element;
247 - (DOMElement *)formForElement:(DOMElement *)element;
248 - (DOMElement *)currentForm;
249 - (NSArray *)controlsInForm:(DOMElement *)form;
250 - (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element;
251 - (NSString *)matchLabels:(NSArray *)labels againstElement:(DOMElement *)element;
252
253 - (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag;
254 - (unsigned)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(unsigned)limit;
255 - (BOOL)markedTextMatchesAreHighlighted;
256 - (void)setMarkedTextMatchesAreHighlighted:(BOOL)doHighlight;
257 - (void)unmarkAllTextMatches;
258 - (NSArray *)rectsForTextMatches;
259
260 - (void)setTextSizeMultiplier:(float)multiplier;
261
262 - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)string;
263 - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)string forceUserGesture:(BOOL)forceUserGesture;
264 - (NSAppleEventDescriptor *)aeDescByEvaluatingJavaScriptFromString:(NSString *)string;
265
266 - (BOOL)mayCopy;
267
268 - (NSString *)selectedString;
269
270 - (NSString *)stringForRange:(DOMRange *)range;
271
272 - (NSString *)markupStringFromNode:(DOMNode *)node nodes:(NSArray **)nodes;
273 - (NSString *)markupStringFromRange:(DOMRange *)range nodes:(NSArray **)nodes;
274
275 - (NSRect)caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity;
276 - (NSRect)firstRectForDOMRange:(DOMRange *)range;
277 - (void)scrollDOMRangeToVisible:(DOMRange *)range;
278
279 // Emacs-style-editing "mark"
280 - (void)setMarkDOMRange:(DOMRange *)range;
281 - (DOMRange *)markDOMRange;
282
283 // international text input "marked text"
284 - (void)setMarkedTextDOMRange:(DOMRange *)range customAttributes:(NSArray *)attributes ranges:(NSArray *)ranges;
285 - (DOMRange *)markedTextDOMRange;
286 - (void)replaceMarkedTextWithText:(NSString *)text;
287
288 - (NSFont *)fontForSelection:(BOOL *)hasMultipleFonts;
289 - (NSWritingDirection)baseWritingDirectionForSelectionStart;
290
291 - (NSString *)stringWithData:(NSData *)data; // using the encoding of the frame's main resource
292 + (NSString *)stringWithData:(NSData *)data textEncodingName:(NSString *)textEncodingName; // nil for textEncodingName means Latin-1
293
294 - (void)setShouldCreateRenderers:(BOOL)f;
295 - (BOOL)shouldCreateRenderers;
296
297 - (void)setBaseBackgroundColor:(NSColor *)backgroundColor;
298 - (void)setDrawsBackground:(BOOL)drawsBackround;
299
300 - (NSColor *)selectionColor;
301
302 - (id)accessibilityTree;
303
304 - (void)undoEditing:(id)arg;
305 - (void)redoEditing:(id)arg;
306
307 - (DOMRange *)rangeOfCharactersAroundCaret;
308 - (DOMRange *)rangeByAlteringCurrentSelection:(WebSelectionAlteration)alteration direction:(WebBridgeSelectionDirection)direction granularity:(WebBridgeSelectionGranularity)granularity;
309 - (void)alterCurrentSelection:(WebSelectionAlteration)alteration direction:(WebBridgeSelectionDirection)direction granularity:(WebBridgeSelectionGranularity)granularity;
310 - (void)alterCurrentSelection:(WebSelectionAlteration)alteration verticalDistance:(float)distance;
311 - (WebBridgeSelectionGranularity)selectionGranularity;
312 - (DOMRange *)smartDeleteRangeForProposedRange:(DOMRange *)proposedCharRange;
313 - (void)smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)charRangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString;
314 - (BOOL)canDeleteRange:(DOMRange *)range;
315 - (void)selectNSRange:(NSRange)range;
316 - (NSRange)selectedNSRange;
317 - (NSRange)markedTextNSRange;
318 - (DOMRange *)convertNSRangeToDOMRange:(NSRange)range;
319 - (NSRange)convertDOMRangeToNSRange:(DOMRange *)range;
320
321 - (DOMDocumentFragment *)documentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString;
322 - (DOMDocumentFragment *)documentFragmentWithText:(NSString *)text inContext:(DOMRange *)context;
323 - (DOMDocumentFragment *)documentFragmentWithNodesAsParagraphs:(NSArray *)nodes;
324
325 - (void)replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
326 - (void)replaceSelectionWithNode:(DOMNode *)node selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
327 - (void)replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
328 - (void)replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
329
330 - (bool)canIncreaseSelectionListLevel;
331 - (bool)canDecreaseSelectionListLevel;
332 - (DOMNode *)increaseSelectionListLevel;
333 - (DOMNode *)increaseSelectionListLevelOrdered;
334 - (DOMNode *)increaseSelectionListLevelUnordered;
335 - (void)decreaseSelectionListLevel;
336
337 - (void)insertLineBreak;
338 - (void)insertParagraphSeparator;
339 - (void)insertParagraphSeparatorInQuotedContent;
340 - (void)insertText:(NSString *)text selectInsertedText:(BOOL)selectInsertedText;
341
342 - (void)setSelectionToDragCaret;
343 - (void)moveSelectionToDragCaret:(DOMDocumentFragment *)selectionFragment smartMove:(BOOL)smartMove;
344 - (void)moveDragCaretToPoint:(NSPoint)point;
345 - (DOMRange *)dragCaretDOMRange;
346 - (BOOL)isDragCaretRichlyEditable;
347 - (DOMRange *)editableDOMRangeForPoint:(NSPoint)point;
348 - (DOMRange *)characterRangeAtPoint:(NSPoint)point;
349
350 - (void)deleteKeyPressedWithSmartDelete:(BOOL)smartDelete granularity:(WebBridgeSelectionGranularity)granularity;
351 - (void)forwardDeleteKeyPressedWithSmartDelete:(BOOL)smartDelete granularity:(WebBridgeSelectionGranularity)granularity;
352
353 - (DOMCSSStyleDeclaration *)typingStyle;
354 - (void)setTypingStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(WebUndoAction)undoAction;
355 - (void)applyStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(WebUndoAction)undoAction;
356 - (void)applyParagraphStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(WebUndoAction)undoAction;
357 - (BOOL)selectionStartHasStyle:(DOMCSSStyleDeclaration *)style;
358 - (NSCellStateValue)selectionHasStyle:(DOMCSSStyleDeclaration *)style;
359
360 - (NSDragOperation)dragOperationForDraggingInfo:(id <NSDraggingInfo>)info;
361 - (void)dragExitedWithDraggingInfo:(id <NSDraggingInfo>)info;
362 - (BOOL)concludeDragForDraggingInfo:(id <NSDraggingInfo>)info;
363 - (void)dragSourceMovedTo:(NSPoint)windowLoc;
364 - (void)dragSourceEndedAt:(NSPoint)windowLoc operation:(NSDragOperation)operation;
365
366 - (BOOL)isCharacterSmartReplaceExempt:(unichar)c isPreviousCharacter:(BOOL)isPreviousCharacter;
367
368 - (BOOL)getData:(NSData **)data andResponse:(NSURLResponse **)response forURL:(NSURL *)URL;
369 - (void)getAllResourceDatas:(NSArray **)datas andResponses:(NSArray **)responses;
370
371 - (BOOL)canProvideDocumentSource;
372 - (BOOL)canSaveAsWebArchive;
373
374 - (NSURL*)originalRequestURL;
375 - (void)frameDetached;
376 - (void)receivedData:(NSData *)data textEncodingName:(NSString *)textEncodingName;
377
378 @end
379
380 // The WebCoreFrameBridge protocol contains methods for use by the WebCore side of the bridge.
381
382 // In NSArray objects for post data, NSData objects represent literal data, and NSString objects represent encoded files.
383 // The encoding is the standard form encoding for uploading files.
384
385 @protocol WebCoreFrameBridge
386
387 - (NSView *)documentView;
388
389 - (WebCorePageBridge *)createWindowWithURL:(NSURL *)URL;
390 - (void)showWindow;
391
392 - (void)setStatusText:(NSString *)status;
393
394 - (WebCoreFrameBridge *)createChildFrameNamed:(NSString *)frameName withURL:(NSURL *)URL referrer:(const WebCore::String&)referrer ownerElement:(WebCoreElement *)ownerElement allowsScrolling:(BOOL)allowsScrolling marginWidth:(int)width marginHeight:(int)height;
395
396 - (BOOL)areToolbarsVisible;
397 - (void)setToolbarsVisible:(BOOL)visible;
398 - (BOOL)isStatusbarVisible;
399 - (void)setStatusbarVisible:(BOOL)visible;
400 - (BOOL)areScrollbarsVisible;
401 - (void)setScrollbarsVisible:(BOOL)visible;
402 - (NSWindow *)window;
403
404 - (void)setWindowIsResizable:(BOOL)resizable;
405 - (BOOL)windowIsResizable;
406
407 - (NSResponder *)firstResponder;
408 - (void)makeFirstResponder:(NSResponder *)responder;
409 - (void)willMakeFirstResponderForNodeFocus;
410
411 - (BOOL)textViewWasFirstResponderAtMouseDownTime:(NSTextView *)textView;
412
413 - (void)closeWindowSoon;
414
415 - (void)runJavaScriptAlertPanelWithMessage:(NSString *)message;
416 - (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message;
417 - (BOOL)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText returningText:(NSString **)result;
418 - (BOOL)shouldInterruptJavaScript;
419 - (BOOL)canRunBeforeUnloadConfirmPanel;
420 - (BOOL)runBeforeUnloadConfirmPanelWithMessage:(NSString *)message;
421 - (void)addMessageToConsole:(NSDictionary *)message;
422 - (void)runOpenPanelForFileButtonWithResultListener:(id <WebCoreOpenPanelResultListener>)resultListener;
423
424 - (void)activateWindow;
425 - (void)deactivateWindow;
426
427 - (void)formControlIsBecomingFirstResponder:(NSView *)formControl;
428 - (void)formControlIsResigningFirstResponder:(NSView *)formControl;
429
430 - (NSView *)nextKeyViewOutsideWebFrameViews;
431 - (NSView *)nextValidKeyViewOutsideWebFrameViews;
432 - (NSView *)previousKeyViewOutsideWebFrameViews;
433
434 - (void)saveDocumentState:(NSArray *)documentState;
435 - (NSArray *)documentState;
436
437 - (void)setNeedsReapplyStyles;
438
439 - (NSView *)viewForPluginWithURL:(NSURL *)URL
440                   attributeNames:(NSArray *)attributeNames
441                  attributeValues:(NSArray *)attributeValues
442                         MIMEType:(NSString *)MIMEType
443                       DOMElement:(DOMElement *)element
444                     loadManually:(BOOL)loadManually;
445 - (NSView *)viewForJavaAppletWithFrame:(NSRect)frame
446                         attributeNames:(NSArray *)attributeNames
447                        attributeValues:(NSArray *)attributeValues
448                                baseURL:(NSURL *)baseURL
449                             DOMElement:(DOMElement *)element;
450 - (void)redirectDataToPlugin:(NSView *)pluginView;
451
452 - (int)getObjectCacheSize;
453
454 - (ObjectElementType)determineObjectFromMIMEType:(NSString*)MIMEType URL:(NSURL*)URL;
455
456 - (NSString *)MIMETypeForPath:(NSString *)path;
457
458 - (void)allowDHTMLDrag:(BOOL *)flagDHTML UADrag:(BOOL *)flagUA;
459 - (BOOL)startDraggingImage:(NSImage *)dragImage at:(NSPoint)dragLoc operation:(NSDragOperation)op event:(NSEvent *)event sourceIsDHTML:(BOOL)flag DHTMLWroteData:(BOOL)dhtmlWroteData;
460 - (BOOL)mayStartDragAtEventLocation:(NSPoint)location;
461
462 - (BOOL)selectWordBeforeMenuEvent;
463
464 - (int)historyLength;
465 - (void)goBackOrForward:(int)distance;
466 - (BOOL)canGoBackOrForward:(int)distance;
467 - (NSURL *)historyURL:(int)distance;
468
469 - (void)textFieldDidBeginEditing:(DOMHTMLInputElement *)element;
470 - (void)textFieldDidEndEditing:(DOMHTMLInputElement *)element;
471 - (void)textDidChangeInTextField:(DOMHTMLInputElement *)element;
472 - (void)textDidChangeInTextArea:(DOMHTMLTextAreaElement *)element;
473
474 - (BOOL)textField:(DOMHTMLInputElement *)element doCommandBySelector:(SEL)commandSelector;
475 - (BOOL)textField:(DOMHTMLInputElement *)element shouldHandleEvent:(NSEvent *)event;
476
477 - (void)setHasBorder:(BOOL)hasBorder;
478
479 - (NSFileWrapper *)fileWrapperForURL:(NSURL *)URL;
480
481 - (void)print;
482
483 - (jobject)getAppletInView:(NSView *)view;
484
485 // Deprecated, use getAppletInView: instead.
486 - (jobject)pollForAppletInView:(NSView *)view;
487
488 - (NSUndoManager *)undoManager;
489 - (NSString *)nameForUndoAction:(WebUndoAction)undoAction;
490 - (void)issueCutCommand;
491 - (void)issueCopyCommand;
492 - (void)issuePasteCommand;
493 - (void)issuePasteAndMatchStyleCommand;
494 - (void)issueTransposeCommand;
495 - (void)respondToChangedSelection;
496 - (void)respondToChangedContents;
497 - (void)setIsSelected:(BOOL)isSelected forView:(NSView *)view;
498 - (BOOL)isEditable;
499 - (BOOL)shouldChangeSelectedDOMRange:(DOMRange *)currentRange toDOMRange:(DOMRange *)proposedRange affinity:(WebCore::EAffinity)selectionAffinity stillSelecting:(BOOL)flag;
500 - (BOOL)shouldDeleteSelectedDOMRange:(DOMRange *)currentRange;
501 - (BOOL)shouldBeginEditing:(DOMRange *)range;
502 - (BOOL)shouldEndEditing:(DOMRange *)range;
503 - (void)didBeginEditing;
504 - (void)didEndEditing;
505 - (BOOL)canPaste;
506
507 - (NSString *)overrideMediaType;
508
509 - (void)windowObjectCleared;
510
511 - (int)spellCheckerDocumentTag;
512 - (BOOL)isContinuousSpellCheckingEnabled;
513
514 - (void)dashboardRegionsChanged:(NSMutableDictionary *)regions;
515 - (void)willPopupMenu:(NSMenu *)menu;
516
517 - (NSRect)customHighlightRect:(NSString*)type forLine:(NSRect)lineRect;
518 - (void)paintCustomHighlight:(NSString*)type forBox:(NSRect)boxRect onLine:(NSRect)lineRect behindText:(BOOL)text entireLine:(BOOL)line;
519
520 - (WebCoreKeyboardUIMode)keyboardUIMode;
521
522 - (NSString*)imageTitleForFilename:(NSString*)filename size:(NSSize)size;
523
524
525 @end
526
527 // This interface definition allows those who hold a WebCoreFrameBridge * to call all the methods
528 // in the WebCoreFrameBridge protocol without requiring the base implementation to supply the methods.
529 // This idiom is appropriate because WebCoreFrameBridge is an abstract class.
530
531 @interface WebCoreFrameBridge (SubclassResponsibility) <WebCoreFrameBridge>
532 @end
533
534 // Protocols that make up part of the interaces above.
535
536 @protocol WebCoreRenderTreeCopier <NSObject>
537 - (NSObject *)nodeWithName:(NSString *)name position:(NSPoint)p rect:(NSRect)rect view:(NSView *)view children:(NSArray *)children;
538 @end
539