📄 webviewprivate.h
字号:
// until callers can be weaned off of it.- (void)_close;/*! @method _registerViewClass:representationClass:forURLScheme: @discussion Register classes that implement WebDocumentView and WebDocumentRepresentation respectively. @param viewClass The WebDocumentView class to use to render data for a given MIME type. @param representationClass The WebDocumentRepresentation class to use to represent data of the given MIME type. @param scheme The URL scheme to represent with an object of the given class.*/+ (void)_registerViewClass:(Class)viewClass representationClass:(Class)representationClass forURLScheme:(NSString *)URLScheme;+ (void)_unregisterViewClassAndRepresentationClassForMIMEType:(NSString *)MIMEType;/*! @method _canHandleRequest: @abstract Performs a "preflight" operation that performs some speculative checks to see if a request can be used to create a WebDocumentView and WebDocumentRepresentation. @discussion The result of this method is valid only as long as no protocols or schemes are registered or unregistered, and as long as the request is not mutated (if the request is mutable). Hence, clients should be prepared to handle failures even if they have performed request preflighting by caling this method. @param request The request to preflight. @result YES if it is likely that a WebDocumentView and WebDocumentRepresentation can be created for the request, NO otherwise.*/+ (BOOL)_canHandleRequest:(NSURLRequest *)request;+ (NSString *)_decodeData:(NSData *)data;+ (void)_setAlwaysUsesComplexTextCodePath:(BOOL)f;// This is the old name of the above method. Needed for Safari versions that call it.+ (void)_setAlwaysUseATSU:(BOOL)f;- (NSCachedURLResponse *)_cachedResponseForURL:(NSURL *)URL;#if ENABLE_DASHBOARD_SUPPORT- (void)_addScrollerDashboardRegions:(NSMutableDictionary *)regions;- (NSDictionary *)_dashboardRegions;- (void)_setDashboardBehavior:(WebDashboardBehavior)behavior to:(BOOL)flag;- (BOOL)_dashboardBehavior:(WebDashboardBehavior)behavior;#endif+ (void)_setShouldUseFontSmoothing:(BOOL)f;+ (BOOL)_shouldUseFontSmoothing;- (void)_setCatchesDelegateExceptions:(BOOL)f;- (BOOL)_catchesDelegateExceptions;// These two methods are useful for a test harness that needs a consistent appearance for the focus rings// regardless of OS X version.+ (void)_setUsesTestModeFocusRingColor:(BOOL)f;+ (BOOL)_usesTestModeFocusRingColor;+ (NSString *)_minimumRequiredSafariBuildNumber;/*! @method setAlwaysShowVerticalScroller: @result Forces the vertical scroller to be visible if flag is YES, otherwise if flag is NO the scroller with automatically show and hide as needed. */- (void)setAlwaysShowVerticalScroller:(BOOL)flag;/*! @method alwaysShowVerticalScroller @result YES if the vertical scroller is always shown */- (BOOL)alwaysShowVerticalScroller;/*! @method setAlwaysShowHorizontalScroller: @result Forces the horizontal scroller to be visible if flag is YES, otherwise if flag is NO the scroller with automatically show and hide as needed. */- (void)setAlwaysShowHorizontalScroller:(BOOL)flag;/*! @method alwaysShowHorizontalScroller @result YES if the horizontal scroller is always shown */- (BOOL)alwaysShowHorizontalScroller;/*! @method setProhibitsMainFrameScrolling: @abstract Prohibits scrolling in the WebView's main frame. Used to "lock" a WebView to a specific scroll position. */- (void)setProhibitsMainFrameScrolling:(BOOL)prohibits;/*! @method _setAdditionalWebPlugInPaths: @abstract Sets additional plugin search paths for a specific WebView. */- (void)_setAdditionalWebPlugInPaths:(NSArray *)newPaths;/*! @method _setInViewSourceMode: @abstract Used to place a WebView into a special source-viewing mode. */- (void)_setInViewSourceMode:(BOOL)flag;/*! @method _inViewSourceMode; @abstract Whether or not the WebView is in source-view mode for HTML. */- (BOOL)_inViewSourceMode;/*! @method _attachScriptDebuggerToAllFrames @abstract Attaches a script debugger to all frames belonging to the receiver. */- (void)_attachScriptDebuggerToAllFrames;/*! @method _detachScriptDebuggerFromAllFrames @abstract Detaches any script debuggers from all frames belonging to the receiver. */- (void)_detachScriptDebuggerFromAllFrames;- (BOOL)defersCallbacks; // called by QuickTime plug-in- (void)setDefersCallbacks:(BOOL)defer; // called by QuickTime plug-in- (BOOL)usesPageCache;- (void)setUsesPageCache:(BOOL)usesPageCache;- (WebHistoryItem *)_globalHistoryItem;/*! @method textIteratorForRect: @param rectangle from which we want the WebTextIterator to load text from @result a WebtextIterator object. */- (WebTextIterator *)textIteratorForRect:(NSRect)rect;#if ENABLE_DASHBOARD_SUPPORT// <rdar://problem/5217124> Clients other than dashboard, don't use this.// Do not remove until Dashboard has moved off it- (void)handleAuthenticationForResource:(id)identifier challenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource;#endif- (void)_clearUndoRedoOperations;/* Used to do fast (lower quality) scaling of images so that window resize can be quick. */- (BOOL)_inFastImageScalingMode;- (void)_setUseFastImageScalingMode:(BOOL)flag;- (BOOL)_cookieEnabled;- (void)_setCookieEnabled:(BOOL)enable;// SPI for DumpRenderTree- (void)_executeCoreCommandByName:(NSString *)name value:(NSString *)value;- (void)_clearMainFrameName;- (void)_setCustomHTMLTokenizerTimeDelay:(double)timeDelay;- (void)_setCustomHTMLTokenizerChunkSize:(int)chunkSize;- (id)_initWithFrame:(NSRect)f frameName:(NSString *)frameName groupName:(NSString *)groupName usesDocumentViews:(BOOL)usesDocumentViews;- (BOOL)_usesDocumentViews;- (void)setSelectTrailingWhitespaceEnabled:(BOOL)flag;- (BOOL)isSelectTrailingWhitespaceEnabled;- (void)setMemoryCacheDelegateCallsEnabled:(BOOL)suspend;- (BOOL)areMemoryCacheDelegateCallsEnabled;- (void)_setJavaScriptURLsAreAllowed:(BOOL)setJavaScriptURLsAreAllowed;+ (NSCursor *)_pointingHandCursor;// SPI for DumpRenderTree- (BOOL)_isUsingAcceleratedCompositing;@end@interface WebView (WebViewPrintingPrivate)/*! @method _adjustPrintingMarginsForHeaderAndFooter: @abstract Increase the top and bottom margins for the current print operation to account for the header and footer height. @discussion Called by <WebDocument> implementors once when a print job begins. If the <WebDocument> implementor implements knowsPageRange:, this should be called from there. Otherwise this should be called from beginDocument. The <WebDocument> implementors need to also call _drawHeaderAndFooter.*/- (void)_adjustPrintingMarginsForHeaderAndFooter;/*! @method _drawHeaderAndFooter @abstract Gives the WebView's UIDelegate a chance to draw a header and footer on the printed page. @discussion This should be called by <WebDocument> implementors from an override of drawPageBorderWithSize:.*/- (void)_drawHeaderAndFooter;@end@interface WebView (WebViewGrammarChecking)// FIXME: These two methods should be merged into WebViewEditing when we're not in API freeze- (BOOL)isGrammarCheckingEnabled;#ifndef BUILDING_ON_TIGER- (void)setGrammarCheckingEnabled:(BOOL)flag;// FIXME: This method should be merged into WebIBActions when we're not in API freeze- (void)toggleGrammarChecking:(id)sender;#endif@end@interface WebView (WebViewEditingInMail)- (void)_insertNewlineInQuotedContent;- (void)_replaceSelectionWithNode:(DOMNode *)node matchStyle:(BOOL)matchStyle;@end@interface NSObject (WebFrameLoadDelegatePrivate)- (void)webView:(WebView *)sender didFirstLayoutInFrame:(WebFrame *)frame;// didFinishDocumentLoadForFrame is sent when the document has finished loading, though not necessarily all// of its subresources.// FIXME 5259339: Currently this callback is not sent for (some?) pages loaded entirely from the cache.- (void)webView:(WebView *)sender didFinishDocumentLoadForFrame:(WebFrame *)frame;// Addresses 4192534. SPI for now.- (void)webView:(WebView *)sender didHandleOnloadEventsForFrame:(WebFrame *)frame;- (void)webView:(WebView *)sender didFirstVisuallyNonEmptyLayoutInFrame:(WebFrame *)frame;@end@interface NSObject (WebResourceLoadDelegatePrivate)// Addresses <rdar://problem/5008925> - SPI for now- (NSCachedURLResponse *)webView:(WebView *)sender resource:(id)identifier willCacheResponse:(NSCachedURLResponse *)response fromDataSource:(WebDataSource *)dataSource;@end#undef WebNSInteger#undef WebNSUInteger
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -