您的位置:首页 > 移动开发

UIWebView体系结构(三)UIWebDocumentView和WebView

2013-08-16 16:17 344 查看
WebView是UIWebDocumentView最重要的组合对象,先讲WebView吧。

WebView的声明如下:(代码好长,点此跳过

[cpp] view
plaincopy

@interface WebView : WAKView

{

WebViewPrivate *_private;

}

+ (void)registerViewClass:(Class)arg1 representationClass:(Class)arg2 forMIMEType:(id)arg3;

+ (void)registerURLSchemeAsLocal:(id)arg1;

+ (void)setMIMETypesShownAsHTML:(id)arg1;

+ (id)MIMETypesShownAsHTML;

+ (BOOL)canShowMIMETypeAsHTML:(id)arg1;

+ (BOOL)canShowMIMEType:(id)arg1;

+ (BOOL)_canShowMIMEType:(id)arg1 allowingPlugins:(BOOL)arg2;

+ (void)initialize;

+ (void)_makeAllWebViewsPerformSelector:(SEL)arg1;

+ (void)_setTileCacheLayerPoolCapacity:(unsigned int)arg1;

+ (void)_setHTTPPipeliningEnabled:(BOOL)arg1;

+ (BOOL)_HTTPPipeliningEnabled;

+ (double)_defaultMinimumTimerInterval;

+ (void)_setLoadResourcesSerially:(BOOL)arg1;

+ (void)_registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing:(id)arg1;

+ (void)_registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing:(id)arg1;

+ (void)_registerURLSchemeAsSecure:(id)arg1;

+ (void)_setDomainRelaxationForbidden:(BOOL)arg1 forURLScheme:(id)arg2;

+ (void)_removeAllUserContentFromGroup:(id)arg1;

+ (void)_removeUserStyleSheetsFromGroup:(id)arg1 world:(id)arg2;

+ (void)_removeUserScriptsFromGroup:(id)arg1 world:(id)arg2;

+ (void)_removeUserStyleSheetFromGroup:(id)arg1 world:(id)arg2 url:(id)arg3;

+ (void)_removeUserScriptFromGroup:(id)arg1 world:(id)arg2 url:(id)arg3;

+ (void)_addUserStyleSheetToGroup:(id)arg1 world:(id)arg2 source:(id)arg3 url:(id)arg4 whitelist:(id)arg5 blacklist:(id)arg6 injectedFrames:(int)arg7;

+ (void)_addUserStyleSheetToGroup:(id)arg1 world:(id)arg2 source:(id)arg3 url:(id)arg4 whitelist:(id)arg5 blacklist:(id)arg6;

+ (void)_addUserScriptToGroup:(id)arg1 world:(id)arg2 source:(id)arg3 url:(id)arg4 whitelist:(id)arg5 blacklist:(id)arg6 injectionTime:(int)arg7 injectedFrames:(int)arg8;

+ (void)_addUserScriptToGroup:(id)arg1 world:(id)arg2 source:(id)arg3 url:(id)arg4 whitelist:(id)arg5 blacklist:(id)arg6 injectionTime:(int)arg7;

+ (void)_resetOriginAccessWhitelists;

+ (void)_removeOriginAccessWhitelistEntryWithSourceOrigin:(id)arg1 destinationProtocol:(id)arg2 destinationHost:(id)arg3 allowDestinationSubdomains:(BOOL)arg4;

+ (void)_addOriginAccessWhitelistEntryWithSourceOrigin:(id)arg1 destinationProtocol:(id)arg2 destinationHost:(id)arg3 allowDestinationSubdomains:(BOOL)arg4;

+ (unsigned int)_maximumImageSizeBeforeSubsampling;

+ (void)_setMaximumImageSizeBeforeSubsampling:(unsigned int)arg1;

+ (id)_productivityDocumentMIMETypes;

+ (BOOL)_shouldUseFontSmoothing;

+ (void)_setShouldUseFontSmoothing:(BOOL)arg1;

+ (id)_decodeData:(id)arg1;

+ (BOOL)_canHandleRequest:(id)arg1;

+ (BOOL)_canHandleRequest:(id)arg1 forMainFrame:(BOOL)arg2;

+ (BOOL)_representationExistsForURLScheme:(id)arg1;

+ (id)_generatedMIMETypeForURLScheme:(id)arg1;

+ (void)_registerViewClass:(Class)arg1 representationClass:(Class)arg2 forURLScheme:(id)arg3;

+ (void)_unregisterViewClassAndRepresentationClassForMIMEType:(id)arg1;

+ (BOOL)_isRemoteInspectorEnabled;

+ (void)_disableAutoStartRemoteInspector;

+ (void)_disableRemoteInspector;

+ (void)_enableRemoteInspector;

+ (id)sharedWebInspectorServer;

+ (id)_MIMETypeForFile:(id)arg1;

+ (BOOL)_isUnderMemoryPressure;

+ (BOOL)_allowCookies;

+ (void)_setAllowCookies:(BOOL)arg1;

+ (BOOL)_acceleratedImageDecoding;

+ (void)_setAcceleratedImageDecoding:(BOOL)arg1;

+ (BOOL)canShowFile:(id)arg1;

+ (void)closeAllWebViews;

+ (BOOL)canCloseAllWebViews;

+ (BOOL)_allowsRoundingHacks;

+ (void)_setAllowsRoundingHacks:(BOOL)arg1;

+ (void)_setAlwaysUsesComplexTextCodePath:(BOOL)arg1;

+ (BOOL)_viewClass:(Class *)arg1 andRepresentationClass:(Class *)arg2 forMIMEType:(id)arg3 allowingPlugins:(BOOL)arg4;

+ (void)_unregisterPluginMIMEType:(id)arg1;

+ (void)_registerPluginMIMEType:(id)arg1;

+ (BOOL)isCharacterSmartReplaceExempt:(unsigned short)arg1 isPreviousCharacter:(BOOL)arg2;

+ (void)discardAllCompiledCode;

+ (void)drainLayerPool;

+ (void)purgeInactiveFontData;

+ (void)garbageCollectNow;

+ (void)releaseFastMallocMemory;

+ (void)willEnterBackgroundWithCompletionHandler:(id)arg1;

+ (void)_releaseMemoryNow;

+ (void)registerForMemoryNotifications;

+ (void)_handleMemoryWarning;

+ (void)enableWebThread;

+ (id)_supportedMIMETypes;

+ (void)_reportException:(struct OpaqueJSValue *)arg1 inContext:(struct OpaqueJSContext *)arg2;

+ (id)_standardUserAgentWithApplicationName:(id)arg1;

+ (id)_standardUserAgentWithApplicationName:(id)arg1 osMarketingVersion:(id)arg2;

+ (void)_preflightSpellChecker;

+ (void)_preflightSpellCheckerNow:(id)arg1;

+ (void)_preferencesRemovedNotification:(id)arg1;

+ (void)_cacheModelChangedNotification:(id)arg1;

+ (unsigned int)_maxCacheModelInAnyInstance;

+ (unsigned int)_didSetCacheModel;

+ (unsigned int)_cacheModel;

+ (void)_setCacheModel:(unsigned int)arg1;

+ (BOOL)shouldIncludeInWebKitStatistics;

+ (void)_setPDFViewClass:(Class)arg1;

+ (Class)_getPDFViewClass;

+ (void)_setPDFRepresentationClass:(Class)arg1;

+ (Class)_getPDFRepresentationClass;

- (id)previousValidKeyView;

- (id)currentNodeHighlight;

- (void)setCurrentNodeHighlight:(id)arg1;

- (BOOL)shouldUpdateWhileOffscreen;

- (void)setShouldUpdateWhileOffscreen:(BOOL)arg1;

- (BOOL)drawsBackground;

- (void)setDrawsBackground:(BOOL)arg1;

- (id)mainFrameDocument;

- (id)mainFrameIconURL;

- (id)mainFrameTitle;

- (BOOL)isLoading;

- (id)mainFrameURL;

- (void)setMainFrameURL:(id)arg1;

- (double)estimatedProgress;

- (id)groupName;

- (void)setGroupName:(id)arg1;

- (BOOL)searchFor:(id)arg1 direction:(BOOL)arg2 caseSensitive:(BOOL)arg3 wrap:(BOOL)arg4;

- (void)setNextKeyView:(id)arg1;

- (id)_webcore_effectiveFirstResponder;

- (BOOL)becomeFirstResponder;

- (BOOL)acceptsFirstResponder;

- (id)elementAtPoint:(struct CGPoint)arg1;

- (id)_elementAtWindowPoint:(struct CGPoint)arg1;

- (id)documentViewAtWindowPoint:(struct CGPoint)arg1;

- (id)hostWindow;

- (void)setHostWindow:(id)arg1;

- (id)userAgentForURL:(id)arg1;

- (struct String)_userAgentString;

- (id)windowScriptObject;

- (id)stringByEvaluatingJavaScriptFromString:(id)arg1;

- (id)customTextEncodingName;

- (id)_mainFrameOverrideEncoding;

- (void)setCustomTextEncodingName:(id)arg1;

- (BOOL)supportsTextEncoding;

- (id)mediaStyle;

- (void)setMediaStyle:(id)arg1;

- (id)customUserAgent;

- (void)setCustomUserAgent:(id)arg1;

- (id)applicationNameForUserAgent;

- (void)setApplicationNameForUserAgent:(id)arg1;

- (void)_resetZoom:(id)arg1 isTextOnly:(BOOL)arg2;

- (BOOL)_canResetZoom:(BOOL)arg1;

- (void)_zoomIn:(id)arg1 isTextOnly:(BOOL)arg2;

- (void)_zoomOut:(id)arg1 isTextOnly:(BOOL)arg2;

- (BOOL)_canZoomIn:(BOOL)arg1;

- (BOOL)_canZoomOut:(BOOL)arg1;

- (BOOL)_realZoomMultiplierIsTextOnly;

- (float)_realZoomMultiplier;

- (float)_zoomMultiplier:(BOOL)arg1;

- (void)_setZoomMultiplier:(float)arg1 isTextOnly:(BOOL)arg2;

- (float)textSizeMultiplier;

- (void)setTextSizeMultiplier:(float)arg1;

- (BOOL)goToBackForwardItem:(id)arg1;

- (BOOL)goForward;

- (BOOL)goBack;

- (void)setMaintainsBackForwardList:(BOOL)arg1;

- (id)backForwardList;

- (id)selectedFrame;

- (id)mainFrame;

- (id)frameLoadDelegate;

- (void)setFrameLoadDelegate:(id)arg1;

- (id)_frameLoadDelegateForwarder;

- (id)policyDelegate;

- (void)setPolicyDelegate:(id)arg1;

- (id)downloadDelegate;

- (void)setDownloadDelegate:(id)arg1;

- (id)resourceLoadDelegate;

- (void)setResourceLoadDelegate:(id)arg1;

- (id)_resourceLoadDelegateForwarder;

- (id)UIDelegate;

- (void)setUIDelegate:(id)arg1;

- (id)preferencesIdentifier;

- (void)setPreferencesIdentifier:(id)arg1;

- (id)preferences;

- (void)setPreferences:(id)arg1;

- (void)_updateScreenScaleFromWindow;

- (void)_wakWindowScreenScaleChanged:(id)arg1;

- (void)viewDidMoveToWindow;

- (BOOL)shouldCloseWithWindow;

- (void)setShouldCloseWithWindow:(BOOL)arg1;

- (void)close;

- (void)finalize;

- (void)dealloc;

- (id)initWithFrame:(struct CGRect)arg1 frameName:(id)arg2 groupName:(id)arg3;

- (id)initWithFrame:(struct CGRect)arg1;

- (id)_initWithArguments:(id)arg1;

- (BOOL)_isMIMETypeRegisteredAsPlugin:(id)arg1;

- (id)_pluginForExtension:(id)arg1;

- (id)_videoProxyPluginForMIMEType:(id)arg1;

- (id)_pluginForMIMEType:(id)arg1;

- (BOOL)_canShowMIMEType:(id)arg1;

- (void)_addToAllWebViewsSet;

- (void)_removeFromAllWebViewsSet;

- (void)_setWebGLEnabled:(BOOL)arg1;

- (BOOL)_webGLEnabled;

- (void)_setWantsTelephoneNumberParsing:(BOOL)arg1;

- (BOOL)_wantsTelephoneNumberParsing;

- (void)_documentScaleChanged;

- (id)_fixedPositionContent;

- (void)_setMinimumTimerInterval:(double)arg1;

- (BOOL)searchFor:(id)arg1 direction:(BOOL)arg2 caseSensitive:(BOOL)arg3 wrap:(BOOL)arg4 startInSelection:(BOOL)arg5;

- (unsigned int)countMatchesForText:(id)arg1 caseSensitive:(BOOL)arg2 highlight:(BOOL)arg3 limit:(unsigned int)arg4 markMatches:(BOOL)arg5;

- (unsigned int)markAllMatchesForText:(id)arg1 caseSensitive:(BOOL)arg2 highlight:(BOOL)arg3 limit:(unsigned int)arg4;

- (unsigned int)_pageCount;

- (float)_gapBetweenPages;

- (void)_setGapBetweenPages:(float)arg1;

- (float)_pageLength;

- (void)_setPageLength:(float)arg1;

- (BOOL)_paginationBehavesLikeColumns;

- (void)_setPaginationBehavesLikeColumns:(BOOL)arg1;

- (int)_paginationMode;

- (void)_setPaginationMode:(int)arg1;

- (BOOL)_useFixedLayout;

- (void)_setUseFixedLayout:(BOOL)arg1;

- (float)_viewScaleFactor;

- (void)_scaleWebView:(float)arg1 atOrigin:(struct CGPoint)arg2;

- (void)setCSSAnimationsSuspended:(BOOL)arg1;

- (BOOL)cssAnimationsSuspended;

- (void)_updateActiveState;

- (id)trackedRepaintRects;

- (void)resetTrackedRepaints;

- (BOOL)isTrackingRepaints;

- (void)setTracksRepaints:(BOOL)arg1;

- (BOOL)_includesFlattenedCompositingLayersWhenDrawingToBitmap;

- (void)_setIncludesFlattenedCompositingLayersWhenDrawingToBitmap:(BOOL)arg1;

- (BOOL)_isSoftwareRenderable;

- (void)setValidationMessageTimerMagnification:(int)arg1;

- (int)validationMessageTimerMagnification;

- (void)setInteractiveFormValidationEnabled:(BOOL)arg1;

- (BOOL)interactiveFormValidationEnabled;

- (void)_setBaseCTM:(struct CGAffineTransform)arg1 forContext:(struct CGContext *)arg2;

- (BOOL)_isUsingAcceleratedCompositing;

- (void)_setPostsAcceleratedCompositingNotifications:(BOOL)arg1;

- (BOOL)_postsAcceleratedCompositingNotifications;

- (void)_setJavaScriptURLsAreAllowed:(BOOL)arg1;

- (BOOL)areMemoryCacheDelegateCallsEnabled;

- (void)setMemoryCacheDelegateCallsEnabled:(BOOL)arg1;

- (BOOL)isSelectTrailingWhitespaceEnabled;

- (void)setSelectTrailingWhitespaceEnabled:(BOOL)arg1;

- (void)_clearMainFrameName;

- (void)_setCustomHTMLTokenizerChunkSize:(int)arg1;

- (void)_setCustomHTMLTokenizerTimeDelay:(double)arg1;

- (void)_executeCoreCommandByName:(id)arg1 value:(id)arg2;

- (BOOL)_catchesDelegateExceptions;

- (void)_setCatchesDelegateExceptions:(BOOL)arg1;

- (id)textIteratorForRect:(struct CGRect)arg1;

- (void)_setGlobalHistoryItem:(struct HistoryItem *)arg1;

- (id)_globalHistoryItem;

- (void)setUsesPageCache:(BOOL)arg1;

- (BOOL)usesPageCache;

- (id)_touchEventRegions;

- (void)_overflowScrollPositionChangedTo:(struct CGPoint)arg1 forNode:(id)arg2 isUserScroll:(BOOL)arg3;

- (void)_setCustomFixedPositionLayoutRect:(struct CGRect)arg1;

- (void)_setCustomFixedPositionLayoutRectInWebThread:(struct CGRect)arg1 synchronize:(BOOL)arg2;

- (void)_synchronizeCustomFixedPositionLayoutRect;

- (struct CGSize)_fixedLayoutSize;

- (void)_setFixedLayoutSize:(struct CGSize)arg1;

- (void)_setNetworkStateIsOnline:(BOOL)arg1;

- (BOOL)_allowsMessaging;

- (void)_setAllowsMessaging:(BOOL)arg1;

- (BOOL)_isClosing;

- (BOOL)_isStopping;

- (id)quickLookContentForURL:(id)arg1;

- (void)setDefersCallbacks:(BOOL)arg1;

- (BOOL)defersCallbacks;

- (struct CGColor *)backgroundColor;

- (void)setBackgroundColor:(struct CGColor *)arg1;

- (void)_detachScriptDebuggerFromAllFrames;

- (void)_attachScriptDebuggerToAllFrames;

- (void)_setNeedsUnrestrictedGetMatchedCSSRules:(BOOL)arg1;

- (BOOL)_setMediaLayer:(id)arg1 forPluginView:(id)arg2;

- (void)_restorePlugInsFromCache;

- (void)_stopAllPlugInsForPageCache;

- (void)_stopAllPlugIns;

- (void)_startAllPlugIns;

- (void)_clearBackForwardCache;

- (void)_destroyAllPlugIns;

- (void)_locked_recursivelyPerformPlugInSelector:(SEL)arg1 inFrame:(id)arg2;

- (BOOL)_pluginsAreRunning;

- (BOOL)_locked_plugInsAreRunningInFrame:(id)arg1;

- (void)_setCookieEnabled:(BOOL)arg1;

- (BOOL)_cookieEnabled;

- (BOOL)_inFastImageScalingMode;

- (void)_setUseFastImageScalingMode:(BOOL)arg1;

- (BOOL)_inViewSourceMode;

- (void)_setInViewSourceMode:(BOOL)arg1;

- (void)_setFontFallbackPrefersPictographs:(BOOL)arg1;

- (id)_displayURL;

- (void)_clearDelegates;

- (void)caretChanged;

- (void)removeAllCaretChangeListeners;

- (void)removeCaretChangeListener:(id)arg1;

- (void)addCaretChangeListener:(id)arg1;

- (id)caretChangeListeners;

- (void)setCaretChangeListener:(id)arg1;

- (id)caretChangeListener;

- (id)_webMailDelegate;

- (void)setWebMailDelegate:(id)arg1;

- (id)_UIKitDelegate;

- (void)_setUIKitDelegate:(id)arg1;

- (void)_didCommitLoadForFrame:(id)arg1;

- (BOOL)_isPerformingProgrammaticFocus;

- (void)_popPerformingProgrammaticFocus;

- (void)_pushPerformingProgrammaticFocus;

- (void)_closeWindow;

- (id)_editingDelegateForwarder;

- (id)_UIDelegateForSelector:(SEL)arg1;

- (id)_UIDelegateForwarder;

- (id)_policyDelegateForwarder;

- (void)_cacheHistoryDelegateImplementations;

- (void)_cacheScriptDebugDelegateImplementations;

- (void)_cacheFrameLoadDelegateImplementations;

- (void)_cacheResourceLoadDelegateImplementations;

- (id)_UIKitDelegateForwarder;

- (void)_preferencesChanged:(id)arg1;

- (void)_preferencesChangedNotification:(id)arg1;

- (BOOL)_needsUnrestrictedGetMatchedCSSRules;

- (BOOL)_needsPreHTML5ParserQuirks;

- (id)_formDelegateForSelector:(SEL)arg1;

- (id)_formDelegateForwarder;

- (id)_formDelegate;

- (void)_setFormDelegate:(id)arg1;

- (void)_loadBackForwardListFromOtherView:(id)arg1;

- (void)_mouseDidMoveOverElement:(id)arg1 modifierFlags:(unsigned int)arg2;

- (struct Page *)page;

- (id)remoteInspectorUserInfo;

- (void)setRemoteInspectorUserInfo:(id)arg1;

- (id)hostApplicationName;

- (id)hostApplicationBundleId;

- (void)setHostApplicationBundleId:(id)arg1 name:(id)arg2;

- (void)setIndicatingForRemoteInspector:(BOOL)arg1;

- (void)setAllowsRemoteInspection:(BOOL)arg1;

- (BOOL)allowsRemoteInspection;

- (BOOL)canBeRemotelyInspected;

- (id)inspector;

- (id)_openNewWindowWithRequest:(id)arg1;

- (id)_downloadURL:(id)arg1;

- (BOOL)_isProcessingUserGesture;

- (void)_close;

- (void)_closeWithFastTeardown;

- (void)_closePluginDatabases;

- (void)_setResourceLoadSchedulerSuspended:(BOOL)arg1;

- (void)_didFinishScrollingOrZooming;

- (void)_willStartScrollingOrZooming;

- (void)_dispatchTileDidDraw:(id)arg1;

- (id)styleAtSelectionStart;

- (void)_dispatchUnloadEvent;

- (BOOL)_isClosed;

- (BOOL)_viewClass:(Class *)arg1 andRepresentationClass:(Class *)arg2 forMIMEType:(id)arg3;

- (void)updateLayoutIgnorePendingStyleSheets;

- (id)initSimpleHTMLDocumentWithStyle:(id)arg1 frame:(struct CGRect)arg2 preferences:(id)arg3 groupName:(id)arg4;

- (void)_viewWillDrawInternal;

- (id)_initWithFrame:(struct CGRect)arg1 frameName:(id)arg2 groupName:(id)arg3 usesDocumentViews:(BOOL)arg4;

- (void)_commonInitializationWithFrameName:(id)arg1 groupName:(id)arg2;

- (void)_dispatchPendingLoadRequests;

- (void)_setUIWebViewUserAgentWithBuildVersion:(id)arg1;

- (void)_setBrowserUserAgentProductVersion:(id)arg1 buildVersion:(id)arg2 bundleVersion:(id)arg3;

- (void)makeTextStandardSize:(id)arg1;

- (BOOL)canMakeTextStandardSize;

- (void)makeTextLarger:(id)arg1;

- (BOOL)canMakeTextLarger;

- (void)makeTextSmaller:(id)arg1;

- (BOOL)canMakeTextSmaller;

- (void)reloadFromOrigin:(id)arg1;

- (void)reload:(id)arg1;

- (void)stopLoadingAndClear;

- (void)stopLoading:(id)arg1;

- (void)goForward:(id)arg1;

- (void)goBack:(id)arg1;

- (BOOL)canGoForward;

- (BOOL)canGoBack;

- (void)takeStringURLFrom:(id)arg1;

- (void)removeVisitedLink:(id)arg1;

- (void)addVisitedLinks:(id)arg1;

- (float)mediaVolume;

- (void)setMediaVolume:(float)arg1;

- (void)resetPageZoom:(id)arg1;

- (BOOL)canResetPageZoom;

- (void)zoomPageOut:(id)arg1;

- (BOOL)canZoomPageOut;

- (void)zoomPageIn:(id)arg1;

- (BOOL)canZoomPageIn;

- (float)pageSizeMultiplier;

- (void)setPageSizeMultiplier:(float)arg1;

- (void)setAllowsUndo:(BOOL)arg1;

- (BOOL)allowsUndo;

- (void)scrollDOMRangeToVisible:(id)arg1 withInset:(float)arg2;

- (void)scrollDOMRangeToVisible:(id)arg1;

- (id)rectsForTextMatches;

- (void)unmarkAllTextMatches;

- (unsigned int)countMatchesForText:(id)arg1 inDOMRange:(id)arg2 options:(unsigned int)arg3 highlight:(BOOL)arg4 limit:(unsigned int)arg5 markMatches:(BOOL)arg6;

- (unsigned int)countMatchesForText:(id)arg1 options:(unsigned int)arg2 highlight:(BOOL)arg3 limit:(unsigned int)arg4 markMatches:(BOOL)arg5;

- (BOOL)canMarkAllTextMatches;

- (BOOL)shouldClose;

- (id)historyDelegate;

- (void)setHistoryDelegate:(id)arg1;

- (id)scriptDebugDelegate;

- (void)setScriptDebugDelegate:(id)arg1;

- (BOOL)tabKeyCyclesThroughElements;

- (void)setTabKeyCyclesThroughElements:(BOOL)arg1;

- (void)setMainFrameDocumentReady:(BOOL)arg1;

- (id)DOMRangeOfString:(id)arg1 relativeTo:(id)arg2 options:(unsigned int)arg3;

- (BOOL)findString:(id)arg1 options:(unsigned int)arg2;

- (id)computedStyleForElement:(id)arg1 pseudoElement:(id)arg2;

- (id)styleDeclarationWithText:(id)arg1;

- (id)editingDelegate;

- (void)setEditingDelegate:(id)arg1;

- (void)registerForEditingDelegateNotification:(id)arg1 selector:(SEL)arg2;

- (id)undoManager;

- (BOOL)isContinuousSpellCheckingEnabled;

- (void)setContinuousSpellCheckingEnabled:(BOOL)arg1;

- (BOOL)smartInsertDeleteEnabled;

- (void)setSmartInsertDeleteEnabled:(BOOL)arg1;

- (id)typingStyle;

- (void)setTypingStyle:(id)arg1;

- (BOOL)isEditable;

- (void)setEditable:(BOOL)arg1;

- (int)selectionAffinity;

- (id)selectedDOMRange;

- (void)setSelectedDOMRange:(id)arg1 affinity:(int)arg2;

- (BOOL)maintainsInactiveSelection;

- (BOOL)_shouldChangeSelectedDOMRange:(id)arg1 toDOMRange:(id)arg2 affinity:(int)arg3 stillSelecting:(BOOL)arg4;

- (id)editableDOMRangeForPoint:(struct CGPoint)arg1;

- (BOOL)isAutomaticSpellingCorrectionEnabled;

- (BOOL)isAutomaticTextReplacementEnabled;

- (BOOL)isAutomaticDashSubstitutionEnabled;

- (BOOL)isAutomaticLinkDetectionEnabled;

- (BOOL)isAutomaticQuoteSubstitutionEnabled;

- (void)applyStyle:(id)arg1;

- (void)deleteSelection;

- (void)replaceSelectionWithArchive:(id)arg1;

- (void)replaceSelectionWithMarkupString:(id)arg1;

- (void)replaceSelectionWithText:(id)arg1;

- (void)replaceSelectionWithNode:(id)arg1;

- (id)typingAttributes;

- (void)insertText:(id)arg1;

- (void)insertDictationPhrases:(id)arg1 metadata:(id)arg2;

- (void)toggleUnderline:(id)arg1;

- (void)toggleItalic:(id)arg1;

- (void)toggleBold:(id)arg1;

- (void)clearText:(id)arg1;

- (void)yankAndSelect:(id)arg1;

- (void)yank:(id)arg1;

- (void)uppercaseWord:(id)arg1;

- (void)unscript:(id)arg1;

- (void)underline:(id)arg1;

- (void)transpose:(id)arg1;

- (void)toggleBaseWritingDirection:(id)arg1;

- (void)takeFindStringFromSelection:(id)arg1;

- (void)swapWithMark:(id)arg1;

- (void)superscript:(id)arg1;

- (void)subscript:(id)arg1;

- (void)stopSpeaking:(id)arg1;

- (void)startSpeaking:(id)arg1;

- (void)showGuessPanel:(id)arg1;

- (void)setMark:(id)arg1;

- (void)selectWord:(id)arg1;

- (void)selectToMark:(id)arg1;

- (void)selectSentence:(id)arg1;

- (void)selectParagraph:(id)arg1;

- (void)selectLine:(id)arg1;

- (void)selectAll:(id)arg1;

- (void)scrollToEndOfDocument:(id)arg1;

- (void)scrollToBeginningOfDocument:(id)arg1;

- (void)scrollPageUp:(id)arg1;

- (void)scrollPageDown:(id)arg1;

- (void)scrollLineUp:(id)arg1;

- (void)scrollLineDown:(id)arg1;

- (void)performFindPanelAction:(id)arg1;

- (void)pasteFont:(id)arg1;

- (void)pasteAsRichText:(id)arg1;

- (void)pasteAsPlainText:(id)arg1;

- (void)paste:(id)arg1;

- (void)pageUpAndModifySelection:(id)arg1;

- (void)pageUp:(id)arg1;

- (void)pageDownAndModifySelection:(id)arg1;

- (void)pageDown:(id)arg1;

- (void)orderFrontSubstitutionsPanel:(id)arg1;

- (void)outdent:(id)arg1;

- (void)moveWordRightAndModifySelection:(id)arg1;

- (void)moveWordRight:(id)arg1;

- (void)moveWordLeftAndModifySelection:(id)arg1;

- (void)moveWordLeft:(id)arg1;

- (void)moveWordForwardAndModifySelection:(id)arg1;

- (void)moveWordForward:(id)arg1;

- (void)moveWordBackwardAndModifySelection:(id)arg1;

- (void)moveWordBackward:(id)arg1;

- (void)moveUpAndModifySelection:(id)arg1;

- (void)moveUp:(id)arg1;

- (void)moveToRightEndOfLineAndModifySelection:(id)arg1;

- (void)moveToRightEndOfLine:(id)arg1;

- (void)moveToLeftEndOfLineAndModifySelection:(id)arg1;

- (void)moveToLeftEndOfLine:(id)arg1;

- (void)moveToEndOfSentenceAndModifySelection:(id)arg1;

- (void)moveToEndOfSentence:(id)arg1;

- (void)moveToEndOfParagraphAndModifySelection:(id)arg1;

- (void)moveToEndOfParagraph:(id)arg1;

- (void)moveToEndOfLineAndModifySelection:(id)arg1;

- (void)moveToEndOfLine:(id)arg1;

- (void)moveToEndOfDocumentAndModifySelection:(id)arg1;

- (void)moveToEndOfDocument:(id)arg1;

- (void)moveToBeginningOfSentenceAndModifySelection:(id)arg1;

- (void)moveToBeginningOfSentence:(id)arg1;

- (void)moveToBeginningOfParagraphAndModifySelection:(id)arg1;

- (void)moveToBeginningOfParagraph:(id)arg1;

- (void)moveToBeginningOfLineAndModifySelection:(id)arg1;

- (void)moveToBeginningOfLine:(id)arg1;

- (void)moveToBeginningOfDocumentAndModifySelection:(id)arg1;

- (void)moveToBeginningOfDocument:(id)arg1;

- (void)moveRightAndModifySelection:(id)arg1;

- (void)moveRight:(id)arg1;

- (void)moveParagraphForwardAndModifySelection:(id)arg1;

- (void)moveParagraphBackwardAndModifySelection:(id)arg1;

- (void)moveLeftAndModifySelection:(id)arg1;

- (void)moveLeft:(id)arg1;

- (void)moveForwardAndModifySelection:(id)arg1;

- (void)moveForward:(id)arg1;

- (void)moveDownAndModifySelection:(id)arg1;

- (void)moveDown:(id)arg1;

- (void)moveBackwardAndModifySelection:(id)arg1;

- (void)moveBackward:(id)arg1;

- (void)makeTextWritingDirectionRightToLeft:(id)arg1;

- (void)makeTextWritingDirectionNatural:(id)arg1;

- (void)makeTextWritingDirectionLeftToRight:(id)arg1;

- (void)makeBaseWritingDirectionRightToLeft:(id)arg1;

- (void)makeBaseWritingDirectionLeftToRight:(id)arg1;

- (void)lowercaseWord:(id)arg1;

- (void)insertTabIgnoringFieldEditor:(id)arg1;

- (void)insertTab:(id)arg1;

- (void)insertParagraphSeparator:(id)arg1;

- (void)insertNewlineIgnoringFieldEditor:(id)arg1;

- (void)insertNewline:(id)arg1;

- (void)insertLineBreak:(id)arg1;

- (void)insertBacktab:(id)arg1;

- (void)indent:(id)arg1;

- (void)ignoreSpelling:(id)arg1;

- (void)deleteWordForward:(id)arg1;

- (void)deleteWordBackward:(id)arg1;

- (void)deleteToMark:(id)arg1;

- (void)deleteToEndOfParagraph:(id)arg1;

- (void)deleteToEndOfLine:(id)arg1;

- (void)deleteToBeginningOfParagraph:(id)arg1;

- (void)deleteToBeginningOfLine:(id)arg1;

- (void)deleteForward:(id)arg1;

- (void)deleteBackwardByDecomposingPreviousCharacter:(id)arg1;

- (void)deleteBackward:(id)arg1;

- (void)delete:(id)arg1;

- (void)cut:(id)arg1;

- (void)copyFont:(id)arg1;

- (void)copy:(id)arg1;

- (void)complete:(id)arg1;

- (void)checkSpelling:(id)arg1;

- (void)changeSpelling:(id)arg1;

- (void)changeFont:(id)arg1;

- (void)changeDocumentBackgroundColor:(id)arg1;

- (void)changeColor:(id)arg1;

- (void)changeBaseWritingDirectionToRTL:(id)arg1;

- (void)changeBaseWritingDirectionToLTR:(id)arg1;

- (void)changeBaseWritingDirection:(id)arg1;

- (void)changeAttributes:(id)arg1;

- (void)centerSelectionInVisibleArea:(id)arg1;

- (void)capitalizeWord:(id)arg1;

- (void)alignRight:(id)arg1;

- (void)alignLeft:(id)arg1;

- (void)alignJustified:(id)arg1;

- (void)alignCenter:(id)arg1;

- (void)_performResponderOperation:(SEL)arg1 with:(id)arg2;

- (void)_simplifyMarkup:(id)arg1 endNode:(id)arg2;

- (BOOL)_selectionIsAll;

- (BOOL)_selectionIsCaret;

- (void)_replaceSelectionWithNode:(id)arg1 matchStyle:(BOOL)arg2;

- (void)_insertNewlineInQuotedContent;

- (id)_responderForResponderOperations;

- (BOOL)_continuousCheckingAllowed;

- (id)_frameViewAtWindowPoint:(struct CGPoint)arg1;

- (BOOL)_isLoading;

- (id)_focusedFrame;

- (struct CGRect)_convertRectFromRootView:(struct CGRect)arg1;

- (struct CGPoint)_convertPointFromRootView:(struct CGPoint)arg1;

- (void)_scheduleCompositingLayerSync;

- (BOOL)_syncCompositingChanges;

- (void)_setNeedsOneShotDrawingSynchronization:(BOOL)arg1;

- (BOOL)_needsOneShotDrawingSynchronization;

- (id)_selectedOrMainFrame;

- (struct Frame *)_mainCoreFrame;

- (int)_keyboardUIMode;

- (void)_retrieveKeyboardUIModeFromPreferences:(id)arg1;

- (void)_removeObjectForIdentifier:(unsigned long)arg1;

- (id)_objectForIdentifier:(unsigned long)arg1;

- (void)_addObject:(id)arg1 forIdentifier:(unsigned long)arg2;

- (BOOL)_becomingFirstResponderFromOutside;

- (id)_deviceOrientationProvider;

- (void)_setDeviceOrientationProvider:(id)arg1;

- (void)_resetAllGeolocationPermission;

- (void)_geolocationDidFailWithError:(id)arg1;

- (void)_geolocationDidChangePosition:(id)arg1;

- (id)_geolocationProvider;

- (void)_setGeolocationProvider:(id)arg1;

- (void)_notificationsDidClose:(id)arg1;

- (void)_notificationDidClick:(unsigned long long)arg1;

- (void)_notificationDidShow:(unsigned long long)arg1;

- (id)_notificationProvider;

- (void)_notificationControllerDestroyed;

- (void)_setNotificationProvider:(id)arg1;

- (struct OpaqueJSValue *)_computedStyleIncludingVisitedInfo:(struct OpaqueJSContext *)arg1 forElement:(struct OpaqueJSValue *)arg2;

@end

把它和Mac上的WebView声明对比,可以发现有很多相同的函数。Mac的WebView继承自NSView,就像UIWebView一样是在Mac上直接给开发者使用的接口,而iOS的WebView继承自WAKView,如同《WebCore::Widget浅探》里所述,这个WAKView就是模仿NSView的,所以通过这样的模仿和继承,可以做较少改动令WebView在Mac和iOS上共用。以下几个函数

[cpp] view
plaincopy

findString(WAKView*, NSString*, unsigned int)

WebCore::Chrome::focusNSView(WAKView*)

WebCore::Widget::setPlatformWidget(WAKView*)

WebCore::Widget::Widget(WAKView*)

WebCore::FrameView::graphicsLayerForPlatformWidget(WAKView*)

WebCore::findViewInSubviews(WAKView*, WAKView*)

setDocumentViewOrigin(WAKScrollView*, WAKView*, CGPoint)

WebCore::Widget::init(WAKView*)

WebCore::Widget::addToSuperview(WAKView*)

WebCore::Chrome::focusNSView(WAKView*)

WebCore::Widget::setPlatformWidget(WAKView*)

WebCore::Widget::Widget(WAKView*)

WebCore::FrameView::graphicsLayerForPlatformWidget(WAKView*)

中,特别是 focusNSView(WAKView*) 这个函数,函数名叫NSView,参数却是WAKView,较显然地支持这个“模仿”的判断。

那为什么在iOS不公开WebView呢?我觉得是因为Mac WebView的实现是单线程的,而iOS是多线程的,必然有很多的lock,而且线程间转发消息也必然牺牲效率。如果直接公开WebView,让开发者随意用WebView的接口反而会招致抱怨,这些接口实现里的锁会令主线程卡顿,用户体验就因此降低了,还不如不公开——没得用你也就没得骂。

经过这样的处理后被UIWebDocumentView封装,WebView在iOS上就像是个数据流处理模块,由UIWebDocumentView对其进行操作并接收事件回调通知。所以说,WebView以及UIWebDocumentView合起来就像是MVC中的Model,当Model发送变化,就通知UIWebTiledView重绘。更进一步讲,UIWebDocumentView是WebView的Controller。

关于WebView暂不深入,后面再有一节来讲。

UIWebDocumentView的声明如下:(代码好长,点此跳过

[cpp] view
plaincopy

@interface UIWebDocumentView : UIWebTiledView <UIActionSheetDelegate, _UIRotatingActionSheetDelegate, UITextAutoscrolling, UIAutoscrollContainer, UIGestureRecognizerDelegate, UIKeyboardInput, UIKeyInput, UIModalViewDelegate, UITextInputTokenizer, _UIWebDoubleTapDelegate, UIWebFileUploadPanelDelegate>

{

struct WKWindow *_wkWindow;

WebView *_webView;

WebViewReachabilityObserver *_reachabilityObserver;

id m_parentTextView;

id _delegate; // 地址偏移28

id _textSuggestionDelegate;

struct CGRect _doubleTapRect;

struct CGRect _mainDocumentDoubleTapRect;

struct CGPoint _scrollPoint;

struct CGPoint _doubleTapStartPosition;

double _doubleTapStartTime;

struct CGSize _pendingSize;

int _orientation;

DOMHTMLElement *_standaloneEditingElement;

struct CGPoint _mouseDownPoint;

double _mouseDownTime;

UIAutoscroll *_autoscroll;

struct __CFDictionary *_plugInViews;

int m_selectionGranularity;

CALayer *_contentLayersHostingLayer;

CALayer *_flattenedRotatingContentLayer;

NSMutableSet *_overflowScrollViewsPendingInsertion;

NSMutableSet *_overflowScrollViewsPendingDeletion;

NSMutableSet *_overflowScrollViews;

NSArray *_additionalSubviews;

UITextInputTraits *_traits;

id <UITextInputDelegate> _inputDelegate;

UITapGestureRecognizer *_singleTapGestureRecognizer;

UITapGestureRecognizer *_doubleTapGestureRecognizer;

UITapGestureRecognizer *_twoFingerDoubleTapGestureRecognizer;

UILongPressGestureRecognizer *_highlightLongPressGestureRecognizer;

UILongPressGestureRecognizer *_longPressGestureRecognizer;

UIPanGestureRecognizer *_twoFingerPanGestureRecognizer;

struct {

NSTimer *timer;

struct CGPoint location;

char isBlocked;

char isCancelled;

char isOnWebThread;

char isDisplayingHighlight;

char attemptedClick;

struct CGPoint lastPanTranslation;

DOMNode *element;

id delegate;

UIWebRotatingSheet *interactionSheet;

NSArray *elementActions;

char allowsImageSheet;

char allowsDataDetectorsSheet;

char allowsLinkSheet;

char acceptsFirstResponder;

float documentScale;

} _interaction;

struct UIWebDocumentViewViewportConfiguration _defaultViewportConfigurations[5];

struct UIWebDocumentViewViewportConfiguration _currentViewportConfiguration;

struct CGSize _minimumSize;

int _documentType;

float _documentScale;

float _previousDocumentScale;

struct CGRect _documentBounds;

struct CGSize _fixedLayoutOriginRoundingDelta;

struct CGSize _fixedLayoutSizeRoundingDelta;

unsigned int _customConfigurations;

unsigned int _mouseDownCount;

unsigned int _dataDetectorTypes;

unsigned int _webCoreNeedsSetNeedsDisplay:1;

unsigned int _webCoreNeedsDraw:1;

unsigned int _ignoresFocusingMouse:1;

unsigned int _ignoresKeyEvents:1;

unsigned int _autoresizes:1;

unsigned int _ignoresViewportOverflowWhenAutoresizing:1;

unsigned int _updatingSize:1;

unsigned int _scalesToFit:1;

unsigned int _updatesScrollView:1;

unsigned int _hasCustomScale:1;

unsigned int _shouldRestoreScrollPosition:1;

unsigned int _pageNeedsReset:1;

unsigned int _hasScrollPoint:1;

unsigned int _gesturesDisabled:1;

unsigned int _doubleTapRectIsReplaced:1;

unsigned int _standaloneEditableView:1;

unsigned int _widgetEditingView:1;

unsigned int _mouseDragged:1;

unsigned int _mouseReentrancyGuard:1;

unsigned int _isShowingFullScreenPlugIn:1;

unsigned int _isSettingRedrawFrame:1;

unsigned int _needsScrollNotifications:1;

unsigned int _loadsSynchronously:1;

unsigned int _mouseDown:1;

unsigned int _usePreTimberlineTransparencyBehavior:1;

unsigned int _geolocationDialogAllowed:1;

unsigned int _usingMinimalTilesDuringLoading:1;

unsigned int _sheetsCount:2;

unsigned int _didFirstVisuallyNonEmptyLayout:1;

unsigned int _loadInProgress:1;

unsigned int _uiwdvIsResigningFirstResponder:1;

unsigned int _classicViewportMode:1;

unsigned int _sizeUpdatesSuspended:1;

unsigned int _sizeUpdateOccurredWhileSuspended:1;

unsigned int _shouldOnlyRecognizeGesturesOnActiveElements:1;

unsigned int _shouldIgnoreCustomViewport:1;

unsigned int _ignoresFocusEventFromFirstResponderChange:1;

unsigned int _shouldCloseWebViewAtDealloc:1;

unsigned int _shouldRemoveUserStyleSheet:1;

unsigned int _hasDrawnTiles:1;

unsigned int _showingTextStyleOptions:1;

unsigned int _subviewCachesNeedUpdate:1;

unsigned int _avoidFixedPositionUpdateViaDidScroll:1;

unsigned int _inspectorSearchingForNode:1;

unsigned int _previousScrollWasScrollToTop:1;

unsigned int _skipResettingNeedsScrollNotifications:1;

WebThreadSafeUndoManager *_undoManager;

UIWebSelectionAssistant *_webSelectionAssistant;

UITextInteractionAssistant *_textSelectionAssistant;

UITextChecker *_textChecker;

struct UIEdgeInsets _caretInsets;

UIWebFileUploadPanel *_fileUploadPanel;

int _selectionAffinity;

DOMElement *_dictationResultPlaceholder;

id _dictationResultPlaceholderRemovalObserver;

DOMRange *_rangeToRestoreAfterDictation;

_UITextServiceSession *_definitionSession;

_UITextServiceSession *_learnSession;

BOOL _suppressesIncrementalRendering;

}

+ (id)standardTextViewPreferences;

+ (BOOL)hasLandscapeOrientation;

+ (void)initialize;

+ (double)getTimestamp;

+ (Class)layerClass;

+ (id)_sharedHighlightView;

+ (id)_createDefaultHighlightView;

@property(nonatomic) BOOL suppressesIncrementalRendering; // @synthesize suppressesIncrementalRendering=_suppressesIncrementalRendering;

@property(retain, nonatomic) DOMRange *rangeToRestoreAfterDictation; // @synthesize rangeToRestoreAfterDictation=_rangeToRestoreAfterDictation;

- (void)willZoomToLocation:(struct CGPoint)arg1 atScale:(float)arg2 forDuration:(double)arg3;

- (BOOL)shouldSelectionAssistantReceiveDoubleTapAtPoint:(struct CGPoint)arg1 forScale:(float)arg2;

- (void)willZoomToMinimumScale;

- (BOOL)considerHeightForDoubleTap;

- (CDStruct_869f9c67)doubleTapScalesForSize:(struct CGSize)arg1;

- (struct CGRect)rectOfInterestForPoint:(struct CGPoint)arg1;

- (float)minimumScaleForSize:(struct CGSize)arg1;

- (struct CGRect)visibleContentRect;

- (float)currentDocumentScale;

- (float)zoomedDocumentScale;

- (id)contentView;

- (id)enclosingScrollView;

- (BOOL)_isInspectorSearchingForNode;

- (BOOL)_shouldResetForNewPage;

- (int)documentType;

- (id)_documentUrl;

- (id)selectionRectsForRange:(id)arg1;

@property(nonatomic) int selectionGranularity;

@property(nonatomic) int selectionAffinity;

- (void)setBaseWritingDirection:(int)arg1 forRange:(id)arg2;

- (int)baseWritingDirectionForPosition:(id)arg1 inDirection:(int)arg2;

- (id)characterRangeByExtendingPosition:(id)arg1 inDirection:(int)arg2;

- (id)positionWithinRange:(id)arg1 farthestInDirection:(int)arg2;

- (id)characterRangeAtPoint:(struct CGPoint)arg1;

- (id)closestPositionToPoint:(struct CGPoint)arg1 withinRange:(id)arg2;

- (id)closestPositionToPoint:(struct CGPoint)arg1;

@property(copy, nonatomic) NSDictionary *markedTextStyle;

- (struct CGRect)caretRectForPosition:(id)arg1;

@property(nonatomic) id <UITextInputDelegate> inputDelegate;

@property(readonly, nonatomic) id <UITextInputTokenizer> tokenizer;

- (struct CGRect)_lastRectForRange:(id)arg1;

- (struct CGRect)firstRectForRange:(id)arg1;

- (id)rangeEnclosingPosition:(id)arg1 withGranularity:(int)arg2 inDirection:(int)arg3;

- (void)_scrollRectToVisible:(struct CGRect)arg1 animated:(BOOL)arg2;

- (BOOL)isPosition:(id)arg1 withinTextUnit:(int)arg2 inDirection:(int)arg3;

- (id)positionFromPosition:(id)arg1 toBoundary:(int)arg2 inDirection:(int)arg3;

- (BOOL)isPosition:(id)arg1 atBoundary:(int)arg2 inDirection:(int)arg3;

- (id)positionFromPosition:(id)arg1 inDirection:(int)arg2 offset:(int)arg3;

- (id)_positionFromPosition:(id)arg1 inDirection:(int)arg2 offset:(int)arg3 withAffinityDownstream:(BOOL)arg4;

- (id)positionFromPosition:(id)arg1 offset:(int)arg2;

- (int)offsetFromPosition:(id)arg1 toPosition:(id)arg2;

- (int)comparePosition:(id)arg1 toPosition:(id)arg2;

- (void)replaceRange:(id)arg1 withText:(id)arg2;

- (id)rangeOfEnclosingWord:(id)arg1;

- (id)textRangeFromPosition:(id)arg1 toPosition:(id)arg2;

- (id)textInRange:(id)arg1;

@property(readonly, nonatomic) UITextPosition *endOfDocument;

@property(readonly, nonatomic) UITextPosition *beginningOfDocument;

- (void)unmarkText;

@property(readonly, nonatomic) UITextRange *markedTextRange;

- (void)setSelectedTextRange:(id)arg1 withAffinityDownstream:(BOOL)arg2;

@property(copy) UITextRange *selectedTextRange;

- (BOOL)hasText;

- (id)_textSelectingContainer;

- (BOOL)hasSimpleTextOnlyStructure;

- (BOOL)containsOnlySelectableElements;

- (void)setTileUpdatesDisabled:(BOOL)arg1;

- (void)_restoreFlattenedContentLayers;

- (void)_flattenAndSwapContentLayersInRect:(struct CGRect)arg1;

- (void *)_createIOSurfaceFromRect:(struct CGRect)arg1;

- (BOOL)_shouldFlattenContentLayersForRect:(struct CGRect)arg1;

- (unsigned int)_contentSizeInExposedRect:(struct CGRect)arg1 topLayer:(id)arg2 visibleLayerCount:(int *)arg3;

- (BOOL)_shouldUseInitialScale;

- (float)maximumDoubleTapScale;

- (void)didEndZoom;

- (void)didZoom;

- (void)willStartZoom;

- (void)scrollViewWasRemoved;

- (void)didEndScroll;

- (void)_updateFixedPositioningObjectsLayoutAfterVisibleGeometryChange;

- (void)_updateFixedPositioningObjectsLayoutAfterScroll;

- (void)willStartScrollToTop;

- (void)willStartScroll;

- (void)useSelectionAssistantWithMode:(int)arg1;

- (void)setBecomesEditableWithGestures:(BOOL)arg1;

- (BOOL)becomesEditableWithGestures;

- (BOOL)playsNicelyWithGestures;

- (struct CGRect)autoscrollContentFrame;

- (struct CGRect)autoscrollDragFrame;

- (struct CGRect)visibleContentFrame;

- (struct CGRect)visibleFrame;

- (BOOL)canPerformAction:(SEL)arg1 withSender:(id)arg2;

- (BOOL)inPopover;

- (BOOL)isCaretInEmptyParagraph;

- (id)webSelectionAssistant;

- (void)makeTextWritingDirectionLeftToRight:(id)arg1;

- (void)makeTextWritingDirectionRightToLeft:(id)arg1;

- (void)_promptForReplace:(id)arg1;

- (void)replace:(id)arg1;

- (void)selectAll:(id)arg1;

- (void)select:(id)arg1;

- (void)paste:(id)arg1;

- (void)_addShortcut:(id)arg1;

- (void)_define:(id)arg1;

- (struct CGRect)_shortcutPresentationRect;

- (void)_showTextStyleOptions:(id)arg1;

- (void)toggleUnderline:(id)arg1;

- (void)toggleItalics:(id)arg1;

- (void)toggleBoldface:(id)arg1;

- (void)copy:(id)arg1;

- (void)cut:(id)arg1;

- (struct CGRect)_selectionClipRect;

- (void)updateSelection;

- (void)endSelectionChange;

- (void)beginSelectionChange;

- (BOOL)isEditing;

- (BOOL)isEditable;

@property(readonly, nonatomic) UITextInteractionAssistant *interactionAssistant;

- (id)selectionView;

- (void)takeTraitsFrom:(id)arg1;

- (id)methodSignatureForSelector:(SEL)arg1;

- (void)forwardInvocation:(id)arg1;

- (id)textInputTraits;

- (void)webView:(id)arg1 willAddPlugInView:(id)arg2;

- (BOOL)hasPlugInSubviews;

- (BOOL)isShowingFullScreenPlugInUI;

- (void)didRemovePlugInView:(id)arg1;

- (void)webView:(id)arg1 didHideFullScreenForPlugInView:(id)arg2;

- (void)webView:(id)arg1 willShowFullScreenForPlugInView:(id)arg2;

- (id)webView:(id)arg1 plugInViewWithArguments:(id)arg2 fromPlugInPackage:(id)arg3;

- (void)setPaused:(BOOL)arg1 withEvents:(BOOL)arg2;

- (void)setPaused:(BOOL)arg1;

- (void)handleKeyWebEvent:(id)arg1;

- (BOOL)requiresKeyEvents;

- (void)setBottomBufferHeight:(float)arg1;

- (id)automaticallySelectedOverlay;

- (void)keyboardInputChangedSelection:(id)arg1;

- (BOOL)keyboardInputChanged:(id)arg1;

- (BOOL)keyboardInputShouldDelete:(id)arg1;

- (BOOL)keyboardInput:(id)arg1 shouldInsertText:(id)arg2 isMarkedText:(BOOL)arg3;

- (BOOL)keyboardInput:(id)arg1 shouldReplaceTextInRange:(struct _NSRange)arg2 replacementText:(id)arg3;

- (id)implementationWebView;

- (struct CGRect)convertCaretRect:(struct CGRect)arg1;

- (void)setCaretChangeListener:(id)arg1;

- (BOOL)hasContent;

- (id)text;

- (void)setText:(id)arg1;

- (void)selectAll;

- (void)moveForward:(unsigned int)arg1;

- (void)moveBackward:(unsigned int)arg1;

- (BOOL)selectionAtWordStart;

- (BOOL)selectionAtDocumentStart;

- (BOOL)hasSelection;

- (void)extendCurrentSelection:(int)arg1;

- (id)rangeByExtendingCurrentSelection:(int)arg1;

- (id)rangeByMovingCurrentSelection:(int)arg1;

- (void)setSelectedDOMRange:(id)arg1 affinityDownstream:(BOOL)arg2;

- (id)selectedDOMRange;

- (struct _NSRange)selectionRange;

- (struct _NSRange)_markedTextNSRange;

- (void)replaceSelectionWithWebArchive:(id)arg1 selectReplacement:(BOOL)arg2 smartReplace:(BOOL)arg3;

- (int)wordOffsetInRange:(id)arg1;

- (void)expandSelectionToStartOfWordContainingCaretSelection;

- (id)wordContainingCaretSelection;

- (id)nextUnperturbedDictationResultBoundaryFromPosition:(id)arg1;

- (id)previousUnperturbedDictationResultBoundaryFromPosition:(id)arg1;

- (id)wordRangeContainingCaretSelection;

- (struct CGRect)rectContainingCaretSelection;

- (id)rectsForNSRange:(struct _NSRange)arg1;

- (struct CGRect)rectForNSRange:(struct _NSRange)arg1;

- (id)textColorForCaretSelection;

- (id)fontForCaretSelection;

- (unsigned short)characterAfterCaretSelection;

- (unsigned short)characterBeforeCaretSelection;

- (unsigned short)characterInRelationToCaretSelection:(int)arg1;

- (id)markedText;

- (void)confirmMarkedText:(id)arg1;

- (void)setMarkedText:(id)arg1 selectedRange:(struct _NSRange)arg2;

- (void)setMarkedText:(id)arg1;

- (void)replaceCurrentWordWithText:(id)arg1;

- (void)replaceRangeWithText:(struct _NSRange)arg1 replacementText:(id)arg2;

- (void)replaceRangeWithTextWithoutClosingTyping:(id)arg1 replacementText:(id)arg2;

- (id)dictationInterpretations;

- (void)removeDictationResultPlaceholder:(id)arg1 willInsertResult:(BOOL)arg2;

- (void)_finishedUsingDictationPlaceholder;

- (struct CGRect)frameForDictationResultPlaceholder:(id)arg1;

- (id)insertDictationResultPlaceholder;

- (BOOL)_dictationPlaceholderHasBeenRemoved;

- (BOOL)hasRangedSelection;

- (id)dictationResultMetadataForRange:(id)arg1;

- (id)metadataDictionariesForDictationResults;

- (void)insertDictationResult:(id)arg1 withCorrectionIdentifier:(id)arg2;

- (BOOL)isEditingSingleLineElement;

- (void)insertText:(id)arg1;

- (void)deleteBackward;

- (void)disableClearsOnInsertion;

- (void)deleteFromInput;

- (void)addInputString:(id)arg1;

- (void)addInputString:(id)arg1 fromVariantKey:(BOOL)arg2;

- (id)delegate;

- (void)setContinuousSpellCheckingEnabled:(BOOL)arg1;

- (void)_setParentTextView:(id)arg1;

- (id)_parentTextView;

- (id)undoManager;

- (id)undoManagerForWebView:(id)arg1;

- (void)_undoManagerDidRedo:(id)arg1;

- (void)_undoManagerDidUndo:(id)arg1;

- (void)setInteractionAssistantGestureRecognizers;

- (void)ensureSelection;

- (BOOL)clearWKFirstResponder;

- (BOOL)makeWKFirstResponder;

- (id)_responderForBecomeFirstResponder;

- (BOOL)resignFirstResponder;

- (void)deferredBecomeFirstResponder;

- (BOOL)becomeFirstResponder;

- (BOOL)canResignFirstResponder;

- (BOOL)canBecomeFirstResponder;

- (BOOL)updateKeyboardStateOnResponderChanges;

- (BOOL)isWidgetEditingView;

- (void)setIsWidgetEditingView:(BOOL)arg1;

- (id)standaloneEditingElement;

- (void)setStandaloneEditingElement:(id)arg1;

- (BOOL)isStandaloneEditableView;

- (void)setIsStandaloneEditableView:(BOOL)arg1;

- (id)textFormElement;

- (id)formElement;

- (void)_clearAllConsoleMessages;

- (void)_resetFormDataForFrame:(id)arg1;

- (void)assistFormNode:(id)arg1;

- (BOOL)doubleTapRectIsReplaced;

- (struct CGRect)doubleTapRect;

- (void)_handleTwoFingerDoubleTapAtLocation:(struct CGPoint)arg1;

- (void)_handleDoubleTapAtLocation:(struct CGPoint)arg1;

- (void)_handleDoubleTapAtPoint:(struct CGPoint)arg1 inWebHTMLView:(id)arg2 outRenderRect:(struct CGRect *)arg3;

@property(nonatomic, getter=isDoubleTapEnabled) BOOL doubleTapEnabled;

@property(nonatomic) BOOL mediaPlaybackAllowsAirPlay;

@property(nonatomic) BOOL shouldOnlyRecognizeGesturesOnActiveElements;

- (void)sendOrientationEventForOrientation:(int)arg1;

- (void)didRotateInteractionSheet;

- (void)willRotateInteractionSheet;

- (void)updateInteractionElements;

- (void)redrawScaledDocument;

- (void)_reshapePlugInViews;

- (id)checkSpellingOfString:(id)arg1;

- (void)_renderUnbufferedInContext:(struct CGContext *)arg1;

- (void)webViewDidDrawTiles:(id)arg1;

- (id)subviews;

- (BOOL)_shouldUpdateSubviewCachesForPlugins;

- (void)_updateSubviewCaches;

- (BOOL)_hasSubviewContainingWebContent:(id)arg1;

- (void)_overflowScrollView:(id)arg1 didEndScrollingForNode:(id)arg2;

- (void)_overflowScrollView:(id)arg1 scrollOffsetChangedForNode:(id)arg2 whileScrolling:(BOOL)arg3;

- (void)_overflowScrollView:(id)arg1 willStartScrollingForNode:(id)arg2;

- (void)webView:(id)arg1 willRemoveScrollingLayer:(id)arg2 withContentsLayer:(id)arg3 forNode:(id)arg4;

- (void)webView:(id)arg1 didCreateOrUpdateScrollingLayer:(id)arg2 withContentsLayer:(id)arg3 scrollSize:(id)arg4 forNode:(id)arg5 allowHorizontalScrollbar:(BOOL)arg6 allowVerticalScrollbar:(BOOL)arg7;

- (void)webViewDidCommitCompositingLayerChanges:(id)arg1;

- (void)_removeAdditionalSubview:(id)arg1;

- (void)_addAdditionalSubview:(id)arg1;

- (void)_setSubviewCachesNeedUpdate:(BOOL)arg1;

- (void)_noteOverflowScrollViewPendingDeletion:(id)arg1;

- (void)_noteOverflowScrollViewPendingInsertion:(id)arg1;

- (void)_webthread_webView:(id)arg1 attachRootLayer:(id)arg2;

- (void)revealedSelectionByScrollingWebFrame:(id)arg1;

- (BOOL)isUnperturbedDictationResultMarker:(id)arg1;

- (int)getPasteboardChangeCount;

- (id)readDataFromPasteboard:(id)arg1 withIndex:(int)arg2;

- (id)supportedPasteboardTypesForCurrentSelection;

- (id)_supportedPasteboardTypesForCurrentSelection;

- (BOOL)performsTwoStepPaste:(id)arg1;

- (BOOL)fragmentContainsRichContent:(id)arg1;

- (BOOL)hasRichlyEditableSelection;

- (BOOL)isInsideRichlyEditableTextWidget;

- (int)getPasteboardItemsCount;

- (void)writeDataToPasteboard:(id)arg1;

- (void)_updateFixedPositionContent;

- (struct CGRect)_adjustedLayoutRectForFixedPositionObjects;

- (void)_updateFixedPositionedObjectsLayoutRectUsingWebThread:(BOOL)arg1 synchronize:(BOOL)arg2;

- (struct CGRect)_layoutRectForFixedPositionObjects;

- (struct CGRect)_documentViewVisibleRect;

- (void)_notifyContentHostingLayersOfScaleChange;

- (void)_didMoveFromWindow:(id)arg1 toWindow:(id)arg2;

- (void)_notifyPlugInViewsOfScaleChange;

- (void)_notifyPlugInViewsOfDidZoom;

- (void)_notifyPlugInViewsOfDidEndZooming;

- (void)_notifyPlugInViewsOfWillBeginZooming;

- (BOOL)_isSubviewOfPlugInView:(id)arg1;

- (void)_didScroll;

- (void)_cancelLongPressGestureRecognizer;

- (void)setTilingArea:(int)arg1;

- (void)setIgnoresKeyEvents:(BOOL)arg1;

- (void)setIgnoresFocusingMouse:(BOOL)arg1;

- (BOOL)cancelTouchTracking;

- (BOOL)cancelMouseTracking;

- (struct CGImage *)newSnapshotWithRect:(struct CGRect)arg1;

- (struct CGImage *)createSnapshotWithRect:(struct CGRect)arg1;

- (void)setOpaque:(BOOL)arg1;

- (void)setDrawsBackground:(BOOL)arg1;

- (void)setSmoothsFonts:(BOOL)arg1;

- (void)layoutSubviews;

- (void)forceLayout;

- (void)_showPendingContentLayers;

- (BOOL)webView:(id)arg1 shouldScrollToPoint:(struct CGPoint)arg2 forFrame:(id)arg3;

- (void)webView:(id)arg1 restoreStateFromHistoryItem:(id)arg2 forFrame:(id)arg3 force:(BOOL)arg4;

- (void)webView:(id)arg1 saveStateToHistoryItem:(id)arg2 forFrame:(id)arg3;

- (void)saveStateToCurrentHistoryItem;

- (void)_saveStateToHistoryItem:(id)arg1;

- (void)_resetForNewPage;

- (void)_restoreScrollPointForce:(BOOL)arg1;

- (BOOL)updatesScrollView;

- (void)setUpdatesScrollView:(BOOL)arg1;

- (void)fileUploadPanelDidDismiss:(id)arg1;

- (void)setAllowsUserScaling:(BOOL)arg1 forDocumentTypes:(int)arg2;

- (void)setMaximumScale:(float)arg1 forDocumentTypes:(int)arg2;

- (void)setMinimumScale:(float)arg1 forDocumentTypes:(int)arg2;

- (void)setInitialScale:(float)arg1 forDocumentTypes:(int)arg2;

- (void)setViewportSize:(struct CGSize)arg1 forDocumentTypes:(int)arg2;

- (void)setMinimumSize:(struct CGSize)arg1 updateCurrentViewportConfigurationSize:(BOOL)arg2;

- (void)setMinimumSize:(struct CGSize)arg1;

- (void)setIgnoresViewportOverflowWhenAutoresizing:(BOOL)arg1;

- (void)setAutoresizes:(BOOL)arg1;

- (struct CGRect)documentBounds;

- (void)_WAKViewSizeDidChange:(id)arg1;

- (void)webView:(id)arg1 didReceiveDocTypeForFrame:(id)arg2;

- (void)webView:(id)arg1 didCommitLoadForFrame:(id)arg2;

- (void)webView:(id)arg1 didChangeLocationWithinPageForFrame:(id)arg2;

- (void)webView:(id)arg1 didFailLoadWithError:(id)arg2 forFrame:(id)arg3;

- (void)webView:(id)arg1 didFirstVisuallyNonEmptyLayoutInFrame:(id)arg2;

- (void)webViewDidRestoreFromPageCache:(id)arg1;

- (void)webView:(id)arg1 runOpenPanelForFileButtonWithResultListener:(id)arg2 allowMultipleFiles:(BOOL)arg3 acceptMIMETypes:(id)arg4;

- (void)webViewDidEndOverflowScroll:(id)arg1;

- (void)webViewDidStartOverflowScroll:(id)arg1;

- (void)_editableSelectionLayoutChangedByScrolling:(BOOL)arg1;

- (void)_selectionLayoutChangedByScrolling:(BOOL)arg1;

- (void)webThreadWebViewDidLayout:(id)arg1 byScrolling:(BOOL)arg2;

- (void)webView:(id)arg1 didFinishLoadForFrame:(id)arg2;

- (void)resetTilingAfterLoadComplete;

- (void)sendScrollEventIfNecessaryWasUserScroll:(BOOL)arg1;

- (void)sendScrollEventIfNecessary;

- (BOOL)needsScrollNotifications;

- (void)webView:(id)arg1 needsScrollNotifications:(id)arg2 forFrame:(id)arg3;

- (BOOL)isClassicViewportMode;

- (void)webView:(id)arg1 didReceiveViewportArguments:(id)arg2 forFrame:(id)arg3;

- (unsigned int)_applyViewportArguments:(id)arg1;

@property(nonatomic) BOOL shouldIgnoreCustomViewport;

- (void)_clearDoubleTapRect;

- (void)_updateSize;

@property(nonatomic) BOOL sizeUpdatesSuspended;

- (void)_setDocumentType:(int)arg1;

- (void)_setDocumentType:(int)arg1 overrideCustomConfigurations:(BOOL)arg2 viewportArguments:(id)arg3;

- (struct CGRect)convertRect:(struct CGRect)arg1 fromFrame:(id)arg2;

- (struct CGRect)convertRect:(struct CGRect)arg1 toFrame:(id)arg2;

- (struct CGPoint)convertPoint:(struct CGPoint)arg1 fromFrame:(id)arg2;

- (struct CGPoint)convertPoint:(struct CGPoint)arg1 toFrame:(id)arg2;

- (void)viewportConfigurationsDidChange:(unsigned int)arg1;

- (void)_updateScrollViewBoundaryZoomScales;

- (float)_zoomedDocumentScale;

- (float)minimumScale;

- (float)maximumScale;

- (float)initialScale;

- (float)minimumScaleForMinimumSize:(struct CGSize)arg1;

- (float)viewportHeight;

- (float)viewportWidth;

- (float)_documentScale;

- (void)_setDocumentScale:(float)arg1;

- (float)integralScaleForScale:(float)arg1;

- (float)integralScaleForScale:(float)arg1 keepingPointFixed:(struct CGPoint *)arg2;

- (void)setFrame:(struct CGRect)arg1;

- (void)setUsePreTimberlineTransparencyBehavior;

- (unsigned int)dataDetectorTypes;

- (void)setDataDetectorTypes:(unsigned int)arg1;

- (unsigned int)effectiveDataDetectorTypes;

- (BOOL)_dataDetectionIsActivated;

- (BOOL)detectsPhoneNumbers;

- (void)setDetectsPhoneNumbers:(BOOL)arg1;

- (void)setUserStyleSheet:(id)arg1;

- (id)_focusedOrMainFrame;

- (id)_groupName;

- (id)webView;

- (BOOL)loadsSynchronously;

- (void)setLoadsSynchronously:(BOOL)arg1;

- (void)loadData:(id)arg1 MIMEType:(id)arg2 textEncodingName:(id)arg3 baseURL:(id)arg4;

- (void)loadHTMLString:(id)arg1 baseURL:(id)arg2;

- (void)loadRequest:(id)arg1;

- (void)_cleanUpFrameStateAndLoad:(id)arg1;

- (void)_runLoadBlock:(id)arg1;

- (void)setDelegate:(id)arg1;

- (void)stopLoading:(id)arg1;

- (void)didMoveToSuperview;

- (void)willMoveToSuperview:(id)arg1;

- (void)_reachabilityManagerNotifiedIsReachable:(BOOL)arg1;

- (BOOL)hasDrawnTiles;

- (BOOL)didFirstVisuallyNonEmptyLayout;

- (void)dealloc;

- (void)setTypingAttributes:(id)arg1;

- (id)typingAttributes;

- (void)_setTextColor:(id)arg1;

- (void)_setFont:(id)arg1;

- (void)_dismissViewControllerAnimated:(BOOL)arg1 completion:(id)arg2;

- (BOOL)_presentViewController:(id)arg1 animated:(BOOL)arg2 completion:(id)arg3;

- (void)_removeShortcutController:(BOOL)arg1;

- (void)_removeDefinitionController:(BOOL)arg1;

- (void)_inspectorDidStopSearchingForNode:(id)arg1;

- (void)_inspectorDidStartSearchingForNode:(id)arg1;

- (void)_resetShowingTextStyle:(id)arg1;

- (void)enableReachability;

- (id)initWithWebView:(id)arg1 frame:(struct CGRect)arg2;

- (id)initWithFrame:(struct CGRect)arg1;

- (id)initSimpleHTMLDocumentWithStyle:(id)arg1 frame:(struct CGRect)arg2 preferences:(id)arg3 groupName:(id)arg4;

- (struct CGRect)webViewFrameForUIFrame:(struct CGRect)arg1;

- (void)_restoreViewportSettingsWithSize:(struct CGSize)arg1;

- (id)scriptingInfoWithChildren;

- (id)_scriptingInfoForForm:(id)arg1;

- (id)_scriptingInfoForLink:(id)arg1;

@property(getter=_acceptsFirstResponder, setter=_setAcceptsFirstResponder:) BOOL _acceptsFirstResponder;

- (id)_doubleTapGestureRecognizer;

- (id)superviewForSheet;

- (struct CGPoint)interactionLocation;

- (id)interactionElement;

- (void)setAllowsLinkSheet:(BOOL)arg1;

- (void)setAllowsDataDetectorsSheet:(BOOL)arg1;

- (void)setAllowsImageSheet:(BOOL)arg1;

- (id)interactionDelegate;

- (void)setInteractionDelegate:(id)arg1;

- (BOOL)supportsTwoFingerScrollingAtTouchLocation:(struct CGPoint)arg1 andLocation:(struct CGPoint)arg2;

- (void)sendScrollWheelEvents;

- (void)_cleanupSheet;

- (void)actionSheet:(id)arg1 didDismissWithButtonIndex:(int)arg2;

- (void)actionSheet:(id)arg1 clickedButtonAtIndex:(int)arg2;

- (id)_targetURL;

- (void)cancelInteractionWithImmediateDisplay:(BOOL)arg1;

- (void)deferInteraction;

- (void)cancelInteraction;

- (void)completeInteraction;

- (void)resetInteraction;

- (void)highlightApproximateNodeAndDisplayInfoSheet;

- (void)hideTapHighlight;

- (void)highlightApproximateNodeInverted:(BOOL)arg1;

- (id)deepestNodeAtViewportLocation:(struct CGPoint)arg1;

- (id)approximateNodeAtViewportLocation:(struct CGPoint *)arg1;

- (void)webViewDidPreventDefaultForEvent:(id)arg1;

- (void)webView:(id)arg1 didObserveDeferredContentChange:(int)arg2 forFrame:(id)arg3;

- (void)attemptClick:(id)arg1;

- (void)_sendMouseMoveAndAttemptClick:(id)arg1;

- (void)performClick:(id)arg1;

- (void)_twoFingerPanRecognized:(id)arg1;

- (void)_longPressRecognized:(id)arg1;

- (void)_highlightLongPressRecognized:(id)arg1;

- (BOOL)gestureRecognizerShouldBegin:(id)arg1;

- (SEL)_actionForLongPressOnElement:(id)arg1;

- (void)_twoFingerDoubleTapRecognized:(id)arg1;

- (void)_doubleTapRecognized:(id)arg1;

- (void)_singleTapRecognized:(id)arg1;

- (BOOL)gestureRecognizer:(id)arg1 shouldRecognizeSimultaneouslyWithGestureRecognizer:(id)arg2;

- (BOOL)gestureRecognizer:(id)arg1 canBePreventedByGestureRecognizer:(id)arg2;

- (BOOL)gestureRecognizer:(id)arg1 canPreventGestureRecognizer:(id)arg2;

- (BOOL)gestureRecognizer:(id)arg1 shouldReceiveTouch:(id)arg2;

- (void)installGestureRecognizers;

- (BOOL)willInteractWithLocation:(struct CGPoint)arg1;

- (BOOL)isInInteraction;

- (BOOL)startActionSheet;

- (void)validateInteractionWithLocation:(struct CGPoint)arg1;

- (void)tapInteractionWithLocation:(struct CGPoint)arg1;

- (void)continueInteractionWithLocation:(struct CGPoint)arg1;

- (void)startInteractionWithLocation:(struct CGPoint)arg1;

- (void)_resetInteractionWithLocation:(struct CGPoint)arg1;

- (void)performInteractionSelector:(SEL)arg1 afterDelay:(double)arg2;

- (void)clearInteractionTimer;

- (struct CGRect)presentationRectInHostViewForSheet:(id)arg1;

- (struct CGRect)initialPresentationRectInHostViewForSheet:(id)arg1;

- (id)hostViewForSheet:(id)arg1;

- (struct CGRect)_presentationRectForSheetGivenPoint:(struct CGPoint)arg1 inHostView:(id)arg2;

- (void)_showDataDetectorsSheet;

- (void)actionDidFinish;

- (void)_showLinkSheet;

- (void)_showImageSheet;

- (void)_createSheetWithElementActions:(id)arg1 showLinkTitle:(BOOL)arg2;

- (void)drawPage:(unsigned int)arg1 withPaginationInfo:(id)arg2;

- (void)_drawPDFPagesForPage:(unsigned int)arg1 withPaginationInfo:(id)arg2;

- (void)endPrintMode;

- (id)beginPrintModeForFrame:(id)arg1 withSize:(struct CGSize)arg2 startOffset:(float)arg3 minimumLayoutWidth:(float)arg4 maximumLayoutWidth:(float)arg5 tileClippedContent:(BOOL)arg6;

- (id)beginPrintModeWithSize:(struct CGSize)arg1 startOffset:(float)arg2 minimumLayoutWidth:(float)arg3 maximumLayoutWidth:(float)arg4 tileClippedContent:(BOOL)arg5;

- (id)beginPrintModeForFrame:(id)arg1 withWidth:(float)arg2 height:(float)arg3 startOffset:(float)arg4 shrinkToFit:(BOOL)arg5 tileClippedContent:(BOOL)arg6;

- (id)beginPrintModeWithWidth:(float)arg1 height:(float)arg2 startOffset:(float)arg3 shrinkToFit:(BOOL)arg4 tileClippedContent:(BOOL)arg5;

- (id)beginPrintModeWithWidth:(float)arg1 height:(float)arg2 startOffset:(float)arg3 shrinkToFit:(BOOL)arg4;

- (id)_beginPrintModeForPDFView:(id)arg1 withSize:(struct CGSize)arg2 startOffset:(float)arg3 minimumLayoutWidth:(float)arg4 maximumLayoutWidth:(float)arg5;

- (id)_beginPrintModeForHTMLView:(id)arg1 withSize:(struct CGSize)arg2 startOffset:(float)arg3 minimumLayoutWidth:(float)arg4 maximumLayoutWidth:(float)arg5 tileClippedContent:(BOOL)arg6;

- (BOOL)isInPrintMode;

- (struct CGPoint)constrainedPoint:(struct CGPoint)arg1;

- (BOOL)mouseEventsChangeSelection;

- (id)positionAtStartOrEndOfWord:(id)arg1;

- (id)asText;

- (struct CGRect)visibleBounds;

- (id)webVisiblePositionForPoint:(struct CGPoint)arg1;

- (void)setSelectionWithPoint:(struct CGPoint)arg1;

- (void)scrollSelectionToVisible:(BOOL)arg1;

- (void)cancelAutoscroll;

- (void)startAutoscroll:(struct CGPoint)arg1;

- (struct CGRect)contentFrameForView:(id)arg1;

@property(nonatomic) struct CGPoint autoscrollContentOffset;

- (BOOL)selectionIsCaretInDisplayBlockElementAtOffset:(int)arg1;

- (void)setSelectionToStart;

- (void)setSelectionToEnd;

- (void)setRangedSelectionWithExtentPoint:(struct CGPoint)arg1;

- (void)smartExtendRangedSelection:(int)arg1;

- (id)selectionRects;

- (id)selectionRectsForDOMRange:(id)arg1;

- (id)textInDOMRange:(id)arg1;

- (void)setSelectedDOMRange:(id)arg1 affinity:(int)arg2;

- (id)wordAtPoint:(struct CGPoint)arg1;

- (void)setSelectionWithFirstPoint:(struct CGPoint)arg1 secondPoint:(struct CGPoint)arg2;

- (void)setRangedSelectionExtentPoint:(struct CGPoint)arg1 baseIsStart:(BOOL)arg2 allowFlipping:(BOOL)arg3;

- (BOOL)setRangedSelectionExtentPoint:(struct CGPoint)arg1 baseIsStart:(BOOL)arg2;

- (void)setRangedSelectionInitialExtentToCurrentSelectionEnd;

- (void)setRangedSelectionInitialExtentToCurrentSelectionStart;

- (void)clearRangedSelectionInitialExtent;

- (void)setRangedSelectionBaseToCurrentSelectionEnd;

- (void)setRangedSelectionBaseToCurrentSelectionStart;

- (void)setRangedSelectionBaseToCurrentSelection;

- (void)setBaseWritingDirection:(int)arg1;

- (void)toggleBaseWritingDirection;

- (int)selectionBaseWritingDirection;

- (struct CGRect)caretRectForVisiblePosition:(id)arg1;

- (struct CGRect)caretRect;

- (struct UIEdgeInsets)caretInsets;

- (void)setCaretInsets:(struct UIEdgeInsets)arg1;

- (void)collapseSelection;

@property(readonly, nonatomic) int selectionState;

- (unsigned int)offsetInMarkedTextForSelection:(id)arg1;

- (struct CGRect)closestCaretRectInMarkedTextRangeForPoint:(struct CGPoint)arg1;

- (BOOL)hasMarkedText;

- (BOOL)hasEditableSelection;

- (void)clearSelection;

- (void)selectionChanged:(id)arg1;

- (void)selectionChanged;

- (struct CGPoint)convertPointToSelectedFrameCoordinates:(struct CGPoint)arg1;

- (struct CGRect)convertRectFromSelectedFrameCoordinates:(struct CGRect)arg1;

- (void)selectWord;

- (Class)_printFormatterClass;

// Remaining properties

@property(nonatomic) BOOL acceptsEmoji; // @dynamic acceptsEmoji;

@property(nonatomic) BOOL acceptsFloatingKeyboard;

@property(nonatomic) BOOL acceptsSplitKeyboard;

@property(nonatomic) int autocapitalizationType; // @dynamic autocapitalizationType;

@property(nonatomic) int autocorrectionType; // @dynamic autocorrectionType;

@property(nonatomic) BOOL contentsIsSingleValue; // @dynamic contentsIsSingleValue;

@property(nonatomic) BOOL deferBecomingResponder;

@property(nonatomic) BOOL displaySecureTextUsingPlainText;

@property(nonatomic) int emptyContentReturnKeyType;

@property(nonatomic) BOOL enablesReturnKeyAutomatically; // @dynamic enablesReturnKeyAutomatically;

@property(nonatomic) BOOL forceEnableDictation;

@property(retain, nonatomic) UIColor *insertionPointColor; // @dynamic insertionPointColor;

@property(nonatomic) unsigned int insertionPointWidth; // @dynamic insertionPointWidth;

@property(nonatomic) int keyboardAppearance; // @dynamic keyboardAppearance;

@property(nonatomic) int keyboardType; // @dynamic keyboardType;

@property(nonatomic) BOOL learnsCorrections;

@property(nonatomic) BOOL returnKeyGoesToNextResponder;

@property(nonatomic) int returnKeyType; // @dynamic returnKeyType;

@property(nonatomic, getter=isSecureTextEntry) BOOL secureTextEntry; // @dynamic secureTextEntry;

@property(retain, nonatomic) UIColor *selectionBarColor; // @dynamic selectionBarColor;

@property(retain, nonatomic) UIImage *selectionDragDotImage; // @dynamic selectionDragDotImage;

@property(retain, nonatomic) UIColor *selectionHighlightColor; // @dynamic selectionHighlightColor;

@property(nonatomic) int shortcutConversionType; // @dynamic shortcutConversionType;

@property(nonatomic) int spellCheckingType; // @dynamic spellCheckingType;

@property(nonatomic) BOOL suppressReturnKeyStyling;

@property(readonly, nonatomic) UIView *textInputView;

@property(nonatomic) int textLoupeVisibility; // @dynamic textLoupeVisibility;

@property(nonatomic) int textSelectionBehavior; // @dynamic textSelectionBehavior;

@property(nonatomic) id textSuggestionDelegate; // @dynamic textSuggestionDelegate;

@property(nonatomic) struct __CFCharacterSet *textTrimmingSet; // @dynamic textTrimmingSet;

@property(nonatomic) BOOL useInterfaceLanguageForLocalization;

@end

UIWebDocumentView和WebView一样是个很大的类,单看它所遵守的协议那么多也足以让人吃一惊。先看看它重要的成员变量吧:

WKWindow是WAKWindow的C语言实现,类似的,WKView是WAKView的底层实现。WAKView的addSubview的操作实际对应了一个C函数

_WKViewAddSubview(WKView* aInstance)

暂未有空去确定C实现的原因,目前猜测是方便其它模块用Core Foundation来实现吧。

这个他们的声明:

[cpp] view
plaincopy

struct WKView {

struct _WKObject _field1;

struct _WKViewContext *_field2;

struct WKWindow *_field3;

struct WKView *_field4;

struct __CFArray *_field5;

struct CGPoint _field6;

struct CGRect _field7;

unsigned int _field8;

float _field9;

void *_field10;

};

struct WKWindow {

struct _WKObject _field1;

id _field2;

struct WKView *_field3;

struct WKView *_field4;

struct WKView *_field5;

};

WebViewReachabilityObserver这个类是用作监控网络状态的,如wifi已连接、网络已断开等状态。

id _delegate会指向一个UIWebView对象,如后面提到的一些来自WebView的通知会通过_delegate再转发给UIWebView。

int _orientation记录了屏幕的方向
三个名字跟overflowScrollViews有关的NSMutableSet是用来保存UIWebOverflowScrollView的,当css属性带有-webkit-overflow-scrolling : touch时会用到这些东西。

NSArray *_additionalSubviews保存附件的view,除了上面的UIWebOverflowScrollView,还可以是视频View(FigPluginView)。

几个手势识别器请参考《iOS私有API(三)
UIWebView下的手势识别器gestureRecognizer》

结构体_interaction把交互相关的成员变量放在了一起,每个变量都基本见名知意了。

两个UIWebDocumentViewViewportConfiguration保存了默认和当前的viewport设置。

其他变量还有:fixed元素的位置偏移,document的scale,undoManager,检查文字拼写的UITextChecker,文件上传面板以及很多声明为只用一个字节的状态参数。

从函数名看:

应用显示点击高亮框的UIHighlightView
提供网页内容选择的接口来传递信息到WebView
提供UIWebTiledView需要的layerClass以及绘图缓存IOSurface
把单击、双击、缩放、键盘等事件传递到WebView
负责网页输入框的处理
接收WebView的回调通知,包括网页已收到数据、完成排版、第一次绘制完毕等

总之,取名UIWeb“Document”View也有类似JavaScript中的document的意思,是操纵网页的中枢。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: