#import <WebKitLegacy/WebFrame.h>
#import <JavaScriptCore/JSBase.h>
#if !TARGET_OS_IPHONE
#if !defined(ENABLE_NETSCAPE_PLUGIN_API)
#define ENABLE_NETSCAPE_PLUGIN_API 1
#endif
#endif
#if TARGET_OS_IPHONE
#import <CoreText/CoreText.h>
#import <WebKitLegacy/WAKAppKitStubs.h>
#endif
@class DOMDocumentFragment;
@class DOMNode;
@class DOMRange;
@class WebScriptObject;
@class WebScriptWorld;
#if TARGET_OS_IPHONE
@class DOMElement;
@class DOMRange;
@class WebEvent;
#endif
extern NSString *WebPageCacheEntryDateKey;
extern NSString *WebPageCacheDataSourceKey;
extern NSString *WebPageCacheDocumentViewKey;
extern NSString *WebFrameMainDocumentError;
extern NSString *WebFrameHasPlugins;
extern NSString *WebFrameHasUnloadListener;
extern NSString *WebFrameUsesDatabases;
extern NSString *WebFrameUsesGeolocation;
extern NSString *WebFrameUsesApplicationCache;
extern NSString *WebFrameCanSuspendActiveDOMObjects;
typedef enum {
WebFrameLoadTypeStandard,
WebFrameLoadTypeBack,
WebFrameLoadTypeForward,
WebFrameLoadTypeIndexedBackForward, WebFrameLoadTypeReload,
WebFrameLoadTypeReloadAllowingStaleData,
WebFrameLoadTypeSame, WebFrameLoadTypeInternal, WebFrameLoadTypeReplace,
WebFrameLoadTypeReloadFromOrigin,
} WebFrameLoadType;
@interface WebFrame (WebPrivate)
- (BOOL)_isDescendantOfFrame:(WebFrame *)frame;
- (void)_setShouldCreateRenderers:(BOOL)shouldCreateRenderers;
#if !TARGET_OS_IPHONE
- (NSColor *)_bodyBackgroundColor;
#else
- (CGColorRef)_bodyBackgroundColor;
#endif
- (BOOL)_isFrameSet;
- (BOOL)_firstLayoutDone;
- (BOOL)_isVisuallyNonEmpty;
- (WebFrameLoadType)_loadType;
#if TARGET_OS_IPHONE
- (BOOL)needsLayout; - (void)_setLoadsSynchronously:(BOOL)flag;
- (BOOL)_loadsSynchronously;
- (unsigned)formElementsCharacterCount;
- (void)setTimeoutsPaused:(BOOL)flag;
- (void)setPluginsPaused:(BOOL)flag;
- (void)prepareForPause;
- (void)resumeFromPause;
- (void)updateLayout;
- (void)selectNSRange:(NSRange)range;
- (void)selectWithoutClosingTypingNSRange:(NSRange)range;
- (NSRange)selectedNSRange;
- (void)forceLayoutAdjustingViewSize:(BOOL)adjust;
- (void)_handleKeyEvent:(WebEvent *)event;
- (void)_selectAll;
- (void)_setSelectionFromNone;
- (void)_saveViewState;
- (void)_restoreViewState;
- (void)deviceOrientationChanged;
- (void)setNeedsLayout;
- (CGSize)renderedSizeOfNode:(DOMNode *)node constrainedToWidth:(float)width;
- (DOMNode *)deepestNodeAtViewportLocation:(CGPoint)aViewportLocation;
- (DOMNode *)scrollableNodeAtViewportLocation:(CGPoint)aViewportLocation;
- (DOMNode *)approximateNodeAtViewportLocation:(CGPoint *)aViewportLocation;
- (CGRect)renderRectForPoint:(CGPoint)point isReplaced:(BOOL *)isReplaced fontSize:(float *)fontSize;
- (void)_setProhibitsScrolling:(BOOL)flag;
- (void)revealSelectionAtExtent:(BOOL)revealExtent;
- (void)resetSelection;
- (BOOL)hasEditableSelection;
- (int)preferredHeight;
- (int)innerLineHeight:(DOMNode *)node;
- (void)setIsActive:(BOOL)flag;
- (void)setSelectionChangeCallbacksDisabled:(BOOL)flag;
- (NSRect)caretRect;
- (NSRect)rectForScrollToVisible; @property (nonatomic, readwrite) CGColorRef caretColor;
- (NSView *)documentView;
- (int)layoutCount;
- (BOOL)isTelephoneNumberParsingAllowed;
- (BOOL)isTelephoneNumberParsingEnabled;
- (DOMRange *)selectedDOMRange;
- (void)setSelectedDOMRange:(DOMRange *)range affinity:(NSSelectionAffinity)affinity closeTyping:(BOOL)closeTyping;
- (void)setSelectedDOMRange:(DOMRange *)range affinity:(NSSelectionAffinity)affinity closeTyping:(BOOL)closeTyping userTriggered:(BOOL)userTriggered;
- (NSSelectionAffinity)selectionAffinity;
- (void)expandSelectionToElementContainingCaretSelection;
- (DOMRange *)elementRangeContainingCaretSelection;
- (void)expandSelectionToWordContainingCaretSelection;
- (void)expandSelectionToStartOfWordContainingCaretSelection;
- (unichar)characterInRelationToCaretSelection:(int)amount;
- (unichar)characterBeforeCaretSelection;
- (unichar)characterAfterCaretSelection;
- (DOMRange *)wordRangeContainingCaretSelection;
- (NSString *)wordInRange:(DOMRange *)range;
- (int)wordOffsetInRange:(DOMRange *)range;
- (BOOL)spaceFollowsWordInRange:(DOMRange *)range;
- (NSArray *)wordsInCurrentParagraph;
- (BOOL)selectionAtDocumentStart;
- (BOOL)selectionAtSentenceStart;
- (BOOL)selectionAtWordStart;
- (DOMRange *)rangeByMovingCurrentSelection:(int)amount;
- (DOMRange *)rangeByExtendingCurrentSelection:(int)amount;
- (void)selectNSRange:(NSRange)range onElement:(DOMElement *)element;
- (DOMRange *)markedTextDOMRange;
- (void)setMarkedText:(NSString *)text selectedRange:(NSRange)newSelRange;
- (void)setMarkedText:(NSString *)text forCandidates:(BOOL)forCandidates;
- (void)confirmMarkedText:(NSString *)text;
- (void)setText:(NSString *)text asChildOfElement:(DOMElement *)element;
- (void)setDictationPhrases:(NSArray *)dictationPhrases metadata:(id)metadata asChildOfElement:(DOMElement *)element;
- (NSArray *)interpretationsForCurrentRoot;
- (void)getDictationResultRanges:(NSArray **)ranges andMetadatas:(NSArray **)metadatas;
- (id)dictationResultMetadataForRange:(DOMRange *)range;
- (void)recursiveSetUpdateAppearanceEnabled:(BOOL)enabled;
+ (NSString *)stringWithData:(NSData *)data textEncodingName:(NSString *)textEncodingName;
- (NSRect)caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity;
- (DOMRange *)characterRangeAtPoint:(NSPoint)point;
- (NSRange)convertDOMRangeToNSRange:(DOMRange *)range;
- (DOMRange *)convertNSRangeToDOMRange:(NSRange)nsrange;
- (NSRect)firstRectForDOMRange:(DOMRange *)range;
- (CTFontRef)fontForSelection:(BOOL *)hasMultipleFonts;
- (void)sendScrollEvent;
- (void)_userScrolled;
- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)string forceUserGesture:(BOOL)forceUserGesture;
- (NSString *)stringForRange:(DOMRange *)range;
- (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
#endif // TARGET_OS_IPHONE
- (NSRange)_selectedNSRange;
- (void)_selectNSRange:(NSRange)range;
#if TARGET_OS_IPHONE
- (NSArray *)_rectsForRange:(DOMRange *)domRange;
- (DOMRange *)_selectionRangeForPoint:(CGPoint)point;
- (DOMRange *)_selectionRangeForFirstPoint:(CGPoint)first secondPoint:(CGPoint)second;
#endif
- (BOOL)_isDisplayingStandaloneImage;
- (unsigned)_pendingFrameUnloadEventCount;
#if !TARGET_OS_IPHONE
#if ENABLE_NETSCAPE_PLUGIN_API
- (void)_recursive_resumeNullEventsForAllNetscapePlugins;
- (void)_recursive_pauseNullEventsForAllNetscapePlugins;
#endif
#endif
- (NSString *)_stringByEvaluatingJavaScriptFromString:(NSString *)string withGlobalObject:(JSObjectRef)globalObject inScriptWorld:(WebScriptWorld *)world;
- (JSGlobalContextRef)_globalContextForScriptWorld:(WebScriptWorld *)world;
#if JSC_OBJC_API_ENABLED
- (JSContext *)_javaScriptContextForScriptWorld:(WebScriptWorld *)world;
#endif
- (void)resetTextAutosizingBeforeLayout;
- (void)_setVisibleSize:(CGSize)size;
- (void)_setTextAutosizingWidth:(CGFloat)width;
#if TARGET_OS_IPHONE
- (void)_replaceSelectionWithWebArchive:(WebArchive *)webArchive selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
#endif
- (void)_replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
- (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
- (void)_replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
#if !TARGET_OS_IPHONE
- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)rangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString;
#endif
- (NSMutableDictionary *)_cacheabilityDictionary;
- (BOOL)_allowsFollowingLink:(NSURL *)URL;
#if !TARGET_OS_IPHONE
- (void)setAllowsScrollersToOverlapContent:(BOOL)flag;
- (void)setAlwaysHideHorizontalScroller:(BOOL)flag;
- (void)setAlwaysHideVerticalScroller:(BOOL)flag;
#endif
- (void)setAccessibleName:(NSString *)name;
- (BOOL)enhancedAccessibilityEnabled;
- (void)setEnhancedAccessibility:(BOOL)enable;
- (NSString*)_layerTreeAsText;
- (id)accessibilityRoot;
- (void)_clearOpener;
- (NSArray *)_computePageRectsWithPrintScaleFactor:(float)printWidthScaleFactor pageSize:(NSSize)pageSize;
@property (nonatomic, readonly) BOOL hasRichlyEditableDragCaret;
#if TARGET_OS_IPHONE
- (DOMDocumentFragment *)_documentFragmentForText:(NSString *)text;
- (DOMDocumentFragment *)_documentFragmentForWebArchive:(WebArchive *)webArchive;
- (DOMDocumentFragment *)_documentFragmentForImageData:(NSData *)data withRelativeURLPart:(NSString *)relativeURLPart andMIMEType:(NSString *)mimeType;
- (BOOL)focusedNodeHasContent;
- (void)_dispatchDidReceiveTitle:(NSString *)title;
- (void)removeUnchangeableStyles;
- (BOOL)hasRichlyEditableSelection;
#endif
- (JSValueRef)jsWrapperForNode:(DOMNode *)node inScriptWorld:(WebScriptWorld *)world;
- (NSDictionary *)elementAtPoint:(NSPoint)point;
- (NSURL *)_unreachableURL;
@end