WebCore:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Oct 2006 05:04:54 +0000 (05:04 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Oct 2006 05:04:54 +0000 (05:04 +0000)
        Reviewed by Anders.

        - removed 55 methods from WebCoreFrameBridge
        - changed callers to use Frame directly instead
        - put FrameLoaderTypes.h types into the WebCore namespace
        - first steps to get FrameLoader.h ready for cross-platform duty

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * bridge/mac/BrowserExtensionMac.mm:
        (WebCore::BrowserExtensionMac::createNewWindow):
        * bridge/mac/FrameMac.h:
        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::loadRequest):
        (WebCore::FrameMac::startRedirectionTimer):
        (WebCore::FrameMac::stopRedirectionTimer):
        (WebCore::FrameMac::passSubframeEventToSubframe):
        (WebCore::FrameMac::handledOnloadEvents):
        (WebCore::FrameMac::isLoadTypeReload):
        * bridge/mac/WebCoreFrameBridge.h:
        * bridge/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge executionContextForView:]):
        (updateRenderingForBindings):
        (-[WebCoreFrameBridge canTargetLoadInFrame:]):
        (-[WebCoreFrameBridge forceLayoutAdjustingViewSize:]):
        (-[WebCoreFrameBridge forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
        (-[WebCoreFrameBridge installInFrame:]):
        (-[WebCoreFrameBridge numPendingOrLoadingRequests]):
        (-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
        (-[WebCoreFrameBridge baseWritingDirectionForSelectionStart]):
        (-[WebCoreFrameBridge dragOperationForDraggingInfo:]):
        (stringByCollapsingNonPrintingCharacters):
        (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:]):
        (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:postData:]):
        (-[WebCoreFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
        * loader/FrameLoaderTypes.h:
        * loader/mac/FrameLoader.h:
        * loader/mac/FrameLoader.mm:
        (WebCore::FrameLoader::FrameLoader):
        (WebCore::FrameLoader::setupForReplace):
        (WebCore::FrameLoader::load):
        (WebCore::FrameLoader::activeDocumentLoader):
        (WebCore::FrameLoader::state):
        (WebCore::FrameLoader::setState):
        (WebCore::FrameLoader::clearProvisionalLoad):
        (WebCore::FrameLoader::markLoadComplete):
        (WebCore::FrameLoader::commitProvisionalLoad):
        (WebCore::FrameLoader::receivedMainResourceError):
        (WebCore::FrameLoader::handleFallbackContent):
        (WebCore::FrameLoader::isLoadingMainFrame):
        (WebCore::FrameLoader::continueAfterNewWindowPolicy):
        (WebCore::FrameLoader::continueAfterNavigationPolicy):
        (WebCore::FrameLoader::continueAfterWillSubmitForm):
        (WebCore::FrameLoader::continueLoadRequestAfterNavigationPolicy):
        (WebCore::FrameLoader::transitionToCommitted):
        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
        (WebCore::FrameLoader::continueLoadRequestAfterNewWindowPolicy):
        (-[WebCoreFrameLoaderAsDelegate continueAfterNewWindowPolicy:]):
        (-[WebCoreFrameLoaderAsDelegate continueAfterNavigationPolicy:]):
        (-[WebCoreFrameLoaderAsDelegate continueAfterWillSubmitForm:]):
        * loader/mac/ImageDocumentMac.mm:
        (WebCore::finishImageLoad):
        * loader/mac/WebDocumentLoader.mm:
        (WebCore::DocumentLoader::isLoadingInAPISense):
        * loader/mac/WebMainResourceLoader.h:
        * loader/mac/WebMainResourceLoader.mm:
        (WebCore::MainResourceLoader::continueAfterContentPolicy):
        (-[WebCoreMainResourceLoaderAsPolicyDelegate continueAfterContentPolicy:]):
        * loader/mac/WebSubresourceLoader.mm:
        (-[WebCoreSubresourceHandle initWithLoader:]):
        * platform/mac/ListBoxMac.mm:
        (-[WebCoreTableView keyDown:]):
        (-[WebCoreTableView keyUp:]):
        * platform/mac/WebCoreTextField.mm:
        (-[WebCoreTextFieldController textView:shouldHandleEvent:]):

WebKit:

        Reviewed by Anders.

        - removed 55 methods from WebCoreFrameBridge
        - changed callers to use Frame directly instead
        - put FrameLoaderTypes.h types into the WebCore namespace
        - first steps to get FrameLoader.h ready for cross-platform duty

        * DefaultDelegates/WebDefaultContextMenuDelegate.m:
        (-[WebDefaultUIDelegate openNewWindowWithURL:element:]):
        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView requestWithURLCString:]):
        (-[WebBaseNetscapePluginView loadPluginRequest:]):
        (-[WebBaseNetscapePluginView getVariable:value:]):
        * Plugins/WebNetscapePluginEmbeddedView.m:
        (-[WebNetscapePluginEmbeddedView didStart]):
        * Plugins/WebNetscapePluginStream.mm:
        * Plugins/WebPluginContainerCheck.m:
        (-[WebPluginContainerCheck _continueWithPolicy:]):
        (-[WebPluginContainerCheck _isForbiddenFileLoad]):
        * WebCoreSupport/WebEditorClient.mm:
        (WebEditorClient::shouldDeleteRange):
        (WebEditorClient::shouldShowDeleteInterface):
        * WebCoreSupport/WebFrameBridge.mm:
        (-[WebFrameBridge webView]):
        (-[WebFrameBridge finishInitializingWithFrameName:view:]):
        (-[WebFrameBridge createWindowWithURL:]):
        (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
        (-[WebFrameBridge windowObjectCleared]):
        (-[WebFrameBridge createModalDialogWithURL:]):
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::dispatchCreatePage):
        (WebFrameLoaderClient::dispatchWillSubmitForm):
        * WebKit.xcodeproj/project.pbxproj:
        * WebView/WebArchiver.m:
        (+[WebArchiver archiveSelectionInFrame:]):
        * WebView/WebDataSource.mm:
        (-[WebDataSource _documentFragmentWithImageResource:]):
        (-[WebDataSource _imageElementWithImageResource:]):
        * WebView/WebEditingDelegatePrivate.h:
        * WebView/WebFrame.mm:
        (core):
        (kit):
        (-[WebFrame _createItemTreeWithTargetFrame:clippedAtTarget:]):
        (-[WebFrame _canCachePage]):
        (-[WebFrame _childFramesMatchItem:]):
        (-[WebFrame _URLsMatchItem:]):
        (-[WebFrame _loadItem:withLoadType:]):
        (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]):
        (-[WebFrame _viewWillMoveToHostWindow:]):
        (-[WebFrame _viewDidMoveToHostWindow]):
        (-[WebFrame _addChild:]):
        (-[WebFrame _saveDocumentAndScrollState]):
        (-[WebFrame _numPendingOrLoadingRequests:]):
        (-[WebFrame _reloadForPluginChanges]):
        (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
        (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
        (-[WebFrame _initWithWebFrameView:webView:coreFrame:]):
        (-[WebFrame _documentViews]):
        (-[WebFrame _updateBackground]):
        (-[WebFrame _unmarkAllMisspellings]):
        (-[WebFrame _hasSelection]):
        (-[WebFrame _atMostOneFrameHasSelection]):
        (-[WebFrame _findFrameWithSelection]):
        (-[WebFrame _frameLoader]):
        (-[WebFrame _isDescendantOfFrame:]):
        (-[WebFrame _setShouldCreateRenderers:]):
        (-[WebFrame _bodyBackgroundColor]):
        (-[WebFrame init]):
        (-[WebFrame initWithName:webFrameView:webView:]):
        (-[WebFrame dealloc]):
        (-[WebFrame finalize]):
        (-[WebFrame name]):
        (-[WebFrame webView]):
        (-[WebFrame DOMDocument]):
        (-[WebFrame frameElement]):
        (-[WebFrame findFrameNamed:]):
        (-[WebFrame parentFrame]):
        (-[WebFrame childFrames]):
        (-[WebFrame _invalidateCurrentItemPageCache]):
        (-[WebFrame _dispatchCreateWebViewWithRequest:]):
        (-[WebFrame _dispatchSourceFrame:willSubmitForm:withValues:submissionDecider:]):
        (-[WebFrame _prepareForDataSourceReplacement]):
        (-[WebFrame _provisionalLoadStarted]):
        * WebView/WebFrameInternal.h:
        * WebView/WebHTMLRepresentation.m:
        (-[WebHTMLRepresentation DOMDocument]):
        (-[WebHTMLRepresentation attributedText]):
        * WebView/WebHTMLView.m:
        (-[WebHTMLView _documentRange]):
        (-[WebHTMLView _documentFragmentWithPaths:]):
        (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
        (-[WebHTMLView _selectedRange]):
        (-[WebHTMLView _updateMouseoverWithEvent:]):
        (-[WebHTMLView _canEditRichly]):
        (-[WebHTMLView _hasSelection]):
        (-[WebHTMLView _hasSelectionOrInsertionPoint]):
        (-[WebHTMLView _hasInsertionPoint]):
        (-[WebHTMLView _isEditable]):
        (-[WebHTMLView _isSelectionInPasswordField]):
        (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
        (-[WebHTMLView _selectionDraggingImage]):
        (-[WebHTMLView _canIncreaseSelectionListLevel]):
        (-[WebHTMLView _canDecreaseSelectionListLevel]):
        (-[WebHTMLView _updateActiveState]):
        (-[NSArray readSelectionFromPasteboard:]):
        (-[NSArray validateUserInterfaceItem:]):
        (-[NSArray maintainsInactiveSelection]):
        (-[NSArray menuForEvent:]):
        (-[NSArray scrollWheel:]):
        (-[NSArray acceptsFirstMouse:]):
        (-[NSArray shouldDelayWindowOrderingForEvent:]):
        (-[NSArray mouseDown:]):
        (-[NSArray mouseDragged:]):
        (-[NSArray mouseUp:]):
        (-[NSArray keyDown:]):
        (-[NSArray keyUp:]):
        (-[NSArray centerSelectionInVisibleArea:]):
        (-[NSArray _selectionStartFontAttributesAsRTF]):
        (-[NSArray _emptyStyle]):
        (-[NSArray performKeyEquivalent:]):
        (-[NSArray indent:]):
        (-[NSArray outdent:]):
        (-[WebHTMLView cut:]):
        (-[WebHTMLView paste:]):
        (-[WebHTMLView _selectRangeInMarkedText:]):
        (-[WebTextCompleteController doCompletion]):
        (-[WebHTMLView selectionRect]):
        (-[WebHTMLView selectionImageForcingWhiteText:]):
        (-[WebHTMLView selectionImageRect]):
        (-[WebHTMLView attributedString]):
        (-[WebHTMLView _isMoveDrag]):
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]):
        * WebView/WebPolicyDelegate.mm:
        (-[WebPolicyDecisionListener _usePolicy:]):
        (-[WebPolicyDecisionListener use]):
        (-[WebPolicyDecisionListener ignore]):
        (-[WebPolicyDecisionListener download]):
        (-[WebPolicyDecisionListener continue]):
        * WebView/WebScriptDebugDelegate.m:
        (-[WebScriptCallFrame _initWithFrame:initWithWebFrame:]):
        (-[WebScriptCallFrame globalObject]):
        * WebView/WebView.mm:
        (-[WebView _attachScriptDebuggerToAllFrames]):
        (-[WebView _detachScriptDebuggerFromAllFrames]):
        (-[WebView windowScriptObject]):
        (incrementFrame):
        (-[WebView searchFor:direction:caseSensitive:wrap:]):
        (-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]):
        (-[WebView removeDragCaret]):
        (-[WebView setScriptDebugDelegate:]):
        (-[WebView scriptDebugDelegate]):
        (-[WebView shouldClose]):
        (-[WebView selectedDOMRange]):
        (-[WebView styleDeclarationWithText:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17299 268f45cc-cd09-0410-ab3c-d52691b4dbfc

40 files changed:
WebCore/ChangeLog
WebCore/WebCore.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bridge/mac/BrowserExtensionMac.mm
WebCore/bridge/mac/FrameMac.h
WebCore/bridge/mac/FrameMac.mm
WebCore/bridge/mac/WebCoreFrameBridge.h
WebCore/bridge/mac/WebCoreFrameBridge.mm
WebCore/loader/FrameLoaderTypes.h
WebCore/loader/mac/FrameLoader.h
WebCore/loader/mac/FrameLoader.mm
WebCore/loader/mac/ImageDocumentMac.mm
WebCore/loader/mac/WebDocumentLoader.mm
WebCore/loader/mac/WebFormState.h
WebCore/loader/mac/WebFormState.mm
WebCore/loader/mac/WebMainResourceLoader.h
WebCore/loader/mac/WebMainResourceLoader.mm
WebCore/loader/mac/WebSubresourceLoader.mm
WebCore/platform/mac/ListBoxMac.mm
WebCore/platform/mac/WebCoreTextField.mm
WebKit/ChangeLog
WebKit/DefaultDelegates/WebDefaultContextMenuDelegate.m
WebKit/Plugins/WebBaseNetscapePluginView.mm
WebKit/Plugins/WebNetscapePluginEmbeddedView.m
WebKit/Plugins/WebNetscapePluginStream.mm
WebKit/Plugins/WebPluginContainerCheck.m
WebKit/WebCoreSupport/WebEditorClient.mm
WebKit/WebCoreSupport/WebFrameBridge.mm
WebKit/WebCoreSupport/WebFrameLoaderClient.mm
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/WebView/WebArchiver.m
WebKit/WebView/WebDataSource.mm
WebKit/WebView/WebEditingDelegatePrivate.h
WebKit/WebView/WebFrame.mm
WebKit/WebView/WebFrameInternal.h
WebKit/WebView/WebHTMLRepresentation.m
WebKit/WebView/WebHTMLView.m
WebKit/WebView/WebPolicyDelegate.mm
WebKit/WebView/WebScriptDebugDelegate.m
WebKit/WebView/WebView.mm

index bb056c65fa36bce1229fe3e82318d9d7f5627d49..b1f1ebd7d476d91364aa8bbee2d7022f4aaaa63e 100644 (file)
@@ -1,3 +1,81 @@
+2006-10-25  Darin Adler  <darin@apple.com>
+
+        Reviewed by Anders.
+
+        - removed 55 methods from WebCoreFrameBridge
+        - changed callers to use Frame directly instead
+        - put FrameLoaderTypes.h types into the WebCore namespace
+        - first steps to get FrameLoader.h ready for cross-platform duty
+
+        * WebCore.exp:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bridge/mac/BrowserExtensionMac.mm:
+        (WebCore::BrowserExtensionMac::createNewWindow):
+        * bridge/mac/FrameMac.h:
+        * bridge/mac/FrameMac.mm:
+        (WebCore::FrameMac::loadRequest):
+        (WebCore::FrameMac::startRedirectionTimer):
+        (WebCore::FrameMac::stopRedirectionTimer):
+        (WebCore::FrameMac::passSubframeEventToSubframe):
+        (WebCore::FrameMac::handledOnloadEvents):
+        (WebCore::FrameMac::isLoadTypeReload):
+        * bridge/mac/WebCoreFrameBridge.h:
+        * bridge/mac/WebCoreFrameBridge.mm:
+        (-[WebCoreFrameBridge executionContextForView:]):
+        (updateRenderingForBindings):
+        (-[WebCoreFrameBridge canTargetLoadInFrame:]):
+        (-[WebCoreFrameBridge forceLayoutAdjustingViewSize:]):
+        (-[WebCoreFrameBridge forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
+        (-[WebCoreFrameBridge installInFrame:]):
+        (-[WebCoreFrameBridge numPendingOrLoadingRequests]):
+        (-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
+        (-[WebCoreFrameBridge baseWritingDirectionForSelectionStart]):
+        (-[WebCoreFrameBridge dragOperationForDraggingInfo:]):
+        (stringByCollapsingNonPrintingCharacters):
+        (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:]):
+        (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:postData:]):
+        (-[WebCoreFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
+        * loader/FrameLoaderTypes.h:
+        * loader/mac/FrameLoader.h:
+        * loader/mac/FrameLoader.mm:
+        (WebCore::FrameLoader::FrameLoader):
+        (WebCore::FrameLoader::setupForReplace):
+        (WebCore::FrameLoader::load):
+        (WebCore::FrameLoader::activeDocumentLoader):
+        (WebCore::FrameLoader::state):
+        (WebCore::FrameLoader::setState):
+        (WebCore::FrameLoader::clearProvisionalLoad):
+        (WebCore::FrameLoader::markLoadComplete):
+        (WebCore::FrameLoader::commitProvisionalLoad):
+        (WebCore::FrameLoader::receivedMainResourceError):
+        (WebCore::FrameLoader::handleFallbackContent):
+        (WebCore::FrameLoader::isLoadingMainFrame):
+        (WebCore::FrameLoader::continueAfterNewWindowPolicy):
+        (WebCore::FrameLoader::continueAfterNavigationPolicy):
+        (WebCore::FrameLoader::continueAfterWillSubmitForm):
+        (WebCore::FrameLoader::continueLoadRequestAfterNavigationPolicy):
+        (WebCore::FrameLoader::transitionToCommitted):
+        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
+        (WebCore::FrameLoader::continueLoadRequestAfterNewWindowPolicy):
+        (-[WebCoreFrameLoaderAsDelegate continueAfterNewWindowPolicy:]):
+        (-[WebCoreFrameLoaderAsDelegate continueAfterNavigationPolicy:]):
+        (-[WebCoreFrameLoaderAsDelegate continueAfterWillSubmitForm:]):
+        * loader/mac/ImageDocumentMac.mm:
+        (WebCore::finishImageLoad):
+        * loader/mac/WebDocumentLoader.mm:
+        (WebCore::DocumentLoader::isLoadingInAPISense):
+        * loader/mac/WebMainResourceLoader.h:
+        * loader/mac/WebMainResourceLoader.mm:
+        (WebCore::MainResourceLoader::continueAfterContentPolicy):
+        (-[WebCoreMainResourceLoaderAsPolicyDelegate continueAfterContentPolicy:]):
+        * loader/mac/WebSubresourceLoader.mm:
+        (-[WebCoreSubresourceHandle initWithLoader:]):
+        * platform/mac/ListBoxMac.mm:
+        (-[WebCoreTableView keyDown:]):
+        (-[WebCoreTableView keyUp:]):
+        * platform/mac/WebCoreTextField.mm:
+        (-[WebCoreTextFieldController textView:shouldHandleEvent:]):
+
 2006-10-25  Steve Falkenburg  <sfalken@apple.com>
 
         Reviewed by Darin.
index 40460ac5eda86879106f194c249a8afd9fac068e..686691e6785a844f38b83fd224d8286f54194b14 100644 (file)
@@ -135,8 +135,8 @@ __ZN7WebCore11FrameLoader11stopLoadingEv
 __ZN7WebCore11FrameLoader12shouldReloadEP5NSURLS2_
 __ZN7WebCore11FrameLoader14detachChildrenEv
 __ZN7WebCore11FrameLoader16detachFromParentEv
-__ZN7WebCore11FrameLoader17actionInformationE13FrameLoadTypebP7NSEventP5NSURL
-__ZN7WebCore11FrameLoader17actionInformationE14NavigationTypeP7NSEventP5NSURL
+__ZN7WebCore11FrameLoader17actionInformationENS_13FrameLoadTypeEbP7NSEventP5NSURL
+__ZN7WebCore11FrameLoader17actionInformationENS_14NavigationTypeEP7NSEventP5NSURL
 __ZN7WebCore11FrameLoader21addPlugInStreamLoaderEPNS_17WebResourceLoaderE
 __ZN7WebCore11FrameLoader21commitProvisionalLoadEP12NSDictionary
 __ZN7WebCore11FrameLoader22defersCallbacksChangedEv
@@ -146,14 +146,16 @@ __ZN7WebCore11FrameLoader23timeOfLastCompletedLoadEv
 __ZN7WebCore11FrameLoader24removePlugInStreamLoaderEPNS_17WebResourceLoaderE
 __ZN7WebCore11FrameLoader25provisionalDocumentLoaderEv
 __ZN7WebCore11FrameLoader4loadEP12NSURLRequest
-__ZN7WebCore11FrameLoader4loadEP12NSURLRequestP12NSDictionary13FrameLoadTypeN3WTF10PassRefPtrINS_9FormStateEEE
+__ZN7WebCore11FrameLoader4loadEP12NSURLRequestP12NSDictionaryNS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE
 __ZN7WebCore11FrameLoader4loadEP12NSURLRequestP8NSString
-__ZN7WebCore11FrameLoader4loadEP5NSURLP8NSString13FrameLoadTypeS4_P7NSEventP10DOMElementP12NSDictionary
+__ZN7WebCore11FrameLoader4loadEP5NSURLP8NSStringNS_13FrameLoadTypeES4_P7NSEventPNS_7ElementEP12NSDictionary
 __ZN7WebCore11FrameLoader4loadEPNS_14DocumentLoaderE
-__ZN7WebCore11FrameLoader4loadEPNS_14DocumentLoaderE13FrameLoadTypeN3WTF10PassRefPtrINS_9FormStateEEE
+__ZN7WebCore11FrameLoader4loadEPNS_14DocumentLoaderENS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE
 __ZN7WebCore11FrameLoader6reloadEv
 __ZN7WebCore11FrameLoader8safeLoadEP5NSURL
 __ZN7WebCore11FrameLoader9setClientEPNS_17FrameLoaderClientE
+__ZN7WebCore11RenderLayer18gAlignCenterAlwaysE
+__ZN7WebCore12AtomicString3addEPNS_10StringImplE
 __ZN7WebCore14DocumentLoader12setCommittedEb
 __ZN7WebCore14DocumentLoader13attachToFrameEv
 __ZN7WebCore14DocumentLoader15detachFromFrameEv
@@ -167,22 +169,42 @@ __ZN7WebCore16DeprecatedStringD1Ev
 __ZN7WebCore17FrameLoaderClientD2Ev
 __ZN7WebCore17WebResourceLoader14cancelledErrorEv
 __ZN7WebCore17WebResourceLoader20inConnectionCallbackEv
-__ZN7WebCore21isBackForwardLoadTypeE13FrameLoadType
+__ZN7WebCore19SelectionController5clearEv
+__ZN7WebCore21isBackForwardLoadTypeENS_13FrameLoadTypeE
 __ZN7WebCore26NetscapePlugInStreamLoader6createEPNS_5FrameEP11objc_object
 __ZN7WebCore4KURLC1EP5NSURL
+__ZN7WebCore5Frame11setSettingsEPNS_8SettingsE
+__ZN7WebCore5Frame12canCachePageEv
+__ZN7WebCore5Frame12ownerElementEv
 __ZN7WebCore5Frame14scrollToAnchorERKNS_4KURLE
+__ZN7WebCore5Frame17setWindowHasFocusEb
 __ZN7WebCore5Frame20setSelectionFromNoneEv
 __ZN7WebCore5Frame21setProhibitsScrollingEb
+__ZN7WebCore5Frame26isSelectionInPasswordFieldEv
 __ZN7WebCore5Frame6indentEv
 __ZN7WebCore5Frame7outdentEv
+__ZN7WebCore5RangeD1Ev
+__ZN7WebCore6StringC1EP8NSString
+__ZN7WebCore8FrameMac10mouseMovedEP7NSEvent
 __ZN7WebCore8FrameMac10wheelEventEP7NSEvent
 __ZN7WebCore8FrameMac11mayDHTMLCutEv
+__ZN7WebCore8FrameMac11shouldCloseEv
 __ZN7WebCore8FrameMac11tryDHTMLCutEv
 __ZN7WebCore8FrameMac12mayDHTMLCopyEv
+__ZN7WebCore8FrameMac12mouseDraggedEP7NSEvent
 __ZN7WebCore8FrameMac12tryDHTMLCopyEv
 __ZN7WebCore8FrameMac13mayDHTMLPasteEv
 __ZN7WebCore8FrameMac13tryDHTMLPasteEv
+__ZN7WebCore8FrameMac18windowScriptObjectEv
+__ZN7WebCore8FrameMac20sendContextMenuEventEP7NSEvent
+__ZN7WebCore8FrameMac20windowScriptNPObjectEv
 __ZN7WebCore8FrameMac26dashboardRegionsDictionaryEv
+__ZN7WebCore8FrameMac7mouseUpEP7NSEvent
+__ZN7WebCore8FrameMac8keyEventEP7NSEvent
+__ZN7WebCore8FrameMac9mouseDownEP7NSEvent
+__ZN7WebCore9FrameTree11appendChildEN3WTF10PassRefPtrINS_5FrameEEE
+__ZN7WebCore9FrameTree7setNameERKNS_12AtomicStringE
+__ZNK7WebCore10StringImplcvP8NSStringEv
 __ZNK7WebCore11FrameLoader14documentLoaderEv
 __ZNK7WebCore11FrameLoader15defersCallbacksEv
 __ZNK7WebCore11FrameLoader15firstLayoutDoneEv
@@ -208,15 +230,36 @@ __ZNK7WebCore14DocumentLoader8responseEv
 __ZNK7WebCore14DocumentLoader9isLoadingEv
 __ZNK7WebCore17WebResourceLoader11frameLoaderEv
 __ZNK7WebCore26NetscapePlugInStreamLoader6isDoneEv
+__ZNK7WebCore4Page19dragCaretControllerEv
+__ZNK7WebCore5Frame13selectionRectEv
 __ZNK7WebCore5Frame15containsPluginsEv
+__ZNK7WebCore5Frame15revealSelectionERKNS_11RenderLayer15ScrollAlignmentE
 __ZNK7WebCore5Frame16inViewSourceModeEv
+__ZNK7WebCore5Frame19selectionControllerEv
 __ZNK7WebCore5Frame19setInViewSourceModeEb
+__ZNK7WebCore5Frame20visibleSelectionRectEv
 __ZNK7WebCore5Frame30applyEditingStyleToBodyElementEv
 __ZNK7WebCore5Frame33removeEditingStyleFromBodyElementEv
+__ZNK7WebCore5Frame4pageEv
 __ZNK7WebCore5Frame4treeEv
 __ZNK7WebCore5Frame6loaderEv
+__ZNK7WebCore5Frame8documentEv
+__ZNK7WebCore5Frame8referrerEv
+__ZNK7WebCore7IntRectcv7_NSRectEv
+__ZNK7WebCore8FrameMac14selectionImageEb
 __ZNK7WebCore8FrameMac17eventMayStartDragEP7NSEvent
+__ZNK7WebCore8FrameMac19bodyBackgroundColorEv
 __ZNK7WebCore8FrameMac31fontAttributesForSelectionStartEv
+__ZNK7WebCore9FloatRectcv7_NSRectEv
+__ZNK7WebCore9FrameTree12traverseNextEPNS_5FrameE
+__ZNK7WebCore9FrameTree14isDescendantOfEPNS_5FrameE
+__ZNK7WebCore9FrameTree20traverseNextWithWrapEb
+__ZNK7WebCore9FrameTree24traversePreviousWithWrapEb
+__ZNK7WebCore9FrameTree4findERKNS_12AtomicStringE
+__ZNK7WebCore9FrameTree5childERKNS_12AtomicStringE
+__ZNK7WebCore9Selection17isContentEditableEv
+__ZNK7WebCore9Selection23isContentRichlyEditableEv
+__ZNK7WebCore9Selection7toRangeEv
 __ZTVN7WebCore17FrameLoaderClientE
 _canonicalURL
 _stringIsFileURL
index e48fb5b622d2206acbfd3335a22acf592bae0622..9d87e2bf4b7a54f5f2a181446e9de69cd09801a8 100644 (file)
                6593923A09AE435C002C531F /* KURLMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6593923909AE435C002C531F /* KURLMac.mm */; };
                659DDC8209E198BA001BF3C6 /* JSDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 659DDC8009E198BA001BF3C6 /* JSDocument.cpp */; };
                659DDC8309E198BA001BF3C6 /* JSDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 659DDC8109E198BA001BF3C6 /* JSDocument.h */; };
-               65A21468097A329100B9050A /* Page.h in Headers */ = {isa = PBXBuildFile; fileRef = 65A21467097A329100B9050A /* Page.h */; };
+               65A21468097A329100B9050A /* Page.h in Headers */ = {isa = PBXBuildFile; fileRef = 65A21467097A329100B9050A /* Page.h */; settings = {ATTRIBUTES = (Private, ); }; };
                65A21484097A3F5300B9050A /* FrameTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65A21482097A3F5300B9050A /* FrameTree.cpp */; };
                65A21485097A3F5300B9050A /* FrameTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 65A21483097A3F5300B9050A /* FrameTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
                65BAAABE0ADCA015005BB5A4 /* RetainPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 65BAAABD0ADCA015005BB5A4 /* RetainPtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309E09099E64920056E581 /* ReplaceSelectionCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DBA099E64910056E581 /* ReplaceSelectionCommand.cpp */; };
                93309E0A099E64920056E581 /* ReplaceSelectionCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DBB099E64910056E581 /* ReplaceSelectionCommand.h */; };
                93309E0B099E64920056E581 /* Selection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DBC099E64910056E581 /* Selection.cpp */; };
