diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
commit | 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch) | |
tree | 4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebKit/mac/WebView/WebFrameInternal.h | |
parent | 9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff) | |
download | external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2 |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebKit/mac/WebView/WebFrameInternal.h')
-rw-r--r-- | WebKit/mac/WebView/WebFrameInternal.h | 110 |
1 files changed, 66 insertions, 44 deletions
diff --git a/WebKit/mac/WebView/WebFrameInternal.h b/WebKit/mac/WebView/WebFrameInternal.h index 89b5b1d..5cf7690 100644 --- a/WebKit/mac/WebView/WebFrameInternal.h +++ b/WebKit/mac/WebView/WebFrameInternal.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,21 +31,20 @@ #import "WebFramePrivate.h" #import "WebPreferencesPrivate.h" -#ifdef __cplusplus +#import <WebCore/EditAction.h> #import <WebCore/FrameLoaderTypes.h> +#import <WebCore/SelectionController.h> #import <WebCore/Settings.h> -#endif @class DOMCSSStyleDeclaration; +@class DOMDocumentFragment; @class DOMElement; @class DOMNode; @class DOMRange; @class WebFrameView; -@class WebFrameBridge; @class WebHistoryItem; -@class WebScriptDebugger; -#ifdef __cplusplus +class WebScriptDebugger; namespace WebCore { class CSSStyleDeclaration; @@ -54,9 +53,9 @@ namespace WebCore { class Element; class Frame; class Frame; - class FrameLoader; class HistoryItem; class HTMLElement; + class HTMLFrameOwnerElement; class Node; class Page; class Range; @@ -79,6 +78,9 @@ DOMNode *kit(WebCore::Node*); WebCore::Document* core(DOMDocument *); DOMDocument *kit(WebCore::Document*); +WebCore::DocumentFragment* core(DOMDocumentFragment *); +DOMDocumentFragment *kit(WebCore::DocumentFragment*); + WebCore::HTMLElement* core(DOMHTMLElement *); DOMHTMLElement *kit(WebCore::HTMLElement*); @@ -89,80 +91,100 @@ WebCore::Page* core(WebView *); WebView *kit(WebCore::Page*); WebCore::EditableLinkBehavior core(WebKitEditableLinkBehavior); -WebKitEditableLinkBehavior kit(WebCore::EditableLinkBehavior); WebView *getWebView(WebFrame *webFrame); -@interface WebFramePrivate : NSObject -{ +@interface WebFramePrivate : NSObject { @public + WebCore::Frame* coreFrame; WebFrameView *webFrameView; - - WebFrameBridge *bridge; - - WebScriptDebugger *scriptDebugger; + WebScriptDebugger* scriptDebugger; id internalLoadDelegate; + BOOL shouldCreateRenderers; } @end -#else -struct WebCoreHistoryItem; -#endif +@protocol WebCoreRenderTreeCopier <NSObject> +- (NSObject *)nodeWithName:(NSString *)name position:(NSPoint)position rect:(NSRect)rect view:(NSView *)view children:(NSArray *)children; +@end @interface WebFrame (WebInternal) -- (void)_updateBackground; ++ (void)_createMainFrameWithPage:(WebCore::Page*)page frameName:(const WebCore::String&)name frameView:(WebFrameView *)frameView; ++ (PassRefPtr<WebCore::Frame>)_createSubframeWithOwnerElement:(WebCore::HTMLFrameOwnerElement*)ownerElement frameName:(const WebCore::String&)name frameView:(WebFrameView *)frameView; +- (id)_initWithWebFrameView:(WebFrameView *)webFrameView webView:(WebView *)webView; + +- (void)_clearCoreFrame; + +- (void)_updateBackgroundAndUpdatesWhileOffscreen; - (void)_setInternalLoadDelegate:(id)internalLoadDelegate; - (id)_internalLoadDelegate; #ifndef BUILDING_ON_TIGER - (void)_unmarkAllBadGrammar; #endif - (void)_unmarkAllMisspellings; -// Note that callers should not perform any ops on these views that could change the set of frames -- (NSArray *)_documentViews; - (BOOL)_hasSelection; - (void)_clearSelection; - (WebFrame *)_findFrameWithSelection; - (void)_clearSelectionInOtherFrames; -#ifdef __cplusplus -- (id)_initWithWebFrameView:(WebFrameView *)fv webView:(WebView *)v bridge:(WebFrameBridge *)bridge; -#endif -- (BOOL)_isMainFrame; +- (void)_attachScriptDebugger; +- (void)_detachScriptDebugger; -#ifdef __cplusplus +// dataSource reports null for the initial empty document's data source; this is needed +// to preserve compatibility with Mail and Safari among others. But internal to WebKit, +// we need to be able to get the initial data source as well, so the _dataSource method +// should be used instead. +- (WebDataSource *)_dataSource; -- (WebCore::FrameLoader*)_frameLoader; -- (WebDataSource *)_dataSourceForDocumentLoader:(WebCore::DocumentLoader*)loader; +- (BOOL)_needsLayout; +- (void)_drawRect:(NSRect)rect contentsOnly:(BOOL)contentsOnly; +- (BOOL)_getVisibleRect:(NSRect*)rect; +- (NSArray*)_computePageRectsWithPrintWidthScaleFactor:(float)printWidthScaleFactor printHeight:(float)printHeight; -- (void)_addDocumentLoader:(WebCore::DocumentLoader*)loader toUnarchiveState:(WebArchive *)archive; +- (NSString *)_stringByEvaluatingJavaScriptFromString:(NSString *)string; +- (NSString *)_stringByEvaluatingJavaScriptFromString:(NSString *)string forceUserGesture:(BOOL)forceUserGesture; -#endif +- (NSString *)_selectedString; +- (NSString *)_stringForRange:(DOMRange *)range; -- (WebFrameBridge *)_bridge; +- (NSString *)_markupStringFromRange:(DOMRange *)range nodes:(NSArray **)nodes; -- (void)_loadURL:(NSURL *)URL referrer:(NSString *)referrer intoChild:(WebFrame *)childFrame; +- (NSRect)_caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity; +- (NSRect)_firstRectForDOMRange:(DOMRange *)range; +- (void)_scrollDOMRangeToVisible:(DOMRange *)range; -- (void)_viewWillMoveToHostWindow:(NSWindow *)hostWindow; -- (void)_viewDidMoveToHostWindow; +- (id)_accessibilityTree; -- (void)_addChild:(WebFrame *)child; +- (DOMRange *)_rangeByAlteringCurrentSelection:(WebCore::SelectionController::EAlteration)alteration direction:(WebCore::SelectionController::EDirection)direction granularity:(WebCore::TextGranularity)granularity; +- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)charRangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString; +- (NSRange)_convertToNSRange:(WebCore::Range*)range; +- (DOMRange *)_convertNSRangeToDOMRange:(NSRange)range; +- (NSRange)_convertDOMRangeToNSRange:(DOMRange *)range; -+ (CFAbsoluteTime)_timeOfLastCompletedLoad; +- (DOMDocumentFragment *)_documentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString; +- (DOMDocumentFragment *)_documentFragmentWithNodesAsParagraphs:(NSArray *)nodes; -- (int)_numPendingOrLoadingRequests:(BOOL)recurse; +- (void)_replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle; +- (void)_replaceSelectionWithNode:(DOMNode *)node selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle; +- (void)_replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace; +- (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace; -- (void)_reloadForPluginChanges; +- (void)_insertParagraphSeparatorInQuotedContent; -- (void)_attachScriptDebugger; -- (void)_detachScriptDebugger; +- (DOMRange *)_characterRangeAtPoint:(NSPoint)point; -// dataSource reports null for the initial empty document's data source; this is needed -// to preserve compatibility with Mail and Safari among others. But internal to WebKit, -// we need to be able to get the initial data source as well, so the _dataSource method -// should be used instead. -- (WebDataSource *)_dataSource; +- (DOMCSSStyleDeclaration *)_typingStyle; +- (void)_setTypingStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(WebCore::EditAction)undoAction; + +- (void)_dragSourceMovedTo:(NSPoint)windowLoc; +- (void)_dragSourceEndedAt:(NSPoint)windowLoc operation:(NSDragOperation)operation; + +- (BOOL)_canProvideDocumentSource; +- (BOOL)_canSaveAsWebArchive; + +- (void)_receivedData:(NSData *)data textEncodingName:(NSString *)textEncodingName; @end |