-               93309E0C099E64920056E581 /* Selection.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DBD099E64910056E581 /* Selection.h */; };
+               93309E0C099E64920056E581 /* Selection.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DBD099E64910056E581 /* Selection.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309E0D099E64920056E581 /* SelectionController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DBE099E64910056E581 /* SelectionController.cpp */; };
-               93309E0E099E64920056E581 /* SelectionController.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DBF099E64910056E581 /* SelectionController.h */; };
+               93309E0E099E64920056E581 /* SelectionController.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DBF099E64910056E581 /* SelectionController.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309E0F099E64920056E581 /* SetNodeAttributeCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DC0099E64910056E581 /* SetNodeAttributeCommand.cpp */; };
                93309E10099E64920056E581 /* SetNodeAttributeCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DC1099E64910056E581 /* SetNodeAttributeCommand.h */; };
                93309E11099E64920056E581 /* SplitElementCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DC2099E64910056E581 /* SplitElementCommand.cpp */; };
                93EEC26F09C3218000C515D1 /* CanvasPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93EEC26E09C3218000C515D1 /* CanvasPattern.cpp */; };
                93EEC27109C3218800C515D1 /* CanvasStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93EEC27009C3218800C515D1 /* CanvasStyle.cpp */; };
                93F198E508245E59001E9ABC /* HTMLDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23C02DE4396018635CA /* HTMLDocument.h */; };
-               93F198E608245E59001E9ABC /* HTMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23F02DE4396018635CA /* HTMLElement.h */; };
+               93F198E608245E59001E9ABC /* HTMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23F02DE4396018635CA /* HTMLElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F198EF08245E59001E9ABC /* HTMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D25102DE4396018635CA /* HTMLParser.h */; };
                93F198F008245E59001E9ABC /* HTMLTokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D25302DE4396018635CA /* HTMLTokenizer.h */; };
                93F198F608245E59001E9ABC /* Decoder.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D27902DE43D7018635CA /* Decoder.h */; };
-               93F1991808245E59001E9ABC /* Range.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D30402DE4476018635CA /* Range.h */; };
+               93F1991808245E59001E9ABC /* Range.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D30402DE4476018635CA /* Range.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F1992108245E59001E9ABC /* XMLTokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D30A02DE4476018635CA /* XMLTokenizer.h */; };
                93F1992908245E59001E9ABC /* DeprecatedCString.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868302DE3B8601EA4122 /* DeprecatedCString.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F1992F08245E59001E9ABC /* Cursor.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868402DE3B8601EA4122 /* Cursor.h */; };
                93F199BD08245E59001E9ABC /* AXObjectCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 55998A5C052B59CC0017A6C1 /* AXObjectCache.h */; };
                93F199BE08245E59001E9ABC /* BlockExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 65A640F00533BB1F0085E777 /* BlockExceptions.h */; settings = {ATTRIBUTES = (); }; };
                93F199C208245E59001E9ABC /* WebCoreKeyGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 84B2B1F7056BEF3A00D2B771 /* WebCoreKeyGenerator.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               93F199CF08245E59001E9ABC /* AtomicStringList.h in Headers */ = {isa = PBXBuildFile; fileRef = BC3B364705C9D5E200E42902 /* AtomicStringList.h */; };
+               93F199CF08245E59001E9ABC /* AtomicStringList.h in Headers */ = {isa = PBXBuildFile; fileRef = BC3B364705C9D5E200E42902 /* AtomicStringList.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F199D508245E59001E9ABC /* WebCoreEditCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = BEF7EEA005FF8F0D009717EE /* WebCoreEditCommand.h */; };
                93F199DE08245E59001E9ABC /* Position.h in Headers */ = {isa = PBXBuildFile; fileRef = BE91FC8B06133666005E3790 /* Position.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F199E008245E59001E9ABC /* Slider.h in Headers */ = {isa = PBXBuildFile; fileRef = BC86FB8D061F5C23006BB822 /* Slider.h */; };
                A80E6D0C0A1989CA007FB8C5 /* CSSStyleRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CE20A1989CA007FB8C5 /* CSSStyleRule.h */; };
                A80E6D0D0A1989CA007FB8C5 /* CSSRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CE30A1989CA007FB8C5 /* CSSRule.h */; };
                A80E6DFB0A199067007FB8C5 /* CSSMutableStyleDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6DF90A199067007FB8C5 /* CSSMutableStyleDeclaration.cpp */; };
-               A80E6DFC0A199067007FB8C5 /* CSSMutableStyleDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6DFA0A199067007FB8C5 /* CSSMutableStyleDeclaration.h */; };
-               A80E6E0F0A19911C007FB8C5 /* CSSStyleDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6E0D0A19911C007FB8C5 /* CSSStyleDeclaration.h */; };
+               A80E6DFC0A199067007FB8C5 /* CSSMutableStyleDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6DFA0A199067007FB8C5 /* CSSMutableStyleDeclaration.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               A80E6E0F0A19911C007FB8C5 /* CSSStyleDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6E0D0A19911C007FB8C5 /* CSSStyleDeclaration.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A80E6E100A19911C007FB8C5 /* CSSStyleDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6E0E0A19911C007FB8C5 /* CSSStyleDeclaration.cpp */; };
                A80E734D0A199C77007FB8C5 /* StyleList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E73460A199C77007FB8C5 /* StyleList.cpp */; };
                A80E734E0A199C77007FB8C5 /* CSSNamespace.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E73470A199C77007FB8C5 /* CSSNamespace.h */; };
                A818721F0977D3C0005826D9 /* ContainerNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A81872140977D3C0005826D9 /* ContainerNode.cpp */; };
                A81872200977D3C0005826D9 /* ChildNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = A81872150977D3C0005826D9 /* ChildNodeList.h */; };
                A81872210977D3C0005826D9 /* NodeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A81872160977D3C0005826D9 /* NodeList.cpp */; };
-               A81872230977D3C0005826D9 /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = A81872180977D3C0005826D9 /* NamedNodeMap.h */; };
+               A81872230977D3C0005826D9 /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = A81872180977D3C0005826D9 /* NamedNodeMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A81872240977D3C0005826D9 /* NameNodeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A81872190977D3C0005826D9 /* NameNodeList.cpp */; };
                A81872250977D3C0005826D9 /* ChildNodeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A818721A0977D3C0005826D9 /* ChildNodeList.cpp */; };
                A82398A609B3ACDB00B60641 /* PlugInInfoStore.h in Headers */ = {isa = PBXBuildFile; fileRef = A82398A509B3ACDB00B60641 /* PlugInInfoStore.h */; };
                A88AD50D095248F0001DD196 /* ksvg.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0F8ED089701F400BA5114 /* ksvg.h */; };
                A88AD52F09524B92001DD196 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A85D7A2F0879EBA9006A9172 /* QuartzCore.framework */; };
                A88AD5AA09525131001DD196 /* SVGCSSStyleSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0F6FB089701F100BA5114 /* SVGCSSStyleSelector.cpp */; };
-               A8C4A7FD09D563270003AC8D /* StyledElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7EB09D563270003AC8D /* StyledElement.h */; };
+               A8C4A7FD09D563270003AC8D /* StyledElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7EB09D563270003AC8D /* StyledElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A8C4A7FE09D563270003AC8D /* StyledElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C4A7EC09D563270003AC8D /* StyledElement.cpp */; };
                A8C4A80009D563270003AC8D /* Node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C4A7EE09D563270003AC8D /* Node.cpp */; };
-               A8C4A80109D563270003AC8D /* NamedMappedAttrMap.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7EF09D563270003AC8D /* NamedMappedAttrMap.h */; };
+               A8C4A80109D563270003AC8D /* NamedMappedAttrMap.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7EF09D563270003AC8D /* NamedMappedAttrMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A8C4A80209D563270003AC8D /* NamedMappedAttrMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C4A7F009D563270003AC8D /* NamedMappedAttrMap.cpp */; };
-               A8C4A80309D563270003AC8D /* NamedAttrMap.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7F109D563270003AC8D /* NamedAttrMap.h */; };
+               A8C4A80309D563270003AC8D /* NamedAttrMap.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7F109D563270003AC8D /* NamedAttrMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A8C4A80409D563270003AC8D /* NamedAttrMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C4A7F209D563270003AC8D /* NamedAttrMap.cpp */; };
-               A8C4A80509D563270003AC8D /* MappedAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7F309D563270003AC8D /* MappedAttribute.h */; };
+               A8C4A80509D563270003AC8D /* MappedAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7F309D563270003AC8D /* MappedAttribute.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A8C4A80609D563270003AC8D /* MappedAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C4A7F409D563270003AC8D /* MappedAttribute.cpp */; };
                A8C4A80709D563270003AC8D /* Element.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7F509D563270003AC8D /* Element.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A8C4A80809D563270003AC8D /* Element.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C4A7F609D563270003AC8D /* Element.cpp */; };
-               A8C4A80909D563270003AC8D /* CSSMappedAttributeDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7F709D563270003AC8D /* CSSMappedAttributeDeclaration.h */; };
+               A8C4A80909D563270003AC8D /* CSSMappedAttributeDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7F709D563270003AC8D /* CSSMappedAttributeDeclaration.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A8C4A80A09D563270003AC8D /* CSSMappedAttributeDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C4A7F809D563270003AC8D /* CSSMappedAttributeDeclaration.cpp */; };
                A8C4A80B09D563270003AC8D /* Attribute.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7F909D563270003AC8D /* Attribute.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A8C4A80C09D563270003AC8D /* Attribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C4A7FA09D563270003AC8D /* Attribute.cpp */; };
                A8C4A80D09D563270003AC8D /* Attr.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7FB09D563270003AC8D /* Attr.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A8C4A80E09D563270003AC8D /* Attr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C4A7FC09D563270003AC8D /* Attr.cpp */; };
-               A8C4A84C09D5649D0003AC8D /* MappedAttributeEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A84B09D5649D0003AC8D /* MappedAttributeEntry.h */; };
+               A8C4A84C09D5649D0003AC8D /* MappedAttributeEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A84B09D5649D0003AC8D /* MappedAttributeEntry.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A8CFF04D0A154F09000A4234 /* FixedTableLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8CFF0480A154F09000A4234 /* FixedTableLayout.cpp */; };
                A8CFF04E0A154F09000A4234 /* AutoTableLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF0490A154F09000A4234 /* AutoTableLayout.h */; };
                A8CFF04F0A154F09000A4234 /* FixedTableLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF04A0A154F09000A4234 /* FixedTableLayout.h */; };
                BC73E25E0978682700EDFF8A /* FloatSize.h in Headers */ = {isa = PBXBuildFile; fileRef = BC73E25C0978682700EDFF8A /* FloatSize.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BC73E3190978AFFC00EDFF8A /* IntPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = BC73E3180978AFFB00EDFF8A /* IntPoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BC73E3920978CED700EDFF8A /* FloatPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC73E3900978CED700EDFF8A /* FloatPoint.cpp */; };
-               BC73E3930978CED700EDFF8A /* FloatPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = BC73E3910978CED700EDFF8A /* FloatPoint.h */; };
+               BC73E3930978CED700EDFF8A /* FloatPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = BC73E3910978CED700EDFF8A /* FloatPoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BC837C720A9D0D1A006B186A /* FloatPointCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC837C670A9D0D1A006B186A /* FloatPointCG.cpp */; };
                BC837C730A9D0D1A006B186A /* FloatRectCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC837C680A9D0D1A006B186A /* FloatRectCG.cpp */; };
                BC837C740A9D0D1A006B186A /* FloatSizeCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC837C690A9D0D1A006B186A /* FloatSizeCG.cpp */; };
                BC9C328B09933A6E001D6924 /* ImageAnimationObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = BC9C328A09933A6D001D6924 /* ImageAnimationObserver.h */; };
                BCAA90C30A7EBA60008B1229 /* ScrollBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCAA90C20A7EBA60008B1229 /* ScrollBar.cpp */; };
                BCB16AF90979A08500467741 /* FloatRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB16AF50979A08500467741 /* FloatRect.cpp */; };
-               BCB16AFA0979A08500467741 /* FloatRect.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16AF60979A08500467741 /* FloatRect.h */; };
+               BCB16AFA0979A08500467741 /* FloatRect.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16AF60979A08500467741 /* FloatRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BCB16AFB0979A08500467741 /* IntRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB16AF70979A08500467741 /* IntRect.cpp */; };
                BCB16AFC0979A08500467741 /* IntRect.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16AF80979A08500467741 /* IntRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BCB16B8B0979B01400467741 /* DeprecatedArray.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16B880979B01400467741 /* DeprecatedArray.h */; settings = {ATTRIBUTES = (Private, ); }; };
index 09f200ba1336f5ef247fcaf91023f4f8d7228980..2fa3f854f7608c3a1a5a2c42405af7db929b9826 100644 (file)
@@ -28,8 +28,8 @@
 
 #import "BlockExceptions.h"
 #import "FloatRect.h"
-#import "FrameMac.h"
 #import "FrameLoadRequest.h"
+#import "FrameMac.h"
 #import "FrameTree.h"
 #import "KURL.h"
 #import "Page.h"
@@ -59,16 +59,11 @@ void BrowserExtensionMac::createNewWindow(const FrameLoadRequest& request,
 
     NSString *frameName = request.m_frameName.isEmpty() ? nil : (NSString*)request.m_frameName;
     if (frameName) {
-        // FIXME: Can't we just use m_frame->findFrame?
-        // ANSWER: No, because such a method doesn't exist - YET
-        if (WebCoreFrameBridge *frameBridge = [m_frame->bridge() findFrameNamed:frameName]) {
+        if (Frame* frame = m_frame->tree()->find(frameName)) {
             if (!url.isEmpty())
-                [frameBridge _frame]->loadRequest(request, true, nil, nil, nil);
-
-            [frameBridge activateWindow];
-
-            newFrame = [frameBridge _frame];
-
+                Mac(frame)->loadRequest(request, true, nil, nil, nil);
+            [Mac(frame)->bridge() activateWindow];
+            newFrame = frame;
             return;
         }
     }
index 77641aceefe465e405de0548b942b5f068293c0a..b40eb87d236e3a9cfe8a4e472afa97c7060baa63 100644 (file)
@@ -48,10 +48,6 @@ namespace KJS {
 
 #ifdef __OBJC__
 
-// Avoid clashes with KJS::DOMElement in KHTML code.
-@class DOMElement;
-typedef DOMElement ObjCDOMElement;
-
 @class WebCorePageState;
 @class NSArray;
 @class NSAttributedString;
@@ -71,9 +67,6 @@ typedef DOMElement ObjCDOMElement;
 
 #else
 
-// Avoid clashes with KJS::DOMElement in KHTML code.
-class ObjCDOMElement;
-
 class WebCorePageState;
 class NSArray;
 class NSAttributedString;
@@ -118,8 +111,8 @@ public:
     FrameMac(Page*, Element*, PassRefPtr<EditorClient>);
     ~FrameMac();
 
-    // FIXME: Merge these and move them into WebFrameLoader.
-    void loadRequest(const FrameLoadRequest&, bool userGesture, NSEvent* triggeringEvent = 0, ObjCDOMElement* submitForm = 0, NSMutableDictionary* formValues = 0);
+    // FIXME: Merge these and move them into FrameLoader.
+    void loadRequest(const FrameLoadRequest&, bool userGesture, NSEvent* triggeringEvent = 0, Element* submitForm = 0, NSMutableDictionary* formValues = 0);
     virtual void urlSelected(const FrameLoadRequest&, const Event* triggeringEvent);
     virtual Frame* createFrame(const KURL&, const String& name, Element* ownerElement, const String& referrer);
     void openURLFromPageCache(WebCorePageState*);
index 5abf6eb7a4d7168f0980c2c608bb335f4cfff478..2bc4d7e10621c6a54c0acb602a464708237be2c1 100644 (file)
@@ -76,6 +76,7 @@
 #import "WebCoreSystemInterface.h"
 #import "WebCoreViewFactory.h"
 #import "WebDashboardRegion.h"
+#import "WebFrameLoaderClient.h"
 #import "WebScriptObjectPrivate.h"
 #import "csshelper.h"
 #import "htmlediting.h"
@@ -182,7 +183,7 @@ FrameMac::~FrameMac()
 
 #pragma mark BEGIN LOADING FUNCTIONS
 
-void FrameMac::loadRequest(const FrameLoadRequest& request, bool userGesture, NSEvent* triggeringEvent, ObjCDOMElement* submitForm, NSMutableDictionary* formValues)
+void FrameMac::loadRequest(const FrameLoadRequest& request, bool userGesture, NSEvent* triggeringEvent, Element* submitForm, NSMutableDictionary* formValues)
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
@@ -191,16 +192,17 @@ void FrameMac::loadRequest(const FrameLoadRequest& request, bool userGesture, NS
     if (!argsReferrer.isEmpty())
         referrer = argsReferrer;
     else
-        referrer = [_bridge referrer];
+        referrer = FrameMac::referrer();
  
     BOOL hideReferrer;
     if (![_bridge canLoadURL:request.m_request.url().getNSURL() fromReferrer:referrer hideReferrer:&hideReferrer])
         return;
+    if (hideReferrer)
+        referrer = nil;
            
-    WebCoreFrameBridge *targetFrame = [_bridge findFrameNamed:request.m_frameName];
-    if (![_bridge canTargetLoadInFrame:targetFrame]) {
+    WebCoreFrameBridge *targetFrame = Mac(tree()->find(request.m_frameName))->bridge();
+    if (![_bridge canTargetLoadInFrame:targetFrame])
         return;
-    }
         
     if (request.m_request.httpMethod() != "POST") {
         FrameLoadType loadType;
@@ -211,10 +213,10 @@ void FrameMac::loadRequest(const FrameLoadRequest& request, bool userGesture, NS
         else
             loadType = FrameLoadTypeStandard;    
     
-        d->m_frameLoader->load(request.m_request.url().getNSURL(), (hideReferrer ? nil : referrer), loadType, 
+        d->m_frameLoader->load(request.m_request.url().getNSURL(), referrer, loadType, 
             (request.m_frameName.length() ? (NSString *)request.m_frameName : nil), triggeringEvent, submitForm, formValues);
     } else
-        d->m_frameLoader->post(request.m_request.url().getNSURL(), (hideReferrer ? nil : referrer), (request.m_frameName.length() ? (NSString *)request.m_frameName : nil), 
+        d->m_frameLoader->post(request.m_request.url().getNSURL(), referrer, (request.m_frameName.length() ? (NSString *)request.m_frameName : nil), 
             arrayFromFormData(request.m_request.httpBody()), request.m_request.httpContentType(), triggeringEvent, submitForm, formValues);
 
     if (targetFrame != nil && _bridge != targetFrame) {
@@ -252,10 +254,9 @@ void FrameMac::submitForm(const FrameLoadRequest& request)
         d->m_submittedFormURL = request.m_request.url();
     }
 
-    ObjCDOMElement* submitForm = [DOMElement _elementWith:d->m_formAboutToBeSubmitted.get()];
     NSMutableDictionary* formValues = createNSDictionary(d->m_formValuesAboutToBeSubmitted);
     
-    loadRequest(request, true, _currentEvent, submitForm, formValues);
+    loadRequest(request, true, _currentEvent, d->m_formAboutToBeSubmitted.get(), formValues);
 
     [formValues release];
     clearRecordedFormValues();
@@ -843,11 +844,8 @@ void FrameMac::startRedirectionTimer()
     if (d->m_scheduledRedirection != historyNavigationScheduled) {
         NSTimeInterval interval = d->m_redirectionTimer.nextFireInterval();
         NSDate *fireDate = [[NSDate alloc] initWithTimeIntervalSinceNow:interval];
-        [_bridge reportClientRedirectToURL:KURL(d->m_redirectURL).getNSURL()
-                                     delay:d->m_delayRedirect
-                                  fireDate:fireDate
-                               lockHistory:d->m_redirectLockHistory
-                               isJavaScriptFormAction:d->m_executingJavaScriptFormAction];
+        loader()->clientRedirected(KURL(d->m_redirectURL).getNSURL(),
+            d->m_delayRedirect, fireDate, d->m_redirectLockHistory, d->m_executingJavaScriptFormAction);
         [fireDate release];
     }
 }
@@ -860,7 +858,7 @@ void FrameMac::stopRedirectionTimer()
 
     // Don't report history navigations, just actual redirection.
     if (wasActive && d->m_scheduledRedirection != historyNavigationScheduled)
-        [_bridge reportClientRedirectCancelled:d->m_cancelWithLoadInProgress];
+        loader()->clientRedirectCancelledOrFinished(d->m_cancelWithLoadInProgress);
 }
 
 String FrameMac::userAgent() const
@@ -1848,43 +1846,36 @@ void FrameMac::handleMouseReleaseEvent(const MouseEventWithHitTestResults& event
     _sendingEventToSubview = false;
 }
 
-bool FrameMac::passSubframeEventToSubframe(MouseEventWithHitTestResults& event, Frame* subframePart)
+bool FrameMac::passSubframeEventToSubframe(MouseEventWithHitTestResults& event, Frame* subframe)
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
 
     switch ([_currentEvent type]) {
-        case NSMouseMoved: {
-            ASSERT(subframePart);
-            [Mac(subframePart)->_bridge mouseMoved:_currentEvent];
+        case NSMouseMoved:
+            Mac(subframe)->mouseMoved(_currentEvent);
             return true;
-        }
         
         case NSLeftMouseDown: {
-            Node *node = event.targetNode();
-            if (!node) {
+            Nodenode = event.targetNode();
+            if (!node)
                 return false;
-            }
             RenderObject *renderer = node->renderer();
-            if (!renderer || !renderer->isWidget()) {
+            if (!renderer || !renderer->isWidget())
                 return false;
-            }
             Widget *widget = static_cast<RenderWidget*>(renderer)->widget();
             if (!widget || !widget->isFrameView())
                 return false;
-            if (!passWidgetMouseDownEventToWidget(static_cast<RenderWidget*>(renderer))) {
+            if (!passWidgetMouseDownEventToWidget(static_cast<RenderWidget*>(renderer)))
                 return false;
-            }
             _mouseDownWasInSubframe = true;
             return true;
         }
         case NSLeftMouseUp: {
-            if (!_mouseDownWasInSubframe) {
+            if (!_mouseDownWasInSubframe)
                 return false;
-            }
             NSView *view = mouseDownViewIfStillGood();
-            if (!view) {
+            if (!view)
                 return false;
-            }
             ASSERT(!_sendingEventToSubview);
             _sendingEventToSubview = true;
             [view mouseUp:_currentEvent];
@@ -1892,13 +1883,11 @@ bool FrameMac::passSubframeEventToSubframe(MouseEventWithHitTestResults& event,
             return true;
         }
         case NSLeftMouseDragged: {
-            if (!_mouseDownWasInSubframe) {
+            if (!_mouseDownWasInSubframe)
                 return false;
-            }
             NSView *view = mouseDownViewIfStillGood();
-            if (!view) {
+            if (!view)
                 return false;
-            }
             ASSERT(!_sendingEventToSubview);
             _sendingEventToSubview = true;
             [view mouseDragged:_currentEvent];
@@ -3445,7 +3434,7 @@ bool FrameMac::isCharacterSmartReplaceExempt(UChar c, bool isPreviousChar)
 
 void FrameMac::handledOnloadEvents()
 {
-    [_bridge handledOnloadEvents];
+    loader()->client()->dispatchDidHandleOnloadEvents();
 }
 
 bool FrameMac::shouldClose()
@@ -3528,7 +3517,7 @@ KURL FrameMac::originalRequestURL() const
 
 bool FrameMac::isLoadTypeReload()
 {
-    return [_bridge isLoadTypeReload];
+    return loader()->loadType() == FrameLoadTypeReload;
 }
 
 int FrameMac::getHistoryLength()
index 3ded5d6d347582a408433714f47919e59b0d5138..9348bea811cf7b6d95a0f8a8d0403205bb881a74 100644 (file)
@@ -202,33 +202,6 @@ typedef enum {
 + (NSArray *)supportedImageMIMETypes;
 + (NSArray *)supportedImageResourceMIMETypes; // includes types like PDF
 
-- (void)initializeSettings:(WebCoreSettings *)settings;
-
-- (void)setName:(NSString *)name;
-- (NSString *)name;
-
-- (WebCorePageBridge *)page;
-
-- (WebCoreFrameBridge *)firstChild;
-- (WebCoreFrameBridge *)lastChild;
-- (WebCoreFrameBridge *)previousSibling;
-- (WebCoreFrameBridge *)nextSibling;
-
-- (BOOL)isMainFrame;
-
-- (void)appendChild:(WebCoreFrameBridge *)child;
-- (void)removeChild:(WebCoreFrameBridge *)child;
-
-- (unsigned)childCount;
-- (BOOL)isDescendantOfFrame:(WebCoreFrameBridge *)ancestor;
-- (WebCoreFrameBridge *)traverseNextFrameStayWithin:(WebCoreFrameBridge *)stayWithin;
-
-- (WebCoreFrameBridge *)nextFrameWithWrap:(BOOL)wrap;
-- (WebCoreFrameBridge *)previousFrameWithWrap:(BOOL)wrap;
-
-- (WebCoreFrameBridge *)childFrameNamed:(NSString *)name;
-- (WebCoreFrameBridge *)findFrameNamed:(NSString *)name;
-
 - (void)openURL:(NSURL *)URL reload:(BOOL)reload
     contentType:(NSString *)contentType refresh:(NSString *)refresh lastModified:(NSDate *)lastModified
     pageCache:(NSDictionary *)pageCache;
@@ -243,17 +216,11 @@ typedef enum {
 - (void)saveDocumentState;
 - (void)restoreDocumentState;
 
-- (BOOL)canCachePage;
 - (BOOL)saveDocumentToPageCache;
 
 - (void)clearFrame;
-- (void)handleFallbackContent;
 
-- (NSURL *)URL;
 - (NSURL *)baseURL;
-- (NSString *)referrer;
-- (WebCoreFrameBridge *)opener;
-- (void)setOpener:(WebCoreFrameBridge *)bridge;
 
 - (void)installInFrame:(NSView *)view;
 - (void)removeFromFrame;
@@ -275,15 +242,6 @@ typedef enum {
 - (void)adjustPageHeightNew:(float *)newBottom top:(float)oldTop bottom:(float)oldBottom limit:(float)bottomLimit;
 - (NSArray*)computePageRectsWithPrintWidthScaleFactor:(float)printWidthScaleFactor printHeight:(float)printHeight;
 
-- (void)setActivationEventNumber:(int)num;
-- (void)mouseDown:(NSEvent *)event;
-- (void)mouseUp:(NSEvent *)event;
-- (void)mouseMoved:(NSEvent *)event;
-- (void)mouseDragged:(NSEvent *)event;
-
-// these return YES if event is eaten by WebCore
-- (BOOL)sendContextMenuEvent:(NSEvent *)event;
-
 - (NSView *)nextKeyView;
 - (NSView *)previousKeyView;
 
@@ -325,24 +283,11 @@ typedef enum {
 - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)string forceUserGesture:(BOOL)forceUserGesture;
 - (NSAppleEventDescriptor *)aeDescByEvaluatingJavaScriptFromString:(NSString *)string;
 
-- (DOMDocument *)DOMDocument;
-- (DOMHTMLElement *)frameElement;
-
-- (BOOL)isSelectionInPasswordField;
-- (BOOL)isSelectionEditable;
-- (BOOL)isSelectionRichlyEditable;
-- (WebSelectionState)selectionState;
-
 - (BOOL)mayCopy;
 
 - (NSAttributedString *)selectedAttributedString;
 - (NSString *)selectedString;
 
-- (void)setSelectionFromNone;
-- (void)setIsActive:(BOOL)flag;
-
-- (void)setWindowHasFocus:(BOOL)flag;
-
 - (NSString *)stringForRange:(DOMRange *)range;
 
 - (NSString *)markupStringFromNode:(DOMNode *)node nodes:(NSArray **)nodes;
@@ -352,16 +297,11 @@ typedef enum {
 - (void)deselectAll;
 - (void)deselectText;
 
-- (NSRect)selectionRect;
-- (NSRect)visibleSelectionRect;
-- (void)centerSelectionInVisibleArea;
-- (NSImage *)selectionImageForcingWhiteText:(BOOL)forceWhiteText;
 - (NSRect)caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity;
 - (NSRect)firstRectForDOMRange:(DOMRange *)range;
 - (void)scrollDOMRangeToVisible:(DOMRange *)range;
 
 - (void)setSelectedDOMRange:(DOMRange *)range affinity:(NSSelectionAffinity)selectionAffinity closeTyping:(BOOL)closeTyping;
-- (DOMRange *)selectedDOMRange;
 - (NSSelectionAffinity)selectionAffinity;
 
 // Emacs-style-editing "mark"
@@ -381,23 +321,17 @@ typedef enum {
 - (NSString *)stringWithData:(NSData *)data; // using the encoding of the frame's main resource
 + (NSString *)stringWithData:(NSData *)data textEncodingName:(NSString *)textEncodingName; // nil for textEncodingName means Latin-1
 
-- (BOOL)interceptKeyEvent:(NSEvent *)event toView:(NSView *)view;
-
 - (void)setShouldCreateRenderers:(BOOL)f;
 - (BOOL)shouldCreateRenderers;
 
 - (int)numPendingOrLoadingRequests;
 - (BOOL)doneProcessingData;
-- (BOOL)shouldClose;
 
 - (void)setBaseBackgroundColor:(NSColor *)backgroundColor;
 - (void)setDrawsBackground:(BOOL)drawsBackround;
 
-- (NSColor *)bodyBackgroundColor;
 - (NSColor *)selectionColor;
 
-- (void)adjustViewSize;
-
 - (id)accessibilityTree;
 
 - (void)undoEditing:(id)arg;
@@ -442,7 +376,6 @@ typedef enum {
 - (void)setSelectionToDragCaret;
 - (void)moveSelectionToDragCaret:(DOMDocumentFragment *)selectionFragment smartMove:(BOOL)smartMove;
 - (void)moveDragCaretToPoint:(NSPoint)point;
-- (void)removeDragCaret;
 - (DOMRange *)dragCaretDOMRange;
 - (BOOL)isDragCaretRichlyEditable;
 - (DOMRange *)editableDOMRangeForPoint:(NSPoint)point;
@@ -459,9 +392,6 @@ typedef enum {
 - (BOOL)selectionStartHasStyle:(DOMCSSStyleDeclaration *)style;
 - (NSCellStateValue)selectionHasStyle:(DOMCSSStyleDeclaration *)style;
 
-- (WebScriptObject *)windowScriptObject;
-- (NPObject *)windowScriptNPObject;
-
 - (NSDragOperation)dragOperationForDraggingInfo:(id <NSDraggingInfo>)info;
 - (void)dragExitedWithDraggingInfo:(id <NSDraggingInfo>)info;
 - (BOOL)concludeDragForDraggingInfo:(id <NSDraggingInfo>)info;
@@ -478,7 +408,6 @@ typedef enum {
 
 - (void)setTitle:(NSString *)title;
 - (NSURL*)originalRequestURL;
-- (BOOL)isLoadTypeReload;
 - (void)frameDetached;
 - (void)tokenizerProcessedData;
 - (void)receivedData:(NSData *)data textEncodingName:(NSString *)textEncodingName;
@@ -487,12 +416,8 @@ typedef enum {
 - (void)objectLoadedFromCacheWithURL:(NSURL *)URL response:(NSURLResponse *)response data:(NSData *)data;
 - (NSData *)syncLoadResourceWithMethod:(NSString *)method URL:(NSURL *)URL customHeaders:(NSDictionary *)requestHeaders postData:(NSArray *)postData finalURL:(NSURL **)finalNSURL responseHeaders:(NSDictionary **)responseHeaderDict statusCode:(int *)statusCode;
 - (BOOL)isReloading;
-- (void)reportClientRedirectToURL:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date lockHistory:(BOOL)lockHistory isJavaScriptFormAction:(BOOL)isJavaScriptFormAction;
-- (void)reportClientRedirectCancelled:(BOOL)cancelWithLoadInProgress;
 - (NSString *)incomingReferrer;
-- (NSURLResponse*)mainResourceURLResponse;
 - (void)loadEmptyDocumentSynchronously;
-- (void)handledOnloadEvents;
 
 @end
 
index 8f85fd7e8453549f796a3dfcaa66c30624d84dcf..73654ecface82bdc2379fc9bca275ed5792d26e8 100644 (file)
@@ -103,20 +103,15 @@ using KJS::BooleanType;
 using KJS::DateInstance;
 using KJS::ExecState;
 using KJS::GetterSetterType;
-using KJS::Identifier;
-using KJS::Interpreter;
 using KJS::JSLock;
 using KJS::JSObject;
-using KJS::JSType;
 using KJS::JSValue;
-using KJS::List;
 using KJS::NullType;
 using KJS::NumberType;
 using KJS::ObjectType;
 using KJS::SavedBuiltins;
 using KJS::SavedProperties;
 using KJS::StringType;
-using KJS::UString;
 using KJS::UndefinedType;
 using KJS::UnspecifiedType;
 using KJS::Window;
@@ -126,10 +121,10 @@ using KJS::Bindings::RootObject;
 NSString *WebCorePageCacheStateKey = @"WebCorePageCacheState";
 
 @interface WebCoreFrameBridge (WebCoreBridgeInternal)
-- (RootObject *)executionContextForView:(NSView *)aView;
+- (RootObject*)executionContextForView:(NSView *)aView;
 @end
 
-static RootObject *rootForView(void *v)
+static RootObject* rootForView(void* v)
 {
     NSView *aView = (NSView *)v;
     WebCoreFrameBridge *aBridge = [[WebCoreViewFactory sharedFactory] bridgeForView:aView];
@@ -143,7 +138,7 @@ static RootObject *rootForView(void *v)
 
 static pthread_t mainThread = 0;
 
-static void updateRenderingForBindings (ExecState *exec, JSObject *rootObject)
+static void updateRenderingForBindings(ExecState* exec, JSObject* rootObject)
 {
     if (pthread_self() != mainThread)
         return;
@@ -151,11 +146,11 @@ static void updateRenderingForBindings (ExecState *exec, JSObject *rootObject)
     if (!rootObject)
         return;
         
-    Window *window = static_cast<Window*>(rootObject);
+    Windowwindow = static_cast<Window*>(rootObject);
     if (!window)
         return;
         
-    Document *doc = static_cast<Document*>(window->frame()->document());
+    Documentdoc = static_cast<Document*>(window->frame()->document());
     if (doc)
         doc->updateRendering();
 }
@@ -255,66 +250,6 @@ static inline WebCoreFrameBridge *bridge(Frame *frame)
     return Mac(frame)->bridge();
 }
 
-- (WebCoreFrameBridge *)firstChild
-{
-    return bridge(m_frame->tree()->firstChild());
-}
-
-- (WebCoreFrameBridge *)lastChild
-{
-    return bridge(m_frame->tree()->lastChild());
-}
-
-- (unsigned)childCount
-{
-    return m_frame->tree()->childCount();
-}
-
-- (WebCoreFrameBridge *)previousSibling;
-{
-    return bridge(m_frame->tree()->previousSibling());
-}
-
-- (WebCoreFrameBridge *)nextSibling;
-{
-    return bridge(m_frame->tree()->nextSibling());
-}
-
-- (BOOL)isDescendantOfFrame:(WebCoreFrameBridge *)ancestor
-{
-    return m_frame->tree()->isDescendantOf(ancestor->m_frame);
-}
-
-- (WebCoreFrameBridge *)traverseNextFrameStayWithin:(WebCoreFrameBridge *)stayWithin
-{
-    return bridge(m_frame->tree()->traverseNext(stayWithin->m_frame));
-}
-
-- (void)appendChild:(WebCoreFrameBridge *)child
-{
-    m_frame->tree()->appendChild(adoptRef(child->m_frame));
-}
-
-- (void)removeChild:(WebCoreFrameBridge *)child
-{
-    m_frame->tree()->removeChild(child->m_frame);
-}
-
-- (WebCoreFrameBridge *)childFrameNamed:(NSString *)name
-{
-    return bridge(m_frame->tree()->child(name));
-}
-
-- (WebCoreFrameBridge *)nextFrameWithWrap:(BOOL)wrapFlag
-{
-    return bridge(m_frame->tree()->traverseNextWithWrap(wrapFlag));
-}
-
-- (WebCoreFrameBridge *)previousFrameWithWrap:(BOOL)wrapFlag
-{
-    return bridge(m_frame->tree()->traversePreviousWithWrap(wrapFlag));
-}
-
 - (NSString *)domain
 {
     Document *doc = m_frame->document();
@@ -369,16 +304,15 @@ static inline WebCoreFrameBridge *bridge(Frame *frame)
     // <rdar://problem/3715785> multiple frame injection vulnerability reported by Secunia, affects almost all browsers
     
     // don't mess with navigation within the same page/frameset
-    if ([self page] == [targetFrame page])
+    if (m_frame->page() == [targetFrame _frame]->page())
         return YES;
 
     // Normally, domain should be called on the DOMDocument since it is a DOM method, but this fix is needed for
     // Jaguar as well where the DOM API doesn't exist.
     NSString *thisDomain = [self domain];
-    if ([thisDomain length] == 0) {
+    if ([thisDomain length] == 0)
         // Allow if the request is made from a local file.
         return YES;
-    }
     
     Frame *target = [targetFrame _frame];
     WebCoreFrameBridge *parentBridge = target ? Mac(target->tree()->parent())->bridge() : nil;
@@ -394,11 +328,6 @@ static inline WebCoreFrameBridge *bridge(Frame *frame)
     return NO;
 }
 
-- (WebCoreFrameBridge *)findFrameNamed:(NSString *)name
-{
-    return bridge(m_frame->tree()->find(name));
-}
-
 + (NSArray *)supportedNonImageMIMETypes
 {
     return [NSArray arrayWithObjects:        
@@ -510,16 +439,6 @@ static inline WebCoreFrameBridge *bridge(Frame *frame)
     return self;
 }
 
-- (WebCorePageBridge *)page
-{
-    return m_frame->page()->bridge();
-}
-
-- (void)initializeSettings:(WebCoreSettings *)settings
-{
-    m_frame->setSettings([settings settings]);
-}
-
 - (void)dealloc
 {
     ASSERT(_closed);
@@ -690,24 +609,11 @@ static inline WebCoreFrameBridge *bridge(Frame *frame)
     return result;
 }
 
-- (BOOL)canCachePage
-{
-    return m_frame->canCachePage();
-}
-
 - (void)clearFrame
 {
     m_frame = 0;
 }
 
-- (void)handleFallbackContent
-{
-    // this needs to be callable even after teardown of the frame
-    if (!m_frame)
-        return;
-    m_frame->handleFallbackContent();
-}
-
 - (void)createFrameViewWithNSView:(NSView *)view marginWidth:(int)mw marginHeight:(int)mh
 {
     // If we own the view, delete the old one - otherwise the render m_frame will take care of deleting the view.
@@ -724,21 +630,6 @@ static inline WebCoreFrameBridge *bridge(Frame *frame)
         frameView->setMarginHeight(mh);
 }
 
-- (BOOL)isSelectionInPasswordField
-{
-    return m_frame->isSelectionInPasswordField();
-}
-
-- (BOOL)isSelectionEditable
-{
-    return m_frame->selectionController()->isContentEditable();
-}
-
-- (BOOL)isSelectionRichlyEditable
-{
-    return m_frame->selectionController()->isContentRichlyEditable();
-}
-
 - (WebSelectionState)selectionState
 {
     switch (m_frame->selectionController()->state()) {
@@ -863,9 +754,8 @@ static BOOL nowPrinting(WebCoreFrameBridge *self)
 {
     [self _setupRootForPrinting:YES];
     m_frame->forceLayout();
-    if (flag) {
-        [self adjustViewSize];
-    }
+    if (flag)
+        m_frame->view()->adjustViewSize();
     [self _setupRootForPrinting:NO];
 }
 
@@ -873,9 +763,8 @@ static BOOL nowPrinting(WebCoreFrameBridge *self)
 {
     [self _setupRootForPrinting:YES];
     m_frame->forceLayoutWithPageWidthRange(minPageWidth, maxPageWidth);
-    if (flag) {
-        [self adjustViewSize];
-    }
+    if (flag)
+        m_frame->view()->adjustViewSize();
     [self _setupRootForPrinting:NO];
 }
 
@@ -1001,7 +890,7 @@ static BOOL nowPrinting(WebCoreFrameBridge *self)
 {
     // If this isn't the main frame, it must have a render m_frame set, or it
     // won't ever get installed in the view hierarchy.
-    ASSERT(self == [[self page] mainFrame] || m_frame->ownerElement());
+    ASSERT(m_frame == m_frame->page()->mainFrame() || m_frame->ownerElement());
 
     m_frame->view()->setView(view);
     // FIXME: frame tries to do this too, is it needed?
@@ -1013,36 +902,6 @@ static BOOL nowPrinting(WebCoreFrameBridge *self)
     m_frame->view()->initScrollbars();
 }
 
-- (void)setActivationEventNumber:(int)num
-{
-    m_frame->setActivationEventNumber(num);
-}
-
-- (void)mouseDown:(NSEvent *)event
-{
-    m_frame->mouseDown(event);
-}
-
-- (void)mouseDragged:(NSEvent *)event
-{
-    m_frame->mouseDragged(event);
-}
-
-- (void)mouseUp:(NSEvent *)event
-{
-    m_frame->mouseUp(event);
-}
-
-- (void)mouseMoved:(NSEvent *)event
-{
-    m_frame->mouseMoved(event);
-}
-
-- (BOOL)sendContextMenuEvent:(NSEvent *)event
-{
-    return m_frame->sendContextMenuEvent(event);
-}
-
 - (DOMElement*)elementForView:(NSView*)view
 {
     // FIXME: implemented currently for only a subset of the KWQ widgets
@@ -1314,31 +1173,6 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
     return aeDescFromJSValue(m_frame->jScript()->interpreter()->globalExec(), result);
 }
 
-- (WebScriptObject *)windowScriptObject
-{
-    return m_frame->windowScriptObject();
-}
-
-- (NPObject *)windowScriptNPObject
-{
-    return m_frame->windowScriptNPObject();
-}
-
-- (DOMDocument *)DOMDocument
-{
-    return [DOMDocument _documentWith:m_frame->document()];
-}
-
-- (DOMHTMLElement *)frameElement
-{
-    // Not [[self DOMDocument] _ownerElement], since our doc is not set up at the start of our own load.
-    // FIXME: There really is no guarantee this is an HTML element.
-    // For example, it could be something like an SVG foreign object element.
-    // Because of that, I believe the cast here is wrong and also the public API
-    // of WebKit might have to be changed.
-    return (DOMHTMLElement *)[DOMElement _elementWith:m_frame->ownerElement()];
-}
-
 - (NSAttributedString *)selectedAttributedString
 {
     // FIXME: should be a no-arg version of attributedString() that does this
@@ -1351,25 +1185,11 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
     return m_frame->attributedString([start _node], startOffset, [end _node], endOffset);
 }
 
-- (NSRect)selectionRect
-{
-    return m_frame->selectionRect(); 
-}
-
-- (NSRect)visibleSelectionRect
-{
-    return m_frame->visibleSelectionRect(); 
-}
-
-- (void)centerSelectionInVisibleArea
-{
-    m_frame->revealSelection(RenderLayer::gAlignCenterAlways);
-}
-
 - (NSRect)caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity
 {
     return [node _node]->renderer()->caretRect(offset, static_cast<EAffinity>(affinity));
 }
+
 - (NSRect)firstRectForDOMRange:(DOMRange *)range
 {
     int extraWidthToEndOfLine = 0;
@@ -1403,52 +1223,11 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
     }
 }
 
-- (NSImage *)selectionImageForcingWhiteText:(BOOL)forceWhiteText;
-{
-    return m_frame->selectionImage(forceWhiteText);
-}
-
-- (void)setName:(NSString *)name
-{
-    m_frame->tree()->setName(name);
-}
-
-- (NSString *)name
-{
-    return m_frame->tree()->name();
-}
-
-- (NSURL *)URL
-{
-    return m_frame->url().getNSURL();
-}
-
 - (NSURL *)baseURL
 {
     return m_frame->completeURL(m_frame->document()->baseURL()).getNSURL();
 }
 
-- (NSString *)referrer
-{
-    return m_frame->referrer();
-}
-
-- (WebCoreFrameBridge *)opener
-{
-    Frame *openerPart = m_frame->opener();
-
-    if (openerPart)
-        return Mac(openerPart)->bridge();
-
-    return nil;
-}
-
-- (void)setOpener:(WebCoreFrameBridge *)bridge;
-{
-    if (Frame* f = [bridge _frame])
-        f->setOpener(m_frame);
-}
-
 - (NSString *)stringWithData:(NSData *)data
 {
     Document* doc = m_frame->document();
@@ -1479,31 +1258,11 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
         renderer->setNeedsLayout(true);
 }
 
-- (BOOL)interceptKeyEvent:(NSEvent *)event toView:(NSView *)view
-{
-    return m_frame->keyEvent(event);
-}
-
 - (NSString *)renderTreeAsExternalRepresentation
 {
     return externalRepresentation(m_frame->renderer()).getNSString();
 }
 
-- (void)setSelectionFromNone
-{
-    m_frame->setSelectionFromNone();
-}
-
-- (void)setIsActive:(BOOL)flag
-{
-    m_frame->setIsActive(flag);
-}
-
-- (void)setWindowHasFocus:(BOOL)flag
-{
-    m_frame->setWindowHasFocus(flag);
-}
-
 - (void)setShouldCreateRenderers:(BOOL)f
 {
     _shouldCreateRenderers = f;
@@ -1517,9 +1276,8 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
 - (int)numPendingOrLoadingRequests
 {
     Document *doc = m_frame->document();
-    
     if (doc)
-        return NumberOfPendingOrLoadingRequests (doc->docLoader());
+        return NumberOfPendingOrLoadingRequests(doc->docLoader());
     return 0;
 }
 
@@ -1534,29 +1292,11 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
     return YES;
 }
 
-- (BOOL)shouldClose
-{
-    return m_frame->shouldClose();
-}
-
-- (NSColor *)bodyBackgroundColor
-{
-    return m_frame->bodyBackgroundColor();
-}
-
-// FIXME: Not sure what this method is for.  It seems to only be used by plug-ins over in WebKit.
 - (NSColor *)selectionColor
 {
     return m_frame->isActive() ? [NSColor selectedTextBackgroundColor] : [NSColor secondarySelectedControlColor];
 }
 
-- (void)adjustViewSize
-{
-    FrameView *view = m_frame->view();
-    if (view)
-        view->adjustViewSize();
-}
-
 - (id)accessibilityTree
 {
     AXObjectCache::enableAccessibility();
@@ -1673,11 +1413,6 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
     m_frame->selectionController()->setSelection(selection, closeTyping);
 }
 
-- (DOMRange *)selectedDOMRange
-{
-    return [DOMRange _rangeWith:m_frame->selectionController()->toRange().get()];
-}
-
 - (NSRange)convertToNSRange:(Range *)range
 {
     int exception = 0;
@@ -1937,7 +1672,7 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
 
 - (void)replaceSelectionWithNode:(DOMNode *)node selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle
 {
-    DOMDocumentFragment *fragment = [[self DOMDocument] createDocumentFragment];
+    DOMDocumentFragment *fragment = [DOMDocumentFragment _documentFragmentWith:m_frame->document()->createDocumentFragment().get()];
     [fragment appendChild:node];
     [self replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:smartReplace matchStyle:matchStyle];
 }
@@ -2071,11 +1806,6 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
     m_frame->dragCaretController()->setSelection(dragCaret);
 }
 
-- (void)removeDragCaret
-{
-    m_frame->dragCaretController()->clear();
-}
-
 - (DOMRange *)dragCaretDOMRange
 {
     return [DOMRange _rangeWith:m_frame->dragCaretController()->toRange().get()];
@@ -2206,7 +1936,6 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
 
 - (NSWritingDirection)baseWritingDirectionForSelectionStart
 {
-    // FIXME: remove this NSWritingDirection cast once <rdar://problem/4509035> is fixed
     return m_frame ? m_frame->baseWritingDirectionForSelectionStart() : (NSWritingDirection)NSWritingDirectionLeftToRight;
 }
 
@@ -2240,15 +1969,14 @@ static PlatformMouseEvent createMouseEventFromDraggingInfo(NSWindow* window, id
                 if (!clipboard->destinationOperation(&op)) {
                     // The element accepted but they didn't pick an operation, so we pick one for them
                     // (as does WinIE).
-                    if (srcOp & NSDragOperationCopy) {
+                    if (srcOp & NSDragOperationCopy)
                         op = NSDragOperationCopy;
-                    } else if (srcOp & NSDragOperationMove || srcOp & NSDragOperationGeneric) {
+                    else if (srcOp & NSDragOperationMove || srcOp & NSDragOperationGeneric)
                         op = NSDragOperationMove;
-                    } else if (srcOp & NSDragOperationLink) {
+                    else if (srcOp & NSDragOperationLink)
                         op = NSDragOperationLink;
-                    } else {
+                    else
                         op = NSDragOperationGeneric;
-                    }
                 } else if (!(op & srcOp)) {
                     // make sure WC picked an op that was offered.  Cocoa doesn't seem to enforce this,
                     // but IE does.
@@ -2446,11 +2174,6 @@ static NSCharacterSet *_getPostSmartSet(void)
     return [self canProvideDocumentSource];
 }
 
-- (BOOL)isMainFrame
-{
-    return m_frame->page()->mainFrame() == m_frame;
-}
-
 static NSString *stringByCollapsingNonPrintingCharacters(NSString *string)
 {
     NSMutableString *result = [NSMutableString string];
@@ -2471,20 +2194,17 @@ static NSString *stringByCollapsingNonPrintingCharacters(NSString *string)
     while (position != length) {
         NSRange nonSpace = [string rangeOfCharacterFromSet:charactersToNotTurnIntoSpaces
                                                  options:0 range:NSMakeRange(position, length - position)];
-        if (nonSpace.location == NSNotFound) {
+        if (nonSpace.location == NSNotFound)
             break;
-        }
         
         NSRange space = [string rangeOfCharacterFromSet:charactersToTurnIntoSpaces
                                               options:0 range:NSMakeRange(nonSpace.location, length - nonSpace.location)];
-        if (space.location == NSNotFound) {
+        if (space.location == NSNotFound)
             space.location = length;
-        }
         
         if (space.location > nonSpace.location) {
-            if (position != 0) {
+            if (position != 0)
                 [result appendString:@" "];
-            }
             [result appendString:[string substringWithRange:
                 NSMakeRange(nonSpace.location, space.location - nonSpace.location)]];
         }
@@ -2507,11 +2227,6 @@ static NSString *stringByCollapsingNonPrintingCharacters(NSString *string)
     return [m_frame->loader()->activeDocumentLoader()->initialRequest() URL];
 }
 
-- (BOOL)isLoadTypeReload
-{
-    return m_frame->loader()->loadType() == FrameLoadTypeReload;
-}
-
 - (void)frameDetached
 {
     m_frame->loader()->stopLoading();
@@ -2536,18 +2251,20 @@ static NSString *stringByCollapsingNonPrintingCharacters(NSString *string)
 
 - (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader withMethod:(NSString *)method URL:(NSURL *)URL customHeaders:(NSDictionary *)customHeaders
 {
-    // If we are no longer attached to a Page, this must be an attempted load from an
-    // onUnload handler, so let's just block it.
-    if ([self page] == nil)
+    // If we are no longer attached to a page, this must be an attempted load from an
+    // onunload handler, so let's just block it.
+    if (!m_frame->page())
         return nil;
     
     // Since this is a subresource, we can load any URL (we ignore the return value).
     // But we still want to know whether we should hide the referrer or not, so we call the canLoadURL method.
+    NSString *referrer = m_frame->referrer();
     BOOL hideReferrer;
-    [self canLoadURL:URL fromReferrer:[self referrer] hideReferrer:&hideReferrer];
+    [self canLoadURL:URL fromReferrer:referrer hideReferrer:&hideReferrer];
+    if (hideReferrer)
+        referrer = nil;
     
-    return SubresourceLoader::create(m_frame, resourceLoader,
-        method, URL, customHeaders, hideReferrer ? nil : [self referrer]);
+    return SubresourceLoader::create(m_frame, resourceLoader, method, URL, customHeaders, referrer);
 }
 
 - (void)objectLoadedFromCacheWithURL:(NSURL *)URL response:(NSURLResponse *)response data:(NSData *)data
@@ -2568,35 +2285,30 @@ static NSString *stringByCollapsingNonPrintingCharacters(NSString *string)
     customHeaders:(NSDictionary *)customHeaders postData:(NSArray *)postData
 {
     // If we are no longer attached to a Page, this must be an attempted load from an
-    // onUnload handler, so let's just block it.
-    if ([self page] == nil)
+    // onunload handler, so let's just block it.
+    if (!m_frame->page())
         return nil;
     
     // Since this is a subresource, we can load any URL (we ignore the return value).
     // But we still want to know whether we should hide the referrer or not, so we call the canLoadURL method.
+    NSString *referrer = m_frame->referrer();
     BOOL hideReferrer;
-    [self canLoadURL:URL fromReferrer:[self referrer] hideReferrer:&hideReferrer];
+    [self canLoadURL:URL fromReferrer:referrer hideReferrer:&hideReferrer];
+    if (hideReferrer)
+        referrer = nil;
     
-    return SubresourceLoader::create(m_frame, resourceLoader,
-        method, URL, customHeaders, postData, hideReferrer ? nil : [self referrer]);
-}
-
-- (void)reportClientRedirectToURL:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date lockHistory:(BOOL)lockHistory isJavaScriptFormAction:(BOOL)isJavaScriptFormAction
-{   
-    m_frame->loader()->clientRedirected(URL, seconds, date, lockHistory, isJavaScriptFormAction);
-}
-
-- (void)reportClientRedirectCancelled:(BOOL)cancelWithLoadInProgress
-{
-    m_frame->loader()->clientRedirectCancelledOrFinished(cancelWithLoadInProgress);
+    return SubresourceLoader::create(m_frame, resourceLoader, method, URL, customHeaders, postData, referrer);
 }
 
 - (NSData *)syncLoadResourceWithMethod:(NSString *)method URL:(NSURL *)URL customHeaders:(NSDictionary *)requestHeaders postData:(NSArray *)postData finalURL:(NSURL **)finalURL responseHeaders:(NSDictionary **)responseHeaderDict statusCode:(int *)statusCode
 {
     // Since this is a subresource, we can load any URL (we ignore the return value).
     // But we still want to know whether we should hide the referrer or not, so we call the canLoadURL method.
+    NSString *referrer = m_frame->referrer();
     BOOL hideReferrer;
-    [self canLoadURL:URL fromReferrer:[self referrer] hideReferrer:&hideReferrer];
+    [self canLoadURL:URL fromReferrer:referrer hideReferrer:&hideReferrer];
+    if (hideReferrer)
+        referrer = nil;
     
     NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:URL];
     [request setTimeoutInterval:10];
@@ -2619,11 +2331,10 @@ static NSString *stringByCollapsingNonPrintingCharacters(NSString *string)
     else
         [request setCachePolicy:[m_frame->loader()->documentLoader()->request() cachePolicy]];
     
-    if (!hideReferrer)
-        setHTTPReferrer(request, [self referrer]);
+    if (referrer)
+        setHTTPReferrer(request, referrer);
     
-    WebCorePageBridge *page = [self page];
-    [request setMainDocumentURL:[[[page mainFrame] _frame]->loader()->documentLoader()->request() URL]];
+    [request setMainDocumentURL:[m_frame->page()->mainFrame()->loader()->documentLoader()->request() URL]];
     [request setValue:[self userAgentForURL:[request URL]] forHTTPHeaderField:@"User-Agent"];
     
     NSError *error = nil;
@@ -2650,11 +2361,10 @@ static NSString *stringByCollapsingNonPrintingCharacters(NSString *string)
     } else {
         *finalURL = URL;
         *responseHeaderDict = [NSDictionary dictionary];
-        if ([error domain] == NSURLErrorDomain) {
+        if ([error domain] == NSURLErrorDomain)
             *statusCode = [error code];
-        } else {
+        else
             *statusCode = 404;
-        }
     }
     
     m_frame->loader()->sendRemainingDelegateMessages(identifier, response, [result length], error);
@@ -2662,6 +2372,7 @@ static NSString *stringByCollapsingNonPrintingCharacters(NSString *string)
     
     return result;
 }
+
 // -------------------
 
 - (NSString *)incomingReferrer
@@ -2674,16 +2385,6 @@ static NSString *stringByCollapsingNonPrintingCharacters(NSString *string)
     return [m_frame->loader()->documentLoader()->request() cachePolicy] == NSURLRequestReloadIgnoringCacheData;
 }
 
-- (void)handledOnloadEvents
-{
-    m_frame->loader()->client()->dispatchDidHandleOnloadEvents();
-}
-
-- (NSURLResponse *)mainResourceURLResponse
-{
-    return m_frame->loader()->documentLoader()->response();
-}
-
 - (void)loadEmptyDocumentSynchronously
 {
     if (!m_frame)
index 7f19eef5882df1f9e046c64cee567c056d6fc0cc..edd1380a453c43da9f7e74d14d4d697c8ddb9708 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-typedef enum {
-    WebFrameStateProvisional,
-    
-    // This state indicates we are ready to commit to a page,
-    // which means the view will transition to use the new data source.
-    WebFrameStateCommittedPage,
-    
-    WebFrameStateComplete
-} WebFrameState;
+namespace WebCore {
 
-typedef enum {
-    WebPolicyUse,
-    WebPolicyDownload,
-    WebPolicyIgnore,
-} WebPolicyAction;
+    enum FrameState {
+        FrameStateProvisional,
+        // This state indicates we are ready to commit to a page,
+        // which means the view will transition to use the new data source.
+        FrameStateCommittedPage,
+        FrameStateComplete
+    };
 
-typedef enum {
-    FrameLoadTypeStandard,
-    FrameLoadTypeBack,
-    FrameLoadTypeForward,
-    FrameLoadTypeIndexedBackForward, // a multi-item hop in the backforward list
-    FrameLoadTypeReload,
-    FrameLoadTypeReloadAllowingStaleData,
-    FrameLoadTypeSame,               // user loads same URL again (but not reload button)
-    FrameLoadTypeInternal,
-    FrameLoadTypeReplace
-} FrameLoadType;
+    enum PolicyAction {
+        PolicyUse,
+        PolicyDownload,
+        PolicyIgnore,
+    };
 
-typedef enum {
-    NavigationTypeLinkClicked,
-    NavigationTypeFormSubmitted,
-    NavigationTypeBackForward,
-    NavigationTypeReload,
-    NavigationTypeFormResubmitted,
-    NavigationTypeOther
-} NavigationType;
+    enum FrameLoadType {
+        FrameLoadTypeStandard,
+        FrameLoadTypeBack,
+        FrameLoadTypeForward,
+        FrameLoadTypeIndexedBackForward, // a multi-item hop in the backforward list
+        FrameLoadTypeReload,
+        FrameLoadTypeReloadAllowingStaleData,
+        FrameLoadTypeSame,               // user loads same URL again (but not reload button)
+        FrameLoadTypeInternal,
+        FrameLoadTypeReplace
+    };
+
+    enum NavigationType {
+        NavigationTypeLinkClicked,
+        NavigationTypeFormSubmitted,
+        NavigationTypeBackForward,
+        NavigationTypeReload,
+        NavigationTypeFormResubmitted,
+        NavigationTypeOther
+    };
+
+}
index a0700bd68d25873fdea1b97c716127a02828f7e2..68e0fca4be0814909b577c6c230d9b89052ed756 100644 (file)
  */
 
 #import "FrameLoaderTypes.h"
-#import "RetainPtr.h"
 #import <wtf/Forward.h>
 #import <wtf/HashSet.h>
 #import <wtf/Noncopyable.h>
 #import <wtf/RefPtr.h>
 
-@class DOMElement;
+#if PLATFORM(MAC)
+
+#import "RetainPtr.h"
+
 @class WebCoreFrameBridge;
 @class WebCoreFrameLoaderAsDelegate;
 @class WebPolicyDecider;
 
+#endif
+
 namespace WebCore {
 
     class DocumentLoader;
+    class Element;
     class FormState;
     class Frame;
     class FrameLoaderClient;
@@ -56,6 +61,7 @@ namespace WebCore {
 
         Frame* frame() const { return m_frame; }
 
+#if PLATFORM(MAC)
         // FIXME: This is not cool, people.
         void prepareForLoadStart();
         void setupForReplace();
@@ -67,7 +73,7 @@ namespace WebCore {
         void load(NSURLRequest *, NSDictionary *triggeringAaction, FrameLoadType, PassRefPtr<FormState>);
         void load(DocumentLoader*);
         void load(DocumentLoader*, FrameLoadType, PassRefPtr<FormState>);
-        void load(NSURL *, NSString *referrer, FrameLoadType, NSString *target, NSEvent *event, DOMElement *form, NSDictionary *formValues);
+        void load(NSURL *, NSString *referrer, FrameLoadType, NSString *target, NSEvent *event, Element* form, NSDictionary *formValues);
 
         // Also not cool.
         void stopLoadingPlugIns();
@@ -90,7 +96,7 @@ namespace WebCore {
         DocumentLoader* activeDocumentLoader() const;
         DocumentLoader* documentLoader() const;
         DocumentLoader* provisionalDocumentLoader();
-        WebFrameState state() const;
+        FrameState state() const;
         static double timeOfLastCompletedLoad();
 
         bool defersCallbacks() const;
@@ -160,7 +166,7 @@ namespace WebCore {
 
         void sendRemainingDelegateMessages(id identifier, NSURLResponse *, unsigned length, NSError *);
         NSURLRequest *requestFromDelegate(NSURLRequest *, id& identifier, NSError *& error);
-        void post(NSURL *, NSString *referrer, NSString *target, NSArray *postData, NSString *contentType, NSEvent *, DOMElement *form, NSDictionary *formValues);
+        void post(NSURL *, NSString *referrer, NSString *target, NSArray *postData, NSString *contentType, NSEvent *, Element* form, NSDictionary *formValues);
 
         void checkLoadComplete();
         void detachFromParent();
@@ -172,14 +178,16 @@ namespace WebCore {
         void setClient(FrameLoaderClient*);
         FrameLoaderClient* client() const;
 
-        void continueAfterWillSubmitForm(WebPolicyAction);
-        void continueAfterNewWindowPolicy(WebPolicyAction);
-        void continueAfterNavigationPolicy(WebPolicyAction);
+        void continueAfterWillSubmitForm(PolicyAction);
+        void continueAfterNewWindowPolicy(PolicyAction);
+        void continueAfterNavigationPolicy(PolicyAction);
         void continueLoadRequestAfterNavigationPolicy(NSURLRequest *, FormState*);
         void continueFragmentScrollAfterNavigationPolicy(NSURLRequest *);
         void continueLoadRequestAfterNewWindowPolicy(NSURLRequest *, NSString *frameName, FormState*);
+#endif
 
     private:
+#if PLATFORM(MAC)
         // Also not cool.
         void startLoading();
         bool startLoadingMainResource(NSMutableURLRequest *, id identifier);
@@ -209,7 +217,7 @@ namespace WebCore {
 
         bool isLoadingPlugIns() const;
 
-        void setState(WebFrameState);
+        void setState(FrameState);
 
         WebCoreFrameBridge *bridge() const;
 
@@ -220,23 +228,25 @@ namespace WebCore {
 
         void handleUnimplementablePolicy(NSError *);
         bool shouldReloadToHandleUnreachableURL(NSURLRequest *);
+#endif
 
         Frame* m_frame;
-        RetainPtr<WebCoreFrameLoaderAsDelegate> m_asDelegate;
+        FrameLoaderClient* m_client;
+
+        FrameState m_state;
+        FrameLoadType m_loadType;
 
         RefPtr<MainResourceLoader> m_mainResourceLoader;
         HashSet<RefPtr<WebResourceLoader> > m_subresourceLoaders;
         HashSet<RefPtr<WebResourceLoader> > m_plugInStreamLoaders;
     
-        FrameLoaderClient* m_client;
+#if PLATFORM(MAC)
+        RetainPtr<WebCoreFrameLoaderAsDelegate> m_asDelegate;
 
         RefPtr<DocumentLoader> m_documentLoader;
         RefPtr<DocumentLoader> m_provisionalDocumentLoader;
         RefPtr<DocumentLoader> m_policyDocumentLoader;
 
-        WebFrameState m_state;
-        FrameLoadType m_loadType;
-
         // state we'll need to continue after waiting for the policy delegate's decision
         RetainPtr<WebPolicyDecider> m_policyDecider;    
 
@@ -254,7 +264,8 @@ namespace WebCore {
         bool m_firstLayoutDone;
         bool m_quickRedirectComing;
         bool m_sentRedirectNotification;
-        bool m_isStoppingLoad;    
+        bool m_isStoppingLoad;
+#endif
     };
 
 }
index 525273bcacf299b7e8cb9269939a2206b0c35976..31eda913155e082a30913b44ee86568f180057eb 100644 (file)
@@ -37,6 +37,7 @@
 #import "HTMLNames.h"
 #import "LoaderNSURLExtras.h"
 #import "LoaderNSURLRequestExtras.h"
+#import "Page.h"
 #import "WebCoreFrameBridge.h"
 #import "WebCoreIconDatabaseBridge.h"
 #import "WebCoreSystemInterface.h"
@@ -103,7 +104,7 @@ bool isBackForwardLoadType(FrameLoadType type)
 FrameLoader::FrameLoader(Frame* frame)
     : m_frame(frame)
     , m_client(nil)
-    , m_state(WebFrameStateCommittedPage)
+    , m_state(FrameStateCommittedPage)
     , m_loadType(FrameLoadTypeStandard)
     , m_delegateIsHandlingProvisionalLoadError(false)
     , m_delegateIsDecidingNavigationPolicy(false)
@@ -130,7 +131,7 @@ void FrameLoader::prepareForLoadStart()
 
 void FrameLoader::setupForReplace()
 {
-    setState(WebFrameStateProvisional);
+    setState(FrameStateProvisional);
     m_provisionalDocumentLoader = m_documentLoader;
     m_documentLoader = nil;
     detachChildren();
@@ -192,7 +193,7 @@ void FrameLoader::load(NSURLRequest *request, NSDictionary *action, FrameLoadTyp
     load(loader.get(), type, formState);
 }
 
-void FrameLoader::load(NSURL *URL, NSString *referrer, FrameLoadType newLoadType, NSString *target, NSEvent *event, DOMElement *form, NSDictionary *values)
+void FrameLoader::load(NSURL *URL, NSString *referrer, FrameLoadType newLoadType, NSString *target, NSEvent *event, Element* form, NSDictionary *values)
 {
     bool isFormSubmission = values != nil;
     
@@ -229,7 +230,7 @@ void FrameLoader::load(NSURL *URL, NSString *referrer, FrameLoadType newLoadType
     if (!isFormSubmission
         && newLoadType != FrameLoadTypeReload
         && newLoadType != FrameLoadTypeSame
-        && !shouldReload(URL, [bridge() URL])
+        && !shouldReload(URL, m_frame->url().getNSURL())
         // We don't want to just scroll if a link from within a
         // frameset is trying to reload the frameset into _top.
         && ![bridge() isFrameSet]) {
@@ -401,7 +402,7 @@ void FrameLoader::cancelPendingArchiveLoad(WebResourceLoader* loader)
 
 DocumentLoader* FrameLoader::activeDocumentLoader() const
 {
-    if (m_state == WebFrameStateProvisional)
+    if (m_state == FrameStateProvisional)
         return m_provisionalDocumentLoader.get();
     return m_documentLoader.get();
 }
@@ -545,7 +546,7 @@ void FrameLoader::setProvisionalDocumentLoader(DocumentLoader* loader)
     m_provisionalDocumentLoader = loader;
 }
 
-WebFrameState FrameLoader::state() const
+FrameState FrameLoader::state() const
 {
     return m_state;
 }
@@ -562,13 +563,13 @@ void FrameLoader::provisionalLoadStarted()
     m_client->provisionalLoadStarted();
 }
 
-void FrameLoader::setState(WebFrameState newState)
+void FrameLoader::setState(FrameState newState)
 {    
     m_state = newState;
     
-    if (newState == WebFrameStateProvisional)
+    if (newState == FrameStateProvisional)
         provisionalLoadStarted();
-    else if (newState == WebFrameStateComplete) {
+    else if (newState == FrameStateComplete) {
         frameLoadCompleted();
         storedTimeOfLastCompletedLoad = CFAbsoluteTimeGetCurrent();
         if (m_documentLoader)
@@ -580,12 +581,12 @@ void FrameLoader::clearProvisionalLoad()
 {
     setProvisionalDocumentLoader(0);
     m_client->progressCompleted();
-    setState(WebFrameStateComplete);
+    setState(FrameStateComplete);
 }
 
 void FrameLoader::markLoadComplete()
 {
-    setState(WebFrameStateComplete);
+    setState(FrameStateComplete);
 }
 
 void FrameLoader::commitProvisionalLoad()
@@ -595,7 +596,7 @@ void FrameLoader::commitProvisionalLoad()
 
     setDocumentLoader(m_provisionalDocumentLoader.get());
     setProvisionalDocumentLoader(0);
-    setState(WebFrameStateCommittedPage);
+    setState(FrameStateCommittedPage);
 }
 
 id FrameLoader::identifierForInitialRequest(NSURLRequest *clientRequest)
@@ -669,10 +670,10 @@ void FrameLoader::receivedMainResourceError(NSError *error, bool isComplete)
         // Can't call _bridge because we might not have commited yet
         m_frame->stop();
         if (m_client->shouldFallBack(error))
-            [bridge() handleFallbackContent];
+            m_frame->handleFallbackContent();
     }
     
-    if (m_state == WebFrameStateProvisional) {
+    if (m_state == FrameStateProvisional) {
         NSURL *failedURL = [m_provisionalDocumentLoader->originalRequestCopy() URL];
         m_frame->didNotOpenURL(failedURL);
         m_client->invalidateCurrentItemPageCache();
@@ -875,7 +876,7 @@ WebCoreFrameBridge *FrameLoader::bridge() const
 
 void FrameLoader::handleFallbackContent()
 {
-    [bridge() handleFallbackContent];
+    m_frame->handleFallbackContent();
 }
 
 bool FrameLoader::isStopping() const
@@ -966,7 +967,8 @@ bool FrameLoader::isHostedByObjectElement() const
 
 bool FrameLoader::isLoadingMainFrame() const
 {
-    return [bridge() isMainFrame];
+    Page* page = m_frame->page();
+    return page && m_frame == page->mainFrame();
 }
 
 bool FrameLoader::canShowMIMEType(NSString *MIMEType) const
@@ -1203,7 +1205,7 @@ void FrameLoader::checkNewWindowPolicy(NSURLRequest *request, NSDictionary *acti
     [decider release];
 }
 
-void FrameLoader::continueAfterNewWindowPolicy(WebPolicyAction policy)
+void FrameLoader::continueAfterNewWindowPolicy(PolicyAction policy)
 {
     RetainPtr<NSURLRequest> request = m_policyRequest;
     RetainPtr<NSString> frameName = m_policyFrameName;
@@ -1214,14 +1216,14 @@ void FrameLoader::continueAfterNewWindowPolicy(WebPolicyAction policy)
     invalidatePendingPolicyDecision(false);
 
     switch (policy) {
-        case WebPolicyIgnore:
+        case PolicyIgnore:
             request = nil;
             break;
-        case WebPolicyDownload:
+        case PolicyDownload:
             m_client->startDownload(request.get());
             request = nil;
             break;
-        case WebPolicyUse:
+        case PolicyUse:
             break;
     }
 
@@ -1271,7 +1273,7 @@ void FrameLoader::checkNavigationPolicy(NSURLRequest *request, DocumentLoader* l
     [decider release];
 }
 
-void FrameLoader::continueAfterNavigationPolicy(WebPolicyAction policy)
+void FrameLoader::continueAfterNavigationPolicy(PolicyAction policy)
 {
     RetainPtr<NSURLRequest> request = m_policyRequest;
     RetainPtr<id> target = m_policyTarget;
@@ -1281,14 +1283,14 @@ void FrameLoader::continueAfterNavigationPolicy(WebPolicyAction policy)
     invalidatePendingPolicyDecision(false);
 
     switch (policy) {
-        case WebPolicyIgnore:
+        case PolicyIgnore:
             request = nil;
             break;
-        case WebPolicyDownload:
+        case PolicyDownload:
             m_client->startDownload(request.get());
             request = nil;
             break;
-        case WebPolicyUse:
+        case PolicyUse:
             if (!m_client->canHandleRequest(request.get())) {
                 handleUnimplementablePolicy(m_client->cannotShowURLError(request.get()));
                 request = nil;
@@ -1299,7 +1301,7 @@ void FrameLoader::continueAfterNavigationPolicy(WebPolicyAction policy)
     objc_msgSend(target.get(), selector, request.get(), formState.get());
 }
 
-void FrameLoader::continueAfterWillSubmitForm(WebPolicyAction policy)
+void FrameLoader::continueAfterWillSubmitForm(PolicyAction policy)
 {
     if (m_policyDecider) {
         [m_policyDecider.get() invalidate];
@@ -1322,7 +1324,7 @@ void FrameLoader::continueLoadRequestAfterNavigationPolicy(NSURLRequest *request
     //       is the user responding Cancel to the form repost nag sheet.
     //    2) User responded Cancel to an alert popped up by the before unload event handler.
     // The "before unload" event handler runs only for the main frame.
-    bool canContinue = request && (!isLoadingMainFrame() || [bridge() shouldClose]);
+    bool canContinue = request && (!isLoadingMainFrame() || Mac(m_frame)->shouldClose());
 
     if (!canContinue) {
         // If we were waiting for a quick redirect, but the policy delegate decided to ignore it, then we 
@@ -1345,7 +1347,7 @@ void FrameLoader::continueLoadRequestAfterNavigationPolicy(NSURLRequest *request
     stopLoading();
     setProvisionalDocumentLoader(m_policyDocumentLoader.get());
     m_loadType = type;
-    setState(WebFrameStateProvisional);
+    setState(FrameStateProvisional);
 
     setPolicyDocumentLoader(0);
 
@@ -1353,14 +1355,14 @@ void FrameLoader::continueLoadRequestAfterNavigationPolicy(NSURLRequest *request
         return;
 
     if (formState) {
-        // It's a bit of a hack to reuse the WebPolicyDecisionListener for the continuation
+        // It's a bit of a hack to reuse the WebPolicyDecider for the continuation
         // mechanism across the willSubmitForm callout.
         WebPolicyDecider *decider = m_client->createPolicyDecider(asDelegate(), @selector(continueAfterWillSubmitForm:));
         m_policyDecider = decider;
         m_client->dispatchWillSubmitForm(decider, formState->sourceFrame(), formState->form(), formState->valuesAsNSDictionary());
         [decider release];
     } else
-        continueAfterWillSubmitForm(WebPolicyUse);
+        continueAfterWillSubmitForm(PolicyUse);
 }
 
 void FrameLoader::didFirstLayout()
@@ -1395,9 +1397,9 @@ bool FrameLoader::isQuickRedirectComing() const
 void FrameLoader::transitionToCommitted(NSDictionary *pageCache)
 {
     ASSERT(m_client->hasWebView());
-    ASSERT(m_state == WebFrameStateProvisional);
+    ASSERT(m_state == FrameStateProvisional);
 
-    if (m_state != WebFrameStateProvisional)
+    if (m_state != FrameStateProvisional)
         return;
 
     m_client->setCopiesOnScroll();
@@ -1474,7 +1476,7 @@ void FrameLoader::checkLoadCompleteForThisFrame()
     ASSERT(m_client->hasWebView());
 
     switch (m_state) {
-        case WebFrameStateProvisional: {
+        case FrameStateProvisional: {
             if (m_delegateIsHandlingProvisionalLoadError)
                 return;
 
@@ -1516,7 +1518,7 @@ void FrameLoader::checkLoadCompleteForThisFrame()
             return;
         }
         
-        case WebFrameStateCommittedPage: {
+        case FrameStateCommittedPage: {
             DocumentLoader* dl = m_documentLoader.get();            
             if (dl->isLoadingInAPISense())
                 return;
@@ -1544,7 +1546,7 @@ void FrameLoader::checkLoadCompleteForThisFrame()
             return;
         }
         
-        case WebFrameStateComplete:
+        case FrameStateComplete:
             // Even if already complete, we might have set a previous item on a frame that
             // didn't do any data loading on the past transaction. Make sure to clear these out.
             m_client->frameLoadCompleted();
@@ -1560,12 +1562,11 @@ void FrameLoader::continueLoadRequestAfterNewWindowPolicy(NSURLRequest *request,
         return;
 
     RefPtr<Frame> frame = m_frame;
-
     RefPtr<Frame> mainFrame = m_client->dispatchCreatePage(nil);
     if (!mainFrame)
         return;
 
-    [Mac(mainFrame.get())->bridge() setName:frameName];
+    mainFrame->tree()->setName(frameName);
     mainFrame->loader()->client()->dispatchShow();
     mainFrame->setOpener(frame.get());
     mainFrame->loader()->load(request, nil, FrameLoadTypeStandard, formState);
@@ -1601,7 +1602,7 @@ NSURLRequest *FrameLoader::requestFromDelegate(NSURLRequest *request, id& identi
 }
 
 void FrameLoader::post(NSURL *URL, NSString *referrer, NSString *target, NSArray *postData,
-    NSString *contentType, NSEvent *event, DOMElement *form, NSDictionary *formValues)
+    NSString *contentType, NSEvent *event, Element* form, NSDictionary *formValues)
 {
     // When posting, use the NSURLRequestReloadIgnoringCacheData load flag.
     // This prevents a potential bug which may cause a page with a form that uses itself
@@ -1778,19 +1779,19 @@ FrameLoaderClient::~FrameLoaderClient()
         m_loader->continueFragmentScrollAfterNavigationPolicy(request);
 }
 
-- (void)continueAfterNewWindowPolicy:(WebPolicyAction)policy
+- (void)continueAfterNewWindowPolicy:(PolicyAction)policy
 {
     if (m_loader)
         m_loader->continueAfterNewWindowPolicy(policy);
 }
 
-- (void)continueAfterNavigationPolicy:(WebPolicyAction)policy
+- (void)continueAfterNavigationPolicy:(PolicyAction)policy
 {
     if (m_loader)
         m_loader->continueAfterNavigationPolicy(policy);
 }
 
-- (void)continueAfterWillSubmitForm:(WebPolicyAction)policy
+- (void)continueAfterWillSubmitForm:(PolicyAction)policy
 {
     if (m_loader)
         m_loader->continueAfterWillSubmitForm(policy);
index fdff7991b7bde92b31d06fb62ec4a4ca0ee9d32f..6d8cc7202b154d01f3e737ce73f24fd200f1884a 100644 (file)
 
 #include "CachedImage.h"
 #include "Document.h"
+#include "FrameLoader.h"
 #include "FrameMac.h"
 #include "WebCoreFrameBridge.h"
+#include "WebDocumentLoader.h"
 
 namespace WebCore {
     
@@ -41,13 +43,13 @@ void finishImageLoad(Document* document, CachedImage* image, const void* imageDa
     image->setAllData(nsData);
     [nsData release];
 
-    WebCoreFrameBridge* bridge = Mac(document->frame())->bridge();
-    NSURLResponse* response = [bridge mainResourceURLResponse];
+    Frame* frame = document->frame();
+    NSURLResponse *response = frame->loader()->documentLoader()->response();
     image->setResponse(response);
 
     IntSize size = image->imageSize();
     if (size.width())
-        document->setTitle([bridge imageTitleForFilename:[response suggestedFilename] size:size]);
+        document->setTitle([Mac(frame)->bridge() imageTitleForFilename:[response suggestedFilename] size:size]);
 }
     
 }
index ebcd86c60d6491980b23e674442009a910f2c757..c8a05832c3c90e8c0d3ddf51172aed9c4822177a 100644 (file)
@@ -417,7 +417,7 @@ bool DocumentLoader::isLoadingInAPISense() const
 {
     // Once a frame has loaded, we no longer need to consider subresources,
     // but we still need to consider subframes.
-    if (frameLoader()->state() != WebFrameStateComplete) {
+    if (frameLoader()->state() != FrameStateComplete) {
         if (!m_primaryLoadComplete && isLoading())
             return true;
         if (frameLoader()->isLoadingSubresources())
index 6febcef585823772feb64695ad094f0b5685048a..9fd2a02eb4d2e882dd7d7b1ec3b453d43117c963 100644 (file)
@@ -30,7 +30,6 @@
 #include "StringHash.h"
 #include <wtf/HashMap.h>
 
-@class DOMElement;
 @class NSDictionary;
 @class WebCoreFrameBridge;
 
@@ -47,12 +46,12 @@ namespace WebCore {
         const HashMap<String, String>& values() const { return m_values; }
         Frame* sourceFrame() const { return m_sourceFrame.get(); }
 
-        static PassRefPtr<FormState> create(DOMElement *form, NSDictionary *values, WebCoreFrameBridge *sourceFrame);
+        static PassRefPtr<FormState> create(PassRefPtr<Element> form, NSDictionary *values, WebCoreFrameBridge *sourceFrame);
         NSDictionary *valuesAsNSDictionary() const;
 
     private:
         FormState(PassRefPtr<Element> form, const HashMap<String, String>& values, PassRefPtr<Frame> sourceFrame);
-        FormState(DOMElement *form, NSDictionary *values, WebCoreFrameBridge *sourceFrame);
+        FormState(PassRefPtr<Element> form, NSDictionary *values, WebCoreFrameBridge *sourceFrame);
 
         RefPtr<Element> m_form;
         HashMap<String, String> m_values;
index a378eec50e61d015d4583c2541cc7e3c234e2ab4..a498fa7ab2a8f27e1e6f22aacb314a6657b50973 100644 (file)
@@ -41,7 +41,7 @@ PassRefPtr<FormState> FormState::create(PassRefPtr<Element> form, const HashMap<
     return new FormState(form, values, sourceFrame);
 }
 
-PassRefPtr<FormState> FormState::create(DOMElement *form, NSDictionary *values, WebCoreFrameBridge *sourceFrame)
+PassRefPtr<FormState> FormState::create(PassRefPtr<Element> form, NSDictionary *values, WebCoreFrameBridge *sourceFrame)
 {
     return new FormState(form, values, sourceFrame);
 }
@@ -53,8 +53,8 @@ FormState::FormState(PassRefPtr<Element> form, const HashMap<String, String>& va
 {
 }
 
-FormState::FormState(DOMElement *form, NSDictionary *values, WebCoreFrameBridge *sourceFrame)
-    : m_form([form _element])
+FormState::FormState(PassRefPtr<Element> form, NSDictionary *values, WebCoreFrameBridge *sourceFrame)
+    : m_form(form)
     , m_sourceFrame([sourceFrame _frame])
 {
     NSEnumerator *keyEnumerator = [values keyEnumerator];
index aabf0a859387ab0e0a1506cf0c3228a422d38c53..4b8f2165453323bf554ab8ee69ea30790045e095 100644 (file)
@@ -53,7 +53,7 @@ namespace WebCore {
         virtual void didFail(NSError *);
 
         void continueAfterNavigationPolicy(NSURLRequest *);
-        void continueAfterContentPolicy(WebPolicyAction);
+        void continueAfterContentPolicy(PolicyAction);
 
     private:
         virtual void didCancel(NSError *);
@@ -72,7 +72,7 @@ namespace WebCore {
         void stopLoadingForPolicyChange();
         bool isPostOrRedirectAfterPost(NSURLRequest *newRequest, NSURLResponse *redirectResponse);
 
-        void continueAfterContentPolicy(WebPolicyAction, NSURLResponse *);
+        void continueAfterContentPolicy(PolicyAction, NSURLResponse *);
 
         int m_contentLength; // for logging only
         int m_bytesReceived; // for logging only
index 3a575c92b54c688316f0cc1589d2f4a97508222e..5a24be84678d88ab304c60a2e1f295157b2374a6 100644 (file)
@@ -214,13 +214,13 @@ static bool shouldLoadAsEmptyDocument(NSURL *url)
     return (bytesFilled == 0) || (bytesFilled > 5 && strncmp((char *)buffer.data(), "about:", 6) == 0);
 }
 
-void MainResourceLoader::continueAfterContentPolicy(WebPolicyAction contentPolicy, NSURLResponse *r)
+void MainResourceLoader::continueAfterContentPolicy(PolicyAction contentPolicy, NSURLResponse *r)
 {
     NSURL *URL = [request() URL];
     NSString *MIMEType = [r MIMEType]; 
     
     switch (contentPolicy) {
-    case WebPolicyUse: {
+    case PolicyUse: {
         // Prevent remote web archives from loading because they can claim to be from any domain and thus avoid cross-domain security checks (4120255).
         bool isRemote = ![URL isFileURL] && ![WebDataProtocol _webIsDataProtocolURL:URL];
         bool isRemoteWebArchive = isRemote && isCaseInsensitiveEqual(@"application/x-webarchive", MIMEType);
@@ -234,14 +234,14 @@ void MainResourceLoader::continueAfterContentPolicy(WebPolicyAction contentPolic
         break;
     }
 
-    case WebPolicyDownload:
+    case PolicyDownload:
         [m_proxy.get() setDelegate:nil];
         frameLoader()->download(connection(), request(), r, m_proxy.get());
         m_proxy = nil;
         receivedError(interruptionForPolicyChangeError());
         return;
 
-    case WebPolicyIgnore:
+    case PolicyIgnore:
         stopLoadingForPolicyChange();
         return;
     
@@ -273,7 +273,7 @@ void MainResourceLoader::continueAfterContentPolicy(WebPolicyAction contentPolic
         didFinishLoading();
 }
 
-void MainResourceLoader::continueAfterContentPolicy(WebPolicyAction policy)
+void MainResourceLoader::continueAfterContentPolicy(PolicyAction policy)
 {
     bool isStopping = frameLoader()->isStopping();
     frameLoader()->cancelContentPolicyCheck();
@@ -461,7 +461,7 @@ void MainResourceLoader::releasePolicyDelegate()
     m_loader->continueAfterNavigationPolicy(request);
 }
 
-- (void)continueAfterContentPolicy:(WebPolicyAction)policy
+- (void)continueAfterContentPolicy:(PolicyAction)policy
 {
     if (!m_loader)
         return;
index 59e2825a0a6278f81b2f5423d17c8522319dcf3f..a901a2dda60fd3e76d80dee6ac2d1b301336bcf2 100644 (file)
@@ -67,7 +67,7 @@ id <WebCoreResourceHandle> SubresourceLoader::create(Frame* frame, id <WebCoreRe
     NSMutableURLRequest *newRequest, NSDictionary *customHeaders, NSString *referrer)
 {
     FrameLoader* fl = frame->loader();
-    if (fl->state() == WebFrameStateProvisional)
+    if (fl->state() == FrameStateProvisional)
         return nil;
 
     wkSupportsMultipartXMixedReplace(newRequest);
index 59dd9184c9c353c28beeca9023bb889bf7e5a5b4..8bafb02c6c80440c858f464a4ea5dda83871089e 100644 (file)
@@ -490,23 +490,18 @@ static Boolean ListBoxTypeSelectCallback(UInt32 index, void *listDataPtr, void *
 
 - (void)keyDown:(NSEvent *)event
 {
-    if (!_box)  {
+    if (!_box)
         return;
-    }
-    WebCoreFrameBridge *bridge = FrameMac::bridgeForWidget(_box);
-    if (![bridge interceptKeyEvent:event toView:self]) {
-    [super keyDown:event];
-    }
+    if (!Mac(Frame::frameForWidget(_box))->keyEvent(event))
+        [super keyDown:event];
 }
 
 - (void)keyUp:(NSEvent *)event
 {
-    if (!_box)  {
+    if (!_box)
         return;
-    }
     
-    WebCoreFrameBridge *bridge = FrameMac::bridgeForWidget(_box);
-    if (![bridge interceptKeyEvent:event toView:self]) {
+    if (!Mac(Frame::frameForWidget(_box))->keyEvent(event)) {
         [super keyUp:event];
         NSString *string = [event characters];
        
@@ -546,7 +541,6 @@ static Boolean ListBoxTypeSelectCallback(UInt32 index, void *listDataPtr, void *
         
         [self selectRowIndexes:[NSIndexSet indexSetWithIndex:closestItem] byExtendingSelection:NO];
         [self scrollRowToVisible:closestItem];
-        
     }
 }
 
index 1e410b80aa495799ba7b6a5771a3777cc811f697..49b4d2ba1db4c6b2dd58ffb8babdb4db184f00b4 100644 (file)
@@ -306,7 +306,7 @@ static DOMHTMLInputElement* inputElement(TextField* widget)
         if (DOMHTMLInputElement* input = inputElement(widget))
             intercepted = [bridge textField:input shouldHandleEvent:event];
         if (!intercepted)
-            intercepted = [bridge interceptKeyEvent:event toView:view];
+            intercepted = [bridge _frame]->keyEvent(event);
 
         // Always intercept key up events because we don't want them
         // passed along the responder chain. This is arguably a bug in
index 2b79fe7818c3c90453872593166bb48594a54ad3..0ea47f7ad55ccffdd9112cc014785a364961aa96 100644 (file)
@@ -1,3 +1,160 @@
+2006-10-25  Darin Adler  <darin@apple.com>
+
+        Reviewed by Anders.
+
+        - removed 55 methods from WebCoreFrameBridge
+        - changed callers to use Frame directly instead
+        - put FrameLoaderTypes.h types into the WebCore namespace
+        - first steps to get FrameLoader.h ready for cross-platform duty
+
+        * DefaultDelegates/WebDefaultContextMenuDelegate.m:
+        (-[WebDefaultUIDelegate openNewWindowWithURL:element:]):
+        * Plugins/WebBaseNetscapePluginView.mm:
+        (-[WebBaseNetscapePluginView requestWithURLCString:]):
+        (-[WebBaseNetscapePluginView loadPluginRequest:]):
+        (-[WebBaseNetscapePluginView getVariable:value:]):
+        * Plugins/WebNetscapePluginEmbeddedView.m:
+        (-[WebNetscapePluginEmbeddedView didStart]):
+        * Plugins/WebNetscapePluginStream.mm:
+        * Plugins/WebPluginContainerCheck.m:
+        (-[WebPluginContainerCheck _continueWithPolicy:]):
+        (-[WebPluginContainerCheck _isForbiddenFileLoad]):
+        * WebCoreSupport/WebEditorClient.mm:
+        (WebEditorClient::shouldDeleteRange):
+        (WebEditorClient::shouldShowDeleteInterface):
+        * WebCoreSupport/WebFrameBridge.mm:
+        (-[WebFrameBridge webView]):
+        (-[WebFrameBridge finishInitializingWithFrameName:view:]):
+        (-[WebFrameBridge createWindowWithURL:]):
+        (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
+        (-[WebFrameBridge windowObjectCleared]):
+        (-[WebFrameBridge createModalDialogWithURL:]):
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::dispatchCreatePage):
+        (WebFrameLoaderClient::dispatchWillSubmitForm):
+        * WebKit.xcodeproj/project.pbxproj:
+        * WebView/WebArchiver.m:
+        (+[WebArchiver archiveSelectionInFrame:]):
+        * WebView/WebDataSource.mm:
+        (-[WebDataSource _documentFragmentWithImageResource:]):
+        (-[WebDataSource _imageElementWithImageResource:]):
+        * WebView/WebEditingDelegatePrivate.h:
+        * WebView/WebFrame.mm:
+        (core):
+        (kit):
+        (-[WebFrame _createItemTreeWithTargetFrame:clippedAtTarget:]):
+        (-[WebFrame _canCachePage]):
+        (-[WebFrame _childFramesMatchItem:]):
+        (-[WebFrame _URLsMatchItem:]):
+        (-[WebFrame _loadItem:withLoadType:]):
+        (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]):
+        (-[WebFrame _viewWillMoveToHostWindow:]):
+        (-[WebFrame _viewDidMoveToHostWindow]):
+        (-[WebFrame _addChild:]):
+        (-[WebFrame _saveDocumentAndScrollState]):
+        (-[WebFrame _numPendingOrLoadingRequests:]):
+        (-[WebFrame _reloadForPluginChanges]):
+        (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
+        (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
+        (-[WebFrame _initWithWebFrameView:webView:coreFrame:]):
+        (-[WebFrame _documentViews]):
+        (-[WebFrame _updateBackground]):
+        (-[WebFrame _unmarkAllMisspellings]):
+        (-[WebFrame _hasSelection]):
+        (-[WebFrame _atMostOneFrameHasSelection]):
+        (-[WebFrame _findFrameWithSelection]):
+        (-[WebFrame _frameLoader]):
+        (-[WebFrame _isDescendantOfFrame:]):
+        (-[WebFrame _setShouldCreateRenderers:]):
+        (-[WebFrame _bodyBackgroundColor]):
+        (-[WebFrame init]):
+        (-[WebFrame initWithName:webFrameView:webView:]):
+        (-[WebFrame dealloc]):
+        (-[WebFrame finalize]):
+        (-[WebFrame name]):
+        (-[WebFrame webView]):
+        (-[WebFrame DOMDocument]):
+        (-[WebFrame frameElement]):
+        (-[WebFrame findFrameNamed:]):
+        (-[WebFrame parentFrame]):
+        (-[WebFrame childFrames]):
+        (-[WebFrame _invalidateCurrentItemPageCache]):
+        (-[WebFrame _dispatchCreateWebViewWithRequest:]):
+        (-[WebFrame _dispatchSourceFrame:willSubmitForm:withValues:submissionDecider:]):
+        (-[WebFrame _prepareForDataSourceReplacement]):
+        (-[WebFrame _provisionalLoadStarted]):
+        * WebView/WebFrameInternal.h:
+        * WebView/WebHTMLRepresentation.m:
+        (-[WebHTMLRepresentation DOMDocument]):
+        (-[WebHTMLRepresentation attributedText]):
+        * WebView/WebHTMLView.m:
+        (-[WebHTMLView _documentRange]):
+        (-[WebHTMLView _documentFragmentWithPaths:]):
+        (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
+        (-[WebHTMLView _selectedRange]):
+        (-[WebHTMLView _updateMouseoverWithEvent:]):
+        (-[WebHTMLView _canEditRichly]):
+        (-[WebHTMLView _hasSelection]):
+        (-[WebHTMLView _hasSelectionOrInsertionPoint]):
+        (-[WebHTMLView _hasInsertionPoint]):
+        (-[WebHTMLView _isEditable]):
+        (-[WebHTMLView _isSelectionInPasswordField]):
+        (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
+        (-[WebHTMLView _selectionDraggingImage]):
+        (-[WebHTMLView _canIncreaseSelectionListLevel]):
+        (-[WebHTMLView _canDecreaseSelectionListLevel]):
+        (-[WebHTMLView _updateActiveState]):
+        (-[NSArray readSelectionFromPasteboard:]):
+        (-[NSArray validateUserInterfaceItem:]):
+        (-[NSArray maintainsInactiveSelection]):
+        (-[NSArray menuForEvent:]):
+        (-[NSArray scrollWheel:]):
+        (-[NSArray acceptsFirstMouse:]):
+        (-[NSArray shouldDelayWindowOrderingForEvent:]):
+        (-[NSArray mouseDown:]):
+        (-[NSArray mouseDragged:]):
+        (-[NSArray mouseUp:]):
+        (-[NSArray keyDown:]):
+        (-[NSArray keyUp:]):
+        (-[NSArray centerSelectionInVisibleArea:]):
+        (-[NSArray _selectionStartFontAttributesAsRTF]):
+        (-[NSArray _emptyStyle]):
+        (-[NSArray performKeyEquivalent:]):
+        (-[NSArray indent:]):
+        (-[NSArray outdent:]):
+        (-[WebHTMLView cut:]):
+        (-[WebHTMLView paste:]):
+        (-[WebHTMLView _selectRangeInMarkedText:]):
+        (-[WebTextCompleteController doCompletion]):
+        (-[WebHTMLView selectionRect]):
+        (-[WebHTMLView selectionImageForcingWhiteText:]):
+        (-[WebHTMLView selectionImageRect]):
+        (-[WebHTMLView attributedString]):
+        (-[WebHTMLView _isMoveDrag]):
+        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]):
+        * WebView/WebPolicyDelegate.mm:
+        (-[WebPolicyDecisionListener _usePolicy:]):
+        (-[WebPolicyDecisionListener use]):
+        (-[WebPolicyDecisionListener ignore]):
+        (-[WebPolicyDecisionListener download]):
+        (-[WebPolicyDecisionListener continue]):
+        * WebView/WebScriptDebugDelegate.m:
+        (-[WebScriptCallFrame _initWithFrame:initWithWebFrame:]):
+        (-[WebScriptCallFrame globalObject]):
+        * WebView/WebView.mm:
+        (-[WebView _attachScriptDebuggerToAllFrames]):
+        (-[WebView _detachScriptDebuggerFromAllFrames]):
+        (-[WebView windowScriptObject]):
+        (incrementFrame):
+        (-[WebView searchFor:direction:caseSensitive:wrap:]):
+        (-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]):
+        (-[WebView removeDragCaret]):
+        (-[WebView setScriptDebugDelegate:]):
+        (-[WebView scriptDebugDelegate]):
+        (-[WebView shouldClose]):
+        (-[WebView selectedDOMRange]):
+        (-[WebView styleDeclarationWithText:]):
+
 2006-10-25  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Adam.
index eb9e3d78d9e041077467a0f5b4cc2cd05ec30568..9fd58b256d023717534161904d43d81e78e4e2f2 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <WebKit/WebDefaultContextMenuDelegate.h>
+#import "WebDefaultContextMenuDelegate.h"
 
+#import "WebDOMOperations.h"
+#import "WebDataSourcePrivate.h"
+#import "WebDefaultUIDelegate.h"
+#import "WebFrameBridge.h"
+#import "WebFrameInternal.h"
+#import "WebFrameView.h"
+#import "WebHTMLViewPrivate.h"
+#import "WebLocalizableStrings.h"
+#import "WebNSPasteboardExtras.h"
+#import "WebNSURLRequestExtras.h"
+#import "WebPolicyDelegate.h"
+#import "WebUIDelegate.h"
+#import "WebUIDelegatePrivate.h"
+#import "WebViewInternal.h"
+#import <Foundation/NSURLConnection.h>
+#import <Foundation/NSURLRequest.h>
 #import <JavaScriptCore/Assertions.h>
+#import <WebCore/FrameMac.h>
+#import <WebCore/WebCoreFrameBridge.h>
 #import <WebKit/DOM.h>
 #import <WebKit/DOMPrivate.h>
-#import <WebKit/WebFrameBridge.h>
-#import <WebKit/WebDataSourcePrivate.h>
-#import <WebKit/WebDefaultUIDelegate.h>
-#import <WebKit/WebDOMOperations.h>
-#import <WebKit/WebFrameInternal.h>
-#import <WebKit/WebHTMLViewPrivate.h>
-#import <WebKit/WebLocalizableStrings.h>
-#import <WebKit/WebNSPasteboardExtras.h>
-#import <WebKit/WebNSURLRequestExtras.h>
-#import <WebKit/WebFrameView.h>
-#import <WebKit/WebPolicyDelegate.h>
-#import <WebKit/WebViewInternal.h>
-#import <WebKit/WebUIDelegate.h>
-#import <WebKit/WebUIDelegatePrivate.h>
-
-#import <WebCore/WebCoreFrameBridge.h>
-
-#import <Foundation/NSURLConnection.h>
-#import <Foundation/NSURLRequest.h>
 
 @implementation WebDefaultUIDelegate (WebContextMenu)
 
@@ -383,10 +382,9 @@ static NSString *localizedMenuTitleFromAppKit(NSString *key, NSString *comment)
     WebView *webView = [webFrame webView];
     
     NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
-    NSString *referrer = [[webFrame _bridge] referrer];
-    if (referrer) {
+    NSString *referrer = core(webFrame)->referrer();
+    if (referrer)
         [request _web_setHTTPReferrer:referrer];
-    }
     
     [webView _openNewWindowWithRequest:request];
 }
index 71b75f666322fd27b21eecd8ba5e78a3fc3e8db2..5362c733f18b9ad03a052d2acf8333a1c0e5084f 100644 (file)
@@ -51,6 +51,8 @@
 #import <JavaScriptCore/Assertions.h>
 #import <JavaScriptCore/npruntime_impl.h>
 #import <WebCore/FrameLoader.h> 
+#import <WebCore/FrameMac.h> 
+#import <WebCore/FrameTree.h> 
 #import <WebKit/DOMPrivate.h>
 #import <WebKit/WebUIDelegate.h>
 #import <WebKitSystemInterface.h>
@@ -1761,7 +1763,7 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
         return nil;
 
     NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
-    [request _web_setHTTPReferrer:[[[self webFrame] _bridge] referrer]];
+    [request _web_setHTTPReferrer:core([self webFrame])->referrer()];
     return request;
 }
 
@@ -1861,7 +1863,7 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
                 newWebView = [[WebDefaultUIDelegate sharedUIDelegate] webView:currentWebView createWebViewWithRequest:nil];
             }
             frame = [newWebView mainFrame];
-            [[frame _bridge] setName:frameName];
+            core(frame)->tree()->setName(frameName);
             [[newWebView _UIDelegateForwarder] webViewShow:newWebView];
         }
     }
@@ -2160,7 +2162,7 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
     switch (variable) {
         case NPNVWindowNPObject:
         {
-            NPObject *windowScriptObject = [[[self webFrame] _bridge] windowScriptNPObject];
+            NPObject *windowScriptObject = core([self webFrame])->windowScriptNPObject();
 
             // Return value is expected to be retained, as described here: <http://www.mozilla.org/projects/plugins/npruntime.html#browseraccess>
             if (windowScriptObject)
index ccc125f6e49d69aeeb67849f80f044b5efabd7f8..319342de3f46dfbfc9b6631c17642c8e6ab90305 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <WebKit/WebNetscapePluginEmbeddedView.h>
-
+#import "WebNetscapePluginEmbeddedView.h"
+
+#import "WebBaseNetscapePluginViewPrivate.h"
+#import "WebDataSource.h"
+#import "WebFrame.h"
+#import "WebFrameBridge.h"
+#import "WebFrameInternal.h"
+#import "WebFrameView.h"
+#import "WebNSURLExtras.h"
+#import "WebNSURLRequestExtras.h"
+#import "WebNSViewExtras.h"
+#import "WebNetscapePluginPackage.h"
+#import "WebNetscapePluginStream.h"
+#import "WebView.h"
 #import <JavaScriptCore/Assertions.h>
-
-#import <WebKit/WebBaseNetscapePluginViewPrivate.h>
-#import <WebKit/WebFrameBridge.h>
-#import <WebKit/WebDataSource.h>
-#import <WebKit/WebFrame.h>
-#import <WebKit/WebFrameInternal.h>
-#import <WebKit/WebFrameView.h>
-#import <WebKit/WebNetscapePluginPackage.h>
-#import <WebKit/WebNetscapePluginStream.h>
-#import <WebKit/WebNSViewExtras.h>
-#import <WebKit/WebNSURLExtras.h>
-#import <WebKit/WebNSURLRequestExtras.h>
-#import <WebKit/WebView.h>
+#import <WebCore/FrameMac.h>
 
 @implementation WebNetscapePluginEmbeddedView
 
     // Check for this and don't start a load in this case.
     if (URL != nil && ![URL _web_isEmpty]) {
         NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
-        [request _web_setHTTPReferrer:[[[self webFrame] _bridge] referrer]];
+        [request _web_setHTTPReferrer:core([self webFrame])->referrer()];
         [self loadRequest:request inTarget:nil withNotifyData:nil sendNotification:NO];
     } 
 }
index df7a212f575d9b8c45fc90bb3b6607df927ac9e3..979cb1c23f106fd04f718af9c4ec1b0311dc4a1a 100644 (file)
@@ -56,7 +56,7 @@ using namespace WebCore;
 
     WebFrameBridge *bridge = [[view webFrame] _bridge];
     BOOL hideReferrer;
-    if (![bridge canLoadURL:[theRequest URL] fromReferrer:[bridge referrer] hideReferrer:&hideReferrer])
+    if (![bridge canLoadURL:[theRequest URL] fromReferrer:core([view webFrame])->referrer() hideReferrer:&hideReferrer])
         return nil;
 
     if ([self initWithRequestURL:[theRequest URL]
@@ -73,7 +73,7 @@ using namespace WebCore;
     if (hideReferrer)
         [(NSMutableURLRequest *)request _web_setHTTPReferrer:nil];
 
-    _loader = NetscapePlugInStreamLoader::create([bridge _frame], self).release();
+    _loader = NetscapePlugInStreamLoader::create(core([view webFrame]), self).release();
     
     isTerminated = NO;
 
index 98b6bd9c3ba1e87a2de40475975406669ba9318d..a8941fde7a5f80b6ba143c2b1ca72bb9e3f8cab8 100644 (file)
@@ -44,6 +44,8 @@
 #import <WebCore/FrameLoaderTypes.h>
 #import <objc/objc-runtime.h>
 
+using namespace WebCore;
+
 @implementation WebPluginContainerCheck
 
 + (id)checkWithRequest:(NSURLRequest *)request target:(NSString *)target resultObject:(id)obj selector:(SEL)selector controller:(WebPluginController *)controller
@@ -81,9 +83,9 @@
     [super dealloc];
 }
 
-- (void)_continueWithPolicy:(WebPolicyAction)policy
+- (void)_continueWithPolicy:(PolicyAction)policy
 {
-    ((void (*)(id, SEL, BOOL))objc_msgSend)(_resultObject, _resultSelector, (policy == WebPolicyUse));
+    ((void (*)(id, SEL, BOOL))objc_msgSend)(_resultObject, _resultSelector, (policy == PolicyUse));
 
     // this will call indirectly call cancel
     [_controller _webPluginContainerCancelCheckIfAllowedToLoadRequest:self];
@@ -95,7 +97,7 @@
    WebFrameBridge *bridge = [_controller bridge];
    ASSERT(bridge);
    if (![bridge canLoadURL:[_request URL] fromReferrer:[_controller URLPolicyCheckReferrer] hideReferrer:&ignore]) {
-       [self _continueWithPolicy:WebPolicyIgnore];
+       [self _continueWithPolicy:PolicyIgnore];
        return YES;
    }
 
index 07758199d911d308d35e6727bde044c2621a16ee..3b2995bab948b33126f6e2e7b3424795613f3ad2 100644 (file)
 
 #import "WebEditorClient.h"
 
-#import <WebKit/DOMHTMLElement.h>
-#import <WebKit/DOMRange.h>
-#import "WebView.h"
+#import "WebFrameInternal.h"
 #import "WebViewInternal.h"
-#import "WebEditingDelegate.h"
 #import "WebEditingDelegatePrivate.h"
 
-// FIXME: we should have a way to get the following DOM interfaces from the WebCore internal headers,
-// we can't make the internal DOM headers private since they are not generated at the time installhdrs is called
-
-@interface DOMHTMLElement (WebCoreInternal)
-+ (DOMHTMLElement *)_HTMLElementWith:(WebCore::HTMLElement*)impl;
-@end
-
-@interface DOMRange (WebCoreInternal)
-+ (DOMRange *)_rangeWith:(WebCore::Range*)impl;
-@end
-
 WebEditorClient::WebEditorClient()
     : m_webView(nil) 
 {
@@ -67,12 +53,14 @@ void WebEditorClient::setWebView(WebView* webView)
 
 bool WebEditorClient::shouldDeleteRange(WebCore::Range* range)
 {
-    return [[m_webView _editingDelegateForwarder] webView:m_webView shouldDeleteDOMRange:[DOMRange _rangeWith:range]];
+    return [[m_webView _editingDelegateForwarder] webView:m_webView
+        shouldDeleteDOMRange:kit(range)];
 }
 
 bool WebEditorClient::shouldShowDeleteInterface(WebCore::HTMLElement* element)
 {
-    return [[m_webView _editingDelegateForwarder] webView:m_webView shouldShowDeleteInterfaceForElement:[DOMHTMLElement _HTMLElementWith:element]];
+    return [[m_webView _editingDelegateForwarder] webView:m_webView
+        shouldShowDeleteInterfaceForElement:kit(element)];
 }
 
 /*
index 8430a4c24f2a81cf3d8b645a4b78d0129e9b076f..1595b722db3697b7419d42102971e5e39452a4b9 100644 (file)
 #import <JavaScriptCore/Assertions.h>
 #import <JavaVM/jni.h>
 #import <WebCore/FrameLoader.h>
+#import <WebCore/FrameMac.h>
+#import <WebCore/FrameTree.h>
+#import <WebCore/Page.h>
 #import <WebCore/WebCoreFrameNamespaces.h>
+#import <WebCore/WebCoreSettings.h>
 #import <WebCore/WebDocumentLoader.h>
 #import <WebCore/WebFormDataStream.h>
 #import <WebCore/WebFrameLoaderClient.h>
@@ -116,19 +120,19 @@ NSString *WebPluginContainerKey =   @"WebPluginContainer";
 
 - (WebView *)webView
 {
-    ASSERT([[self page] isKindOfClass:[WebPageBridge class]]);
-    return [(WebPageBridge *)[self page] webView];
+    ASSERT([[self _frame]->page()->bridge() isKindOfClass:[WebPageBridge class]]);
+    return [(WebPageBridge *)[self _frame]->page()->bridge() webView];
 }
 
 - (void)finishInitializingWithFrameName:(NSString *)name view:(WebFrameView *)view
 {
     WebView *webView = [self webView];
 
-    _frame = [[WebFrame alloc] _initWithWebFrameView:view webView:webView bridge:self];
+    _frame = [[WebFrame alloc] _initWithWebFrameView:view webView:webView coreFrame:m_frame];
     ++WebBridgeCount;
 
-    [self setName:name];
-    [self initializeSettings:[webView _settings]];
+    [self _frame]->tree()->setName(name);
+    [self _frame]->setSettings([[webView _settings] settings]);
     [self setTextSizeMultiplier:[webView textSizeMultiplier]];
 }
 
@@ -248,7 +252,7 @@ NSString *WebPluginContainerKey =   @"WebPluginContainer";
     NSMutableURLRequest *request = nil;
     if (URL != nil && ![URL _web_isEmpty]) {
         request = [NSMutableURLRequest requestWithURL:URL];
-        [request _web_setHTTPReferrer:[self referrer]];
+        [request _web_setHTTPReferrer:m_frame->referrer()];
     }
 
     WebView *currentWebView = [self webView];
@@ -729,7 +733,7 @@ NSString *WebPluginContainerKey =   @"WebPluginContainer";
                     loadManually:(BOOL)loadManually
 {
     BOOL hideReferrer;
-    if (![self canLoadURL:URL fromReferrer:[self referrer] hideReferrer:&hideReferrer])
+    if (![self canLoadURL:URL fromReferrer:m_frame->referrer() hideReferrer:&hideReferrer])
         return nil;
 
     ASSERT([attributeNames count] == [attributeValues count]);
@@ -1271,7 +1275,7 @@ static id <WebFormDelegate> formDelegate(WebFrameBridge *self)
 - (void)windowObjectCleared
 {
     WebView *wv = [self webView];
-    [[wv _frameLoadDelegateForwarder] webView:wv windowScriptObjectAvailable:[self windowScriptObject]];
+    [[wv _frameLoadDelegateForwarder] webView:wv windowScriptObjectAvailable:m_frame->windowScriptObject()];
     if ([wv scriptDebugDelegate] || [WebScriptDebugServer listenerCount]) {
         [_frame _detachScriptDebugger]; // FIXME: remove this once <rdar://problem/4608404> is fixed
         [_frame _attachScriptDebugger];
@@ -1395,7 +1399,7 @@ static id <WebFormDelegate> formDelegate(WebFrameBridge *self)
 
     if (URL != nil && ![URL _web_isEmpty]) {
         request = [NSMutableURLRequest requestWithURL:URL];
-        [request _web_setHTTPReferrer:[self referrer]];
+        [request _web_setHTTPReferrer:m_frame->referrer()];
     }
 
     WebView *currentWebView = [self webView];
index 75af4bb3479ba90394c5e22e4e017833b4876090..54ceb19c4e45cb29a11f57527d6adc2067c436e3 100644 (file)
 
 using namespace WebCore;
 
-// FIXME: We should have a way to get the following DOM interface from the WebCore internal headers, but we
-// can't make the internal DOM headers private since they are not generated at the time installhdrs is called.
-
-@interface DOMElement (WebCoreInternal)
-+ (DOMElement *)_elementWith:(WebCore::Element*)impl;
-@end
-
 WebFrameLoaderClient::WebFrameLoaderClient(WebFrame *webFrame)
     : m_webFrame(webFrame)
 {
@@ -319,7 +312,7 @@ void WebFrameLoaderClient::dispatchDidFirstLayout()
 
 Frame* WebFrameLoaderClient::dispatchCreatePage(NSURLRequest *request)
 {
-    return [[m_webFrame.get() _dispatchCreateWebViewWithRequest:request] _frame];
+    return [m_webFrame.get() _dispatchCreateWebViewWithRequest:request];
 }
 
 void WebFrameLoaderClient::dispatchShow()
@@ -354,8 +347,8 @@ void WebFrameLoaderClient::dispatchUnableToImplementPolicy(NSError *error)
 void WebFrameLoaderClient::dispatchWillSubmitForm(WebPolicyDecider *decider, Frame* sourceFrame,
     Element* form, NSDictionary *values)
 {
-    [m_webFrame.get() _dispatchSourceFrame:Mac(sourceFrame)->bridge()
-        willSubmitForm:[DOMElement _elementWith:form] withValues:values submissionDecider:decider];
+    [m_webFrame.get() _dispatchSourceFrame:sourceFrame
+        willSubmitForm:form withValues:values submissionDecider:decider];
 }
 
 void WebFrameLoaderClient::dispatchDidLoadMainResource(DocumentLoader* loader)
index 63ddbcc5efbb140482dc6bcda14b7ae01f314807..e1fe2d448d898bc1cd7159c6662e03394e2bcce6 100644 (file)
                51443F9B0429392B00CA2D3A /* WebPolicyDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPolicyDelegate.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                51443F9C0429392B00CA2D3A /* WebPolicyDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPolicyDelegatePrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                5152FADD033FC50400CA2ACD /* WebDefaultContextMenuDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDefaultContextMenuDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               5152FADE033FC50400CA2ACD /* WebDefaultContextMenuDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDefaultContextMenuDelegate.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               5152FADE033FC50400CA2ACD /* WebDefaultContextMenuDelegate.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; indentWidth = 4; path = WebDefaultContextMenuDelegate.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                5152FADF033FC50400CA2ACD /* WebDefaultPolicyDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDefaultPolicyDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                5152FAE0033FC50400CA2ACD /* WebDefaultPolicyDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDefaultPolicyDelegate.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                5152FAE5033FC52200CA2ACD /* WebFrameLoadDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFrameLoadDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                65488D9F084FBCCB00831AD0 /* WebNSDictionaryExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSDictionaryExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                65488DA0084FBCCB00831AD0 /* WebNSDictionaryExtras.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNSDictionaryExtras.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                6550B7C5099EFAE90090D781 /* WebArchiver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebArchiver.h; sourceTree = "<group>"; };
-               6550B7C6099EFAE90090D781 /* WebArchiver.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = WebArchiver.m; sourceTree = "<group>"; };
+               6550B7C6099EFAE90090D781 /* WebArchiver.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 30; path = WebArchiver.m; sourceTree = "<group>"; };
                6578F5DE045F817400000128 /* WebDownload.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDownload.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                6578F5DF045F817400000128 /* WebDownload.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDownload.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                65836F5E07EE425900682F95 /* WebPluginContainerPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPluginContainerPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                65E0F9E408500F23007E5CB9 /* WebNSUserDefaultsExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSUserDefaultsExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                65E0F9E508500F23007E5CB9 /* WebNSUserDefaultsExtras.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNSUserDefaultsExtras.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                65E1150307EFFEBF009B8BF7 /* WebPluginContainerCheck.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPluginContainerCheck.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               65E1150407EFFEBF009B8BF7 /* WebPluginContainerCheck.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebPluginContainerCheck.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               65E1150407EFFEBF009B8BF7 /* WebPluginContainerCheck.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 30; indentWidth = 4; path = WebPluginContainerCheck.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                65EEDE51084FFB920002DB25 /* WebNSCalendarDateExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSCalendarDateExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                65EEDE52084FFB920002DB25 /* WebNSCalendarDateExtras.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNSCalendarDateExtras.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                65EEDE55084FFC9E0002DB25 /* WebNSFileManagerExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSFileManagerExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                7E6FEEFF08985A3E00C44C3F /* WebDefaultScriptDebugDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDefaultScriptDebugDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                7E6FEF0008985A3E00C44C3F /* WebDefaultScriptDebugDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDefaultScriptDebugDelegate.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                7E6FEF0508985A7200C44C3F /* WebScriptDebugDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebScriptDebugDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               7E6FEF0608985A7200C44C3F /* WebScriptDebugDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebScriptDebugDelegate.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               7E6FEF0608985A7200C44C3F /* WebScriptDebugDelegate.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; indentWidth = 4; path = WebScriptDebugDelegate.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                7E6FEF0708985A7200C44C3F /* WebScriptDebugDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebScriptDebugDelegatePrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                830E81E005853AC000AD0891 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
                833987810543012D00EE146E /* WebDocumentPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDocumentPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                84AE905F062DE6A80075BBF9 /* WebDOMOperationsPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDOMOperationsPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                84CA5F7E042685E800CA2ACA /* WebKitErrorsPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebKitErrorsPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                84D4BFF70348EF7600CA2ACA /* WebNetscapePluginEmbeddedView.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNetscapePluginEmbeddedView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               84D4BFF80348EF7600CA2ACA /* WebNetscapePluginEmbeddedView.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNetscapePluginEmbeddedView.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               84D4BFF80348EF7600CA2ACA /* WebNetscapePluginEmbeddedView.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; indentWidth = 4; path = WebNetscapePluginEmbeddedView.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                9305892A070868B300E79D96 /* WebDashboardRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDashboardRegion.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                930D02BB06275F640076701E /* WebViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebViewInternal.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                930D02BD06275F710076701E /* WebFrameInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFrameInternal.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
index d3347dc22ebb2fbed90cbb7f88b12cf9c5d2198f..da34ecbbe7e5c1d8952120484b406174a14ae2ee 100644 (file)
 
 #import "WebArchiver.h"
 
-#import <WebKit/DOM.h>
 #import "WebArchive.h"
-#import <JavaScriptCore/Assertions.h>
-#import "WebDocument.h"
-#import "WebDataSource.h"
 #import "WebDOMOperationsPrivate.h"
+#import "WebDataSource.h"
+#import "WebDocument.h"
 #import "WebFrame.h"
 #import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import "WebResource.h"
+#import <JavaScriptCore/Assertions.h>
+#import <WebCore/FrameMac.h>
+#import <WebCore/SelectionController.h>
+#import <WebKit/DOM.h>
+
+using namespace WebCore;
 
 @implementation WebArchiver
 
 
 + (WebArchive *)archiveSelectionInFrame:(WebFrame *)frame
 {
+    Frame* coreFrame = core(frame);
+    if (!coreFrame)
+        return nil;
+
     WebFrameBridge *bridge = [frame _bridge];
     NSArray *nodes;
-    NSString *markupString = [bridge markupStringFromRange:[bridge selectedDOMRange] nodes:&nodes];
+    NSString *markupString = [bridge markupStringFromRange:kit(coreFrame->selectionController()->toRange().get()) nodes:&nodes];
     WebArchive *archive = [self _archiveWithMarkupString:markupString fromFrame:frame nodes:nodes];
 
     if ([bridge isFrameSet]) {
index 72546eecb6b06fca6351e6f18866d4f51e254144..eda672c28b6788dcacb790cae43bff6c89b232c4 100644 (file)
@@ -259,7 +259,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
     DOMElement *imageElement = [self _imageElementWithImageResource:resource];
     if (!imageElement)
         return 0;
-    DOMDocumentFragment *fragment = [[[self _bridge] DOMDocument] createDocumentFragment];
+    DOMDocumentFragment *fragment = [[[self webFrame] DOMDocument] createDocumentFragment];
     [fragment appendChild:imageElement];
     return fragment;
 }
@@ -271,7 +271,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
     
     [self addSubresource:resource];
     
-    DOMElement *imageElement = [[[self _bridge] DOMDocument] createElement:@"img"];
+    DOMElement *imageElement = [[[self webFrame] DOMDocument] createElement:@"img"];
     
     // FIXME: calling _web_originalDataAsString on a file URL returns an absolute path. Workaround this.
     NSURL *URL = [resource URL];
index 825cbda127d92b751d34ba0afd5c4b2601580413..412ec971e25988ff02fab29e0dbdb6c8cfeb1b5c 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <Cocoa/Cocoa.h>
-
-@class WebView;
-@class DOMHTMLElement;
+#import "WebEditingDelegate.h"
 
 @interface NSObject (WebViewEditingDelegatePrivate)
 - (BOOL)webView:(WebView *)webView shouldShowDeleteInterfaceForElement:(DOMHTMLElement *)element;
index 944ffd296472e49d63afaa7bf5bbd96c285d43db..454105d0bff7af6e45f5dee2bd23902154669b08 100644 (file)
 #import "WebScriptDebugServerPrivate.h"
 #import "WebUIDelegate.h"
 #import "WebViewInternal.h"
-#import <WebCore/Element.h>
 #import <WebCore/FrameLoader.h>
 #import <WebCore/FrameMac.h>
 #import <WebCore/FrameTree.h>
+#import <WebCore/HTMLElement.h>
+#import <WebCore/Page.h>
+#import <WebCore/SelectionController.h>
 #import <WebCore/WebDataProtocol.h>
 #import <WebCore/WebFormDataStream.h>
 #import <WebCore/WebFormState.h>
 #import <objc/objc-runtime.h>
 #import <wtf/HashMap.h>
 
+// FIXME: We should have a way to get the following DOM interface from the WebCore internal headers, but we
+// can't make the internal DOM headers private since they are not generated at the time installhdrs is called.
+
+@interface DOMDocument (WebCoreInternal)
+- (WebCore::Document *)_document;
++ (DOMDocument *)_documentWith:(WebCore::Document *)impl;
+@end
+
+@interface DOMElement (WebCoreInternal)
+- (WebCore::Element *)_element;
++ (DOMElement *)_elementWith:(WebCore::Element *)impl;
+@end
+
+@interface DOMHTMLElement (WebCoreInternal)
+- (WebCore::HTMLElement *)_HTMLElement;
++ (DOMHTMLElement *)_HTMLElementWith:(WebCore::HTMLElement *)impl;
+@end
+
+@interface DOMRange (WebCoreInternal)
+- (WebCore::Range *)_range;
++ (DOMRange *)_rangeWith:(WebCore::Range *)impl;
+@end
+
 /*
 Here is the current behavior matrix for four types of navigations:
 
@@ -85,28 +110,28 @@ Standard Nav:
 
  Restore form state:   YES
  Restore scroll and focus state:  YES
WF Cache policy: NSURLRequestUseProtocolCachePolicy
+ Cache policy: NSURLRequestUseProtocolCachePolicy
  Add to back/forward list: YES
  
 Back/Forward:
 
  Restore form state:   YES
  Restore scroll and focus state:  YES
WF Cache policy: NSURLRequestReturnCacheDataElseLoad
+ Cache policy: NSURLRequestReturnCacheDataElseLoad
  Add to back/forward list: NO
 
 Reload (meaning only the reload button):
 
  Restore form state:   NO
  Restore scroll and focus state:  YES
WF Cache policy: NSURLRequestReloadIgnoringCacheData
+ Cache policy: NSURLRequestReloadIgnoringCacheData
  Add to back/forward list: NO
 
 Repeat load of the same URL (by any other means of navigation other than the reload button, including hitting return in the location field):
 
  Restore form state:   NO
  Restore scroll and focus state:  NO, reset to initial conditions
WF Cache policy: NSURLRequestReloadIgnoringCacheData
+ Cache policy: NSURLRequestReloadIgnoringCacheData
  Add to back/forward list: NO
 */
 
@@ -220,44 +245,55 @@ static inline WebFrame *frame(WebCoreFrameBridge *bridge)
     return [(WebFrameBridge *)bridge webFrame];
 }
 
-static inline WebFrame *frame(Frame* f)
+FrameMac* core(WebFrame *frame)
 {
-    return f ? [(WebFrameBridge *)Mac(f)->bridge() webFrame] : nil;
+    return [[frame _bridge] _frame];
 }
 
-@implementation WebFrame (FrameTraversal)
+WebFrame *kit(Frame* frame)
+{
+    return frame ? [(WebFrameBridge *)Mac(frame)->bridge() webFrame] : nil;
+}
 
-- (WebFrame *)_firstChildFrame
+Element* core(DOMElement *element)
 {
-    return frame([[self _bridge] firstChild]);
+    return [element _element];
 }
 
-- (WebFrame *)_lastChildFrame
+DOMElement *kit(Element* element)
 {
-    return frame([[self _bridge] lastChild]);
+    return [DOMElement _elementWith:element];
 }
 
-- (unsigned)_childFrameCount
+Document* core(DOMDocument *document)
 {
-    return [[self _bridge] childCount];
+    return [document _document];
 }
 
-- (WebFrame *)_previousSiblingFrame;
+DOMDocument *kit(Document* document)
 {
-    return frame([[self _bridge] previousSibling]);
+    return [DOMDocument _documentWith:document];
 }
 
-- (WebFrame *)_nextSiblingFrame;
+HTMLElement* core(DOMHTMLElement *element)
 {
-    return frame([[self _bridge] nextSibling]);
+    return [element _HTMLElement];
 }
 
-- (WebFrame *)_traverseNextFrameStayWithin:(WebFrame *)stayWithin
+DOMHTMLElement *kit(HTMLElement *element)
 {
-    return frame([[self _bridge] traverseNextFrameStayWithin:[stayWithin _bridge]]);
+    return [DOMHTMLElement _HTMLElementWith:element];
 }
 
-@end
+Range* core(DOMRange *range)
+{
+    return [range _range];
+}
+
+DOMRange *kit(Range* range)
+{
+    return [DOMRange _rangeWith:range];
+}
 
 @implementation WebFrame (WebInternal)
 
@@ -347,8 +383,8 @@ static inline WebFrame *frame(Frame* f)
         // save frame state for items that aren't loading (khtml doesn't save those)
         [_private->bridge saveDocumentState];
 
-        for (WebFrame *child = [self _firstChildFrame]; child; child = [child _nextSiblingFrame])
-            [bfItem addChildItem:[child _createItemTreeWithTargetFrame:targetFrame clippedAtTarget:doClip]];
+        for (Frame* child = core(self)->tree()->firstChild(); child; child = child->tree()->nextSibling())
+            [bfItem addChildItem:[kit(child) _createItemTreeWithTargetFrame:targetFrame clippedAtTarget:doClip]];
     }
     if (self == targetFrame)
         [bfItem setIsTargetItem:YES];
@@ -356,14 +392,9 @@ static inline WebFrame *frame(Frame* f)
     return bfItem;
 }
 
-- (WebFrame *)_immediateChildFrameNamed:(NSString *)name
-{
-    return frame([[self _bridge] childFrameNamed:name]);
-}
-
 - (BOOL)_canCachePage
 {
-    return [[[self webView] backForwardList] _usesPageCache];
+    return [[[self webView] backForwardList] _usesPageCache] && core(self)->canCachePage();
 }
 
 - (void)_purgePageCache
@@ -427,7 +458,7 @@ static inline WebFrame *frame(Frame* f)
 {
     NSArray *childItems = [item children];
     int numChildItems = [childItems count];
-    int numChildFrames = [self _childFrameCount];
+    int numChildFrames = core(self)->tree()->childCount();
     if (numChildFrames != numChildItems)
         return NO;
 
@@ -435,7 +466,7 @@ static inline WebFrame *frame(Frame* f)
     for (i = 0; i < numChildItems; i++) {
         NSString *itemTargetName = [[childItems objectAtIndex:i] target];
         //Search recursive here?
-        if (![self _immediateChildFrameNamed:itemTargetName])
+        if (!core(self)->tree()->child(itemTargetName))
             return NO; // couldn't match the i'th itemTarget
     }
 
@@ -456,8 +487,8 @@ static inline WebFrame *frame(Frame* f)
     int i, count = [childItems count];
     for (i = 0; i < count; i++){
         childItem = [childItems objectAtIndex:i];
-        childFrame = [self _immediateChildFrameNamed:[childItem target]];
-        if (![childFrame _URLsMatchItem: childItem])
+        childFrame = kit(core(self)->tree()->child([childItem target]));
+        if (![childFrame _URLsMatchItem:childItem])
             return NO;
     }
     
@@ -494,7 +525,7 @@ static inline WebFrame *frame(Frame* f)
 
         // We always call scrollToAnchor here, even if the URL doesn't have an
         // anchor fragment. This is so we'll keep the WebCore Frame's URL up-to-date.
-        [_private->bridge _frame]->scrollToAnchor([item URL]);
+        core(self)->scrollToAnchor([item URL]);
     
         // must do this maintenance here, since we don't go through a real page reload
         [_private setCurrentItem:item];
@@ -633,7 +664,7 @@ static inline WebFrame *frame(Frame* f)
             NSString *childName = [childItem target];
             WebHistoryItem *fromChildItem = [fromItem childItemWithName:childName];
             ASSERT(fromChildItem || [fromItem isTargetItem]);
-            WebFrame *childFrame = [self _immediateChildFrameNamed:childName];
+            WebFrame *childFrame = kit(core(self)->tree()->child(childName));
             ASSERT(childFrame);
             [childFrame _recursiveGoToItem:childItem fromItem:fromChildItem withLoadType:type];
         }
@@ -730,19 +761,21 @@ static inline WebFrame *frame(Frame* f)
 
 - (void)_viewWillMoveToHostWindow:(NSWindow *)hostWindow
 {
-    for (WebFrame *frame = self; frame; frame = [frame _traverseNextFrameStayWithin:self])
-        [[[frame frameView] documentView] viewWillMoveToHostWindow:hostWindow];
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame))
+        [[[kit(frame) frameView] documentView] viewWillMoveToHostWindow:hostWindow];
 }
 
 - (void)_viewDidMoveToHostWindow
 {
-    for (WebFrame *frame = self; frame; frame = [frame _traverseNextFrameStayWithin:self])
-        [[[frame frameView] documentView] viewDidMoveToHostWindow];
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame))
+        [[[kit(frame) frameView] documentView] viewDidMoveToHostWindow];
 }
 
 - (void)_addChild:(WebFrame *)child
 {
-    [[self _bridge] appendChild:[child _bridge]];
+    core(self)->tree()->appendChild(adoptRef(core(child)));
     if ([child dataSource])
         [[child dataSource] _documentLoader]->setOverrideEncoding([[self dataSource] _documentLoader]->overrideEncoding());  
 }
@@ -798,42 +831,33 @@ static inline WebFrame *frame(Frame* f)
 // history item.
 - (void)_saveDocumentAndScrollState
 {
-    for (WebFrame *frame = self; frame; frame = [frame _traverseNextFrameStayWithin:self]) {
-        [[frame _bridge] saveDocumentState];
-        [frame _saveScrollPositionAndViewStateToItem:frame->_private->currentItem];
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
+        [Mac(frame)->bridge() saveDocumentState];
+        [kit(frame) _saveScrollPositionAndViewStateToItem:kit(frame)->_private->currentItem];
     }
 }
 
-// Return next frame to be traversed, visiting children after parent
-- (WebFrame *)_nextFrameWithWrap:(BOOL)wrapFlag
-{
-    return frame([[self _bridge] nextFrameWithWrap:wrapFlag]);
-}
-
-// Return previous frame to be traversed, exact reverse order of _nextFrame
-- (WebFrame *)_previousFrameWithWrap:(BOOL)wrapFlag
-{
-    return frame([[self _bridge] previousFrameWithWrap:wrapFlag]);
-}
-
 - (int)_numPendingOrLoadingRequests:(BOOL)recurse
 {
     if (!recurse)
-        return [[self _bridge] numPendingOrLoadingRequests];
+        return [_private->bridge numPendingOrLoadingRequests];
 
     int num = 0;
-    for (WebFrame *frame = self; frame; frame = [frame _traverseNextFrameStayWithin:self])
-        num += [[frame _bridge] numPendingOrLoadingRequests];
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame))
+        num += [Mac(frame)->bridge() numPendingOrLoadingRequests];
 
     return num;
 }
 
 - (void)_reloadForPluginChanges
 {
-    for (WebFrame *frame = self; frame; frame = [frame _traverseNextFrameStayWithin:self]) {
-        NSView <WebDocumentView> *documentView = [[frame frameView] documentView];
-        if (([documentView isKindOfClass:[WebHTMLView class]] && [_private->bridge _frame]->containsPlugins()))
-            [frame reload];
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
+        NSView <WebDocumentView> *documentView = [[kit(frame) frameView] documentView];
+        if (([documentView isKindOfClass:[WebHTMLView class]] && coreFrame->containsPlugins()))
+            [kit(frame) reload];
     }
 }
 
@@ -854,8 +878,9 @@ static inline WebFrame *frame(Frame* f)
 
 - (void)_recursive_pauseNullEventsForAllNetscapePlugins
 {
-    for (WebFrame *frame = self; frame; frame = [frame _traverseNextFrameStayWithin:self]) {
-        NSView <WebDocumentView> *documentView = [[frame frameView] documentView];
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
+        NSView <WebDocumentView> *documentView = [[kit(frame) frameView] documentView];
         if ([documentView isKindOfClass:[WebHTMLView class]])
             [(WebHTMLView *)documentView _pauseNullEventsForAllNetscapePlugins];
     }
@@ -863,14 +888,15 @@ static inline WebFrame *frame(Frame* f)
 
 - (void)_recursive_resumeNullEventsForAllNetscapePlugins
 {
-    for (WebFrame *frame = self; frame; frame = [frame _traverseNextFrameStayWithin:self]) {
-        NSView <WebDocumentView> *documentView = [[frame frameView] documentView];
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
+        NSView <WebDocumentView> *documentView = [[kit(frame) frameView] documentView];
         if ([documentView isKindOfClass:[WebHTMLView class]])
             [(WebHTMLView *)documentView _resumeNullEventsForAllNetscapePlugins];
     }
 }
 
-- (id)_initWithWebFrameView:(WebFrameView *)fv webView:(WebView *)v bridge:(WebFrameBridge *)bridge
+- (id)_initWithWebFrameView:(WebFrameView *)fv webView:(WebView *)v coreFrame:(Frame*)coreFrame
 {
     self = [super init];
     if (!self)
@@ -878,7 +904,7 @@ static inline WebFrame *frame(Frame* f)
 
     _private = [[WebFramePrivate alloc] init];
 
-    _private->bridge = bridge;
+    _private->bridge = (WebFrameBridge *)Mac(coreFrame)->bridge();
 
     if (fv) {
         [_private setWebFrameView:fv];
@@ -895,12 +921,12 @@ static inline WebFrame *frame(Frame* f)
 - (NSArray *)_documentViews
 {
     NSMutableArray *result = [NSMutableArray array];
-    for (WebFrame *frame = self; frame; frame = [frame _traverseNextFrameStayWithin:self]) {
-        id docView = [[frame frameView] documentView];
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
+        id docView = [[kit(frame) frameView] documentView];
         if (docView)
             [result addObject:docView];
     }
-        
     return result;
 }
 
@@ -909,19 +935,22 @@ static inline WebFrame *frame(Frame* f)
     BOOL drawsBackground = [[self webView] drawsBackground];
     NSColor *backgroundColor = [[self webView] backgroundColor];
 
-    for (WebFrame *frame = self; frame; frame = [frame _traverseNextFrameStayWithin:self]) {
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
+        WebFrameBridge *bridge = (WebFrameBridge *)Mac(frame)->bridge();
+        WebFrame *webFrame = [bridge webFrame];
         // Never call setDrawsBackground:YES here on the scroll view or the background color will
         // flash between pages loads. setDrawsBackground:YES will be called in _frameLoadCompleted.
         if (!drawsBackground)
-            [[[frame frameView] _scrollView] setDrawsBackground:NO];
-        [[[frame frameView] _scrollView] setBackgroundColor:backgroundColor];
-        id documentView = [[frame frameView] documentView];
+            [[[webFrame frameView] _scrollView] setDrawsBackground:NO];
+        [[[webFrame frameView] _scrollView] setBackgroundColor:backgroundColor];
+        id documentView = [[webFrame frameView] documentView];
         if ([documentView respondsToSelector:@selector(setDrawsBackground:)])
             [documentView setDrawsBackground:drawsBackground];
         if ([documentView respondsToSelector:@selector(setBackgroundColor:)])
             [documentView setBackgroundColor:backgroundColor];
-        [[frame _bridge] setDrawsBackground:drawsBackground];
-        [[frame _bridge] setBaseBackgroundColor:backgroundColor];
+        [bridge setDrawsBackground:drawsBackground];
+        [bridge setBaseBackgroundColor:backgroundColor];
     }
 }
 
@@ -944,20 +973,20 @@ static inline WebFrame *frame(Frame* f)
 
 - (void)_unmarkAllMisspellings
 {
-    for (WebFrame *frame = self; frame; frame = [frame _traverseNextFrameStayWithin:self])
-        [[frame _bridge] unmarkAllMisspellings];
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame))
+        [Mac(frame)->bridge() unmarkAllMisspellings];
 }
 
 - (BOOL)_hasSelection
 {
     id documentView = [[self frameView] documentView];    
-    
+
     // optimization for common case to avoid creating potentially large selection string
-    if ([documentView isKindOfClass:[WebHTMLView class]]) {
-        DOMRange *selectedDOMRange = [[self _bridge] selectedDOMRange];
-        return selectedDOMRange && ![selectedDOMRange collapsed];
-    }
-    
+    if ([documentView isKindOfClass:[WebHTMLView class]])
+        if (Frame* coreFrame = core(self))
+            return coreFrame->selectionController()->isRange();
+
     if ([documentView conformsToProtocol:@protocol(WebDocumentText)])
         return [[documentView selectedString] length] > 0;
     
@@ -977,23 +1006,23 @@ static inline WebFrame *frame(Frame* f)
 {
     // FIXME: 4186050 is one known case that makes this debug check fail.
     BOOL found = NO;
-    for (WebFrame *frame = self; frame; frame = [frame _traverseNextFrameStayWithin:self]) {
-        if ([frame _hasSelection]) {
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame))
+        if ([kit(frame) _hasSelection]) {
             if (found)
                 return NO;
             found = YES;
         }
-    }
     return YES;
 }
 #endif
 
 - (WebFrame *)_findFrameWithSelection
 {
-    for (WebFrame *frame = self; frame; frame = [frame _traverseNextFrameStayWithin:self])
-        if ([frame _hasSelection])
-            return frame;
-
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame))
+        if ([kit(frame) _hasSelection])
+            return kit(frame);
     return nil;
 }
 
@@ -1059,7 +1088,7 @@ static inline WebFrame *frame(Frame* f)
 
 - (FrameLoader*)_frameLoader
 {
-    Frame* frame = [_private->bridge _frame];
+    Frame* frame = core(self);
     return frame ? frame->loader() : 0;
 }
 
@@ -1090,17 +1119,18 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
 // FIXME: Yhis exists only as a convenience for Safari, consider moving there.
 - (BOOL)_isDescendantOfFrame:(WebFrame *)ancestor
 {
-    return [[self _bridge] isDescendantOfFrame:[ancestor _bridge]];
+    Frame* coreFrame = core(self);
+    return coreFrame && coreFrame->tree()->isDescendantOf(core(ancestor));
 }
 
-- (void)_setShouldCreateRenderers:(BOOL)f
+- (void)_setShouldCreateRenderers:(BOOL)frame
 {
-    [_private->bridge setShouldCreateRenderers:f];
+    [_private->bridge setShouldCreateRenderers:frame];
 }
 
 - (NSColor *)_bodyBackgroundColor
 {
-    return [_private->bridge bodyBackgroundColor];
+    return core(self)->bodyBackgroundColor();
 }
 
 - (BOOL)_isFrameSet
@@ -1124,37 +1154,36 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
 
 - (id)init
 {
-    return [self initWithName:nil webFrameView:nil webView:nil];
+    return nil;
 }
 
-// FIXME: this method can't work any more and should be marked deprecated
-- (id)initWithName:(NSString *)n webFrameView:(WebFrameView *)fv webView:(WebView *)v
+// Should be deprecated.
+- (id)initWithName:(NSString *)name webFrameView:(WebFrameView *)view webView:(WebView *)webView
 {
-    return [self _initWithWebFrameView:fv webView:v bridge:nil];
+    return nil;
 }
 
 - (void)dealloc
 {
     ASSERT(_private->bridge == nil);
     [_private release];
-
     --WebFrameCount;
-
     [super dealloc];
 }
 
 - (void)finalize
 {
     ASSERT(_private->bridge == nil);
-
     --WebFrameCount;
-
     [super finalize];
 }
 
 - (NSString *)name
 {
-    return [[self _bridge] name];
+    Frame* coreFrame = core(self);
+    if (!coreFrame)
+        return nil;
+    return coreFrame->tree()->name();
 }
 
 - (WebFrameView *)frameView
@@ -1164,17 +1193,30 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
 
 - (WebView *)webView
 {
-    return [[[self _bridge] page] webView];
+    Frame* coreFrame = core(self);
+    return coreFrame ? [coreFrame->page()->bridge() webView] : nil;
 }
 
 - (DOMDocument *)DOMDocument
 {
-    return [[self dataSource] _isDocumentHTML] ? [_private->bridge DOMDocument] : nil;
+    Frame* coreFrame = core(self);
+    if (!coreFrame)
+        return nil;
+    // FIXME: Why do we need this check?
+    if (![[self dataSource] _isDocumentHTML])
+        return nil;
+    return kit(coreFrame->document());
 }
 
 - (DOMHTMLElement *)frameElement
 {
-    return [[self webView] mainFrame] != self ? [_private->bridge frameElement] : nil;
+    Frame* coreFrame = core(self);
+    if (!coreFrame)
+        return nil;
+    Element* element = coreFrame->ownerElement();
+    if (!element->isHTMLElement())
+        return nil;
+    return kit(static_cast<HTMLElement*>(element));
 }
 
 - (WebDataSource *)provisionalDataSource
@@ -1253,20 +1295,28 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
 
 - (WebFrame *)findFrameNamed:(NSString *)name
 {
-    return frame([[self _bridge] findFrameNamed:name]);
+    Frame* coreFrame = core(self);
+    if (!coreFrame)
+        return nil;
+    return kit(coreFrame->tree()->find(name));
 }
 
 - (WebFrame *)parentFrame
 {
-    return [[frame([_private->bridge _frame]->tree()->parent()) retain] autorelease];
+    Frame* coreFrame = core(self);
+    if (!coreFrame)
+        return nil;
+    return [[kit(coreFrame->tree()->parent()) retain] autorelease];
 }
 
 - (NSArray *)childFrames
 {
-    NSMutableArray *children = [NSMutableArray arrayWithCapacity:[self _childFrameCount]];
-    for (WebFrame *child = [self _firstChildFrame]; child; child = [child _nextSiblingFrame])
-        [children addObject:child];
-
+    Frame* coreFrame = core(self);
+    if (!coreFrame)
+        return [NSArray array];
+    NSMutableArray *children = [NSMutableArray arrayWithCapacity:coreFrame->tree()->childCount()];
+    for (Frame* child = coreFrame->tree()->firstChild(); child; child = child->tree()->nextSibling())
+        [children addObject:kit(child)];
     return children;
 }
 
@@ -1294,7 +1344,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
     // When we are pre-commit, the currentItem is where the pageCache data resides
     NSDictionary *pageCache = [_private->currentItem pageCache];
 
-    [[self _bridge] invalidatePageCache:pageCache];
+    [_private->bridge invalidatePageCache:pageCache];
     
     // We're assuming that WebCore invalidates its pageCache state in didNotOpen:pageCache:
     [_private->currentItem setHasPageCache:NO];
@@ -1647,14 +1697,13 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
     [[webView _frameLoadDelegateForwarder] webView:webView didFirstLayoutInFrame:self];
 }
 
-- (WebCoreFrameBridge *)_dispatchCreateWebViewWithRequest:(NSURLRequest *)request
+- (Frame*)_dispatchCreateWebViewWithRequest:(NSURLRequest *)request
 {
     WebView *currentWebView = [self webView];
     id wd = [currentWebView UIDelegate];
     if ([wd respondsToSelector:@selector(webView:createWebViewWithRequest:)])
-        return [[[wd webView:currentWebView createWebViewWithRequest:request] mainFrame] _bridge];
-
-    return [[[[WebDefaultUIDelegate sharedUIDelegate] webView:currentWebView createWebViewWithRequest:request] mainFrame] _bridge];
+        return core([[wd webView:currentWebView createWebViewWithRequest:request] mainFrame]);
+    return core([[[WebDefaultUIDelegate sharedUIDelegate] webView:currentWebView createWebViewWithRequest:request] mainFrame]);
 }
 
 - (void)_dispatchShow
@@ -1706,9 +1755,9 @@ static inline WebPolicyDecisionListener *decisionListener(WebPolicyDecider *deci
     [[webView _policyDelegateForwarder] webView:webView unableToImplementPolicyWithError:error frame:self];    
 }
 
-- (void)_dispatchSourceFrame:(WebCoreFrameBridge *)sourceFrame willSubmitForm:(DOMElement *)form withValues:(NSDictionary *)values submissionDecider:(WebPolicyDecider *)decider
+- (void)_dispatchSourceFrame:(Frame*)sourceFrame willSubmitForm:(Element*)form withValues:(NSDictionary *)values submissionDecider:(WebPolicyDecider *)decider
 {
-    [[self _formDelegate] frame:self sourceFrame:frame(sourceFrame) willSubmitForm:form withValues:values submissionListener:decisionListener(decider)];
+    [[self _formDelegate] frame:self sourceFrame:kit(sourceFrame) willSubmitForm:kit(form) withValues:values submissionListener:decisionListener(decider)];
 }
 
 - (void)_detachedFromParent1
@@ -2165,7 +2214,7 @@ static inline WebPolicyDecisionListener *decisionListener(WebPolicyDecider *deci
 - (void)_prepareForDataSourceReplacement
 {
     if (![self dataSource]) {
-        ASSERT(![self _childFrameCount]);
+        ASSERT(!core(self)->tree()->childCount());
         return;
     }
     
@@ -2223,7 +2272,6 @@ static inline WebPolicyDecisionListener *decisionListener(WebPolicyDecider *deci
     // over it again when we leave that page.
     WebHistoryItem *item = _private->currentItem;
     if ([self _canCachePage]
-        && [_private->bridge canCachePage]
         && item
         && ![self _frameLoader]->isQuickRedirectComing()
         && loadType != FrameLoadTypeReload 
@@ -2246,7 +2294,7 @@ static inline WebPolicyDecisionListener *decisionListener(WebPolicyDecider *deci
             }
         } else
             // Put the document into a null state, so it can be restored correctly.
-            [_private->bridge _frame]->clear();
+            core(self)->clear();
     } else
         LOG(PageCache, "NOT saving page to back/forward cache, %@\n", [[self dataSource] _URL]);
 }
index a2d9e37527e8d237c0f7febfc457d7540d9c984f..0a82c4580140d4229dcff0e2bab3b2b1aac0363b 100644 (file)
 
 #import "WebFramePrivate.h"
 #import "WebPolicyDelegatePrivate.h"
-#import <WebCore/FrameLoaderTypes.h>
 
 #ifdef __cplusplus
+#import <WebCore/FrameLoaderTypes.h>
 #import <wtf/Forward.h>
 #endif
 
-@class WebCoreFrameBridge;
-@class WebDocumentLoader;
+@class DOMRange;
 @class WebInspector;
 @class WebFrameView;
 @class WebFrameBridge;
 #ifdef __cplusplus
 
 namespace WebCore {
+    class Document;
     class DocumentLoader;
+    class Element;
+    class Frame;
+    class FrameMac;
     class FrameLoader;
+    class HTMLElement;
+    class Range;
     class WebResourceLoader;
     struct LoadErrorResetToken;
 }
 
+WebCore::FrameMac* core(WebFrame *);
+WebFrame *kit(WebCore::Frame *);
+
+WebCore::Element* core(DOMElement *);
+DOMElement *kit(WebCore::Element*);
+
+WebCore::Document* core(DOMDocument *);
+DOMDocument *kit(WebCore::Document*);
+
+WebCore::HTMLElement* core(DOMHTMLElement *);
+DOMHTMLElement *kit(WebCore::HTMLElement*);
+
+WebCore::Range* core(DOMRange *);
+DOMRange *kit(WebCore::Range*);
+
 #endif
 
 @interface WebFrame (WebInternal)
@@ -70,7 +90,9 @@ namespace WebCore {
 - (void)_clearSelection;
 - (WebFrame *)_findFrameWithSelection;
 - (void)_clearSelectionInOtherFrames;
-- (id)_initWithWebFrameView:(WebFrameView *)fv webView:(WebView *)v bridge:(WebFrameBridge *)bridge;
+#ifdef __cplusplus
+- (id)_initWithWebFrameView:(WebFrameView *)fv webView:(WebView *)v coreFrame:(WebCore::Frame*)coreFrame;
+#endif
 
 - (void)_addPlugInView:(NSView *)plugInView;
 - (void)_removeAllPlugInViews;
@@ -96,7 +118,9 @@ namespace WebCore {
 
 - (WebFrameBridge *)_bridge;
 
-- (void)_goToItem:(WebHistoryItem *)item withLoadType:(FrameLoadType)type;
+#ifdef __cplusplus
+- (void)_goToItem:(WebHistoryItem *)item withLoadType:(WebCore::FrameLoadType)type;
+#endif
 - (void)_loadURL:(NSURL *)URL referrer:(NSString *)referrer intoChild:(WebFrame *)childFrame;
 
 - (void)_viewWillMoveToHostWindow:(NSWindow *)hostWindow;
@@ -113,10 +137,6 @@ namespace WebCore {
 - (BOOL)_canCachePage;
 - (void)_purgePageCache;
 
-
-- (WebFrame *)_nextFrameWithWrap:(BOOL)wrapFlag;
-- (WebFrame *)_previousFrameWithWrap:(BOOL)wrapFlag;
-
 - (int)_numPendingOrLoadingRequests:(BOOL)recurse;
 
 - (void)_reloadForPluginChanges;
@@ -171,14 +191,14 @@ namespace WebCore {
 - (void)_dispatchDidFailLoadWithError:(NSError *)error;
 - (void)_dispatchDidFinishLoadForFrame;
 - (void)_dispatchDidFirstLayoutInFrame;
-- (WebCoreFrameBridge *)_dispatchCreateWebViewWithRequest:(NSURLRequest *)request;
+- (WebCore::Frame*)_dispatchCreateWebViewWithRequest:(NSURLRequest *)request;
 - (void)_dispatchShow;
 - (WebPolicyDecider *)_createPolicyDeciderWithTarget:(id)target action:(SEL)action;
 - (void)_dispatchDecidePolicyForMIMEType:(NSString *)MIMEType request:(NSURLRequest *)request decider:(WebPolicyDecider *)decider;
 - (void)_dispatchDecidePolicyForNewWindowAction:(NSDictionary *)action request:(NSURLRequest *)request newFrameName:(NSString *)frameName decider:(WebPolicyDecider *)decider;
 - (void)_dispatchDecidePolicyForNavigationAction:(NSDictionary *)action request:(NSURLRequest *)request decider:(WebPolicyDecider *)decider;
 - (void)_dispatchUnableToImplementPolicyWithError:(NSError *)error;
-- (void)_dispatchSourceFrame:(WebCoreFrameBridge *)sourceFrame willSubmitForm:(DOMElement *)form withValues:(NSDictionary *)values submissionDecider:(WebPolicyDecider *)decider;
+- (void)_dispatchSourceFrame:(WebCore::Frame*)sourceFrame willSubmitForm:(WebCore::Element*)form withValues:(NSDictionary *)values submissionDecider:(WebPolicyDecider *)decider;
 - (void)_detachedFromParent1;
 - (void)_detachedFromParent2;
 - (void)_detachedFromParent3;
@@ -249,12 +269,3 @@ namespace WebCore {
 @interface NSObject (WebInternalFrameLoadDelegate)
 - (void)webFrame:(WebFrame *)webFrame didFinishLoadWithError:(NSError *)error;
 @end
-
-@interface WebFrame (FrameTraversal)
-- (WebFrame *)_firstChildFrame;
-- (WebFrame *)_lastChildFrame;
-- (unsigned)_childFrameCount;
-- (WebFrame *)_previousSiblingFrame;
-- (WebFrame *)_nextSiblingFrame;
-- (WebFrame *)_traverseNextFrameStayWithin:(WebFrame *)stayWithin;
-@end
index 60a2d281fab2438d4d16178252e7bf6564c42185..21d453fb871846130d23ad21b49724add99fc114 100644 (file)
     }
 
     if (frame) {
-        if ([self _isDisplayingWebArchive]) {
+        if ([self _isDisplayingWebArchive])
             [self loadArchive];
-        } else {
+        else
             // Telling the bridge we received some data and passing nil as the data is our
             // way to get work done that is normally done when the first bit of data is
             // received, even for the case of a document with no data (like about:blank).
             [_private->bridge receivedData:nil textEncodingName:[[_private->dataSource response] textEncodingName]];
-        }
         
         WebView *webView = [frame webView];
         if ([webView isEditable])
-            [_private->bridge _frame]->applyEditingStyleToBodyElement();
+            core(frame)->applyEditingStyleToBodyElement();
     }
 }
 
 
 - (DOMDocument *)DOMDocument
 {
-    return [_private->bridge DOMDocument];
+    return [[_private->bridge webFrame] DOMDocument];
 }
 
 - (NSAttributedString *)attributedText
 {
-    // FIXME:  Implement
+    // FIXME: Implement
     return nil;
 }
 
index 9ca311a6435ceee335203b0f2fd544f30c2abe9d..0105065b18e101de5734021b35040600d76d079b 100644 (file)
@@ -66,7 +66,9 @@
 #import "WebViewInternal.h"
 #import <AppKit/NSAccessibility.h>
 #import <ApplicationServices/ApplicationServices.h>
+#import <WebCore/FloatRect.h>
 #import <WebCore/FrameMac.h>
+#import <WebCore/SelectionController.h>
 #import <WebCore/WebCoreTextRenderer.h>
 #import <WebCore/WebDataProtocol.h>
 #import <WebKit/DOM.h>
@@ -282,7 +284,7 @@ extern "C" void *_NSSoftLinkingGetFrameworkFuncPtr(NSString *inUmbrellaFramework
 
 - (DOMRange *)_documentRange
 {
-    return [[[self _bridge] DOMDocument] _documentRange];
+    return [[[self _frame] DOMDocument] _documentRange];
 }
 
 - (BOOL)_imageExistsAtPaths:(NSArray *)paths
@@ -345,7 +347,7 @@ extern "C" void *_NSSoftLinkingGetFrameworkFuncPtr(NSString *inUmbrellaFramework
         } else {
             // Non-image file types
             NSString *url = [[[NSURL fileURLWithPath:path] _webkit_canonicalize] _web_userVisibleString];
-            [domNodes addObject:[[[self _bridge] DOMDocument] createTextNode: url]];
+            [domNodes addObject:[[[self _frame] DOMDocument] createTextNode: url]];
         }
     }
     
@@ -430,7 +432,7 @@ extern "C" void *_NSSoftLinkingGetFrameworkFuncPtr(NSString *inUmbrellaFramework
             self, @"WebResourceHandler", nil];
         NSArray *subresources;
         DOMDocumentFragment *fragment = [string _documentFromRange:NSMakeRange(0, [string length]) 
-                                                          document:[[self _bridge] DOMDocument] 
+                                                          document:[[self _frame] DOMDocument] 
                                                 documentAttributes:documentAttributes
                                                       subresources:&subresources];
         [documentAttributes release];
@@ -461,7 +463,7 @@ extern "C" void *_NSSoftLinkingGetFrameworkFuncPtr(NSString *inUmbrellaFramework
     }    
     
     if ((URL = [NSURL URLFromPasteboard:pasteboard])) {
-        DOMDocument* document = [[self _bridge] DOMDocument];
+        DOMDocument* document = [[self _frame] DOMDocument];
         ASSERT(document);
         if (document) {
             DOMHTMLAnchorElement* anchor = (DOMHTMLAnchorElement*)[document createElement:@"a"];
@@ -580,7 +582,10 @@ extern "C" void *_NSSoftLinkingGetFrameworkFuncPtr(NSString *inUmbrellaFramework
 
 - (DOMRange *)_selectedRange
 {
-    return [[self _bridge] selectedDOMRange];
+    Frame* coreFrame = core([self _frame]);
+    if (!coreFrame)
+        return nil;
+    return kit(coreFrame->selectionController()->toRange().get());
 }
 
 - (BOOL)_shouldDeleteRange:(DOMRange *)range
@@ -1181,13 +1186,15 @@ static WebHTMLView *lastHitView = nil;
                          windowNumber:[[view window] windowNumber]
                          context:[[NSApp currentEvent] context]
                          eventNumber:0 clickCount:0 pressure:0];
-        [[lastHitView _bridge] mouseMoved:event];
+        if (FrameMac* lastHitCoreFrame = core([lastHitView _frame]))
+            lastHitCoreFrame->mouseMoved(event);
     }
 
     lastHitView = view;
 
     if (view) {
-        [[view _bridge] mouseMoved:event];
+        if (FrameMac* coreFrame = core([view _frame]))
+            coreFrame->mouseMoved(event);
 
         NSPoint point = [view convertPoint:[event locationInWindow] fromView:nil];
         NSDictionary *element = [view elementAtPoint:point];
@@ -1617,7 +1624,10 @@ static WebHTMLView *lastHitView = nil;
 
 - (BOOL)_canEditRichly
 {
-    return [self _canEdit] && [[self _bridge] isSelectionRichlyEditable];
+    Frame* coreFrame = core([self _frame]);
+    if (!coreFrame)
+        return NO;
+    return [self _canEdit] && coreFrame->selectionController()->isContentRichlyEditable();
 }
 
 - (BOOL)_canAlterCurrentSelection
@@ -1627,27 +1637,42 @@ static WebHTMLView *lastHitView = nil;
 
 - (BOOL)_hasSelection
 {
-    return [[self _bridge] selectionState] == WebSelectionStateRange;
+    Frame* coreFrame = core([self _frame]);
+    if (!coreFrame)
+        return NO;
+    return coreFrame->selectionController()->isRange();
 }
 
 - (BOOL)_hasSelectionOrInsertionPoint
 {
-    return [[self _bridge] selectionState] != WebSelectionStateNone;
+    Frame* coreFrame = core([self _frame]);
+    if (!coreFrame)
+        return NO;
+    return coreFrame->selectionController()->isCaretOrRange();
 }
 
 - (BOOL)_hasInsertionPoint
 {
-    return [[self _bridge] selectionState] == WebSelectionStateCaret;
+    Frame* coreFrame = core([self _frame]);
+    if (!coreFrame)
+        return NO;
+    return coreFrame->selectionController()->isCaret();
 }
 
 - (BOOL)_isEditable
 {
-    return [[self _webView] isEditable] || [[self _bridge] isSelectionEditable];
+    Frame* coreFrame = core([self _frame]);
+    if (!coreFrame)
+        return NO;
+    return [[self _webView] isEditable] || coreFrame->selectionController()->isContentEditable();
 }
 
 - (BOOL)_isSelectionInPasswordField
 {
-    return [[self _bridge] isSelectionInPasswordField];
+    Frame* coreFrame = core([self _frame]);
+    if (!coreFrame)
+        return NO;
+    return coreFrame->isSelectionInPasswordField();
 }
 
 - (BOOL)_isSelectionMisspelled
@@ -1695,9 +1720,8 @@ static WebHTMLView *lastHitView = nil;
 - (void)_lookUpInDictionaryFromMenu:(id)sender
 {
     // This should only be called when there's a selection, but play it safe.
-    if (![self _hasSelection]) {
+    if (![self _hasSelection])
         return;
-    }
     
     // Soft link to dictionary-display function to avoid linking another framework (ApplicationServices/LangAnalysis)
     static bool lookedForFunction = false;
@@ -1721,7 +1745,7 @@ static WebHTMLView *lastHitView = nil;
     // FIXME: the dictionary API expects the rect for the first line of selection. Passing
     // the rect for the entire selection, as we do here, positions the pop-up window near
     // the bottom of the selection rather than at the selected word.
-    NSRect rect = [self convertRect:[[self _bridge] visibleSelectionRect] toView:nil];
+    NSRect rect = [self convertRect:core([self _frame])->visibleSelectionRect() toView:nil];
     rect.origin = [[self window] convertBaseToScreen:rect.origin];
     NSData *data = [attrString RTFFromRange:NSMakeRange(0, [attrString length]) documentAttributes:nil];
     dictionaryServiceWindowShow(data, rect, (writingDirection == NSWritingDirectionRightToLeft) ? 1 : 0);
@@ -1740,7 +1764,7 @@ static WebHTMLView *lastHitView = nil;
 - (NSImage *)_selectionDraggingImage
 {
     if ([self _hasSelection]) {
-        NSImage *dragImage = [[self _bridge] selectionImageForcingWhiteText:NO];
+        NSImage *dragImage = core([self _frame])->selectionImage();
         [dragImage _web_dissolveToFraction:WebDragImageAlpha];
         return dragImage;
     }
@@ -1755,12 +1779,12 @@ static WebHTMLView *lastHitView = nil;
 
 - (BOOL)_canIncreaseSelectionListLevel
 {
-    return ([self _canEditRichly] && [[self _bridge] canIncreaseSelectionListLevel]);
+    return [self _canEditRichly] && [[self _bridge] canIncreaseSelectionListLevel];
 }
 
 - (BOOL)_canDecreaseSelectionListLevel
 {
-    return ([self _canEditRichly] && [[self _bridge] canDecreaseSelectionListLevel]);
+    return [self _canEditRichly] && [[self _bridge] canDecreaseSelectionListLevel];
 }
 
 - (DOMNode *)_increaseSelectionListLevel
@@ -1820,7 +1844,7 @@ static WebHTMLView *lastHitView = nil;
 {
     // This method does the job of updating the view based on the view's firstResponder-ness and
     // the window key-ness of the window containing this view. This involves four kinds of 
-    // drawing updates right now, all handled in WebCore in response to the call over the bridge
+    // drawing updates right now. 
     // 
     // The four display attributes are as follows:
     // 
@@ -1837,9 +1861,11 @@ static WebHTMLView *lastHitView = nil;
     BOOL windowOrSheetIsKey = windowIsKey || [[window attachedSheet] isKeyWindow];
 
     BOOL isActive = !_private->resigningFirstResponder && windowIsKey && (_private->descendantBecomingFirstResponder || [self _web_firstResponderCausesFocusDisplay]);
-    
-    [[self _bridge] setWindowHasFocus:windowOrSheetIsKey];
-    [[self _bridge] setIsActive:isActive];
+
+    if (Frame* coreFrame = core([self _frame])) {
+        coreFrame->setWindowHasFocus(windowOrSheetIsKey);
+        coreFrame->setIsActive(isActive);
+    }
 }
 
 - (unsigned)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(unsigned)limit
@@ -2049,7 +2075,10 @@ static WebHTMLView *lastHitView = nil;
 
 - (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pasteboard
 {
-    if ([[self _bridge] isSelectionRichlyEditable])
+    Frame* coreFrame = core([self _frame]);
+    if (!coreFrame)
+        return NO;
+    if (coreFrame->selectionController()->isContentRichlyEditable())
         [self _pasteWithPasteboard:pasteboard allowPlainText:YES];
     else
         [self _pasteAsPlainTextWithPasteboard:pasteboard];
@@ -2084,8 +2113,7 @@ static WebHTMLView *lastHitView = nil;
 - (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item 
 {
     SEL action = [item action];
-    WebFrameBridge *bridge = [self _bridge];
-    FrameMac* frame = [bridge _frame];
+    FrameMac* frame = core([self _frame]);
 
     if (action == @selector(changeSpelling:)
             || action == @selector(_changeSpellingFromMenu:)
@@ -2238,7 +2266,8 @@ static WebHTMLView *lastHitView = nil;
         return (frame && frame->mayDHTMLPaste()) || [self _canPaste];
     
     if (action == @selector(pasteAsRichText:))
-        return (frame && frame->mayDHTMLPaste()) || ([self _canPaste] && [[self _bridge] isSelectionRichlyEditable]);
+        return frame && (frame->mayDHTMLPaste()
+            || ([self _canPaste] && frame->selectionController()->isContentRichlyEditable()));
     
     if (action == @selector(performFindPanelAction:))
         // FIXME: Not yet implemented.
@@ -2334,29 +2363,32 @@ static WebHTMLView *lastHitView = nil;
     // <rdar://problem/3672088>: "Editable WebViews should maintain a selection even 
     //                            when they're not firstResponder"
     // it was decided to add a switch to act more like an NSTextView.
-    id nextResponder = [[self window] _newFirstResponderAfterResigning];
+
+    if ([[self _webView] maintainsInactiveSelection])
+        return YES;
 
     // Predict the case where we are losing first responder status only to
-    // gain it back again.  Want to keep the selection in that case.
+    // gain it back again. Want to keep the selection in that case.
+    id nextResponder = [[self window] _newFirstResponderAfterResigning];
     if ([nextResponder isKindOfClass:[NSScrollView class]]) {
         id contentView = [nextResponder contentView];
-        if (contentView) {
+        if (contentView)
             nextResponder = contentView;
-        }
     }
     if ([nextResponder isKindOfClass:[NSClipView class]]) {
         id documentView = [nextResponder documentView];
-        if (documentView) {
+        if (documentView)
             nextResponder = documentView;
-        }
     }
-
     if (nextResponder == self)
         return YES;
-        
-    BOOL nextResponderIsInWebView = [nextResponder isKindOfClass:[NSView class]] && [nextResponder isDescendantOf:[[[self _webView] mainFrame] frameView]];
 
-    return [[self _webView] maintainsInactiveSelection] || ([[self _bridge] isSelectionEditable] && nextResponderIsInWebView);
+    FrameMac* coreFrame = core([self _frame]);
+    bool selectionIsEditable = coreFrame && coreFrame->selectionController()->isContentEditable();
+    bool nextResponderIsInWebView = [nextResponder isKindOfClass:[NSView class]]
+        && [nextResponder isDescendantOf:[[[self _webView] mainFrame] frameView]];
+
+    return selectionIsEditable && nextResponderIsInWebView;
 }
 
 - (void)addMouseMovedObserver
@@ -2617,7 +2649,7 @@ static WebHTMLView *lastHitView = nil;
     [_private->compController endRevertingChange:NO moveLeft:NO];
 
     _private->handlingMouseDownEvent = YES;
-    BOOL handledEvent = [[self _bridge] sendContextMenuEvent:event];
+    BOOL handledEvent = core([self _frame])->sendContextMenuEvent(event);
     _private->handlingMouseDownEvent = NO;
     if (handledEvent)
         return nil;
@@ -2802,7 +2834,7 @@ static WebHTMLView *lastHitView = nil;
 - (void)scrollWheel:(NSEvent *)event
 {
     [self retain];
-    FrameMac* frame = [[self _bridge] _frame];
+    FrameMac* frame = core([self _frame]);
     if (!frame || !frame->wheelEvent(event))
         [[self nextResponder] scrollWheel:event];    
     [self release];
@@ -2822,14 +2854,15 @@ static WebHTMLView *lastHitView = nil;
     if ([[self _webView] _dashboardBehavior:WebDashboardBehaviorAlwaysAcceptsFirstMouse])
         return YES;
     
-    if (hitHTMLView != nil) {
-        [hitHTMLView _setMouseDownEvent:event];
-        [[hitHTMLView _bridge] setActivationEventNumber:[event eventNumber]];
+    if (hitHTMLView) {
         bool result = false;
-        if ([hitHTMLView _isSelectionEvent:event])
-            if (FrameMac* frame = [[hitHTMLView _bridge] _frame])
-                result = frame->eventMayStartDrag(event);
-        [hitHTMLView _setMouseDownEvent:nil];
+        if (FrameMac* coreFrame = core([hitHTMLView _frame])) {
+            coreFrame->setActivationEventNumber([event eventNumber]);
+            [hitHTMLView _setMouseDownEvent:event];
+            if ([hitHTMLView _isSelectionEvent:event])
+                result = coreFrame->eventMayStartDrag(event);
+            [hitHTMLView _setMouseDownEvent:nil];
+        }
         return result;
     }
     return [hitView acceptsFirstMouse:event];
@@ -2839,12 +2872,14 @@ static WebHTMLView *lastHitView = nil;
 {
     NSView *hitView = [self _hitViewForEvent:event];
     WebHTMLView *hitHTMLView = [hitView isKindOfClass:[self class]] ? (WebHTMLView *)hitView : nil;
-    if (hitHTMLView != nil) {
+    if (hitHTMLView) {
         bool result = false;
         if ([hitHTMLView _isSelectionEvent:event])
-            if (FrameMac* frame = [[hitHTMLView _bridge] _frame])
-                result = frame->eventMayStartDrag(event);
-        [hitHTMLView _setMouseDownEvent:nil];
+            if (FrameMac* coreFrame = core([hitHTMLView _frame])) {
+                [hitHTMLView _setMouseDownEvent:event];
+                result = coreFrame->eventMayStartDrag(event);
+                [hitHTMLView _setMouseDownEvent:nil];
+            }
         return result;
     }
     return [hitView shouldDelayWindowOrderingForEvent:event];
@@ -2873,9 +2908,9 @@ static WebHTMLView *lastHitView = nil;
         // Don't do any mouseover while the mouse is down.
         [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(_updateMouseoverWithFakeEvent) object:nil];
 
-        // Let KHTML get a chance to deal with the event. This will call back to us
+        // Let WebCore get a chance to deal with the event. This will call back to us
         // to start the autoscroll timer if appropriate.
-        [[self _bridge] mouseDown:event];
+        core([self _frame])->mouseDown(event);
     }
 
 done:
@@ -2928,7 +2963,7 @@ done:
     [self retain];
 
     if (!_private->ignoringMouseDraggedEvents)
-        [[self _bridge] mouseDragged:event];
+        core([self _frame])->mouseDragged(event);
 
     [self release];
 }
@@ -3011,7 +3046,7 @@ done:
     [self retain];
 
     [self _stopAutoscrollTimer];
-    [[self _bridge] mouseUp:event];
+    core([self _frame])->mouseUp(event);
     [self _updateMouseoverWithFakeEvent];
 
     [self release];
@@ -3384,8 +3419,7 @@ done:
 
     _private->keyDownEvent = event;
 
-    WebFrameBridge *bridge = [self _bridge];
-    if ([bridge interceptKeyEvent:event toView:self]) {
+    if (core([self _frame])->keyEvent(event)) {
         // WebCore processed a key event, bail on any outstanding complete: UI
         [_private->compController endRevertingChange:YES moveLeft:NO];
     } else if (_private->compController && [_private->compController filterKeyDown:event]) {
@@ -3410,7 +3444,7 @@ done:
 - (void)keyUp:(NSEvent *)event
 {
     [self retain];
-    if (![[self _bridge] interceptKeyEvent:event toView:self])
+    if (!core([self _frame])->keyEvent(event))
         [super keyUp:event];    
     [self release];
 }
@@ -3457,7 +3491,8 @@ done:
 
 - (void)centerSelectionInVisibleArea:(id)sender
 {
-    [[self _bridge] centerSelectionInVisibleArea];
+    if (FrameMac* coreFrame = core([self _frame]))
+        coreFrame->revealSelection(RenderLayer::gAlignCenterAlways);
 }
 
 - (void)moveBackward:(id)sender
@@ -3770,7 +3805,7 @@ done:
 - (NSData *)_selectionStartFontAttributesAsRTF
 {
     NSAttributedString *string = [[NSAttributedString alloc] initWithString:@"x"
-        attributes:[[self _bridge] _frame]->fontAttributesForSelectionStart()];
+        attributes:core([self _frame])->fontAttributesForSelectionStart()];
     NSData *data = [string RTFFromRange:NSMakeRange(0, [string length]) documentAttributes:nil];
     [string release];
     return data;
@@ -3793,7 +3828,7 @@ done:
 
 - (DOMCSSStyleDeclaration *)_emptyStyle
 {
-    return [[[self _bridge] DOMDocument] createCSSStyleDeclaration];
+    return [[[self _frame] DOMDocument] createCSSStyleDeclaration];
 }
 
 - (NSString *)_colorAsString:(NSColor *)color
@@ -3968,7 +4003,7 @@ done:
     // But don't do it if we have already handled the event.
     if (event != _private->keyDownEvent
             && [self _web_firstResponderIsSelfOrDescendantView]
-            && [[self _bridge] interceptKeyEvent:event toView:self])
+            && core([self _frame])->keyEvent(event))
         ret = YES;
     else
         ret = [super performKeyEquivalent:event];
@@ -4774,12 +4809,12 @@ static DOMRange *unionDOMRanges(DOMRange *a, DOMRange *b)
 
 - (void)indent:(id)sender
 {
-    [[self _bridge] _frame]->indent();
+    core([self _frame])->indent();
 }
 
 - (void)outdent:(id)sender
 {
-    [[self _bridge] _frame]->outdent();
+    core([self _frame])->outdent();
 }
 
 #if 0
@@ -5108,7 +5143,7 @@ static DOMRange *unionDOMRanges(DOMRange *a, DOMRange *b)
 - (void)cut:(id)sender
 {
     WebFrameBridge *bridge = [self _bridge];
-    FrameMac* frame = [bridge _frame];
+    FrameMac* frame = core([self _frame]);
     if (frame && frame->tryDHTMLCut())
         return; // DHTML did the whole operation
     if (![self _canCut]) {
@@ -5124,13 +5159,12 @@ static DOMRange *unionDOMRanges(DOMRange *a, DOMRange *b)
 
 - (void)paste:(id)sender
 {
-    WebFrameBridge *bridge = [self _bridge];
-    FrameMac* frame = [bridge _frame];
-    if (frame && frame->tryDHTMLPaste())
+    FrameMac* coreFrame = core([self _frame]);
+    if (coreFrame && coreFrame->tryDHTMLPaste())
         return; // DHTML did the whole operation
     if (![self _canPaste])
         return;
-    if ([bridge isSelectionRichlyEditable])
+    if (coreFrame->selectionController()->isContentRichlyEditable())
         [self _pasteWithPasteboard:[NSPasteboard generalPasteboard] allowPlainText:YES];
     else
         [self _pasteAsPlainTextWithPasteboard:[NSPasteboard generalPasteboard]];
@@ -5288,7 +5322,7 @@ static DOMRange *unionDOMRanges(DOMRange *a, DOMRange *b)
     ASSERT([self hasMarkedText]);
 
     WebFrameBridge *bridge = [self _bridge];
-    DOMRange *selectedRange = [[bridge DOMDocument] createRange];
+    DOMRange *selectedRange = [[[self _frame] DOMDocument] createRange];
     DOMRange *markedTextRange = [bridge markedTextDOMRange];
     
     ASSERT([markedTextRange startContainer] == [markedTextRange endContainer]);
@@ -5594,8 +5628,9 @@ static DOMRange *unionDOMRanges(DOMRange *a, DOMRange *b)
 
         // Get preceeding word stem
         WebFrameBridge *bridge = [_view _bridge];
-        DOMRange *selection = [bridge selectedDOMRange];
-        DOMRange *wholeWord = [bridge rangeByAlteringCurrentSelection:WebSelectByExtending direction:WebBridgeSelectBackward granularity:WebBridgeSelectByWord];
+        DOMRange *selection = kit(core([_view _frame])->selectionController()->toRange().get());
+        DOMRange *wholeWord = [bridge rangeByAlteringCurrentSelection:WebSelectByExtending
+            direction:WebBridgeSelectBackward granularity:WebBridgeSelectByWord];
         DOMRange *prefix = [wholeWord cloneRange];
         [prefix setEnd:[selection startContainer] offset:[selection startOffset]];
 
@@ -5733,7 +5768,9 @@ static DOMRange *unionDOMRanges(DOMRange *a, DOMRange *b)
 
 - (NSRect)selectionRect
 {
-    return [[self _bridge] selectionRect];
+    if ([self _hasSelection])
+        return core([self _frame])->selectionRect();
+    return NSZeroRect;
 }
 
 - (NSView *)selectionView
@@ -5744,15 +5781,14 @@ static DOMRange *unionDOMRanges(DOMRange *a, DOMRange *b)
 - (NSImage *)selectionImageForcingWhiteText:(BOOL)forceWhiteText
 {
     if ([self _hasSelection])
-        return [[self _bridge] selectionImageForcingWhiteText:forceWhiteText];
-
+        return core([self _frame])->selectionImage(forceWhiteText);
     return nil;
 }
 
 - (NSRect)selectionImageRect
 {
     if ([self _hasSelection])
-        return [[self _bridge] visibleSelectionRect];
+        return core([self _frame])->visibleSelectionRect();
     return NSZeroRect;
 }
 
@@ -5804,7 +5840,7 @@ static DOMRange *unionDOMRanges(DOMRange *a, DOMRange *b)
 - (NSAttributedString *)attributedString
 {
     WebFrameBridge *bridge = [self _bridge];
-    DOMDocument *document = [bridge DOMDocument];
+    DOMDocument *document = [[self _frame] DOMDocument];
     NSAttributedString *attributedString = [self _attributeStringFromDOMRange:[document _documentRange]];
     if (attributedString == nil) {
         attributedString = [bridge attributedStringFrom:document startOffset:0 to:nil endOffset:0];
@@ -5869,8 +5905,10 @@ static DOMRange *unionDOMRanges(DOMRange *a, DOMRange *b)
 
 - (BOOL)_isMoveDrag
 {
+    FrameMac* coreFrame = core([self _frame]);
     return _private->initiatedDrag
-        && [[self _bridge] isSelectionEditable]
+        && coreFrame
+        && coreFrame->selectionController()->isContentEditable()
         && !([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask);
 }
 
@@ -5946,14 +5984,20 @@ static DOMRange *unionDOMRanges(DOMRange *a, DOMRange *b)
         NSColor *color = [NSColor colorFromPasteboard:[draggingInfo draggingPasteboard]];
         if (!color)
             return NO;
+        Frame* coreFrame = core(innerFrame);
+        if (!coreFrame)
+            return NO;
+        DOMRange *innerRange = kit(coreFrame->selectionController()->toRange().get());
         DOMCSSStyleDeclaration *style = [self _emptyStyle];
         [style setProperty:@"color" value:[self _colorAsString:color] priority:@""];
-        if ([[webView _editingDelegateForwarder] webView:webView shouldApplyStyle:style toElementsInDOMRange:[innerBridge selectedDOMRange]]) {
-            [[webView _UIDelegateForwarder] webView:webView willPerformDragDestinationAction:WebDragDestinationActionEdit forDraggingInfo:draggingInfo];
-            [innerBridge applyStyle:style withUndoAction:WebUndoActionSetColor];
-            return YES;
-        }
-        return NO;
+        if (![[webView _editingDelegateForwarder] webView:webView
+                shouldApplyStyle:style toElementsInDOMRange:innerRange])
+            return NO;
+        [[webView _UIDelegateForwarder] webView:webView
+            willPerformDragDestinationAction:WebDragDestinationActionEdit
+            forDraggingInfo:draggingInfo];
+        [innerBridge applyStyle:style withUndoAction:WebUndoActionSetColor];
+        return YES;
     }
 
     BOOL didInsert = NO;
index 05494ed3deb6a4f3a3b9b8d9d1f1d25142b3792c..d04d4ea1c4f8a7fa50044b04c617d76a72464fad 100644 (file)
@@ -31,6 +31,8 @@
 #import <WebCore/FrameLoader.h>
 #import <objc/objc-runtime.h>
 
+using namespace WebCore;
+
 NSString *WebActionNavigationTypeKey = @"WebActionNavigationTypeKey";
 NSString *WebActionElementKey = @"WebActionElementKey";
 NSString *WebActionButtonKey = @"WebActionButtonKey"; 
@@ -86,10 +88,10 @@ NSString *WebActionOriginalURLKey = @"WebActionOriginalURLKey";
 }
 
 
--(void)_usePolicy:(WebPolicyAction)policy
+-(void)_usePolicy:(PolicyAction)policy
 {
     if (_private->target != nil)
-        ((void (*)(id, SEL, WebPolicyAction))objc_msgSend)(_private->target, _private->action, policy);
+        ((void (*)(id, SEL, PolicyAction))objc_msgSend)(_private->target, _private->action, policy);
 }
 
 -(void)_invalidate
@@ -104,24 +106,24 @@ NSString *WebActionOriginalURLKey = @"WebActionOriginalURLKey";
 
 -(void)use
 {
-    [self _usePolicy:WebPolicyUse];
+    [self _usePolicy:PolicyUse];
 }
 
 -(void)ignore
 {
-    [self _usePolicy:WebPolicyIgnore];
+    [self _usePolicy:PolicyIgnore];
 }
 
 -(void)download
 {
-    [self _usePolicy:WebPolicyDownload];
+    [self _usePolicy:PolicyDownload];
 }
 
 // WebFormSubmissionListener implementation
 
 -(void)continue
 {
-    [self _usePolicy:WebPolicyUse];
+    [self _usePolicy:PolicyUse];
 }
 
 @end
index c968cad3dce8e5da9c63e067ea6b08c29c709fbe..21efdffa9b39d458605a5514885d4974bbe7a488 100644 (file)
  */
 
 #import "WebScriptDebugDelegatePrivate.h"
-#import "WebScriptDebugServerPrivate.h"
+
 #import "WebDataSource.h"
 #import "WebDataSourceInternal.h"
-
-#import <WebKit/WebFrameBridge.h>
-#import <WebKit/WebFrameInternal.h>
-#import <WebKit/WebViewInternal.h>
+#import "WebFrameBridge.h"
+#import "WebFrameInternal.h"
+#import "WebScriptDebugServerPrivate.h"
+#import "WebViewInternal.h"
+#import <WebCore/FrameMac.h>
 #import <WebCore/WebCoreScriptDebugger.h>
 
+using namespace WebCore;
+
 // FIXME: these error strings should be public for future use by WebScriptObject and in WebScriptObject.h
 NSString * const WebScriptErrorDomain = @"WebScriptErrorDomain";
 NSString * const WebScriptErrorDescriptionKey = @"WebScriptErrorDescription";
@@ -47,8 +50,6 @@ NSString * const WebScriptErrorLineNumberKey = @"WebScriptErrorLineNumber";
 
 @end
 
-
-
 @implementation WebScriptDebugger
 
 - (WebScriptDebugger *)initWithWebFrame:(WebFrame *)webFrame
@@ -68,7 +69,7 @@ NSString * const WebScriptErrorLineNumberKey = @"WebScriptErrorLineNumber";
 
 - (WebScriptObject *)globalObject
 {
-    return [[_webFrame _bridge] windowScriptObject];
+    return core(_webFrame)->windowScriptObject();
 }
 
 - (id)newWrapperForFrame:(WebCoreScriptCallFrame *)frame
index c881a371ea63a45acfe9726d08073409642f84c9..941a647bceef51dca2c0f7266607c94766b061cb 100644 (file)
@@ -87,6 +87,8 @@
 #import <JavaScriptCore/Assertions.h>
 #import <WebCore/FrameLoader.h>
 #import <WebCore/FrameMac.h>
+#import <WebCore/FrameTree.h>
+#import <WebCore/Page.h>
 #import <WebCore/WebCoreEncodings.h>
 #import <WebCore/WebCoreFrameBridge.h>
 #import <WebCore/WebCoreSettings.h>
@@ -1542,20 +1544,14 @@ static bool debugWidget = true;
 
 - (void)_attachScriptDebuggerToAllFrames
 {
-    WebFrame *frame = [self mainFrame];
-    do {
-        [frame _attachScriptDebugger];
-        frame = [frame _nextFrameWithWrap:NO];
-    } while (frame);
+    for (Frame* frame = core([self mainFrame]); frame; frame = frame->tree()->traverseNext())
+        [kit(frame) _attachScriptDebugger];
 }
 
 - (void)_detachScriptDebuggerFromAllFrames
 {
-    WebFrame *frame = [self mainFrame];
-    do {
-        [frame _detachScriptDebugger];
-        frame = [frame _nextFrameWithWrap:NO];
-    } while (frame);
+    for (Frame* frame = core([self mainFrame]); frame; frame = frame->tree()->traverseNext())
+        [kit(frame) _detachScriptDebugger];
 }
 
 - (void)setBackgroundColor:(NSColor *)backgroundColor
@@ -1577,7 +1573,6 @@ static bool debugWidget = true;
 
 @end
 
-
 @implementation _WebSafeForwarder
 
 - initWithTarget: t defaultTarget: dt templateClass: (Class)aClass
@@ -1592,7 +1587,6 @@ static bool debugWidget = true;
     return self;
 }
 
-
 // Used to send messages to delegates that implement informal protocols.
 + safeForwarderWithTarget: t defaultTarget: dt templateClass: (Class)aClass;
 {
@@ -2233,7 +2227,7 @@ NS_ENDHANDLER
 
 - (WebScriptObject *)windowScriptObject
 {
-    return [[[self mainFrame] _bridge] windowScriptObject];
+    return core([self mainFrame])->windowScriptObject();
 }
 
 // Get the appropriate user-agent string for a particular URL.
@@ -2483,8 +2477,10 @@ NS_ENDHANDLER
 
 static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
 {
-    return forward ? [curr _nextFrameWithWrap:wrapFlag]
-                   : [curr _previousFrameWithWrap:wrapFlag];
+    Frame* coreFrame = core(curr);
+    return kit(forward
+        ? coreFrame->tree()->traverseNextWithWrap(wrapFlag)
+        : coreFrame->tree()->traversePreviousWithWrap(wrapFlag));
 }
 
 - (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag
@@ -2507,12 +2503,11 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
             // first time through
             if (frame == startFrame) {
                 // Remember if start even has a selection, to know if we need to search more later
-                if ([searchView isKindOfClass:[WebHTMLView class]]) {
+                if ([searchView isKindOfClass:[WebHTMLView class]])
                     // optimization for the common case, to avoid making giant string for selection
-                    startHasSelection = [[startFrame _bridge] selectedDOMRange] != nil;
-                } else if ([searchView conformsToProtocol:@protocol(WebDocumentText)]) {
+                    startHasSelection = [startFrame _hasSelection];
+                else if ([searchView conformsToProtocol:@protocol(WebDocumentText)])
                     startHasSelection = [(id <WebDocumentText>)searchView selectedString] != nil;
-                }
                 startSearchView = searchView;
             }
             
@@ -2569,12 +2564,11 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
 
 - (void)writeSelectionWithPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard
 {
-    WebFrameBridge *bridge = [self _bridgeForSelectedOrMainFrame];
-    if (bridge && [bridge selectionState] != WebSelectionStateRange) {
-        NSView <WebDocumentView> *documentView = [[[bridge webFrame] frameView] documentView];
-        if ([documentView conformsToProtocol:@protocol(WebDocumentSelection)]) {
+    WebFrame *frame = [self _selectedOrMainFrame];
+    if (frame && [frame _hasSelection]) {
+        NSView <WebDocumentView> *documentView = [[frame frameView] documentView];
+        if ([documentView conformsToProtocol:@protocol(WebDocumentSelection)])
             [(NSView <WebDocumentSelection> *)documentView writeSelectionWithPasteboardTypes:types toPasteboard:pasteboard];
-        }
     }
 }
 
@@ -2608,7 +2602,7 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
 
 - (void)removeDragCaret
 {
-    [[[self mainFrame] _bridge] removeDragCaret];
+    [_private->_pageBridge impl]->dragCaretController()->clear();
 }
 
 - (void)setMainFrameURL:(NSString *)URLString
@@ -2874,7 +2868,7 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
     return _private->tabKeyCyclesThroughElements;
 }
 
-- (void)setScriptDebugDelegate:delegate
+- (void)setScriptDebugDelegate:(id)delegate
 {
     _private->scriptDebugDelegate = delegate;
     [_private->scriptDebugDelegateForwarder release];
@@ -2885,17 +2879,17 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
         [self _detachScriptDebuggerFromAllFrames];
 }
 
-- scriptDebugDelegate
+- (id)scriptDebugDelegate
 {
     return _private->scriptDebugDelegate;
 }
 
 - (BOOL)shouldClose
 {
-    WebFrameBridge *bridge = [[self mainFrame] _bridge];
-    if (!bridge)
+    FrameMac* coreFrame = core([self mainFrame]);
+    if (!coreFrame)
         return YES;
-    return [bridge shouldClose];
+    return coreFrame->shouldClose();
 }
 
 - (NSAppleEventDescriptor *)aeDescByEvaluatingJavaScriptFromString:(NSString *)script
@@ -3148,7 +3142,10 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
 
 - (DOMRange *)selectedDOMRange
 {
-    return [[self _bridgeForSelectedOrMainFrame] selectedDOMRange];
+    Frame* coreFrame = core([self _selectedOrMainFrame]);
+    if (!coreFrame)
+        return nil;
+    return kit(coreFrame->selectionController()->toRange().get());
 }
 
 - (NSSelectionAffinity)selectionAffinity
@@ -3280,7 +3277,7 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
 - (DOMCSSStyleDeclaration *)styleDeclarationWithText:(NSString *)text
 {
     // FIXME: Should this really be attached to the document with the current selection?
-    DOMCSSStyleDeclaration *decl = [[[self _bridgeForSelectedOrMainFrame] DOMDocument] createCSSStyleDeclaration];
+    DOMCSSStyleDeclaration *decl = [[[self _selectedOrMainFrame] DOMDocument] createCSSStyleDeclaration];
     [decl setCssText:text];
     return decl;
 }