WebCore:
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Mar 2008 03:48:28 +0000 (03:48 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Mar 2008 03:48:28 +0000 (03:48 +0000)
        Reviewed by Anders.

        - http://bugs.webkit.org/show_bug.cgi?id=17640
          eliminate WebCoreFrameBridge

        * WebCore.base.exp: Added more exports, needed by code moved from WebCoreFrameBridge
        to WebFrame in WebKit.
        * WebCore.xcodeproj/project.pbxproj: Added more headers, same reason. Also deleted
        WebCoreFrameBridge.h and WebCoreFrameBridge.mm.

        * page/Frame.cpp:
        (WebCore::Frame::Frame): Added call to initJavaJSBindings(), formerly handled by
        the WebCoreFrameBridge.
        * page/Frame.h: Added initJavaJSBindings function.

        * page/mac/FrameMac.mm:
        (WebCore::updateRenderingForBindings): Moved here from WebCoreFrameBridge.
        (WebCore::Frame::initJavaJSBindings): Ditto; code was in the init function.

        * page/mac/WebCoreFrameBridge.h: Removed.
        * page/mac/WebCoreFrameBridge.mm: Removed.

WebKit:

        Reviewed by Anders.

        - http://bugs.webkit.org/show_bug.cgi?id=17640
          eliminate WebCoreFrameBridge

        * StringsNotToBeLocalized.txt: Updated for recent changes.
        * WebKit.xcodeproj/project.pbxproj: Removed WebFrameBridge.h and WebFrameBridge.mm.

WebKit/mac:

        Reviewed by Anders.

        - http://bugs.webkit.org/show_bug.cgi?id=17640
          eliminate WebCoreFrameBridge

        Moved all the code from the bridge into WebFrame. This need not be the final
        home of these methods -- they can be moved closer to their callers and improved
        further -- but it eliminates the bridge without requiring a rewrite of the code.
        It's a fairly mechanical process (just adding underscores to method names really).

        There's even a chance that some of the methods are unused. Those we can remove
        after checking if that's so.

        * DOM/WebDOMOperations.mm:
        (-[DOMNode markupString]): Use WebFrame rather than bridge.
        (-[DOMDocument webFrame]): Changed to use the core and kit functions
        instead of using the bridge.
        (-[DOMDocument URLWithAttributeString:]): Use WebFrame rather than bridge.
        (-[DOMRange markupString]): Ditto.
        * DOM/WebDOMOperationsPrivate.h: Removed _bridge methods.

        * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Removed unneeded import.
        * History/WebHistoryItem.mm: Ditto.

        * MigrateHeaders.make: Added DOMDocumentFragmentInternal.h.
        * Misc/WebCoreStatistics.mm:
        (-[WebFrame renderTreeAsExternalRepresentation]): Use WebFrame rather than bridge.

        * Misc/WebElementDictionary.mm: Removed unneeded import.

        * Misc/WebKitStatistics.m:
        (+[WebKitStatistics bridgeCount]): Removed WebBridgeCount and just return 0.
        * Misc/WebKitStatisticsPrivate.h: Ditto.

        * Misc/WebNSAttributedStringExtras.mm: Removed unneeded import.
        * Misc/WebNSPasteboardExtras.mm: Ditto.

        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Use WebFrame
        rather than bridge.

        * Plugins/WebNetscapePluginEmbeddedView.mm: Removed unneeded import.
        * Plugins/WebNetscapePluginStream.mm: Ditto.

        * Plugins/WebPluginContainerCheck.mm:
        (-[WebPluginContainerCheck _isForbiddenFileLoad]): Use WebFrame rather than
        bridge to get to the WebCore::Frame.

        * Plugins/WebPluginController.h: Declare webFrame method and remove bridge method.
        * Plugins/WebPluginController.mm:
        (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]): Use WebFrame
        rather than bridge.

        * WebCoreSupport/WebEditorClient.mm:
        (selectorForKeyEvent): Tweaked comment.

        * WebCoreSupport/WebFrameBridge.h: Removed.
        * WebCoreSupport/WebFrameBridge.mm: Removed.

        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::frameLoaderDestroyed): Removed bridge assertion.
        (WebFrameLoaderClient::detachedFromParent4): Removed bridge teardown code.
        I could remove this function entirely, but it looks like the Qt port is using it.

        * WebCoreSupport/WebViewFactory.mm: Removed unneeded import.

        * WebView/WebArchiver.mm:
        (+[WebArchiver archiveRange:]): Use WebFrame rather than bridge.
        (+[WebArchiver archiveNode:]): Ditto.
        (+[WebArchiver archiveSelectionInFrame:]): Ditto.

        * WebView/WebDataSource.mm:
        (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): Ditto.
        (-[WebDataSource _documentFragmentWithArchive:]): Ditto.
        (-[WebDataSource subresources]): Ditto.
        (-[WebDataSource subresourceForURL:]): Ditto.

        * WebView/WebDataSourceInternal.h: Removed _bridge method.

        * WebView/WebFrame.mm:
        (-[WebFramePrivate dealloc]): Removed code to release the bridge.
        (core): Go directly to the core frame, not via the bridge.
        (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
        Remove the code to deal with the bridge.
        (-[WebFrame _initWithWebFrameView:webView:]): Ditto. Also added code to set the
        shouldCreateRenderers flag, formerly on the bridge.
        (-[WebFrame _updateBackground]): Change to call mehods on self, not bridge.
        (aeDescFromJSValue): Moved here from bridge.
        (-[WebFrame _domain]): Ditto.
        (-[WebFrame _addData:]): Ditto.
        (-[WebFrame _stringWithDocumentTypeStringAndMarkupString:]): Ditto.
        (-[WebFrame _nodesFromList:]): Ditto.
        (-[WebFrame _markupStringFromNode:nodes:]): Ditto.
        (-[WebFrame _markupStringFromRange:nodes:]): Ditto.
        (-[WebFrame _selectedString]): Ditto.
        (-[WebFrame _stringForRange:]): Ditto.
        (-[WebFrame _forceLayoutAdjustingViewSize:]): Ditto.
        (-[WebFrame _forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto.
        (-[WebFrame _sendScrollEvent]): Ditto.
        (-[WebFrame _drawRect:]): Ditto.
        (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]): Ditto.
        (-[WebFrame _adjustPageHeightNew:top:bottom:limit:]): Ditto.
        (-[WebFrame _copyRenderNode:copier:]): Ditto.
        (-[WebFrame _copyRenderTree:]): Ditto.
        (inputElementFromDOMElement): Ditto.
        (formElementFromDOMElement): Ditto.
        (-[WebFrame _elementWithName:inForm:]): Ditto.
        (-[WebFrame _elementDoesAutoComplete:]): Ditto.
        (-[WebFrame _elementIsPassword:]): Ditto.
        (-[WebFrame _formForElement:]): Ditto.
        (-[WebFrame _currentForm]): Ditto.
        (-[WebFrame _controlsInForm:]): Ditto.
        (-[WebFrame _searchForLabels:beforeElement:]): Ditto.
        (-[WebFrame _matchLabels:againstElement:]): Ditto.
        (-[WebFrame _URLWithAttributeString:]): Ditto.
        (-[WebFrame _searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto.
        (-[WebFrame _markAllMatchesForText:caseSensitive:limit:]): Ditto.
        (-[WebFrame _markedTextMatchesAreHighlighted]): Ditto.
        (-[WebFrame _setMarkedTextMatchesAreHighlighted:]): Ditto.
        (-[WebFrame _unmarkAllTextMatches]): Ditto.
        (-[WebFrame _rectsForTextMatches]): Ditto.
        (-[WebFrame _stringByEvaluatingJavaScriptFromString:]): Ditto.
        (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Ditto.
        (-[WebFrame _aeDescByEvaluatingJavaScriptFromString:]): Ditto.
        (-[WebFrame _caretRectAtNode:offset:affinity:]): Ditto.
        (-[WebFrame _firstRectForDOMRange:]): Ditto.
        (-[WebFrame _scrollDOMRangeToVisible:]): Ditto.
        (-[WebFrame _baseURL]): Ditto.
        (-[WebFrame _stringWithData:]): Ditto.
        (+[WebFrame _stringWithData:textEncodingName:]): Ditto.
        (-[WebFrame _needsLayout]): Ditto.
        (-[WebFrame _renderTreeAsExternalRepresentation]): Ditto.
        (-[WebFrame _accessibilityTree]): Ditto.
        (-[WebFrame _setBaseBackgroundColor:]): Ditto.
        (-[WebFrame _setDrawsBackground:]): Ditto.
        (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
        Ditto.
        (-[WebFrame _selectionGranularity]): Ditto.
        (-[WebFrame _convertToNSRange:]): Ditto.
        (-[WebFrame _convertToDOMRange:]): Ditto.
        (-[WebFrame _convertNSRangeToDOMRange:]): Ditto.
        (-[WebFrame _convertDOMRangeToNSRange:]): Ditto.
        (-[WebFrame _markDOMRange]): Ditto.
        (-[WebFrame _markedTextNSRange]): Ditto.
        (-[WebFrame _smartDeleteRangeForProposedRange:]): Ditto.
        (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
        (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto.
        (-[WebFrame _documentFragmentWithText:inContext:]): Ditto.
        (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): Ditto.
        (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): Ditto.
        (-[WebFrame _replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]): Ditto.
        (-[WebFrame _replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): Ditto.
        (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): Ditto.
        (-[WebFrame _insertParagraphSeparatorInQuotedContent]): Ditto.
        (-[WebFrame _visiblePositionForPoint:]): Ditto.
        (-[WebFrame _characterRangeAtPoint:]): Ditto.
        (-[WebFrame _typingStyle]): Ditto.
        (-[WebFrame _setTypingStyle:withUndoAction:]): Ditto.
        (-[WebFrame _fontForSelection:]): Ditto.
        (-[WebFrame _dragSourceMovedTo:]): Ditto.
        (-[WebFrame _dragSourceEndedAt:operation:]): Ditto.
        (-[WebFrame _getData:andResponse:forURL:]): Ditto.
        (-[WebFrame _getAllResourceDatas:andResponses:]): Ditto.
        (-[WebFrame _canProvideDocumentSource]): Ditto.
        (-[WebFrame _canSaveAsWebArchive]): Ditto.
        (-[WebFrame _receivedData:textEncodingName:]): Ditto.
        (-[WebFrame _setShouldCreateRenderers:]): Put the code from the bridge in this preexisting
        function. Couldn't just keep the bridge method because this was already here with the same name.
        (-[WebFrame _selectedNSRange]): Ditto.
        (-[WebFrame _selectNSRange:]): Ditto.
        (-[WebFrame dealloc]): Remove bridge-related code.
        (-[WebFrame finalize]): Ditto.

        * WebView/WebFrameInternal.h: Added all the method declarations from the bridge.
        Removed the bridge parameter from the init method. Removed the #if blocks that
        tried to make this header work in non-C++ ObjC files -- they were broken and unused.
        Removed the _bridge method.

        * WebView/WebFrameView.mm: Removed the _bridge method.

        * WebView/WebHTMLRepresentation.mm:
        (-[WebHTMLRepresentation setDataSource:]): Removed the code to set up the bridge
        field.
        (-[WebHTMLRepresentation receivedData:withDataSource:]): Use WebFrame instead of bridge.
        (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): Ditto.
        (-[WebHTMLRepresentation canProvideDocumentSource]): Ditto.
        (-[WebHTMLRepresentation canSaveAsWebArchive]): Ditto.
        (-[WebHTMLRepresentation documentSource]): Ditto.
        (-[WebHTMLRepresentation DOMDocument]): Ditto.
        (-[WebHTMLRepresentation elementWithName:inForm:]): Ditto.
        (-[WebHTMLRepresentation elementDoesAutoComplete:]): Ditto.
        (-[WebHTMLRepresentation elementIsPassword:]): Ditto.
        (-[WebHTMLRepresentation formForElement:]): Ditto.
        (-[WebHTMLRepresentation currentForm]): Ditto.
        (-[WebHTMLRepresentation controlsInForm:]): Ditto.
        (-[WebHTMLRepresentation searchForLabels:beforeElement:]): Ditto.
        (-[WebHTMLRepresentation matchLabels:againstElement:]): Ditto.

        * WebView/WebHTMLRepresentationPrivate.h: Removed the _bridge method.

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _documentFragmentWithPaths:]): Use WebFrame instead of bridge.
        (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Ditto.
        (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Ditto.
        (-[WebHTMLView _updateTextSizeMultiplier]): Ditto.
        (-[WebHTMLView _frameOrBoundsChanged]): Ditto.
        (-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
        (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): Ditto.
        (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto.
        (-[WebHTMLView drawSingleRect:]): Ditto.
        (-[WebHTMLView draggedImage:movedTo:]): Ditto.
        (-[WebHTMLView draggedImage:endedAt:operation:]): Ditto.
        (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Ditto.
        (-[WebHTMLView knowsPageRange:]): Ditto.
        (-[WebHTMLView accessibilityAttributeValue:]): Ditto.
        (-[WebHTMLView accessibilityFocusedUIElement]): Ditto.
        (-[WebHTMLView accessibilityHitTest:]): Ditto.
        (-[WebHTMLView _accessibilityParentForSubview:]): Ditto.
        (-[WebHTMLView changeDocumentBackgroundColor:]): Ditto.
        (-[WebHTMLView _changeWordCaseWithSelector:]): Ditto.
        (-[WebHTMLView _changeSpellingToWord:]): Ditto.
        (-[WebHTMLView startSpeaking:]): Ditto.
        (-[WebHTMLView _updateFontPanel]): Ditto.
        (-[WebHTMLView _canSmartCopyOrDelete]): Ditto.
        (-[WebHTMLView _layoutIfNeeded]): Ditto.
        (-[WebHTMLView characterIndexForPoint:]): Ditto.
        (-[WebHTMLView firstRectForCharacterRange:]): Ditto.
        (-[WebHTMLView selectedRange]): Ditto.
        (-[WebHTMLView markedRange]): Ditto.
        (-[WebHTMLView attributedSubstringFromRange:]): Ditto.
        (-[WebHTMLView setMarkedText:selectedRange:]): Ditto.
        (-[WebHTMLView insertText:]): Ditto.
        (-[WebTextCompleteController _insertMatch:]): Ditto.
        (-[WebTextCompleteController doCompletion]): Ditto.
        (-[WebTextCompleteController endRevertingChange:moveLeft:]): Ditto.
        (-[WebHTMLView string]): Ditto.
        (-[WebHTMLView selectedString]): Ditto.
        (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto.
        (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Ditto.
        (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): Ditto.
        (-[WebHTMLView markedTextMatchesAreHighlighted]): Ditto.
        (-[WebHTMLView unmarkAllTextMatches]): Ditto.
        (-[WebHTMLView rectsForTextMatches]): Ditto.
        * WebView/WebRenderNode.mm:
        (-[WebRenderNode initWithWebFrameView:]): Ditto.
        * WebView/WebResource.mm:
        (-[WebResource _stringValue]): Ditto.

        * WebView/WebScriptDebugDelegate.mm: Removed unneeded include.

        * WebView/WebView.mm:
        (-[WebView _dashboardRegions]): Use WebFrame instead of bridge.
        (-[WebView setProhibitsMainFrameScrolling:]): Ditto.
        (-[WebView _setInViewSourceMode:]): Ditto.
        (-[WebView _inViewSourceMode]): Ditto.
        (-[WebView _executeCoreCommandByName:value:]): Ditto.
        (-[WebView stringByEvaluatingJavaScriptFromString:]): Ditto.
        (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto.
        (-[WebView scrollDOMRangeToVisible:]): Ditto.
        (-[WebView setSelectedDOMRange:affinity:]): Ditto.
        (-[WebView setEditable:]): Ditto.
        (-[WebView setTypingStyle:]): Ditto.
        (-[WebView typingStyle]): Ditto.
        (-[WebView replaceSelectionWithNode:]): Ditto.
        (-[WebView replaceSelectionWithText:]): Ditto.
        (-[WebView replaceSelectionWithMarkupString:]): Ditto.
        (-[WebView replaceSelectionWithArchive:]): Ditto.
        (-[WebView _insertNewlineInQuotedContent]): Ditto.
        (-[WebView _replaceSelectionWithNode:matchStyle:]): Ditto.

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

47 files changed:
WebCore/ChangeLog
WebCore/WebCore.base.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/page/Frame.cpp
WebCore/page/Frame.h
WebCore/page/mac/FrameMac.mm
WebCore/page/mac/WebCoreFrameBridge.h [deleted file]
WebCore/page/mac/WebCoreFrameBridge.mm [deleted file]
WebKit/ChangeLog
WebKit/StringsNotToBeLocalized.txt
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/mac/ChangeLog
WebKit/mac/DOM/WebDOMOperations.mm
WebKit/mac/DOM/WebDOMOperationsPrivate.h
WebKit/mac/DefaultDelegates/WebDefaultContextMenuDelegate.mm
WebKit/mac/History/WebHistoryItem.mm
WebKit/mac/MigrateHeaders.make
WebKit/mac/Misc/WebCoreStatistics.mm
WebKit/mac/Misc/WebElementDictionary.mm
WebKit/mac/Misc/WebKitStatistics.m
WebKit/mac/Misc/WebKitStatisticsPrivate.h
WebKit/mac/Misc/WebNSAttributedStringExtras.mm
WebKit/mac/Misc/WebNSPasteboardExtras.mm
WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
WebKit/mac/Plugins/WebNetscapePluginEmbeddedView.mm
WebKit/mac/Plugins/WebNetscapePluginStream.mm
WebKit/mac/Plugins/WebPluginContainerCheck.mm
WebKit/mac/Plugins/WebPluginController.h
WebKit/mac/Plugins/WebPluginController.mm
WebKit/mac/WebCoreSupport/WebEditorClient.mm
WebKit/mac/WebCoreSupport/WebFrameBridge.h [deleted file]
WebKit/mac/WebCoreSupport/WebFrameBridge.mm [deleted file]
WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
WebKit/mac/WebCoreSupport/WebViewFactory.mm
WebKit/mac/WebView/WebArchiver.mm
WebKit/mac/WebView/WebDataSource.mm
WebKit/mac/WebView/WebDataSourceInternal.h
WebKit/mac/WebView/WebFrame.mm
WebKit/mac/WebView/WebFrameInternal.h
WebKit/mac/WebView/WebFrameView.mm
WebKit/mac/WebView/WebHTMLRepresentation.mm
WebKit/mac/WebView/WebHTMLRepresentationPrivate.h
WebKit/mac/WebView/WebHTMLView.mm
WebKit/mac/WebView/WebRenderNode.mm
WebKit/mac/WebView/WebResource.mm
WebKit/mac/WebView/WebScriptDebugDelegate.mm
WebKit/mac/WebView/WebView.mm

index a96a495..7f00ae2 100644 (file)
@@ -1,3 +1,27 @@
+2008-03-12  Darin Adler  <darin@apple.com>
+
+        Reviewed by Anders.
+
+        - http://bugs.webkit.org/show_bug.cgi?id=17640
+          eliminate WebCoreFrameBridge
+
+        * WebCore.base.exp: Added more exports, needed by code moved from WebCoreFrameBridge
+        to WebFrame in WebKit.
+        * WebCore.xcodeproj/project.pbxproj: Added more headers, same reason. Also deleted
+        WebCoreFrameBridge.h and WebCoreFrameBridge.mm.
+
+        * page/Frame.cpp:
+        (WebCore::Frame::Frame): Added call to initJavaJSBindings(), formerly handled by
+        the WebCoreFrameBridge.
+        * page/Frame.h: Added initJavaJSBindings function.
+
+        * page/mac/FrameMac.mm:
+        (WebCore::updateRenderingForBindings): Moved here from WebCoreFrameBridge.
+        (WebCore::Frame::initJavaJSBindings): Ditto; code was in the init function.
+
+        * page/mac/WebCoreFrameBridge.h: Removed.
+        * page/mac/WebCoreFrameBridge.mm: Removed.
+
 2008-03-12  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Anders Carlsson.
index 964c595..408c06d 100644 (file)
@@ -149,8 +149,10 @@ __ZN7WebCore11EditCommand7unapplyEv
 __ZN7WebCore11FileChooser10chooseFileERKNS_6StringE
 __ZN7WebCore11FileChooserD1Ev
 __ZN7WebCore11FrameLoader11completeURLERKNS_6StringE
+__ZN7WebCore11FrameLoader11setEncodingERKNS_6StringEb
 __ZN7WebCore11FrameLoader12canCachePageEv
 __ZN7WebCore11FrameLoader12shouldReloadERKNS_4KURLES3_
+__ZN7WebCore11FrameLoader13executeScriptERKNS_6StringEb
 __ZN7WebCore11FrameLoader14detachChildrenEv
 __ZN7WebCore11FrameLoader14scrollToAnchorERKNS_4KURLE
 __ZN7WebCore11FrameLoader14stopAllLoadersEv
@@ -180,6 +182,7 @@ __ZN7WebCore11FrameLoader4loadERKNS_4KURLEPNS_5EventE
 __ZN7WebCore11FrameLoader4loadERKNS_4KURLERKNS_6StringENS_13FrameLoadTypeES6_PNS_5EventEN3WTF10PassRefPtrINS_9FormStateEEE
 __ZN7WebCore11FrameLoader5clearEbb
 __ZN7WebCore11FrameLoader6reloadEv
+__ZN7WebCore11FrameLoader7addDataEPKci
 __ZN7WebCore11FrameLoader7canLoadERKNS_4KURLEPKNS_8DocumentE
 __ZN7WebCore11HistoryItem12addChildItemEN3WTF10PassRefPtrIS0_EE
 __ZN7WebCore11HistoryItem12setURLStringERKNS_6StringE
@@ -205,6 +208,9 @@ __ZN7WebCore11HistoryItemC1ERKNS_6StringES3_d
 __ZN7WebCore11HistoryItemC1Ev
 __ZN7WebCore11HistoryItemD1Ev
 __ZN7WebCore11RenderLayer18gAlignCenterAlwaysE
+__ZN7WebCore11RenderLayer19scrollRectToVisibleERKNS_7IntRectERKNS0_15ScrollAlignmentES6_
+__ZN7WebCore11RenderLayer20gAlignToEdgeIfNeededE
+__ZN7WebCore11currentTimeEv
 __ZN7WebCore11globalPointERK8_NSPointP8NSWindow
 __ZN7WebCore11toUserSpaceERK7_NSRectP8NSWindow
 __ZN7WebCore12AtomicString3addEPKc
@@ -214,6 +220,8 @@ __ZN7WebCore12EventHandler10wheelEventEP7NSEvent
 __ZN7WebCore12EventHandler12mouseDraggedEP7NSEvent
 __ZN7WebCore12EventHandler14currentNSEventEv
 __ZN7WebCore12EventHandler14scrollOverflowENS_15ScrollDirectionENS_17ScrollGranularityE
+__ZN7WebCore12EventHandler17dragSourceEndedAtERKNS_18PlatformMouseEventENS_13DragOperationE
+__ZN7WebCore12EventHandler17dragSourceMovedToERKNS_18PlatformMouseEventE
 __ZN7WebCore12EventHandler20handleTextInputEventERKNS_6StringEPNS_5EventEbb
 __ZN7WebCore12EventHandler20hitTestResultAtPointERKNS_8IntPointEb
 __ZN7WebCore12EventHandler20sendContextMenuEventERKNS_18PlatformMouseEventE
@@ -251,11 +259,19 @@ __ZN7WebCore12SchedulePairC1EP9NSRunLoopPK10__CFString
 __ZN7WebCore12SharedBuffer10wrapNSDataEP6NSData
 __ZN7WebCore12SharedBuffer12createNSDataEv
 __ZN7WebCore12TextEncodingC1ERKNS_6StringE
+__ZN7WebCore12TextIterator11rangeLengthEPKNS_5RangeEb
+__ZN7WebCore12TextIterator26rangeFromLocationAndLengthEPNS_7ElementEiib
+__ZN7WebCore12applyCommandEN3WTF10PassRefPtrINS_11EditCommandEEE
+__ZN7WebCore12createMarkupEPKNS_4NodeENS_13EChildrenOnlyEPN3WTF6VectorIPS0_Lm0EEE
+__ZN7WebCore12createMarkupEPKNS_5RangeEPN3WTF6VectorIPNS_4NodeELm0EEENS_23EAnnotateForInterchangeEb
 __ZN7WebCore12gcControllerEv
 __ZN7WebCore12iconDatabaseEv
+__ZN7WebCore13AXObjectCache21gAccessibilityEnabledE
+__ZN7WebCore13AXObjectCache3getEPNS_12RenderObjectE
 __ZN7WebCore13HitTestResultC1ERKS0_
 __ZN7WebCore13HitTestResultD1Ev
 __ZN7WebCore13KeyboardEventC1ERKNS_12AtomicStringEbbPNS_9DOMWindowERKNS_6StringEjbbbbb
+__ZN7WebCore13TypingCommand39insertParagraphSeparatorInQuotedContentEPNS_8DocumentE
 __ZN7WebCore13toDeviceSpaceERKNS_9FloatRectEP8NSWindow
 __ZN7WebCore14CachedResource5derefEPNS_20CachedResourceClientE
 __ZN7WebCore14DocumentLoader12setCommittedEb
@@ -321,9 +337,12 @@ __ZN7WebCore15FocusController15setFocusedFrameEN3WTF10PassRefPtrINS_5FrameEEE
 __ZN7WebCore15FocusController15setInitialFocusENS_14FocusDirectionEPNS_13KeyboardEventE
 __ZN7WebCore15FocusController18focusedOrMainFrameEv
 __ZN7WebCore15FocusController9setActiveEb
+__ZN7WebCore15GraphicsContextC1EP9CGContext
+__ZN7WebCore15GraphicsContextD1Ev
 __ZN7WebCore15StringTruncator13rightTruncateERKNS_6StringEfRKNS_4FontEb
 __ZN7WebCore15StringTruncator14centerTruncateERKNS_6StringEfRKNS_4FontEb
 __ZN7WebCore15StringTruncator5widthERKNS_6StringERKNS_4FontEb
+__ZN7WebCore15VisiblePositionC1ERKNS_8PositionENS_9EAffinityE
 __ZN7WebCore16FontPlatformDataC1EP6NSFontbb
 __ZN7WebCore16FontPlatformDataD1Ev
 __ZN7WebCore16MIMETypeRegistry24isSupportedImageMIMETypeERKNS_6StringE
@@ -334,8 +353,12 @@ __ZN7WebCore16NavigationActionC1ERKNS_4KURLENS_13FrameLoadTypeEb
 __ZN7WebCore16NavigationActionC1ERKNS_4KURLENS_14NavigationTypeE
 __ZN7WebCore16NavigationActionC1Ev
 __ZN7WebCore16colorFromNSColorEP7NSColor
+__ZN7WebCore16enclosingIntRectERK7_NSRect
+__ZN7WebCore16isEndOfParagraphERKNS_15VisiblePositionE
+__ZN7WebCore17DOMImplementation14isTextMIMETypeERKNS_6StringE
 __ZN7WebCore17equalIgnoringCaseEPNS_10StringImplES1_
 __ZN7WebCore18PlatformMouseEventC1EP7NSEvent
+__ZN7WebCore18isStartOfParagraphERKNS_15VisiblePositionE
 __ZN7WebCore19CSSStyleDeclaration11setPropertyERKNS_6StringES3_Ri
 __ZN7WebCore19InspectorController11showConsoleEv
 __ZN7WebCore19InspectorController12attachWindowEv
@@ -346,9 +369,12 @@ __ZN7WebCore19InspectorController4showEv
 __ZN7WebCore19InspectorController5closeEv
 __ZN7WebCore19InspectorController7inspectEPNS_4NodeE
 __ZN7WebCore19SelectionController10setFocusedEb
+__ZN7WebCore19SelectionController12setSelectionERKNS_9SelectionEbbb
 __ZN7WebCore19SelectionController16setSelectedRangeEPNS_5RangeENS_9EAffinityEb
 __ZN7WebCore19SelectionController5clearEv
+__ZN7WebCore19SelectionController6modifyENS0_11EAlterationENS0_10EDirectionENS_15TextGranularityEb
 __ZN7WebCore19SelectionController9selectAllEv
+__ZN7WebCore19SelectionControllerC1EPNS_5FrameEb
 __ZN7WebCore19TextResourceDecoder5flushEv
 __ZN7WebCore19TextResourceDecoder6decodeEPKcm
 __ZN7WebCore19TextResourceDecoderC1ERKNS_6StringERKNS_12TextEncodingE
@@ -361,12 +387,20 @@ __ZN7WebCore21WindowsLatin1EncodingEv
 __ZN7WebCore21findEventWithKeyStateEPNS_5EventE
 __ZN7WebCore21isBackForwardLoadTypeENS_13FrameLoadTypeE
 __ZN7WebCore21reportThreadViolationEPKc
+__ZN7WebCore22createFragmentFromTextEPNS_5RangeERKNS_6StringE
+__ZN7WebCore22externalRepresentationEPNS_12RenderObjectE
+__ZN7WebCore23ReplaceSelectionCommandC1EPNS_8DocumentEN3WTF10PassRefPtrINS_16DocumentFragmentEEEbbbbbNS_10EditActionE
+__ZN7WebCore23createFragmentFromNodesEPNS_8DocumentERKN3WTF6VectorIPNS_4NodeELm0EEE
+__ZN7WebCore24createFragmentFromMarkupEPNS_8DocumentERKNS_6StringES4_
 __ZN7WebCore24decodeURLEscapeSequencesERKNS_6StringE
 __ZN7WebCore24notifyHistoryItemChangedE
+__ZN7WebCore24rangeCompliantEquivalentERKNS_8PositionE
 __ZN7WebCore26CSSMutableStyleDeclarationC1Ev
 __ZN7WebCore26NetscapePlugInStreamLoader6createEPNS_5FrameEPNS_32NetscapePlugInStreamLoaderClientE
 __ZN7WebCore26usesTestModeFocusRingColorEv
+__ZN7WebCore29isCharacterSmartReplaceExemptEib
 __ZN7WebCore29setUsesTestModeFocusRingColorEb
+__ZN7WebCore32plainTextToMallocAllocatedBufferEPKNS_5RangeERj
 __ZN7WebCore33setDefaultThreadViolationBehaviorENS_23ThreadViolationBehaviorE
 __ZN7WebCore36InitializeLoggingChannelsIfNecessaryEv
 __ZN7WebCore3macERKNS_23AuthenticationChallengeE
@@ -395,22 +429,37 @@ __ZN7WebCore4PageD1Ev
 __ZN7WebCore5Cache11setDisabledEb
 __ZN7WebCore5Cache13getStatisticsEv
 __ZN7WebCore5Cache13setCapacitiesEjjj
+__ZN7WebCore5Frame10findStringERKNS_6StringEbbbb
+__ZN7WebCore5Frame11forceLayoutEb
 __ZN7WebCore5Frame11scriptProxyEv
 __ZN7WebCore5Frame11shouldCloseEv
 __ZN7WebCore5Frame13ownerRendererEv
 __ZN7WebCore5Frame13reapplyStylesEv
+__ZN7WebCore5Frame13setZoomFactorEfb
+__ZN7WebCore5Frame15sendScrollEventEv
+__ZN7WebCore5Frame16adjustPageHeightEPffff
 __ZN7WebCore5Frame17bindingRootObjectEv
 __ZN7WebCore5Frame18windowScriptObjectEv
 __ZN7WebCore5Frame20setSelectionFromNoneEv
+__ZN7WebCore5Frame21markAllMatchesForTextERKNS_6StringEbj
 __ZN7WebCore5Frame21setProhibitsScrollingEb
+__ZN7WebCore5Frame24computeAndSetTypingStyleEPNS_19CSSStyleDeclarationENS_10EditActionE
+__ZN7WebCore5Frame25matchLabelsAgainstElementEP7NSArrayPNS_7ElementE
 __ZN7WebCore5Frame26dashboardRegionsDictionaryEv
+__ZN7WebCore5Frame28searchForLabelsBeforeElementEP7NSArrayPNS_7ElementE
 __ZN7WebCore5Frame29cleanupScriptObjectsForPluginEPv
+__ZN7WebCore5Frame29forceLayoutWithPageWidthRangeEffb
+__ZN7WebCore5Frame34setMarkedTextMatchesAreHighlightedEb
 __ZN7WebCore5Frame4initEv
+__ZN7WebCore5Frame5paintEPNS_15GraphicsContextERKNS_7IntRectE
 __ZN7WebCore5FrameC1EPNS_4PageEPNS_21HTMLFrameOwnerElementEPNS_17FrameLoaderClientE
 __ZN7WebCore5Image10getNSImageEv
+__ZN7WebCore5Image12supportsTypeERKNS_6StringE
 __ZN7WebCore5Image20loadPlatformResourceEPKc
 __ZN7WebCore5Image21getTIFFRepresentationEv
 __ZN7WebCore5Range6createEN3WTF10PassRefPtrINS_8DocumentEEENS2_INS_4NodeEEEiS6_i
+__ZN7WebCore5Range6setEndEN3WTF10PassRefPtrINS_4NodeEEEiRi
+__ZN7WebCore5Range8setStartEN3WTF10PassRefPtrINS_4NodeEEEiRi
 __ZN7WebCore5RangeD1Ev
 __ZN7WebCore5cacheEv
 __ZN7WebCore5equalEPNS_10StringImplEPKc
@@ -464,8 +513,13 @@ __ZN7WebCore6WidgetC1EP6NSView
 __ZN7WebCore6WidgetC1Ev
 __ZN7WebCore7IntSizeC1ERK7_NSSize
 __ZN7WebCore7nsColorERKNS_5ColorE
+__ZN7WebCore8Document11createRangeEv
 __ZN7WebCore8Document13removeMarkersENS_14DocumentMarker10MarkerTypeE
 __ZN7WebCore8Document14setFocusedNodeEN3WTF10PassRefPtrINS_4NodeEEE
+__ZN7WebCore8Document22createDocumentFragmentEv
+__ZN7WebCore8Document23renderedRectsForMarkersENS_14DocumentMarker10MarkerTypeE
+__ZN7WebCore8Document24setShouldCreateRenderersEb
+__ZN7WebCore8Document36updateLayoutIgnorePendingStylesheetsEv
 __ZN7WebCore8Document4bodyEv
 __ZN7WebCore8DragDataC1EP11objc_objectRKNS_8IntPointES5_NS_13DragOperationEPNS_16PasteboardHelperE
 __ZN7WebCore8IntPointC1ERK8_NSPoint
@@ -509,10 +563,13 @@ __ZN7WebCore9FloatRectC1ERK7_NSRect
 __ZN7WebCore9FrameTree11appendChildEN3WTF10PassRefPtrINS_5FrameEEE
 __ZN7WebCore9FrameTree7setNameERKNS_12AtomicStringE
 __ZN7WebCore9FrameView12setMediaTypeERKNS_6StringE
+__ZN7WebCore9FrameView14adjustViewSizeEv
 __ZN7WebCore9FrameView14initScrollbarsEv
 __ZN7WebCore9FrameView14setMarginWidthEi
+__ZN7WebCore9FrameView14setTransparentEb
 __ZN7WebCore9FrameView15setMarginHeightEi
 __ZN7WebCore9FrameView18updateControlTintsEv
+__ZN7WebCore9FrameView22setBaseBackgroundColorENS_5ColorE
 __ZN7WebCore9FrameViewC1EPNS_5FrameE
 __ZN7WebCore9HTMLNames10listingTagE
 __ZN7WebCore9HTMLNames13blockquoteTagE
@@ -539,21 +596,28 @@ __ZN7WebCore9HTMLNames5ulTagE
 __ZN7WebCore9HTMLNames6divTagE
 __ZN7WebCore9HTMLNames6imgTagE
 __ZN7WebCore9HTMLNames6preTagE
+__ZN7WebCore9HTMLNames7formTagE
 __ZN7WebCore9HTMLNames7srcAttrE
 __ZN7WebCore9HTMLNames8hrefAttrE
+__ZN7WebCore9HTMLNames8inputTagE
 __ZN7WebCore9PageCache11setCapacityEi
 __ZN7WebCore9PageCache27releaseAutoreleasedPagesNowEv
 __ZN7WebCore9PageGroup14addVisitedLinkEPKtm
 __ZN7WebCore9PageGroup21removeAllVisitedLinksEv
 __ZN7WebCore9PageGroup26setShouldTrackVisitedLinksEb
 __ZN7WebCore9Selection22expandUsingGranularityENS_15TextGranularityE
+__ZN7WebCore9SelectionC1EPKNS_5RangeENS_9EAffinityE
 __ZN7WebCore9TimerBase4stopEv
 __ZN7WebCore9TimerBase5startEdd
 __ZN7WebCore9TimerBaseC2Ev
 __ZN7WebCore9TimerBaseD2Ev
+__ZN7WebCore9makeRangeERKNS_15VisiblePositionES2_
 __ZN7WebCore9pageCacheEv
 __ZN7WebCoreeqERKNS_19ResourceRequestBaseES2_
+__ZN7WebCoreplERKNS_6StringES2_
 __ZNK3KJS8Bindings10RootObject12globalObjectEv
+__ZNK7WebCore10PluginData16supportsMimeTypeERKNS_6StringE
+__ZNK7WebCore10ScrollView12documentViewEv
 __ZNK7WebCore11CachedImage5imageEv
 __ZNK7WebCore11ContextMenu19platformDescriptionEv
 __ZNK7WebCore11FrameLoader10isCompleteEv
@@ -562,6 +626,7 @@ __ZNK7WebCore11FrameLoader14frameHasLoadedEv
 __ZNK7WebCore11FrameLoader15containsPluginsEv
 __ZNK7WebCore11FrameLoader15firstLayoutDoneEv
 __ZNK7WebCore11FrameLoader16outgoingReferrerEv
+__ZNK7WebCore11FrameLoader16responseMIMETypeEv
 __ZNK7WebCore11FrameLoader20activeDocumentLoaderEv
 __ZNK7WebCore11FrameLoader21isQuickRedirectComingEv
 __ZNK7WebCore11FrameLoader27numPendingOrLoadingRequestsEb
@@ -591,6 +656,7 @@ __ZNK7WebCore12EventHandler20currentKeyboardEventEv
 __ZNK7WebCore12IconDatabase12databasePathEv
 __ZNK7WebCore12IconDatabase24shouldStopThreadActivityEv
 __ZNK7WebCore12IconDatabase9isEnabledEv
+__ZNK7WebCore12RenderObject14enclosingLayerEv
 __ZNK7WebCore12RenderObject25backslashAsCurrencySymbolEv
 __ZNK7WebCore12SharedBuffer4dataEv
 __ZNK7WebCore12SharedBuffer4sizeEv
@@ -631,6 +697,9 @@ __ZNK7WebCore14ResourceHandle10connectionEv
 __ZNK7WebCore14ResourceLoader11frameLoaderEv
 __ZNK7WebCore15ProgressTracker17estimatedProgressEv
 __ZNK7WebCore15ResourceRequest12nsURLRequestEv
+__ZNK7WebCore15VisiblePosition14characterAfterEv
+__ZNK7WebCore15VisiblePosition4nextEb
+__ZNK7WebCore15VisiblePosition8previousEb
 __ZNK7WebCore16ResourceResponse13nsURLResponseEv
 __ZNK7WebCore17ResourceErrorBase8lazyInitEv
 __ZNK7WebCore19ResourceRequestBase3urlEv
@@ -649,28 +718,39 @@ __ZNK7WebCore4KURL17lastPathComponentEv
 __ZNK7WebCore4KURL4hostEv
 __ZNK7WebCore4KURL4pathEv
 __ZNK7WebCore4KURLcvP5NSURLEv
+__ZNK7WebCore4Node14isDescendantOfEPKS0_
+__ZNK7WebCore4Page10pluginDataEv
 __ZNK7WebCore4Page34inLowQualityImageInterpolationModeEv
 __ZNK7WebCore5Frame10isFrameSetEv
+__ZNK7WebCore5Frame11currentFormEv
+__ZNK7WebCore5Frame11typingStyleEv
 __ZNK7WebCore5Frame12eventHandlerEv
 __ZNK7WebCore5Frame12ownerElementEv
+__ZNK7WebCore5Frame12selectedTextEv
 __ZNK7WebCore5Frame13selectionRectEb
 __ZNK7WebCore5Frame14selectionImageEb
 __ZNK7WebCore5Frame15revealSelectionERKNS_11RenderLayer15ScrollAlignmentE
 __ZNK7WebCore5Frame16inViewSourceModeEv
+__ZNK7WebCore5Frame17firstRectForRangeEPNS_5RangeE
+__ZNK7WebCore5Frame18documentTypeStringEv
 __ZNK7WebCore5Frame18selectionTextRectsERN3WTF6VectorINS_9FloatRectELm0EEEb
 __ZNK7WebCore5Frame19selectionControllerEv
 __ZNK7WebCore5Frame19setInViewSourceModeEb
-__ZN7WebCore5Frame13setZoomFactorEfb
+__ZNK7WebCore5Frame20selectionGranularityEv
+__ZNK7WebCore5Frame25backslashAsCurrencySymbolEv
 __ZNK7WebCore5Frame30applyEditingStyleToBodyElementEv
 __ZNK7WebCore5Frame31fontAttributesForSelectionStartEv
+__ZNK7WebCore5Frame31markedTextMatchesAreHighlightedEv
 __ZNK7WebCore5Frame33removeEditingStyleFromBodyElementEv
 __ZNK7WebCore5Frame37baseWritingDirectionForSelectionStartEv
+__ZNK7WebCore5Frame4markEv
 __ZNK7WebCore5Frame4pageEv
 __ZNK7WebCore5Frame4treeEv
 __ZNK7WebCore5Frame4viewEv
 __ZNK7WebCore5Frame6editorEv
 __ZNK7WebCore5Frame6loaderEv
 __ZNK7WebCore5Frame8documentEv
+__ZNK7WebCore5Frame8rendererEv
 __ZNK7WebCore5Frame8settingsEv
 __ZNK7WebCore5Range11startOffsetERi
 __ZNK7WebCore5Range12endContainerERi
@@ -679,6 +759,8 @@ __ZNK7WebCore5Range19boundaryPointsValidEv
 __ZNK7WebCore5Range9endOffsetERi
 __ZNK7WebCore5Range9firstNodeEv
 __ZNK7WebCore6Editor13canEditRichlyEv
+__ZNK7WebCore6Editor16compositionRangeEv
+__ZNK7WebCore6Editor16fontForSelectionERb
 __ZNK7WebCore6Editor17selectionHasStyleEPNS_19CSSStyleDeclarationE
 __ZNK7WebCore6Editor17shouldDeleteRangeEPNS_5RangeE
 __ZNK7WebCore6Editor22selectionStartHasStyleEPNS_19CSSStyleDeclarationE
@@ -705,7 +787,14 @@ __ZNK7WebCore7Element12getAttributeERKNS_13QualifiedNameE
 __ZNK7WebCore7IntRectcv7_NSRectEv
 __ZNK7WebCore8Document11completeURLERKNS_6StringE
 __ZNK7WebCore8Document11defaultViewEv
+__ZNK7WebCore8Document13axObjectCacheEv
+__ZNK7WebCore8Document15documentElementEv
+__ZNK7WebCore8Document6domainEv
 __ZNK7WebCore8IntPointcv8_NSPointEv
+__ZNK7WebCore8Position10downstreamEv
+__ZNK7WebCore8Position25leadingWhitespacePositionENS_9EAffinityEb
+__ZNK7WebCore8Position26trailingWhitespacePositionENS_9EAffinityEb
+__ZNK7WebCore8Position8upstreamEv
 __ZNK7WebCore9FloatRectcv7_NSRectEv
 __ZNK7WebCore9FrameTree12traverseNextEPKNS_5FrameE
 __ZNK7WebCore9FrameTree14isDescendantOfEPKNS_5FrameE
@@ -713,7 +802,9 @@ __ZNK7WebCore9FrameTree20traverseNextWithWrapEb
 __ZNK7WebCore9FrameTree24traversePreviousWithWrapEb
 __ZNK7WebCore9FrameTree4findERKNS_12AtomicStringE
 __ZNK7WebCore9FrameTree5childERKNS_12AtomicStringE
+__ZNK7WebCore9FrameView11needsLayoutEv
 __ZNK7WebCore9Selection17isContentEditableEv
+__ZNK7WebCore9Selection19rootEditableElementEv
 __ZNK7WebCore9Selection23isContentRichlyEditableEv
 __ZNK7WebCore9Selection7toRangeEv
 __ZNK7WebCore9TimerBase8isActiveEv
index 25468c1..2924595 100644 (file)
                1AF326460D78B5530068F0C4 /* AXObjectCacheMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AF326400D78B5530068F0C4 /* AXObjectCacheMac.mm */; };
                1AF326480D78B5530068F0C4 /* WebCoreAXObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AF326420D78B5530068F0C4 /* WebCoreAXObject.h */; };
                1AF326490D78B5530068F0C4 /* WebCoreAXObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AF326430D78B5530068F0C4 /* WebCoreAXObject.mm */; };
-               1AF326780D78B9440068F0C4 /* AXObjectCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AF326760D78B9440068F0C4 /* AXObjectCache.h */; };
+               1AF326780D78B9440068F0C4 /* AXObjectCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AF326760D78B9440068F0C4 /* AXObjectCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1AF326790D78B9440068F0C4 /* EditorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AF326770D78B9440068F0C4 /* EditorClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1AFE117D0CBFFB36003017FA /* SQLResultSetRowList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFE117B0CBFFB36003017FA /* SQLResultSetRowList.cpp */; };
                1AFE117E0CBFFB36003017FA /* SQLResultSetRowList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AFE117C0CBFFB36003017FA /* SQLResultSetRowList.h */; };
                1CFCEEDF0AACC6A300348750 /* DOMHTMLPreElementPrivate.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 1CFCEEDA0AACC68300348750 /* DOMHTMLPreElementPrivate.h */; };
                1CFCEEFA0AACC7A700348750 /* DOMHTMLInputElementPrivate.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 1CFCEEF90AACC79000348750 /* DOMHTMLInputElementPrivate.h */; };
                2D9066060BE141D400956998 /* LayoutState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9066040BE141D400956998 /* LayoutState.cpp */; };
-               2D9066070BE141D400956998 /* LayoutState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9066050BE141D400956998 /* LayoutState.h */; };
+               2D9066070BE141D400956998 /* LayoutState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9066050BE141D400956998 /* LayoutState.h */; settings = {ATTRIBUTES = (Private, ); }; };
                371F4F400D25B9AF00ECE0D5 /* FontData.h in Headers */ = {isa = PBXBuildFile; fileRef = 371F4F3E0D25B9AF00ECE0D5 /* FontData.h */; settings = {ATTRIBUTES = (Private, ); }; };
                371F4F410D25B9AF00ECE0D5 /* FontData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 371F4F3F0D25B9AF00ECE0D5 /* FontData.cpp */; };
                371F4FFC0D25E7F300ECE0D5 /* SegmentedFontData.h in Headers */ = {isa = PBXBuildFile; fileRef = 371F4FFA0D25E7F300ECE0D5 /* SegmentedFontData.h */; };
                4B3043C90AE0371D00A82647 /* SoundMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B3043C80AE0371D00A82647 /* SoundMac.mm */; };
                4B3043CC0AE0373B00A82647 /* Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B3043CA0AE0373B00A82647 /* Editor.cpp */; };
                4B3043CD0AE0373B00A82647 /* Editor.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B3043CB0AE0373B00A82647 /* Editor.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               4B6FA6F40C39E48C00087011 /* SmartReplace.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6FA6F20C39E48C00087011 /* SmartReplace.h */; };
+               4B6FA6F40C39E48C00087011 /* SmartReplace.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6FA6F20C39E48C00087011 /* SmartReplace.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4B6FA6F50C39E48C00087011 /* SmartReplace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B6FA6F30C39E48C00087011 /* SmartReplace.cpp */; };
                4B6FA6F70C39E4A100087011 /* SmartReplaceCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B6FA6F60C39E4A100087011 /* SmartReplaceCF.cpp */; };
                4B8AF4AA0B1CE02B00687690 /* ClipboardAccessPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8AF4A90B1CE02B00687690 /* ClipboardAccessPolicy.h */; settings = {ATTRIBUTES = (Private, ); }; };
                514C76380CE9225E007EF3CD /* JSSQLTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C76360CE9225E007EF3CD /* JSSQLTransaction.cpp */; };
                514C764C0CE9234E007EF3CD /* AuthenticationMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C76420CE9234E007EF3CD /* AuthenticationMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
                514C764D0CE9234E007EF3CD /* AuthenticationMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C76430CE9234E007EF3CD /* AuthenticationMac.mm */; };
-               514C764E0CE9234E007EF3CD /* FormDataStreamMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C76440CE9234E007EF3CD /* FormDataStreamMac.h */; };
+               514C764E0CE9234E007EF3CD /* FormDataStreamMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C76440CE9234E007EF3CD /* FormDataStreamMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
                514C764F0CE9234E007EF3CD /* FormDataStreamMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C76450CE9234E007EF3CD /* FormDataStreamMac.mm */; };
                514C76500CE9234E007EF3CD /* ResourceErrorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C76460CE9234E007EF3CD /* ResourceErrorMac.mm */; };
                514C76510CE9234E007EF3CD /* ResourceHandleMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C76470CE9234E007EF3CD /* ResourceHandleMac.mm */; };
                5DFE8F570D16477C0076E937 /* ScheduledAction.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA378BB0D15F64200B793D6 /* ScheduledAction.h */; };
                650F53DC09D15DDA00C9B0C8 /* CSSGrammar.h in Headers */ = {isa = PBXBuildFile; fileRef = 650F53DB09D15DDA00C9B0C8 /* CSSGrammar.h */; };
                650F53DD09D15DDF00C9B0C8 /* CSSGrammar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6565814409D13043000E61D7 /* CSSGrammar.cpp */; };
-               654EC611097778F500DAB52C /* WebCoreFrameBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 654EC60F097778F500DAB52C /* WebCoreFrameBridge.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               654EC612097778F500DAB52C /* WebCoreFrameBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 654EC610097778F500DAB52C /* WebCoreFrameBridge.mm */; };
                6550B69D099DF0270090D781 /* CDATASection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6550B693099DF0270090D781 /* CDATASection.cpp */; };
                6550B69E099DF0270090D781 /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6550B694099DF0270090D781 /* CDATASection.h */; };
                6550B69F099DF0270090D781 /* CharacterData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6550B695099DF0270090D781 /* CharacterData.cpp */; };
                85E711910AC5D5350053270F /* DOMCounterInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711420AC5D5340053270F /* DOMCounterInternal.h */; };
                85E711920AC5D5350053270F /* DOMCSSRuleListInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711430AC5D5340053270F /* DOMCSSRuleListInternal.h */; };
                85E711930AC5D5350053270F /* DOMCSSStyleDeclarationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711440AC5D5340053270F /* DOMCSSStyleDeclarationInternal.h */; };
-               85E711940AC5D5350053270F /* DOMDocumentFragmentInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711450AC5D5340053270F /* DOMDocumentFragmentInternal.h */; };
+               85E711940AC5D5350053270F /* DOMDocumentFragmentInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711450AC5D5340053270F /* DOMDocumentFragmentInternal.h */; settings = {ATTRIBUTES = (Private, ); }; };
                85E711950AC5D5350053270F /* DOMDocumentInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711460AC5D5340053270F /* DOMDocumentInternal.h */; };
                85E711960AC5D5350053270F /* DOMDocumentTypeInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711470AC5D5340053270F /* DOMDocumentTypeInternal.h */; };
                85E711970AC5D5350053270F /* DOMDOMImplementationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711480AC5D5340053270F /* DOMDOMImplementationInternal.h */; };
                93309DDA099E64920056E581 /* BreakBlockquoteCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309D8B099E64910056E581 /* BreakBlockquoteCommand.cpp */; };
                93309DDB099E64920056E581 /* BreakBlockquoteCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309D8C099E64910056E581 /* BreakBlockquoteCommand.h */; };
                93309DDC099E64920056E581 /* CompositeEditCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309D8D099E64910056E581 /* CompositeEditCommand.cpp */; };
-               93309DDD099E64920056E581 /* CompositeEditCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309D8E099E64910056E581 /* CompositeEditCommand.h */; };
+               93309DDD099E64920056E581 /* CompositeEditCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309D8E099E64910056E581 /* CompositeEditCommand.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309DDE099E64920056E581 /* DeleteFromTextNodeCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309D8F099E64910056E581 /* DeleteFromTextNodeCommand.cpp */; };
                93309DDF099E64920056E581 /* DeleteFromTextNodeCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309D90099E64910056E581 /* DeleteFromTextNodeCommand.h */; };
                93309DE0099E64920056E581 /* DeleteSelectionCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309D91099E64910056E581 /* DeleteSelectionCommand.cpp */; };
-               93309DE1099E64920056E581 /* DeleteSelectionCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309D92099E64910056E581 /* DeleteSelectionCommand.h */; };
+               93309DE1099E64920056E581 /* DeleteSelectionCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309D92099E64910056E581 /* DeleteSelectionCommand.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309DE2099E64920056E581 /* EditAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309D93099E64910056E581 /* EditAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309DE3099E64920056E581 /* EditCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309D94099E64910056E581 /* EditCommand.cpp */; };
                93309DE4099E64920056E581 /* EditCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309D95099E64910056E581 /* EditCommand.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309DE5099E64920056E581 /* HTMLInterchange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309D96099E64910056E581 /* HTMLInterchange.cpp */; };
-               93309DE6099E64920056E581 /* HTMLInterchange.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309D97099E64910056E581 /* HTMLInterchange.h */; };
+               93309DE6099E64920056E581 /* HTMLInterchange.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309D97099E64910056E581 /* HTMLInterchange.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309DE7099E64920056E581 /* htmlediting.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309D98099E64910056E581 /* htmlediting.cpp */; };
-               93309DE8099E64920056E581 /* htmlediting.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309D99099E64910056E581 /* htmlediting.h */; };
+               93309DE8099E64920056E581 /* htmlediting.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309D99099E64910056E581 /* htmlediting.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309DE9099E64920056E581 /* InsertIntoTextNodeCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309D9A099E64910056E581 /* InsertIntoTextNodeCommand.cpp */; };
                93309DEA099E64920056E581 /* InsertIntoTextNodeCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309D9B099E64910056E581 /* InsertIntoTextNodeCommand.h */; };
                93309DEB099E64920056E581 /* InsertLineBreakCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309D9C099E64910056E581 /* InsertLineBreakCommand.cpp */; };
                93309DF3099E64920056E581 /* JoinTextNodesCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DA4099E64910056E581 /* JoinTextNodesCommand.cpp */; };
                93309DF4099E64920056E581 /* JoinTextNodesCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DA5099E64910056E581 /* JoinTextNodesCommand.h */; };
                93309DF7099E64920056E581 /* markup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DA8099E64910056E581 /* markup.cpp */; };
-               93309DF8099E64920056E581 /* markup.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DA9099E64910056E581 /* markup.h */; };
+               93309DF8099E64920056E581 /* markup.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DA9099E64910056E581 /* markup.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309DF9099E64920056E581 /* MergeIdenticalElementsCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DAA099E64910056E581 /* MergeIdenticalElementsCommand.cpp */; };
                93309DFA099E64920056E581 /* MergeIdenticalElementsCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DAB099E64910056E581 /* MergeIdenticalElementsCommand.h */; };
                93309DFB099E64920056E581 /* MoveSelectionCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DAC099E64910056E581 /* MoveSelectionCommand.cpp */; };
-               93309DFC099E64920056E581 /* MoveSelectionCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DAD099E64910056E581 /* MoveSelectionCommand.h */; };
+               93309DFC099E64920056E581 /* MoveSelectionCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DAD099E64910056E581 /* MoveSelectionCommand.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309E00099E64920056E581 /* RemoveCSSPropertyCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DB1099E64910056E581 /* RemoveCSSPropertyCommand.cpp */; };
                93309E01099E64920056E581 /* RemoveCSSPropertyCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DB2099E64910056E581 /* RemoveCSSPropertyCommand.h */; };
                93309E02099E64920056E581 /* RemoveNodeAttributeCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DB3099E64910056E581 /* RemoveNodeAttributeCommand.cpp */; };
                93309E06099E64920056E581 /* RemoveNodePreservingChildrenCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DB7099E64910056E581 /* RemoveNodePreservingChildrenCommand.cpp */; };
                93309E07099E64920056E581 /* RemoveNodePreservingChildrenCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DB8099E64910056E581 /* RemoveNodePreservingChildrenCommand.h */; };
                93309E09099E64920056E581 /* ReplaceSelectionCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DBA099E64910056E581 /* ReplaceSelectionCommand.cpp */; };
-               93309E0A099E64920056E581 /* ReplaceSelectionCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DBB099E64910056E581 /* ReplaceSelectionCommand.h */; };
+               93309E0A099E64920056E581 /* ReplaceSelectionCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DBB099E64910056E581 /* ReplaceSelectionCommand.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309E0B099E64920056E581 /* Selection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DBC099E64910056E581 /* Selection.cpp */; };
                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 */; };
                93309E17099E64920056E581 /* TextAffinity.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DC8099E64910056E581 /* TextAffinity.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309E18099E64920056E581 /* TextGranularity.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DC9099E64910056E581 /* TextGranularity.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309E19099E64920056E581 /* TypingCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DCA099E64910056E581 /* TypingCommand.cpp */; };
-               93309E1A099E64920056E581 /* TypingCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DCB099E64910056E581 /* TypingCommand.h */; };
+               93309E1A099E64920056E581 /* TypingCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DCB099E64910056E581 /* TypingCommand.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309E1B099E64920056E581 /* TextIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DCC099E64910056E581 /* TextIterator.cpp */; };
-               93309E1C099E64920056E581 /* TextIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DCD099E64910056E581 /* TextIterator.h */; };
+               93309E1C099E64920056E581 /* TextIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DCD099E64910056E581 /* TextIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309E1D099E64920056E581 /* visible_units.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DCE099E64910056E581 /* visible_units.cpp */; };
-               93309E1E099E64920056E581 /* visible_units.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DCF099E64910056E581 /* visible_units.h */; };
+               93309E1E099E64920056E581 /* visible_units.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DCF099E64910056E581 /* visible_units.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309E1F099E64920056E581 /* VisiblePosition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DD0099E64910056E581 /* VisiblePosition.cpp */; };
                93309E20099E64920056E581 /* VisiblePosition.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DD1099E64910056E581 /* VisiblePosition.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93309E23099E64920056E581 /* WrapContentsInDummySpanCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DD4099E64910056E581 /* WrapContentsInDummySpanCommand.cpp */; };
                93E227E40AF589AD00D48324 /* SubresourceLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E227DF0AF589AD00D48324 /* SubresourceLoader.cpp */; };
                93E241FF0B2B4E4000C732A1 /* HTMLFrameOwnerElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E241FE0B2B4E4000C732A1 /* HTMLFrameOwnerElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93E2425F0B2B509500C732A1 /* HTMLFrameOwnerElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E2425E0B2B509500C732A1 /* HTMLFrameOwnerElement.cpp */; };
-               93E62D9B0985F41600E1B5E3 /* SystemTime.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E62D990985F41600E1B5E3 /* SystemTime.h */; };
+               93E62D9B0985F41600E1B5E3 /* SystemTime.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E62D990985F41600E1B5E3 /* SystemTime.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93EB169509F880B00091F8FF /* WebCoreSystemInterface.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93EB169409F880B00091F8FF /* WebCoreSystemInterface.mm */; };
                93EB169709F880C00091F8FF /* WebCoreSystemInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 93EB169609F880C00091F8FF /* WebCoreSystemInterface.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93EB355F09E37FD600F43799 /* MouseEventWithHitTestResults.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93EB355E09E37FD600F43799 /* MouseEventWithHitTestResults.cpp */; };
                93EEC20409C2877700C515D1 /* CanvasPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 93EEC1F209C2877700C515D1 /* CanvasPattern.h */; };
                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 */; };
+               93F198E508245E59001E9ABC /* HTMLDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23C02DE4396018635CA /* HTMLDocument.h */; settings = {ATTRIBUTES = (Private, ); }; };
                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 /* TextResourceDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D27902DE43D7018635CA /* TextResourceDecoder.h */; settings = {ATTRIBUTES = (Private, ); }; };
                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 */; };
+               93F1992108245E59001E9ABC /* XMLTokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D30A02DE4476018635CA /* XMLTokenizer.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F1992F08245E59001E9ABC /* Cursor.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868402DE3B8601EA4122 /* Cursor.h */; };
                93F1994F08245E59001E9ABC /* Settings.h in Headers */ = {isa = PBXBuildFile; fileRef = F587863A02DE3A1401EA4122 /* Settings.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F1995008245E59001E9ABC /* CachePolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = F587864902DE3A9A01EA4122 /* CachePolicy.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F1996D08245E59001E9ABC /* DeprecatedPtrListImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F587851502DE375901EA4122 /* DeprecatedPtrListImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F1998208245E59001E9ABC /* DeprecatedPtrList.h in Headers */ = {isa = PBXBuildFile; fileRef = F587869902DE3B8601EA4122 /* DeprecatedPtrList.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F1998308245E59001E9ABC /* DeprecatedPtrQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = F58786AD02DE3B8601EA4122 /* DeprecatedPtrQueue.h */; };
-               93F1998C08245E59001E9ABC /* RenderTreeAsText.h in Headers */ = {isa = PBXBuildFile; fileRef = 93955A4103D72932008635CE /* RenderTreeAsText.h */; };
+               93F1998C08245E59001E9ABC /* RenderTreeAsText.h in Headers */ = {isa = PBXBuildFile; fileRef = 93955A4103D72932008635CE /* RenderTreeAsText.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F1999D08245E59001E9ABC /* DeprecatedValueList.h in Headers */ = {isa = PBXBuildFile; fileRef = F58786C202DE3B8601EA4122 /* DeprecatedValueList.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F1999E08245E59001E9ABC /* DeprecatedValueListImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F587853B02DE375901EA4122 /* DeprecatedValueListImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93F199A808245E59001E9ABC /* WebCoreFrameView.h in Headers */ = {isa = PBXBuildFile; fileRef = F587854C02DE375901EA4122 /* WebCoreFrameView.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A80F435D0CCDE63C002DD990 /* DOMSVGAnimateElementInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85ACEF860ACDD04A001214FF /* DOMSVGAnimateElementInternal.h */; };
                A81369CA097374F600D74463 /* HTMLIsIndexElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A81369AE097374F500D74463 /* HTMLIsIndexElement.h */; };
                A81369CB097374F600D74463 /* HTMLIsIndexElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A81369AF097374F500D74463 /* HTMLIsIndexElement.cpp */; };
-               A81369CC097374F600D74463 /* HTMLInputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A81369B0097374F500D74463 /* HTMLInputElement.h */; };
+               A81369CC097374F600D74463 /* HTMLInputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A81369B0097374F500D74463 /* HTMLInputElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A81369CD097374F600D74463 /* HTMLInputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A81369B1097374F500D74463 /* HTMLInputElement.cpp */; };
-               A81369CE097374F600D74463 /* HTMLGenericFormElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A81369B2097374F500D74463 /* HTMLGenericFormElement.h */; };
+               A81369CE097374F600D74463 /* HTMLGenericFormElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A81369B2097374F500D74463 /* HTMLGenericFormElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A81369CF097374F600D74463 /* HTMLGenericFormElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A81369B3097374F500D74463 /* HTMLGenericFormElement.cpp */; };
                A81369D0097374F600D74463 /* HTMLFormElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A81369B4097374F500D74463 /* HTMLFormElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A81369D1097374F600D74463 /* HTMLFormElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A81369B5097374F500D74463 /* HTMLFormElement.cpp */; };
                A81369E5097374F600D74463 /* HTMLKeygenElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A81369C9097374F600D74463 /* HTMLKeygenElement.cpp */; };
                A8136D380973A8E700D74463 /* FormDataList.h in Headers */ = {isa = PBXBuildFile; fileRef = A8136D360973A8E700D74463 /* FormDataList.h */; };
                A8136D390973A8E700D74463 /* FormDataList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8136D370973A8E700D74463 /* FormDataList.cpp */; };
-               A8185F3909765766005826D9 /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = A8185F3109765765005826D9 /* DocumentType.h */; };
+               A8185F3909765766005826D9 /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = A8185F3109765765005826D9 /* DocumentType.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A8185F3A09765766005826D9 /* DocumentType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8185F3209765765005826D9 /* DocumentType.cpp */; };
-               A8185F3B09765766005826D9 /* DOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = A8185F3309765765005826D9 /* DOMImplementation.h */; };
+               A8185F3B09765766005826D9 /* DOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = A8185F3309765765005826D9 /* DOMImplementation.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A8185F3C09765766005826D9 /* Document.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8185F3409765765005826D9 /* Document.cpp */; };
-               A8185F3D09765766005826D9 /* DocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = A8185F3509765765005826D9 /* DocumentFragment.h */; };
+               A8185F3D09765766005826D9 /* DocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = A8185F3509765765005826D9 /* DocumentFragment.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A8185F3E09765766005826D9 /* DOMImplementation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8185F3609765765005826D9 /* DOMImplementation.cpp */; };
                A8185F3F09765766005826D9 /* DocumentFragment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8185F3709765765005826D9 /* DocumentFragment.cpp */; };
                A8185F4009765766005826D9 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = A8185F3809765765005826D9 /* Document.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A9C6E4EF0D745E38006442E9 /* PluginArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9C6E4ED0D745E38006442E9 /* PluginArray.cpp */; };
                A9C6E4F00D745E38006442E9 /* PluginArray.h in Headers */ = {isa = PBXBuildFile; fileRef = A9C6E4EE0D745E38006442E9 /* PluginArray.h */; };
                A9C6E4F30D745E48006442E9 /* PluginData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9C6E4F10D745E48006442E9 /* PluginData.cpp */; };
-               A9C6E4F40D745E48006442E9 /* PluginData.h in Headers */ = {isa = PBXBuildFile; fileRef = A9C6E4F20D745E48006442E9 /* PluginData.h */; };
+               A9C6E4F40D745E48006442E9 /* PluginData.h in Headers */ = {isa = PBXBuildFile; fileRef = A9C6E4F20D745E48006442E9 /* PluginData.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A9C6E4F60D745E61006442E9 /* PluginDataMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A9C6E4F50D745E61006442E9 /* PluginDataMac.mm */; };
                A9C6E5A50D746458006442E9 /* Navigator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9C6E5A30D746458006442E9 /* Navigator.cpp */; };
                A9C6E5A60D746458006442E9 /* Navigator.h in Headers */ = {isa = PBXBuildFile; fileRef = A9C6E5A40D746458006442E9 /* Navigator.h */; };
                B28C6A2E0D00C44800334AA4 /* TimeScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = B28C6A250D00C44800334AA4 /* TimeScheduler.h */; };
                B297BC700B3C14CF0045A590 /* JSSVGPathSegListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B297BC6F0B3C14CF0045A590 /* JSSVGPathSegListCustom.cpp */; };
                B2A015A80AF6CD53006BCE0E /* GraphicsContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2A015920AF6CD53006BCE0E /* GraphicsContext.cpp */; };
-               B2A015A90AF6CD53006BCE0E /* GraphicsContext.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A015930AF6CD53006BCE0E /* GraphicsContext.h */; };
+               B2A015A90AF6CD53006BCE0E /* GraphicsContext.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A015930AF6CD53006BCE0E /* GraphicsContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
                B2A015AA0AF6CD53006BCE0E /* GraphicsTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2A015940AF6CD53006BCE0E /* GraphicsTypes.cpp */; };
                B2A015AB0AF6CD53006BCE0E /* GraphicsTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A015950AF6CD53006BCE0E /* GraphicsTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
                B2A10B920B3818BD00099AA4 /* ImageBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A10B910B3818BD00099AA4 /* ImageBuffer.h */; };
                BCCBAD410C18C14200CE890F /* JSHTMLCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = BCCBAD3F0C18C14200CE890F /* JSHTMLCollection.h */; };
                BCCD74DC0A4C8D35005FDA6D /* HTMLViewSourceDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = BCCD74DB0A4C8D35005FDA6D /* HTMLViewSourceDocument.h */; };
                BCCD74E50A4C8DDF005FDA6D /* HTMLViewSourceDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCCD74E40A4C8DDF005FDA6D /* HTMLViewSourceDocument.cpp */; };
-               BCCFBAE80B5152ED0001F1D7 /* Tokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = BCCFBAE70B5152ED0001F1D7 /* Tokenizer.h */; };
+               BCCFBAE80B5152ED0001F1D7 /* Tokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = BCCFBAE70B5152ED0001F1D7 /* Tokenizer.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BCD41ABB0C060DE800C0E446 /* JSHTMLFrameSetElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD41ABA0C060DE800C0E446 /* JSHTMLFrameSetElementCustom.cpp */; };
                BCD9C2620C17AA67005C90A2 /* JSDOMWindowCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD9C25E0C17AA67005C90A2 /* JSDOMWindowCustom.cpp */; };
                BCD9C2630C17AA67005C90A2 /* JSNamedNodeMapCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD9C25F0C17AA67005C90A2 /* JSNamedNodeMapCustom.cpp */; };
                BCEA4865097D93020094C9E4 /* RenderButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEA4826097D93020094C9E4 /* RenderButton.cpp */; };
                BCEA4866097D93020094C9E4 /* RenderButton.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA4827097D93020094C9E4 /* RenderButton.h */; };
                BCEA4867097D93020094C9E4 /* RenderView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEA4828097D93020094C9E4 /* RenderView.cpp */; };
-               BCEA4868097D93020094C9E4 /* RenderView.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA4829097D93020094C9E4 /* RenderView.h */; };
+               BCEA4868097D93020094C9E4 /* RenderView.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA4829097D93020094C9E4 /* RenderView.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BCEA4869097D93020094C9E4 /* RenderHTMLCanvas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEA482A097D93020094C9E4 /* RenderHTMLCanvas.cpp */; };
                BCEA486A097D93020094C9E4 /* RenderHTMLCanvas.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA482B097D93020094C9E4 /* RenderHTMLCanvas.h */; };
                BCEA486B097D93020094C9E4 /* RenderContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEA482C097D93020094C9E4 /* RenderContainer.cpp */; };
                5DCF836C0D59159800953BC6 /* PluginInfoStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginInfoStore.h; sourceTree = "<group>"; };
                650F53DB09D15DDA00C9B0C8 /* CSSGrammar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSGrammar.h; sourceTree = "<group>"; };
                6548E24809E1E04D00AF8020 /* Document.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Document.idl; sourceTree = "<group>"; };
-               654EC60F097778F500DAB52C /* WebCoreFrameBridge.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCoreFrameBridge.h; sourceTree = "<group>"; };
-               654EC610097778F500DAB52C /* WebCoreFrameBridge.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreFrameBridge.mm; sourceTree = "<group>"; };
                6550B693099DF0270090D781 /* CDATASection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CDATASection.cpp; sourceTree = "<group>"; };
                6550B694099DF0270090D781 /* CDATASection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CDATASection.h; sourceTree = "<group>"; };
                6550B695099DF0270090D781 /* CharacterData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CharacterData.cpp; sourceTree = "<group>"; };
                65BF02180974806300C43196 /* page */ = {
                        isa = PBXGroup;
                        children = (
-                               A9C6E65D0D746694006442E9 /* Navigator.idl */,
-                               A9C6E5A30D746458006442E9 /* Navigator.cpp */,
-                               A9C6E5A40D746458006442E9 /* Navigator.h */,
                                06693F450BFBC91600216072 /* inspector */,
                                93C09A820B064F05005ABD4D /* mac */,
                                8538F0000AD71770006A81D1 /* AbstractView.idl */,
                                C02B14C10D81E02A00D8A970 /* JavaScriptDebugServer.h */,
                                93EB355E09E37FD600F43799 /* MouseEventWithHitTestResults.cpp */,
                                935C476209AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h */,
+                               A9C6E5A30D746458006442E9 /* Navigator.cpp */,
+                               A9C6E5A40D746458006442E9 /* Navigator.h */,
+                               A9C6E65D0D746694006442E9 /* Navigator.idl */,
                                65FEA86809833ADE00BED4AB /* Page.cpp */,
                                65A21467097A329100B9050A /* Page.h */,
                                9302B0BC0D79F82900C7EE83 /* PageGroup.cpp */,
                                A718788F0B2D04AC00A16ECE /* DragControllerMac.mm */,
                                65BF023C0974819000C43196 /* FrameMac.mm */,
                                1C26497B0D7E24EC00BD10F2 /* PageMac.cpp */,
-                               654EC60F097778F500DAB52C /* WebCoreFrameBridge.h */,
-                               654EC610097778F500DAB52C /* WebCoreFrameBridge.mm */,
                                F587854C02DE375901EA4122 /* WebCoreFrameView.h */,
                                BE983D95052A2E0A00892D85 /* WebCoreKeyboardUIMode.h */,
                                F587855402DE375901EA4122 /* WebCoreViewFactory.h */,
                                B25599690D00D8BA00BB825C /* WKSpecularLightingFilter.h in Headers */,
                                B255996C0D00D8BA00BB825C /* WKSpotLightFilter.h in Headers */,
                                B255996F0D00D8BA00BB825C /* WKTableTransferFilter.h in Headers */,
-                               654EC611097778F500DAB52C /* WebCoreFrameBridge.h in Headers */,
                                93F199A808245E59001E9ABC /* WebCoreFrameView.h in Headers */,
                                93F199C208245E59001E9ABC /* WebCoreKeyGenerator.h in Headers */,
                                93F199BB08245E59001E9ABC /* WebCoreKeyboardUIMode.h in Headers */,
                                B255996A0D00D8BA00BB825C /* WKSpecularLightingFilter.m in Sources */,
                                B255996D0D00D8BA00BB825C /* WKSpotLightFilter.m in Sources */,
                                B25599700D00D8BA00BB825C /* WKTableTransferFilter.m in Sources */,
-                               654EC612097778F500DAB52C /* WebCoreFrameBridge.mm in Sources */,
                                93F19AE508245E59001E9ABC /* WebCoreKeyGenerator.m in Sources */,
                                934D9BA50B8C116B007B42A9 /* WebCoreNSStringExtras.mm in Sources */,
                                DD05FE0E0B8BA3C6009ACDFE /* WebCoreObjCExtras.c in Sources */,
index 5a7c69b..ab27bb1 100644 (file)
@@ -55,6 +55,7 @@
 #include "JSDOMWindow.h"
 #include "Logging.h"
 #include "MediaFeatureNames.h"
+#include "NP_jsobject.h"
 #include "Navigator.h"
 #include "NodeList.h"
 #include "Page.h"
 #include "TextIterator.h"
 #include "TextResourceDecoder.h"
 #include "XMLNames.h"
-#include "NP_jsobject.h"
+#include "kjs_proxy.h"
 #include "npruntime_impl.h"
 #include "runtime_root.h"
-#include "kjs_proxy.h"
 #include "visible_units.h"
 
 #if FRAME_LOADS_USER_STYLESHEET
@@ -136,6 +136,14 @@ Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient*
 
     XMLNames::init();
 
+#if PLATFORM(MAC)
+    static bool initializedJavaJSBindings;
+    if (!initializedJavaJSBindings) {
+        initializedJavaJSBindings = true;
+        initJavaJSBindings();
+    }
+#endif
+
     if (!ownerElement)
         page->setMainFrame(this);
     else {
index 1866973..faab759 100644 (file)
@@ -169,6 +169,7 @@ public:
     PassRefPtr<KJS::Bindings::RootObject> createRootObject(void* nativeHandle, KJS::JSGlobalObject*);
 
 #if PLATFORM(MAC)
+    static void initJavaJSBindings();
     WebScriptObject* windowScriptObject();
 #endif
 
index 9a7d7b3..a8755e1 100644 (file)
@@ -39,6 +39,7 @@
 #import "ColorMac.h"
 #import "Cursor.h"
 #import "DOMInternal.h"
+#import "DOMWindow.h"
 #import "DocumentLoader.h"
 #import "EditCommand.h"
 #import "EditorClient.h"
@@ -89,6 +90,7 @@
 #import "visible_units.h"
 #import <Carbon/Carbon.h>
 #import <JavaScriptCore/APICast.h>
+
 #if ENABLE(NETSCAPE_PLUGIN_API)
 #import "c_instance.h"
 #import "NP_jsobject.h"
@@ -619,4 +621,36 @@ void Frame::setUserStyleSheet(const String& styleSheet)
         d->m_doc->setUserStyleSheet(styleSheet);
 }
 
+static pthread_t mainThread;
+
+static void updateRenderingForBindings(KJS::ExecState* exec, KJS::JSObject* rootObject)
+{
+    if (pthread_self() != mainThread)
+        return;
+        
+    if (!rootObject)
+        return;
+        
+    JSDOMWindow* window = static_cast<JSDOMWindow*>(rootObject);
+    if (!window)
+        return;
+
+    Frame* frame = window->impl()->frame();
+    if (!frame)
+        return;
+
+    Document* document = frame->document();
+    if (!document)
+        return;
+
+    document->updateRendering();
+}
+
+void Frame::initJavaJSBindings()
+{
+    mainThread = pthread_self();
+    KJS::Bindings::JavaJSObject::initializeJNIThreading();
+    KJS::Bindings::Instance::setDidExecuteFunction(updateRenderingForBindings);
+}
+
 } // namespace WebCore
diff --git a/WebCore/page/mac/WebCoreFrameBridge.h b/WebCore/page/mac/WebCoreFrameBridge.h
deleted file mode 100644 (file)
index b11976e..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#import <WebCore/EditAction.h>
-#import <WebCore/SelectionController.h>
-#import <WebCore/TextGranularity.h>
-
-@class DOMCSSStyleDeclaration;
-@class DOMDocument;
-@class DOMDocumentFragment;
-@class DOMElement;
-@class DOMNode;
-@class DOMRange;
-
-@protocol WebCoreRenderTreeCopier <NSObject>
-- (NSObject *)nodeWithName:(NSString *)name position:(NSPoint)position rect:(NSRect)rect view:(NSView *)view children:(NSArray *)children;
-@end
-
-// WebCoreFrameBridge objects are used by WebCore to abstract away operations that need
-// to be implemented by library clients, for example WebKit. The objects are also
-// used in the opposite direction, for simple access to WebCore functions without dealing
-// directly with the KHTML C++ classes.
-
-// A WebCoreFrameBridge creates and holds a reference to a Frame.
-
-// The WebCoreFrameBridge interface contains methods for use by the non-WebCore side of the bridge.
-
-@interface WebCoreFrameBridge : NSObject {
-@public
-    WebCore::Frame* m_frame;
-    BOOL _shouldCreateRenderers;
-    BOOL _closed;
-}
-
-- (void)setWebCoreFrame:(WebCore::Frame*)webCoreFrame;
-- (WebCore::Frame*)_frame; // underscore to prevent conflict with -[NSView frame]
-
-- (id)init;
-- (void)close;
-
-- (NSURL *)baseURL;
-
-- (void)forceLayoutAdjustingViewSize:(BOOL)adjustSizeFlag;
-- (void)forceLayoutWithMinimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustingViewSize:(BOOL)adjustSizeFlag;
-- (void)sendScrollEvent;
-- (BOOL)needsLayout;
-- (void)drawRect:(NSRect)rect;
-- (void)adjustPageHeightNew:(float *)newBottom top:(float)oldTop bottom:(float)oldBottom limit:(float)bottomLimit;
-- (NSArray*)computePageRectsWithPrintWidthScaleFactor:(float)printWidthScaleFactor printHeight:(float)printHeight;
-
-- (NSObject *)copyRenderTree:(id <WebCoreRenderTreeCopier>)copier;
-- (NSString *)renderTreeAsExternalRepresentation;
-
-- (NSURL *)URLWithAttributeString:(NSString *)string;
-
-- (DOMElement *)elementWithName:(NSString *)name inForm:(DOMElement *)form;
-- (BOOL)elementDoesAutoComplete:(DOMElement *)element;
-- (BOOL)elementIsPassword:(DOMElement *)element;
-- (DOMElement *)formForElement:(DOMElement *)element;
-- (DOMElement *)currentForm;
-- (NSArray *)controlsInForm:(DOMElement *)form;
-- (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element;
-- (NSString *)matchLabels:(NSArray *)labels againstElement:(DOMElement *)element;
-
-- (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag startInSelection:(BOOL)startInSelection;
-- (unsigned)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(unsigned)limit;
-- (BOOL)markedTextMatchesAreHighlighted;
-- (void)setMarkedTextMatchesAreHighlighted:(BOOL)doHighlight;
-- (void)unmarkAllTextMatches;
-- (NSArray *)rectsForTextMatches;
-
-- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)string;
-- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)string forceUserGesture:(BOOL)forceUserGesture;
-- (NSAppleEventDescriptor *)aeDescByEvaluatingJavaScriptFromString:(NSString *)string;
-
-- (NSString *)selectedString;
-
-- (NSString *)stringForRange:(DOMRange *)range;
-
-- (NSString *)markupStringFromNode:(DOMNode *)node nodes:(NSArray **)nodes;
-- (NSString *)markupStringFromRange:(DOMRange *)range nodes:(NSArray **)nodes;
-
-- (NSRect)caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity;
-- (NSRect)firstRectForDOMRange:(DOMRange *)range;
-- (void)scrollDOMRangeToVisible:(DOMRange *)range;
-
-- (NSFont *)fontForSelection:(BOOL *)hasMultipleFonts;
-
-- (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
-
-- (void)setShouldCreateRenderers:(BOOL)shouldCreateRenderers;
-
-- (void)setBaseBackgroundColor:(NSColor *)backgroundColor;
-- (void)setDrawsBackground:(BOOL)drawsBackround;
-
-- (id)accessibilityTree;
-
-- (DOMRange *)rangeByAlteringCurrentSelection:(WebCore::SelectionController::EAlteration)alteration direction:(WebCore::SelectionController::EDirection)direction granularity:(WebCore::TextGranularity)granularity;
-- (WebCore::TextGranularity)selectionGranularity;
-- (void)smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)charRangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString;
-- (void)selectNSRange:(NSRange)range;
-- (NSRange)selectedNSRange;
-- (NSRange)markedTextNSRange;
-- (DOMRange *)convertNSRangeToDOMRange:(NSRange)range;
-- (NSRange)convertDOMRangeToNSRange:(DOMRange *)range;
-
-- (DOMDocumentFragment *)documentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString;
-- (DOMDocumentFragment *)documentFragmentWithText:(NSString *)text inContext:(DOMRange *)context;
-- (DOMDocumentFragment *)documentFragmentWithNodesAsParagraphs:(NSArray *)nodes;
-
-- (void)replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
-- (void)replaceSelectionWithNode:(DOMNode *)node selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
-- (void)replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
-- (void)replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
-
-- (void)insertParagraphSeparatorInQuotedContent;
-
-- (DOMRange *)characterRangeAtPoint:(NSPoint)point;
-
-- (DOMCSSStyleDeclaration *)typingStyle;
-- (void)setTypingStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(WebCore::EditAction)undoAction;
-
-- (void)dragSourceMovedTo:(NSPoint)windowLoc;
-- (void)dragSourceEndedAt:(NSPoint)windowLoc operation:(NSDragOperation)operation;
-
-- (BOOL)getData:(NSData **)data andResponse:(NSURLResponse **)response forURL:(NSString *)URL;
-- (void)getAllResourceDatas:(NSArray **)datas andResponses:(NSArray **)responses;
-
-- (BOOL)canProvideDocumentSource;
-- (BOOL)canSaveAsWebArchive;
-
-- (void)receivedData:(NSData *)data textEncodingName:(NSString *)textEncodingName;
-
-@end
diff --git a/WebCore/page/mac/WebCoreFrameBridge.mm b/WebCore/page/mac/WebCoreFrameBridge.mm
deleted file mode 100644 (file)
index a4dd312..0000000
+++ /dev/null
@@ -1,1166 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2005, 2006 Alexey Proskuryakov (ap@nypop.com)
- * Copyright (C) 2006 David Smith (catfish.man@gmail.com)
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#import "config.h"
-#import "WebCoreFrameBridge.h"
-
-#import "AXObjectCache.h"
-#import "CSSHelper.h"
-#import "Cache.h"
-#import "ClipboardMac.h"
-#import "ColorMac.h"
-#import "DOMImplementation.h"
-#import "DOMInternal.h"
-#import "DOMWindow.h"
-#import "DeleteSelectionCommand.h"
-#import "DocLoader.h"
-#import "DocumentFragment.h"
-#import "DocumentLoader.h"
-#import "DocumentType.h"
-#import "Editor.h"
-#import "EditorClient.h"
-#import "EventHandler.h"
-#import "FloatRect.h"
-#import "FormDataStreamMac.h"
-#import "Frame.h"
-#import "FrameLoader.h"
-#import "FrameLoaderClient.h"
-#import "FrameTree.h"
-#import "FrameView.h"
-#import "GraphicsContext.h"
-#import "HTMLDocument.h"
-#import "HTMLFormElement.h"
-#import "HTMLInputElement.h"
-#import "HTMLNames.h"
-#import "HitTestResult.h"
-#import "Image.h"
-#import "JSDOMWindow.h"
-#import "LoaderNSURLExtras.h"
-#import "MoveSelectionCommand.h"
-#import "Page.h"
-#import "PlatformMouseEvent.h"
-#import "PlatformScreen.h"
-#import "PluginData.h"
-#import "RenderImage.h"
-#import "RenderPart.h"
-#import "RenderTreeAsText.h"
-#import "RenderView.h"
-#import "RenderWidget.h"
-#import "ReplaceSelectionCommand.h"
-#import "ResourceRequest.h"
-#import "SelectionController.h"
-#import "SimpleFontData.h"
-#import "SmartReplace.h"
-#import "SubresourceLoader.h"
-#import "SystemTime.h"
-#import "Text.h"
-#import "TextEncoding.h"
-#import "TextIterator.h"
-#import "TextResourceDecoder.h"
-#import "TypingCommand.h"
-#import "WebCoreViewFactory.h"
-#import "XMLTokenizer.h"
-#import "htmlediting.h"
-#import "kjs_proxy.h"
-#import "markup.h"
-#import "visible_units.h"
-#import <JavaScriptCore/array_instance.h>
-#import <JavaScriptCore/date_object.h>
-#import "jni_jsobject.h"
-#import "runtime_root.h"
-#import "runtime.h"
-#import <OpenScripting/ASRegistry.h>
-#import <wtf/RetainPtr.h>
-
-@class NSView;
-
-using namespace std;
-using namespace WebCore;
-using namespace HTMLNames;
-
-using KJS::ArrayInstance;
-using KJS::BooleanType;
-using KJS::DateInstance;
-using KJS::ExecState;
-using KJS::GetterSetterType;
-using KJS::JSImmediate;
-using KJS::JSLock;
-using KJS::JSObject;
-using KJS::JSValue;
-using KJS::NullType;
-using KJS::NumberType;
-using KJS::ObjectType;
-using KJS::SavedBuiltins;
-using KJS::SavedProperties;
-using KJS::StringType;
-using KJS::UndefinedType;
-using KJS::UnspecifiedType;
-
-using KJS::Bindings::JavaJSObject;
-
-static pthread_t mainThread = 0;
-
-static void updateRenderingForBindings(ExecState* exec, JSObject* rootObject)
-{
-    if (pthread_self() != mainThread)
-        return;
-        
-    if (!rootObject)
-        return;
-        
-    JSDOMWindow* window = static_cast<JSDOMWindow*>(rootObject);
-    if (!window)
-        return;
-
-    if (Frame* frame = window->impl()->frame())
-        if (Document* doc = frame->document())
-            doc->updateRendering();
-}
-
-static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue* jsValue)
-{
-    NSAppleEventDescriptor* aeDesc = 0;
-    switch (jsValue->type()) {
-        case BooleanType:
-            aeDesc = [NSAppleEventDescriptor descriptorWithBoolean:jsValue->getBoolean()];
-            break;
-        case StringType:
-            aeDesc = [NSAppleEventDescriptor descriptorWithString:String(jsValue->getString())];
-            break;
-        case NumberType: {
-            double value = jsValue->getNumber();
-            int intValue = (int)value;
-            if (value == intValue)
-                aeDesc = [NSAppleEventDescriptor descriptorWithDescriptorType:typeSInt32 bytes:&intValue length:sizeof(intValue)];
-            else
-                aeDesc = [NSAppleEventDescriptor descriptorWithDescriptorType:typeIEEE64BitFloatingPoint bytes:&value length:sizeof(value)];
-            break;
-        }
-        case ObjectType: {
-            JSObject* object = jsValue->getObject();
-            if (object->inherits(&DateInstance::info)) {
-                DateInstance* date = static_cast<DateInstance*>(object);
-                double ms = 0;
-                int tzOffset = 0;
-                if (date->getTime(ms, tzOffset)) {
-                    CFAbsoluteTime utcSeconds = ms / 1000 - kCFAbsoluteTimeIntervalSince1970;
-                    LongDateTime ldt;
-                    if (noErr == UCConvertCFAbsoluteTimeToLongDateTime(utcSeconds, &ldt))
-                        aeDesc = [NSAppleEventDescriptor descriptorWithDescriptorType:typeLongDateTime bytes:&ldt length:sizeof(ldt)];
-                }
-            }
-            else if (object->inherits(&ArrayInstance::info)) {
-                static HashSet<JSObject*> visitedElems;
-                if (!visitedElems.contains(object)) {
-                    visitedElems.add(object);
-                    
-                    ArrayInstance* array = static_cast<ArrayInstance*>(object);
-                    aeDesc = [NSAppleEventDescriptor listDescriptor];
-                    unsigned numItems = array->getLength();
-                    for (unsigned i = 0; i < numItems; ++i)
-                        [aeDesc insertDescriptor:aeDescFromJSValue(exec, array->getItem(i)) atIndex:0];
-                    
-                    visitedElems.remove(object);
-                }
-            }
-            if (!aeDesc) {
-                JSValue* primitive = object->toPrimitive(exec);
-                if (exec->hadException()) {
-                    exec->clearException();
-                    return [NSAppleEventDescriptor nullDescriptor];
-                }
-                return aeDescFromJSValue(exec, primitive);
-            }
-            break;
-        }
-        case UndefinedType:
-            aeDesc = [NSAppleEventDescriptor descriptorWithTypeCode:cMissingValue];
-            break;
-        default:
-            LOG_ERROR("Unknown JavaScript type: %d", jsValue->type());
-            // no break;
-        case UnspecifiedType:
-        case NullType:
-        case GetterSetterType:
-            aeDesc = [NSAppleEventDescriptor nullDescriptor];
-            break;
-    }
-    
-    return aeDesc;
-}
-
-@implementation WebCoreFrameBridge
-
-- (NSString *)domain
-{
-    Document *doc = m_frame->document();
-    if (doc)
-        return doc->domain();
-    return nil;
-}
-
-- (id)init
-{
-    static bool initializedKJS;
-    if (!initializedKJS) {
-        initializedKJS = true;
-
-        mainThread = pthread_self();
-        JavaJSObject::initializeJNIThreading();
-        KJS::Bindings::Instance::setDidExecuteFunction(updateRenderingForBindings);
-    }
-    
-    if (!(self = [super init]))
-        return nil;
-
-    _shouldCreateRenderers = YES;
-    return self;
-}
-
-- (void)dealloc
-{
-    ASSERT(_closed);
-    [super dealloc];
-}
-
-- (void)finalize
-{
-    ASSERT(_closed);
-    [super finalize];
-}
-
-- (void)close
-{
-    m_frame = 0;
-    _closed = YES;
-}
-
-- (void)addData:(NSData *)data
-{
-    Document *doc = m_frame->document();
-    
-    // Document may be nil if the part is about to redirect
-    // as a result of JS executing during load, i.e. one frame
-    // changing another's location before the frame's document
-    // has been created. 
-    if (doc) {
-        doc->setShouldCreateRenderers(_shouldCreateRenderers);
-        m_frame->loader()->addData((const char *)[data bytes], [data length]);
-    }
-}
-
-- (NSString *)_stringWithDocumentTypeStringAndMarkupString:(NSString *)markupString
-{
-    return m_frame->documentTypeString() + markupString;
-}
-
-- (NSArray *)nodesFromList:(Vector<Node*> *)nodesVector
-{
-    size_t size = nodesVector->size();
-    NSMutableArray *nodes = [NSMutableArray arrayWithCapacity:size];
-    for (size_t i = 0; i < size; ++i)
-        [nodes addObject:[DOMNode _wrapNode:(*nodesVector)[i]]];
-    return nodes;
-}
-
-- (NSString *)markupStringFromNode:(DOMNode *)node nodes:(NSArray **)nodes
-{
-    // FIXME: This is never "for interchange". Is that right? See the next method.
-    Vector<Node*> nodeList;
-    NSString *markupString = createMarkup([node _node], IncludeNode, nodes ? &nodeList : 0);
-    if (nodes)
-        *nodes = [self nodesFromList:&nodeList];
-
-    return [self _stringWithDocumentTypeStringAndMarkupString:markupString];
-}
-
-- (NSString *)markupStringFromRange:(DOMRange *)range nodes:(NSArray **)nodes
-{
-    // FIXME: This is always "for interchange". Is that right? See the previous method.
-    Vector<Node*> nodeList;
-    NSString *markupString = createMarkup([range _range], nodes ? &nodeList : 0, AnnotateForInterchange);
-    if (nodes)
-        *nodes = [self nodesFromList:&nodeList];
-
-    return [self _stringWithDocumentTypeStringAndMarkupString:markupString];
-}
-
-- (NSString *)selectedString
-{
-    String text = m_frame->selectedText();
-    text.replace('\\', m_frame->backslashAsCurrencySymbol());
-    return text;
-}
-
-- (NSString *)stringForRange:(DOMRange *)range
-{
-    // This will give a system malloc'd buffer that can be turned directly into an NSString
-    unsigned length;
-    UChar* buf = plainTextToMallocAllocatedBuffer([range _range], length);
-    
-    if (!buf)
-        return [NSString string];
-    
-    UChar backslashAsCurrencySymbol = m_frame->backslashAsCurrencySymbol();
-    if (backslashAsCurrencySymbol != '\\')
-        for (unsigned n = 0; n < length; n++) 
-            if (buf[n] == '\\')
-                buf[n] = backslashAsCurrencySymbol;
-
-    // Transfer buffer ownership to NSString
-    return [[[NSString alloc] initWithCharactersNoCopy:buf length:length freeWhenDone:YES] autorelease];
-}
-
-- (void)forceLayoutAdjustingViewSize:(BOOL)flag
-{
-    m_frame->forceLayout(!flag);
-    if (flag)
-        m_frame->view()->adjustViewSize();
-}
-
-- (void)forceLayoutWithMinimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustingViewSize:(BOOL)flag
-{
-    m_frame->forceLayoutWithPageWidthRange(minPageWidth, maxPageWidth, flag);
-}
-
-- (void)sendScrollEvent
-{
-    m_frame->sendScrollEvent();
-}
-
-- (void)drawRect:(NSRect)rect
-{
-    PlatformGraphicsContext* platformContext = static_cast<PlatformGraphicsContext*>([[NSGraphicsContext currentContext] graphicsPort]);
-    ASSERT([[NSGraphicsContext currentContext] isFlipped]);
-    GraphicsContext context(platformContext);
-    
-    m_frame->paint(&context, enclosingIntRect(rect));
-}
-
-// Used by pagination code called from AppKit when a standalone web page is printed.
-- (NSArray*)computePageRectsWithPrintWidthScaleFactor:(float)printWidthScaleFactor printHeight:(float)printHeight
-{
-    NSMutableArray* pages = [NSMutableArray arrayWithCapacity:5];
-    if (printWidthScaleFactor <= 0) {
-        LOG_ERROR("printWidthScaleFactor has bad value %.2f", printWidthScaleFactor);
-        return pages;
-    }
-    
-    if (printHeight <= 0) {
-        LOG_ERROR("printHeight has bad value %.2f", printHeight);
-        return pages;
-    }
-
-    if (!m_frame || !m_frame->document() || !m_frame->view()) return pages;
-    RenderView* root = static_cast<RenderView *>(m_frame->document()->renderer());
-    if (!root) return pages;
-    
-    FrameView* view = m_frame->view();
-    if (!view)
-        return pages;
-
-    NSView* documentView = view->documentView();
-    if (!documentView)
-        return pages;
-
-    float currPageHeight = printHeight;
-    float docHeight = root->layer()->height();
-    float docWidth = root->layer()->width();
-    float printWidth = docWidth/printWidthScaleFactor;
-    
-    // We need to give the part the opportunity to adjust the page height at each step.
-    for (float i = 0; i < docHeight; i += currPageHeight) {
-        float proposedBottom = min(docHeight, i + printHeight);
-        m_frame->adjustPageHeight(&proposedBottom, i, proposedBottom, i);
-        currPageHeight = max(1.0f, proposedBottom - i);
-        for (float j = 0; j < docWidth; j += printWidth) {
-            NSValue* val = [NSValue valueWithRect: NSMakeRect(j, i, printWidth, currPageHeight)];
-            [pages addObject: val];
-        }
-    }
-    
-    return pages;
-}
-
-// This is to support the case where a webview is embedded in the view that's being printed
-- (void)adjustPageHeightNew:(float *)newBottom top:(float)oldTop bottom:(float)oldBottom limit:(float)bottomLimit
-{
-    m_frame->adjustPageHeight(newBottom, oldTop, oldBottom, bottomLimit);
-}
-
-- (NSObject *)copyRenderNode:(RenderObject *)node copier:(id <WebCoreRenderTreeCopier>)copier
-{
-    NSMutableArray *children = [[NSMutableArray alloc] init];
-    for (RenderObject *child = node->firstChild(); child; child = child->nextSibling()) {
-        [children addObject:[self copyRenderNode:child copier:copier]];
-    }
-          
-    NSString *name = [[NSString alloc] initWithUTF8String:node->renderName()];
-    
-    RenderWidget* renderWidget = node->isWidget() ? static_cast<RenderWidget*>(node) : 0;
-    Widget* widget = renderWidget ? renderWidget->widget() : 0;
-    NSView *view = widget ? widget->getView() : nil;
-    
-    int nx, ny;
-    node->absolutePosition(nx, ny);
-    NSObject *copiedNode = [copier nodeWithName:name
-                                       position:NSMakePoint(nx,ny)
-                                           rect:NSMakeRect(node->xPos(), node->yPos(), node->width(), node->height())
-                                           view:view
-                                       children:children];
-    
-    [name release];
-    [children release];
-    
-    return copiedNode;
-}
-
-- (NSObject *)copyRenderTree:(id <WebCoreRenderTreeCopier>)copier
-{
-    RenderObject *renderer = m_frame->renderer();
-    if (!renderer) {
-        return nil;
-    }
-    return [self copyRenderNode:renderer copier:copier];
-}
-
-static HTMLInputElement* inputElementFromDOMElement(DOMElement* element)
-{
-    Node* node = [element _node];
-    if (node->hasTagName(inputTag))
-        return static_cast<HTMLInputElement*>(node);
-    return nil;
-}
-
-static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
-{
-    Node *node = [element _node];
-    // This should not be necessary, but an XSL file on
-    // maps.google.com crashes otherwise because it is an xslt file
-    // that contains <form> elements that aren't in any namespace, so
-    // they come out as generic CML elements
-    if (node && node->hasTagName(formTag)) {
-        return static_cast<HTMLFormElement *>(node);
-    }
-    return nil;
-}
-
-- (DOMElement *)elementWithName:(NSString *)name inForm:(DOMElement *)form
-{
-    HTMLFormElement *formElement = formElementFromDOMElement(form);
-    if (formElement) {
-        Vector<HTMLGenericFormElement*>& elements = formElement->formElements;
-        AtomicString targetName = name;
-        for (unsigned int i = 0; i < elements.size(); i++) {
-            HTMLGenericFormElement *elt = elements[i];
-            // Skip option elements, other duds
-            if (elt->name() == targetName)
-                return [DOMElement _wrapElement:elt];
-        }
-    }
-    return nil;
-}
-
-- (BOOL)elementDoesAutoComplete:(DOMElement *)element
-{
-    HTMLInputElement *inputElement = inputElementFromDOMElement(element);
-    return inputElement != nil
-        && inputElement->inputType() == HTMLInputElement::TEXT
-        && inputElement->autoComplete();
-}
-
-- (BOOL)elementIsPassword:(DOMElement *)element
-{
-    HTMLInputElement *inputElement = inputElementFromDOMElement(element);
-    return inputElement != nil
-        && inputElement->inputType() == HTMLInputElement::PASSWORD;
-}
-
-- (DOMElement *)formForElement:(DOMElement *)element;
-{
-    HTMLInputElement *inputElement = inputElementFromDOMElement(element);
-    if (inputElement) {
-        HTMLFormElement *formElement = inputElement->form();
-        if (formElement) {
-            return [DOMElement _wrapElement:formElement];
-        }
-    }
-    return nil;
-}
-
-- (DOMElement *)currentForm
-{
-    return [DOMElement _wrapElement:m_frame->currentForm()];
-}
-
-- (NSArray *)controlsInForm:(DOMElement *)form
-{
-    NSMutableArray *results = nil;
-    HTMLFormElement *formElement = formElementFromDOMElement(form);
-    if (formElement) {
-        Vector<HTMLGenericFormElement*>& elements = formElement->formElements;
-        for (unsigned int i = 0; i < elements.size(); i++) {
-            if (elements.at(i)->isEnumeratable()) { // Skip option elements, other duds
-                DOMElement *de = [DOMElement _wrapElement:elements.at(i)];
-                if (!results) {
-                    results = [NSMutableArray arrayWithObject:de];
-                } else {
-                    [results addObject:de];
-                }
-            }
-        }
-    }
-    return results;
-}
-
-- (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element
-{
-    return m_frame->searchForLabelsBeforeElement(labels, [element _element]);
-}
-
-- (NSString *)matchLabels:(NSArray *)labels againstElement:(DOMElement *)element
-{
-    return m_frame->matchLabelsAgainstElement(labels, [element _element]);
-}
-
-- (NSURL *)URLWithAttributeString:(NSString *)string
-{
-    Document* doc = m_frame->document();
-    if (!doc)
-        return nil;
-    // FIXME: is parseURL appropriate here?
-    return doc->completeURL(parseURL(string));
-}
-
-- (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag startInSelection:(BOOL)startInSelection
-{
-    return m_frame->findString(string, forward, caseFlag, wrapFlag, startInSelection);
-}
-
-- (unsigned)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(unsigned)limit
-{
-    return m_frame->markAllMatchesForText(string, caseFlag, limit);
-}
-
-- (BOOL)markedTextMatchesAreHighlighted
-{
-    return m_frame->markedTextMatchesAreHighlighted();
-}
-
-- (void)setMarkedTextMatchesAreHighlighted:(BOOL)doHighlight
-{
-    m_frame->setMarkedTextMatchesAreHighlighted(doHighlight);
-}
-
-- (void)unmarkAllTextMatches
-{
-    Document *doc = m_frame->document();
-    if (!doc) {
-        return;
-    }
-    doc->removeMarkers(DocumentMarker::TextMatch);
-}
-
-- (NSArray *)rectsForTextMatches
-{
-    Document *doc = m_frame->document();
-    if (!doc)
-        return [NSArray array];
-    
-    NSMutableArray *result = [NSMutableArray array];
-    Vector<IntRect> rects = doc->renderedRectsForMarkers(DocumentMarker::TextMatch);
-    unsigned count = rects.size();
-    for (unsigned index = 0; index < count; ++index)
-        [result addObject:[NSValue valueWithRect:rects[index]]];
-    
-    return result;
-}
-
-- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)string
-{
-    return [self stringByEvaluatingJavaScriptFromString:string forceUserGesture:true];
-}
-
-- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)string forceUserGesture:(BOOL)forceUserGesture
-{
-    ASSERT(m_frame->document());
-    
-    JSValue* result = m_frame->loader()->executeScript(string, forceUserGesture);
-
-    if (!m_frame) // In case the script removed our frame from the page.
-        return @"";
-
-    // This bizarre set of rules matches behavior from WebKit for Safari 2.0.
-    // If you don't like it, use -[WebScriptObject evaluateWebScript:] or 
-    // JSEvaluateScript instead, since they have less surprising semantics.
-    if (!result || !result->isBoolean() && !result->isString() && !result->isNumber())
-        return @"";
-
-    JSLock lock;
-    return String(result->toString(m_frame->scriptProxy()->globalObject()->globalExec()));
-}
-
-- (NSAppleEventDescriptor *)aeDescByEvaluatingJavaScriptFromString:(NSString *)string
-{
-    ASSERT(m_frame->document());
-    ASSERT(m_frame == m_frame->page()->mainFrame());
-    JSValue* result = m_frame->loader()->executeScript(string, true);
-    if (!result) // FIXME: pass errors
-        return 0;
-    JSLock lock;
-    return aeDescFromJSValue(m_frame->scriptProxy()->globalObject()->globalExec(), result);
-}
-
-- (NSRect)caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity
-{
-    return [node _node]->renderer()->caretRect(offset, static_cast<EAffinity>(affinity));
-}
-
-- (NSRect)firstRectForDOMRange:(DOMRange *)range
-{
-   return m_frame->firstRectForRange([range _range]);
-}
-
-- (void)scrollDOMRangeToVisible:(DOMRange *)range
-{
-    NSRect rangeRect = [self firstRectForDOMRange:range];    
-    Node *startNode = [[range startContainer] _node];
-        
-    if (startNode && startNode->renderer()) {
-        RenderLayer *layer = startNode->renderer()->enclosingLayer();
-        if (layer)
-            layer->scrollRectToVisible(enclosingIntRect(rangeRect), RenderLayer::gAlignToEdgeIfNeeded, RenderLayer::gAlignToEdgeIfNeeded);
-    }
-}
-
-- (NSURL *)baseURL
-{
-    return m_frame->document()->baseURL();
-}
-
-- (NSString *)stringWithData:(NSData *)data
-{
-    Document* doc = m_frame->document();
-    if (!doc)
-        return nil;
-    TextResourceDecoder* decoder = doc->decoder();
-    if (!decoder)
-        return nil;
-    return decoder->encoding().decode(reinterpret_cast<const char*>([data bytes]), [data length]);
-}
-
-+ (NSString *)stringWithData:(NSData *)data textEncodingName:(NSString *)textEncodingName
-{
-    WebCore::TextEncoding encoding(textEncodingName);
-    if (!encoding.isValid())
-        encoding = WindowsLatin1Encoding();
-    return encoding.decode(reinterpret_cast<const char*>([data bytes]), [data length]);
-}
-
-- (BOOL)needsLayout
-{
-    return m_frame->view() ? m_frame->view()->needsLayout() : false;
-}
-
-- (NSString *)renderTreeAsExternalRepresentation
-{
-    return externalRepresentation(m_frame->renderer());
-}
-
-- (void)setShouldCreateRenderers:(BOOL)f
-{
-    _shouldCreateRenderers = f;
-}
-
-- (id)accessibilityTree
-{
-    AXObjectCache::enableAccessibility();
-    if (!m_frame || !m_frame->document())
-        return nil;
-    RenderView* root = static_cast<RenderView *>(m_frame->document()->renderer());
-    if (!root)
-        return nil;
-    return m_frame->document()->axObjectCache()->get(root);
-}
-
-- (void)setBaseBackgroundColor:(NSColor *)backgroundColor
-{
-    if (m_frame && m_frame->view()) {
-        Color color = colorFromNSColor([backgroundColor colorUsingColorSpaceName:NSDeviceRGBColorSpace]);
-        m_frame->view()->setBaseBackgroundColor(color);
-    }
-}
-
-- (void)setDrawsBackground:(BOOL)drawsBackground
-{
-    if (m_frame && m_frame->view())
-        m_frame->view()->setTransparent(!drawsBackground);
-}
-
-- (DOMRange *)rangeByAlteringCurrentSelection:(SelectionController::EAlteration)alteration direction:(SelectionController::EDirection)direction granularity:(TextGranularity)granularity
-{
-    if (m_frame->selectionController()->isNone())
-        return nil;
-
-    SelectionController selectionController;
-    selectionController.setSelection(m_frame->selectionController()->selection());
-    selectionController.modify(alteration, direction, granularity);
-    return [DOMRange _wrapRange:selectionController.toRange().get()];
-}
-
-- (TextGranularity)selectionGranularity
-{
-    return m_frame->selectionGranularity();
-}
-
-- (NSRange)convertToNSRange:(Range *)range
-{
-    if (!range || !range->startContainer())
-        return NSMakeRange(NSNotFound, 0);
-
-    Element* selectionRoot = m_frame->selectionController()->rootEditableElement();
-    Element* scope = selectionRoot ? selectionRoot : m_frame->document()->documentElement();
-    
-    // Mouse events may cause TSM to attempt to create an NSRange for a portion of the view
-    // that is not inside the current editable region.  These checks ensure we don't produce
-    // potentially invalid data when responding to such requests.
-    if (range->startContainer() != scope && !range->startContainer()->isDescendantOf(scope))
-        return NSMakeRange(NSNotFound, 0);
-    if(range->endContainer() != scope && !range->endContainer()->isDescendantOf(scope))
-        return NSMakeRange(NSNotFound, 0);
-    
-    RefPtr<Range> testRange = Range::create(scope->document(), scope, 0, range->startContainer(), range->startOffset());
-    ASSERT(testRange->startContainer() == scope);
-    int startPosition = TextIterator::rangeLength(testRange.get());
-
-    ExceptionCode ec;
-    testRange->setEnd(range->endContainer(), range->endOffset(), ec);
-    ASSERT(testRange->startContainer() == scope);
-    int endPosition = TextIterator::rangeLength(testRange.get());
-
-    return NSMakeRange(startPosition, endPosition - startPosition);
-}
-
-- (PassRefPtr<Range>)convertToDOMRange:(NSRange)nsrange
-{
-    if (nsrange.location > INT_MAX)
-        return 0;
-    if (nsrange.length > INT_MAX || nsrange.location + nsrange.length > INT_MAX)
-        nsrange.length = INT_MAX - nsrange.location;
-
-    // our critical assumption is that we are only called by input methods that
-    // concentrate on a given area containing the selection
-    // We have to do this because of text fields and textareas. The DOM for those is not
-    // directly in the document DOM, so serialization is problematic. Our solution is
-    // to use the root editable element of the selection start as the positional base.
-    // That fits with AppKit's idea of an input context.
-    Element* selectionRoot = m_frame->selectionController()->rootEditableElement();
-    Element* scope = selectionRoot ? selectionRoot : m_frame->document()->documentElement();
-    return TextIterator::rangeFromLocationAndLength(scope, nsrange.location, nsrange.length);
-}
-
-- (DOMRange *)convertNSRangeToDOMRange:(NSRange)nsrange
-{
-    return [DOMRange _wrapRange:[self convertToDOMRange:nsrange].get()];
-}
-
-- (NSRange)convertDOMRangeToNSRange:(DOMRange *)range
-{
-    return [self convertToNSRange:[range _range]];
-}
-
-- (void)selectNSRange:(NSRange)range
-{
-    RefPtr<Range> domRange = [self convertToDOMRange:range];
-    if (domRange)
-        m_frame->selectionController()->setSelection(Selection(domRange.get(), SEL_DEFAULT_AFFINITY));
-}
-
-- (NSRange)selectedNSRange
-{
-    return [self convertToNSRange:m_frame->selectionController()->toRange().get()];
-}
-
-- (DOMRange *)markDOMRange
-{
-    return [DOMRange _wrapRange:m_frame->mark().toRange().get()];
-}
-
-- (NSRange)markedTextNSRange
-{
-    return [self convertToNSRange:m_frame->editor()->compositionRange().get()];
-}
-
-// Given proposedRange, returns an extended range that includes adjacent whitespace that should
-// be deleted along with the proposed range in order to preserve proper spacing and punctuation of
-// the text surrounding the deletion.
-- (DOMRange *)smartDeleteRangeForProposedRange:(DOMRange *)proposedRange
-{
-    Node *startContainer = [[proposedRange startContainer] _node];
-    Node *endContainer = [[proposedRange endContainer] _node];
-    if (startContainer == nil || endContainer == nil)
-        return nil;
-
-    ASSERT(startContainer->document() == endContainer->document());
-    
-    m_frame->document()->updateLayoutIgnorePendingStylesheets();
-
-    Position start(startContainer, [proposedRange startOffset]);
-    Position end(endContainer, [proposedRange endOffset]);
-    Position newStart = start.upstream().leadingWhitespacePosition(DOWNSTREAM, true);
-    if (newStart.isNull())
-        newStart = start;
-    Position newEnd = end.downstream().trailingWhitespacePosition(DOWNSTREAM, true);
-    if (newEnd.isNull())
-        newEnd = end;
-
-    newStart = rangeCompliantEquivalent(newStart);
-    newEnd = rangeCompliantEquivalent(newEnd);
-
-    RefPtr<Range> range = m_frame->document()->createRange();
-    int exception = 0;
-    range->setStart(newStart.node(), newStart.offset(), exception);
-    range->setEnd(newStart.node(), newStart.offset(), exception);
-    return [DOMRange _wrapRange:range.get()];
-}
-
-// Determines whether whitespace needs to be added around aString to preserve proper spacing and
-// punctuation when it’s inserted into the receiver’s text over charRange. Returns by reference
-// in beforeString and afterString any whitespace that should be added, unless either or both are
-// nil. Both are returned as nil if aString is nil or if smart insertion and deletion are disabled.
-- (void)smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)rangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString
-{
-    // give back nil pointers in case of early returns
-    if (beforeString)
-        *beforeString = nil;
-    if (afterString)
-        *afterString = nil;
-        
-    // inspect destination
-    Node *startContainer = [[rangeToReplace startContainer] _node];
-    Node *endContainer = [[rangeToReplace endContainer] _node];
-
-    Position startPos(startContainer, [rangeToReplace startOffset]);
-    Position endPos(endContainer, [rangeToReplace endOffset]);
-
-    VisiblePosition startVisiblePos = VisiblePosition(startPos, VP_DEFAULT_AFFINITY);
-    VisiblePosition endVisiblePos = VisiblePosition(endPos, VP_DEFAULT_AFFINITY);
-    
-    // this check also ensures startContainer, startPos, endContainer, and endPos are non-null
-    if (startVisiblePos.isNull() || endVisiblePos.isNull())
-        return;
-
-    bool addLeadingSpace = startPos.leadingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isStartOfParagraph(startVisiblePos);
-    if (addLeadingSpace)
-        if (UChar previousChar = startVisiblePos.previous().characterAfter())
-            addLeadingSpace = !isCharacterSmartReplaceExempt(previousChar, true);
-    
-    bool addTrailingSpace = endPos.trailingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isEndOfParagraph(endVisiblePos);
-    if (addTrailingSpace)
-        if (UChar thisChar = endVisiblePos.characterAfter())
-            addTrailingSpace = !isCharacterSmartReplaceExempt(thisChar, false);
-    
-    // inspect source
-    bool hasWhitespaceAtStart = false;
-    bool hasWhitespaceAtEnd = false;
-    unsigned pasteLength = [pasteString length];
-    if (pasteLength > 0) {
-        NSCharacterSet *whiteSet = [NSCharacterSet whitespaceAndNewlineCharacterSet];
-        
-        if ([whiteSet characterIsMember:[pasteString characterAtIndex:0]]) {
-            hasWhitespaceAtStart = YES;
-        }
-        if ([whiteSet characterIsMember:[pasteString characterAtIndex:(pasteLength - 1)]]) {
-            hasWhitespaceAtEnd = YES;
-        }
-    }
-    
-    // issue the verdict
-    if (beforeString && addLeadingSpace && !hasWhitespaceAtStart)
-        *beforeString = @" ";
-    if (afterString && addTrailingSpace && !hasWhitespaceAtEnd)
-        *afterString = @" ";
-}
-
-- (DOMDocumentFragment *)documentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString 
-{
-    if (!m_frame || !m_frame->document())
-        return 0;
-
-    return [DOMDocumentFragment _wrapDocumentFragment:createFragmentFromMarkup(m_frame->document(), markupString, baseURLString).get()];
-}
-
-- (DOMDocumentFragment *)documentFragmentWithText:(NSString *)text inContext:(DOMRange *)context
-{
-    return [DOMDocumentFragment _wrapDocumentFragment:createFragmentFromText([context _range], text).get()];
-}
-
-- (DOMDocumentFragment *)documentFragmentWithNodesAsParagraphs:(NSArray *)nodes
-{
-    if (!m_frame || !m_frame->document())
-        return 0;
-    
-    NSEnumerator *nodeEnum = [nodes objectEnumerator];
-    Vector<Node*> nodesVector;
-    DOMNode *node;
-    while ((node = [nodeEnum nextObject]))
-        nodesVector.append([node _node]);
-    
-    return [DOMDocumentFragment _wrapDocumentFragment:createFragmentFromNodes(m_frame->document(), nodesVector).get()];
-}
-
-- (void)replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle
-{
-    if (m_frame->selectionController()->isNone() || !fragment)
-        return;
-    
-    applyCommand(new ReplaceSelectionCommand(m_frame->document(), [fragment _documentFragment], selectReplacement, smartReplace, matchStyle));
-    m_frame->revealSelection(RenderLayer::gAlignToEdgeIfNeeded);
-}
-
-- (void)replaceSelectionWithNode:(DOMNode *)node selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle
-{
-    DOMDocumentFragment *fragment = [DOMDocumentFragment _wrapDocumentFragment:m_frame->document()->createDocumentFragment().get()];
-    [fragment appendChild:node];
-    [self replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:smartReplace matchStyle:matchStyle];
-}
-
-- (void)replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace
-{
-    DOMDocumentFragment *fragment = [self documentFragmentWithMarkupString:markupString baseURLString:baseURLString];
-    [self replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:smartReplace matchStyle:NO];
-}
-
-- (void)replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace
-{
-    [self replaceSelectionWithFragment:[self documentFragmentWithText:text
-        inContext:[DOMRange _wrapRange:m_frame->selectionController()->toRange().get()]]
-        selectReplacement:selectReplacement smartReplace:smartReplace matchStyle:YES];
-}
-
-- (void)insertParagraphSeparatorInQuotedContent
-{
-    if (m_frame->selectionController()->isNone())
-        return;
-    
-    TypingCommand::insertParagraphSeparatorInQuotedContent(m_frame->document());
-    m_frame->revealSelection(RenderLayer::gAlignToEdgeIfNeeded);
-}
-
-- (VisiblePosition)_visiblePositionForPoint:(NSPoint)point
-{
-    IntPoint outerPoint(point);
-    HitTestResult result = m_frame->eventHandler()->hitTestResultAtPoint(outerPoint, true);
-    Node* node = result.innerNode();
-    if (!node)
-        return VisiblePosition();
-    RenderObject* renderer = node->renderer();
-    if (!renderer)
-        return VisiblePosition();
-    VisiblePosition visiblePos = renderer->positionForCoordinates(result.localPoint().x(), result.localPoint().y());
-    if (visiblePos.isNull())
-        visiblePos = VisiblePosition(Position(node, 0));
-    return visiblePos;
-}
-
-- (DOMRange *)characterRangeAtPoint:(NSPoint)point
-{
-    VisiblePosition position = [self _visiblePositionForPoint:point];
-    if (position.isNull())
-        return nil;
-    
-    VisiblePosition previous = position.previous();
-    if (previous.isNotNull()) {
-        DOMRange *previousCharacterRange = [DOMRange _wrapRange:makeRange(previous, position).get()];
-        NSRect rect = [self firstRectForDOMRange:previousCharacterRange];
-        if (NSPointInRect(point, rect))
-            return previousCharacterRange;
-    }
-
-    VisiblePosition next = position.next();
-    if (next.isNotNull()) {
-        DOMRange *nextCharacterRange = [DOMRange _wrapRange:makeRange(position, next).get()];
-        NSRect rect = [self firstRectForDOMRange:nextCharacterRange];
-        if (NSPointInRect(point, rect))
-            return nextCharacterRange;
-    }
-    
-    return nil;
-}
-
-- (DOMCSSStyleDeclaration *)typingStyle
-{
-    if (!m_frame || !m_frame->typingStyle())
-        return nil;
-    return [DOMCSSStyleDeclaration _wrapCSSStyleDeclaration:m_frame->typingStyle()->copy().get()];
-}
-
-- (void)setTypingStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(EditAction)undoAction
-{
-    if (!m_frame)
-        return;
-    m_frame->computeAndSetTypingStyle([style _CSSStyleDeclaration], undoAction);
-}
-
-- (NSFont *)fontForSelection:(BOOL *)hasMultipleFonts
-{
-    bool multipleFonts = false;
-    NSFont *font = nil;
-    if (m_frame) {
-        const SimpleFontData* fd = m_frame->editor()->fontForSelection(multipleFonts);
-        if (fd)
-            font = fd->getNSFont();
-    }
-    
-    if (hasMultipleFonts)
-        *hasMultipleFonts = multipleFonts;
-    return font;
-}
-
-- (void)dragSourceMovedTo:(NSPoint)windowLoc
-{
-    if (!m_frame)
-        return;
-    FrameView* view = m_frame->view();
-    if (!view)
-        return;
-    // FIXME: These are fake modifier keys here, but they should be real ones instead.
-    PlatformMouseEvent event(IntPoint(windowLoc), globalPoint(windowLoc, [view->getView() window]),
-        LeftButton, MouseEventMoved, 0, false, false, false, false, currentTime());
-    m_frame->eventHandler()->dragSourceMovedTo(event);
-}
-
-- (void)dragSourceEndedAt:(NSPoint)windowLoc operation:(NSDragOperation)operation
-{
-    if (!m_frame)
-        return;
-    FrameView* view = m_frame->view();
-    if (!view)
-        return;
-    // FIXME: These are fake modifier keys here, but they should be real ones instead.
-    PlatformMouseEvent event(IntPoint(windowLoc), globalPoint(windowLoc, [view->getView() window]),
-        LeftButton, MouseEventMoved, 0, false, false, false, false, currentTime());
-    m_frame->eventHandler()->dragSourceEndedAt(event, (DragOperation)operation);
-}
-
-- (BOOL)getData:(NSData **)data andResponse:(NSURLResponse **)response forURL:(NSString *)url
-{
-    Document* doc = m_frame->document();
-    if (!doc)
-        return NO;
-
-    CachedResource* resource = doc->docLoader()->cachedResource(url);
-    if (!resource)
-        return NO;
-
-    SharedBuffer* buffer = resource->data();
-    if (buffer)
-        *data = [buffer->createNSData() autorelease];
-    else
-        *data = nil;
-
-    *response = resource->response().nsURLResponse();
-    return YES;
-}
-
-- (void)getAllResourceDatas:(NSArray **)datas andResponses:(NSArray **)responses
-{
-    Document* doc = m_frame->document();
-    if (!doc) {
-        NSArray* emptyArray = [NSArray array];
-        *datas = emptyArray;
-        *responses = emptyArray;
-        return;
-    }
-
-    const HashMap<String, CachedResource*>& allResources = doc->docLoader()->allCachedResources();
-
-    NSMutableArray *d = [[NSMutableArray alloc] initWithCapacity:allResources.size()];
-    NSMutableArray *r = [[NSMutableArray alloc] initWithCapacity:allResources.size()];
-
-    HashMap<String, CachedResource*>::const_iterator end = allResources.end();
-    for (HashMap<String, CachedResource*>::const_iterator it = allResources.begin(); it != end; ++it) {
-        SharedBuffer* buffer = it->second->data();
-        NSData *data;
-        if (buffer)
-            data = buffer->createNSData();
-        else
-            data = [[NSData alloc] init];
-        [d addObject:data];
-        [data release];
-        [r addObject:it->second->response().nsURLResponse()];
-    }
-
-    *datas = [d autorelease];
-    *responses = [r autorelease];
-}
-
-- (BOOL)canProvideDocumentSource
-{
-    String mimeType = m_frame->loader()->responseMIMEType();
-    
-    if (WebCore::DOMImplementation::isTextMIMEType(mimeType) ||
-        Image::supportsType(mimeType) ||
-        (m_frame->page() && m_frame->page()->pluginData()->supportsMimeType(mimeType)))
-        return NO;
-    
-    return YES;
-}
-
-- (BOOL)canSaveAsWebArchive
-{
-    // Currently, all documents that we can view source for
-    // (HTML and XML documents) can also be saved as web archives
-    return [self canProvideDocumentSource];
-}
-
-- (void)receivedData:(NSData *)data textEncodingName:(NSString *)textEncodingName
-{
-    // Set the encoding. This only needs to be done once, but it's harmless to do it again later.
-    String encoding;
-    if (m_frame)
-        encoding = m_frame->loader()->documentLoader()->overrideEncoding();
-    bool userChosen = !encoding.isNull();
-    if (encoding.isNull())
-        encoding = textEncodingName;
-    m_frame->loader()->setEncoding(encoding, userChosen);
-    [self addData:data];
-}
-
-// -------------------
-
-- (void)setWebCoreFrame:(Frame*)webCoreFrame
-{
-    m_frame = webCoreFrame;
-}
-
-- (Frame*)_frame
-{
-    return m_frame;
-}
-
-@end
index 7efb07f..e85b55c 100644 (file)
@@ -1,3 +1,13 @@
+2008-03-12  Darin Adler  <darin@apple.com>
+
+        Reviewed by Anders.
+
+        - http://bugs.webkit.org/show_bug.cgi?id=17640
+          eliminate WebCoreFrameBridge
+
+        * StringsNotToBeLocalized.txt: Updated for recent changes.
+        * WebKit.xcodeproj/project.pbxproj: Removed WebFrameBridge.h and WebFrameBridge.mm.
+
 2008-03-11  Darin Adler  <darin@apple.com>
 
         Reviewed by Anders.
index af1c6ce..fa5d12a 100644 (file)
@@ -65,6 +65,7 @@
 "1800"
 "1px"
 "2"
+"3.1"
 "3DBD89EB-CEFB-4ddb-8D1A-5BE47ED4E929"
 "420+"
 "5CACD637-F82F-491F-947A-5DCA38AA0FEA"
 "Apple Web Archive pasteboard type"
 "AppleKeyboardUIMode"
 "AppleLanguages"
+"AppleTextDirection"
 "BEGIN:VCALENDAR"
 "BEGIN:VCARD"
 "BP_CreatePluginMIMETypesPreferences"
 "CSS"
-"Cache-Control"
 "Content-Encoding"
 "Content-Length"
 "Content-Type"
 "InsertBacktab"
 "InsertNewline"
 "InsertTab"
+"InspectorLocalizedStrings"
 "Intel"
 "JavaScript"
 "Joy!peff"
 "NP_Initialize"
 "NP_Shutdown"
 "NSAllowContinuousSpellChecking"
+"NSAllowsBaseWritingDirectionKeyBindings"
 "NSApplicationIcon"
 "NSCarbonWindow"
 "NSErrorFailingURLKey"
 "NSEvent"
 "NSView"
 "NeXT smart paste pasteboard type"
+"OldMainThreadWndClass"
+"OleMainThreadWndName"
 "PDFDocument"
 "PDFPreviewView"
 "PDFView"
 "WebIconDatabaseVersion"
 "WebIconNotificationUserInfoURLKey"
 "WebInspectorPointer"
+"WebInspectorPreferences"
 "WebInspectorWindowClass"
 "WebJavaScriptTextInputPanel"
 "WebKitErrorDomain"
 "\0"
 "\\"
 "\\StringFileInfo\\%04x%04x\\ProductVersion"
+"\\StringFileInfo\\040904b0\\ProductVersion"
 "\\VarFileInfo\\Translation"
 "\\WebKit.resources"
 "\n        "
 "a"
 "ab"
 "about:"
-"about:blank"
 "applewebdata"
 "applewebdata://%@"
 "application/atom+xml"
 "doctype"
 "en"
 "estimatedProgress"
+"eval"
 "file:"
 "ftp:"
 "htm"
 "image/tiff"
 "img"
 "insertText:"
+"inspector/Images"
 "isLoading"
 "isindex"
 "javascript:"
+"js"
 "lastVisitedDate"
 "line-through"
 "lineNumber"
 "localhost"
 "localized string not found"
 "lproj"
+"ltr"
 "mailto:"
 "mainFrameDocument"
 "mainFrameIcon"
 "mainFrameTitle"
 "mainFrameURL"
-"must-revalidate"
 "name: %@\npath: %@\nmimeTypes:\n%@\npluginDescription:%@"
 "nullplugin"
 "pluginspage"
 "png"
-"proxy-revalidate"
 "r"
 "r+b"
 "rgb(%.0f,%.0f,%.0f)"
 "rgba(%.0f,%.0f,%.0f,%f)"
+"rtl"
 "s"
 "sourceURL"
 "src"
 "x"
 "x-apple-web-kit/"
 "xml"
+"{A3676398-4485-4a9d-87DC-CB5A40E6351D}"
 "~/Library/Icons"
 "~/Library/WebKit/Databases"
 WebKit/mac/DOM/WebDOMOperations.mm:"background"
@@ -510,13 +520,10 @@ WebKit/mac/WebCoreSupport/WebChromeClient.mm:"y"
 WebKit/mac/WebCoreSupport/WebEditorClient.mm:"Down"
 WebKit/mac/WebCoreSupport/WebEditorClient.mm:"Enter"
 WebKit/mac/WebCoreSupport/WebEditorClient.mm:"Up"
-WebKit/mac/WebCoreSupport/WebFrameBridge.mm:"height"
-WebKit/mac/WebCoreSupport/WebFrameBridge.mm:"width"
-WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"InspectorLocalizedStrings"
+WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm:"height"
+WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm:"width"
 WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Web Inspector 2"
 WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"inspector"
-WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"inspector/Images"
-WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"js"
 WebKit/mac/WebInspector/WebNodeHighlightView.m:"display"
 WebKit/mac/WebInspector/WebNodeHighlightView.m:"inline"
 WebKit/mac/WebView/WebHTMLView.mm:"'%@'"
@@ -535,6 +542,8 @@ WebKit/mac/WebView/WebHTMLView.mm:"menu"
 WebKit/mac/WebView/WebHTMLView.mm:"none"
 WebKit/mac/WebView/WebHTMLView.mm:"normal"
 WebKit/mac/WebView/WebHTMLView.mm:"object"
+WebKit/mac/WebView/WebHTMLView.mm:"print"
+WebKit/mac/WebView/WebHTMLView.mm:"screen"
 WebKit/mac/WebView/WebHTMLView.mm:"strike"
 WebKit/mac/WebView/WebHTMLView.mm:"style"
 WebKit/mac/WebView/WebHTMLView.mm:"super"
@@ -554,9 +563,6 @@ WebKit/win/WebCache.cpp:"scripts"
 WebKit/win/WebCache.cpp:"style sheets"
 WebKit/win/WebDatabaseManager.cpp:"Databases"
 WebKit/win/WebHistoryItem.cpp:"title"
-WebKit/win/WebInspectorClient.cpp:"Web Inspector "
-WebKit/win/WebInspectorClient.cpp:"Web Inspector"
-WebKit/win/WebInspectorClient.cpp:"inspector"
 WebKit/win/WebKitDLL.cpp
 WebKit/win/WebPreferenceKeysPrivate.h
 WebKit/win/WebPreferences.cpp:"Arial"
@@ -565,9 +571,7 @@ WebKit/win/WebPreferences.cpp:"Courier New"
 WebKit/win/WebPreferences.cpp:"Times New Roman"
 WebKit/win/WebScriptCallFrame.cpp:"False"
 WebKit/win/WebScriptCallFrame.cpp:"True"
-WebKit/win/WebScriptCallFrame.cpp:"eval"
 WebKit/win/WebScriptCallFrame.cpp:"undefined"
-WebKit/win/WebScriptDebugger.cpp:"An Error Occurred."
 WebKit/win/WebURLResponse.cpp:"Extension"
 WebKit/win/WebView.cpp:"Cancel"
 WebKit/win/WebView.cpp:"Copy"
index b72acbf..56bf59f 100644 (file)
                939810380824BF01008DF038 /* WebPluginDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = F5F717200288493C018635CA /* WebPluginDatabase.h */; settings = {ATTRIBUTES = (Private, ); }; };
                939810390824BF01008DF038 /* WebPluginPackage.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E4AF4B036659440000E506 /* WebPluginPackage.h */; };
                9398103A0824BF01008DF038 /* WebPluginViewFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 848DFF860365FE6A00CA2ACA /* WebPluginViewFactory.h */; settings = {ATTRIBUTES = (Public, ); }; };
-               9398103C0824BF01008DF038 /* WebFrameBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = F5AFB45E02B94DC8018635CA /* WebFrameBridge.h */; };
                939810420824BF01008DF038 /* WebJavaScriptTextInputPanel.h in Headers */ = {isa = PBXBuildFile; fileRef = 9345D4EA0365C5B2008635CE /* WebJavaScriptTextInputPanel.h */; settings = {ATTRIBUTES = (Private, ); }; };
                939810460824BF01008DF038 /* WebViewFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = F5F7174C02885C5B018635CA /* WebViewFactory.h */; settings = {ATTRIBUTES = (); }; };
                939810470824BF01008DF038 /* WebKitPrefix.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C283730284676D018635CA /* WebKitPrefix.h */; };
                939810DB0824BF01008DF038 /* WebPluginDatabase.m in Sources */ = {isa = PBXBuildFile; fileRef = F5F717210288493C018635CA /* WebPluginDatabase.m */; };
                939810DC0824BF01008DF038 /* WebPluginPackage.m in Sources */ = {isa = PBXBuildFile; fileRef = 83E4AF4C036659440000E506 /* WebPluginPackage.m */; };
                939810DD0824BF01008DF038 /* npapi.m in Sources */ = {isa = PBXBuildFile; fileRef = F5F717230288493C018635CA /* npapi.m */; };
-               939810DE0824BF01008DF038 /* WebFrameBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5AFB45F02B94DC8018635CA /* WebFrameBridge.mm */; };
                939810E30824BF01008DF038 /* WebImageRendererFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CE1F8A302A5C6F30ECA2ACD /* WebImageRendererFactory.m */; };
                939810E40824BF01008DF038 /* WebJavaScriptTextInputPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9345D4EB0365C5B2008635CE /* WebJavaScriptTextInputPanel.m */; };
                939810E80824BF01008DF038 /* WebViewFactory.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5F7174D02885C5B018635CA /* WebViewFactory.mm */; };
                F5A672B90263866E01000102 /* WebBaseNetscapePluginStream.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebBaseNetscapePluginStream.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F5A672BA0263866E01000102 /* WebBaseNetscapePluginStream.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; indentWidth = 4; path = WebBaseNetscapePluginStream.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F5AEBB3D024A527601C1A526 /* WebPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebPreferences.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               F5AFB45E02B94DC8018635CA /* WebFrameBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFrameBridge.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               F5AFB45F02B94DC8018635CA /* WebFrameBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebFrameBridge.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F5B67130023EDF8901C1A525 /* url_icon.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = url_icon.tiff; sourceTree = "<group>"; };
                F5B92B820223191D01C1A525 /* WebHistoryPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebHistoryPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F5C283730284676D018635CA /* WebKitPrefix.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; name = WebKitPrefix.h; path = mac/WebKitPrefix.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
                                A70936AE0B5608DC00CDB48E /* WebDragClient.mm */,
                                4BF99F8E0AE050BC00815C2B /* WebEditorClient.h */,
                                4BF99F8F0AE050BC00815C2B /* WebEditorClient.mm */,
-                               F5AFB45E02B94DC8018635CA /* WebFrameBridge.h */,
-                               F5AFB45F02B94DC8018635CA /* WebFrameBridge.mm */,
                                931633EA0AEDFF930062B92D /* WebFrameLoaderClient.h */,
                                931633EE0AEDFFAE0062B92D /* WebFrameLoaderClient.mm */,
                                51494CD40C7EBDE0004178C5 /* WebIconDatabaseClient.h */,
                                939810520824BF01008DF038 /* WebFormDelegate.h in Headers */,
                                939810640824BF01008DF038 /* WebFormDelegatePrivate.h in Headers */,
                                939810530824BF01008DF038 /* WebFrame.h in Headers */,
-                               9398103C0824BF01008DF038 /* WebFrameBridge.h in Headers */,
                                9398109C0824BF01008DF038 /* WebFrameInternal.h in Headers */,
                                9398105B0824BF01008DF038 /* WebFrameLoadDelegate.h in Headers */,
                                931633EB0AEDFF930062B92D /* WebFrameLoaderClient.h in Headers */,
                                DD89682109AA87240097E7F0 /* WebElementDictionary.mm in Sources */,
                                939810FC0824BF01008DF038 /* WebFormDelegate.m in Sources */,
                                939810F20824BF01008DF038 /* WebFrame.mm in Sources */,
-                               939810DE0824BF01008DF038 /* WebFrameBridge.mm in Sources */,
                                931633EF0AEDFFAE0062B92D /* WebFrameLoaderClient.mm in Sources */,
                                939811060824BF01008DF038 /* WebFrameView.mm in Sources */,
                                1CA57D630AED6A470009BDD0 /* WebGraphicsExtras.c in Sources */,
index 4a9066f..c5b699d 100644 (file)
@@ -1,3 +1,275 @@
+2008-03-12  Darin Adler  <darin@apple.com>
+
+        Reviewed by Anders.
+
+        - http://bugs.webkit.org/show_bug.cgi?id=17640
+          eliminate WebCoreFrameBridge
+
+        Moved all the code from the bridge into WebFrame. This need not be the final
+        home of these methods -- they can be moved closer to their callers and improved
+        further -- but it eliminates the bridge without requiring a rewrite of the code.
+        It's a fairly mechanical process (just adding underscores to method names really).
+
+        There's even a chance that some of the methods are unused. Those we can remove
+        after checking if that's so.
+
+        * DOM/WebDOMOperations.mm:
+        (-[DOMNode markupString]): Use WebFrame rather than bridge.
+        (-[DOMDocument webFrame]): Changed to use the core and kit functions
+        instead of using the bridge.
+        (-[DOMDocument URLWithAttributeString:]): Use WebFrame rather than bridge.
+        (-[DOMRange markupString]): Ditto.
+        * DOM/WebDOMOperationsPrivate.h: Removed _bridge methods.
+
+        * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Removed unneeded import.
+        * History/WebHistoryItem.mm: Ditto.
+
+        * MigrateHeaders.make: Added DOMDocumentFragmentInternal.h.
+        * Misc/WebCoreStatistics.mm:
+        (-[WebFrame renderTreeAsExternalRepresentation]): Use WebFrame rather than bridge.
+
+        * Misc/WebElementDictionary.mm: Removed unneeded import.
+
+        * Misc/WebKitStatistics.m:
+        (+[WebKitStatistics bridgeCount]): Removed WebBridgeCount and just return 0.
+        * Misc/WebKitStatisticsPrivate.h: Ditto.
+
+        * Misc/WebNSAttributedStringExtras.mm: Removed unneeded import.
+        * Misc/WebNSPasteboardExtras.mm: Ditto.
+
+        * Plugins/WebBaseNetscapePluginView.mm:
+        (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Use WebFrame
+        rather than bridge.
+
+        * Plugins/WebNetscapePluginEmbeddedView.mm: Removed unneeded import.
+        * Plugins/WebNetscapePluginStream.mm: Ditto.
+
+        * Plugins/WebPluginContainerCheck.mm:
+        (-[WebPluginContainerCheck _isForbiddenFileLoad]): Use WebFrame rather than
+        bridge to get to the WebCore::Frame.
+
+        * Plugins/WebPluginController.h: Declare webFrame method and remove bridge method.
+        * Plugins/WebPluginController.mm:
+        (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]): Use WebFrame
+        rather than bridge.
+
+        * WebCoreSupport/WebEditorClient.mm:
+        (selectorForKeyEvent): Tweaked comment.
+
+        * WebCoreSupport/WebFrameBridge.h: Removed.
+        * WebCoreSupport/WebFrameBridge.mm: Removed.
+
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::frameLoaderDestroyed): Removed bridge assertion.
+        (WebFrameLoaderClient::detachedFromParent4): Removed bridge teardown code.
+        I could remove this function entirely, but it looks like the Qt port is using it.
+
+        * WebCoreSupport/WebViewFactory.mm: Removed unneeded import.
+
+        * WebView/WebArchiver.mm:
+        (+[WebArchiver archiveRange:]): Use WebFrame rather than bridge.
+        (+[WebArchiver archiveNode:]): Ditto.
+        (+[WebArchiver archiveSelectionInFrame:]): Ditto.
+
+        * WebView/WebDataSource.mm:
+        (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): Ditto.
+        (-[WebDataSource _documentFragmentWithArchive:]): Ditto.
+        (-[WebDataSource subresources]): Ditto.
+        (-[WebDataSource subresourceForURL:]): Ditto.
+
+        * WebView/WebDataSourceInternal.h: Removed _bridge method.
+
+        * WebView/WebFrame.mm:
+        (-[WebFramePrivate dealloc]): Removed code to release the bridge.
+        (core): Go directly to the core frame, not via the bridge.
+        (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
+        Remove the code to deal with the bridge.
+        (-[WebFrame _initWithWebFrameView:webView:]): Ditto. Also added code to set the
+        shouldCreateRenderers flag, formerly on the bridge.
+        (-[WebFrame _updateBackground]): Change to call mehods on self, not bridge.
+        (aeDescFromJSValue): Moved here from bridge.
+        (-[WebFrame _domain]): Ditto.
+        (-[WebFrame _addData:]): Ditto.
+        (-[WebFrame _stringWithDocumentTypeStringAndMarkupString:]): Ditto.
+        (-[WebFrame _nodesFromList:]): Ditto.
+        (-[WebFrame _markupStringFromNode:nodes:]): Ditto.
+        (-[WebFrame _markupStringFromRange:nodes:]): Ditto.
+        (-[WebFrame _selectedString]): Ditto.
+        (-[WebFrame _stringForRange:]): Ditto.
+        (-[WebFrame _forceLayoutAdjustingViewSize:]): Ditto.
+        (-[WebFrame _forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto.
+        (-[WebFrame _sendScrollEvent]): Ditto.
+        (-[WebFrame _drawRect:]): Ditto.
+        (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]): Ditto.
+        (-[WebFrame _adjustPageHeightNew:top:bottom:limit:]): Ditto.
+        (-[WebFrame _copyRenderNode:copier:]): Ditto.
+        (-[WebFrame _copyRenderTree:]): Ditto.
+        (inputElementFromDOMElement): Ditto.
+        (formElementFromDOMElement): Ditto.
+        (-[WebFrame _elementWithName:inForm:]): Ditto.
+        (-[WebFrame _elementDoesAutoComplete:]): Ditto.
+        (-[WebFrame _elementIsPassword:]): Ditto.
+        (-[WebFrame _formForElement:]): Ditto.
+        (-[WebFrame _currentForm]): Ditto.
+        (-[WebFrame _controlsInForm:]): Ditto.
+        (-[WebFrame _searchForLabels:beforeElement:]): Ditto.
+        (-[WebFrame _matchLabels:againstElement:]): Ditto.
+        (-[WebFrame _URLWithAttributeString:]): Ditto.
+        (-[WebFrame _searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto.
+        (-[WebFrame _markAllMatchesForText:caseSensitive:limit:]): Ditto.
+        (-[WebFrame _markedTextMatchesAreHighlighted]): Ditto.
+        (-[WebFrame _setMarkedTextMatchesAreHighlighted:]): Ditto.
+        (-[WebFrame _unmarkAllTextMatches]): Ditto.
+        (-[WebFrame _rectsForTextMatches]): Ditto.
+        (-[WebFrame _stringByEvaluatingJavaScriptFromString:]): Ditto.
+        (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Ditto.
+        (-[WebFrame _aeDescByEvaluatingJavaScriptFromString:]): Ditto.
+        (-[WebFrame _caretRectAtNode:offset:affinity:]): Ditto.
+        (-[WebFrame _firstRectForDOMRange:]): Ditto.
+        (-[WebFrame _scrollDOMRangeToVisible:]): Ditto.
+        (-[WebFrame _baseURL]): Ditto.
+        (-[WebFrame _stringWithData:]): Ditto.
+        (+[WebFrame _stringWithData:textEncodingName:]): Ditto.
+        (-[WebFrame _needsLayout]): Ditto.
+        (-[WebFrame _renderTreeAsExternalRepresentation]): Ditto.
+        (-[WebFrame _accessibilityTree]): Ditto.
+        (-[WebFrame _setBaseBackgroundColor:]): Ditto.
+        (-[WebFrame _setDrawsBackground:]): Ditto.
+        (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
+        Ditto.
+        (-[WebFrame _selectionGranularity]): Ditto.
+        (-[WebFrame _convertToNSRange:]): Ditto.
+        (-[WebFrame _convertToDOMRange:]): Ditto.
+        (-[WebFrame _convertNSRangeToDOMRange:]): Ditto.
+        (-[WebFrame _convertDOMRangeToNSRange:]): Ditto.
+        (-[WebFrame _markDOMRange]): Ditto.
+        (-[WebFrame _markedTextNSRange]): Ditto.
+        (-[WebFrame _smartDeleteRangeForProposedRange:]): Ditto.
+        (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
+        (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto.
+        (-[WebFrame _documentFragmentWithText:inContext:]): Ditto.
+        (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): Ditto.
+        (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): Ditto.
+        (-[WebFrame _replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]): Ditto.
+        (-[WebFrame _replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): Ditto.
+        (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): Ditto.
+        (-[WebFrame _insertParagraphSeparatorInQuotedContent]): Ditto.
+        (-[WebFrame _visiblePositionForPoint:]): Ditto.
+        (-[WebFrame _characterRangeAtPoint:]): Ditto.
+        (-[WebFrame _typingStyle]): Ditto.
+        (-[WebFrame _setTypingStyle:withUndoAction:]): Ditto.
+        (-[WebFrame _fontForSelection:]): Ditto.
+        (-[WebFrame _dragSourceMovedTo:]): Ditto.
+        (-[WebFrame _dragSourceEndedAt:operation:]): Ditto.
+        (-[WebFrame _getData:andResponse:forURL:]): Ditto.
+        (-[WebFrame _getAllResourceDatas:andResponses:]): Ditto.
+        (-[WebFrame _canProvideDocumentSource]): Ditto.
+        (-[WebFrame _canSaveAsWebArchive]): Ditto.
+        (-[WebFrame _receivedData:textEncodingName:]): Ditto.
+        (-[WebFrame _setShouldCreateRenderers:]): Put the code from the bridge in this preexisting
+        function. Couldn't just keep the bridge method because this was already here with the same name.
+        (-[WebFrame _selectedNSRange]): Ditto.
+        (-[WebFrame _selectNSRange:]): Ditto.
+        (-[WebFrame dealloc]): Remove bridge-related code.
+        (-[WebFrame finalize]): Ditto.
+
+        * WebView/WebFrameInternal.h: Added all the method declarations from the bridge.
+        Removed the bridge parameter from the init method. Removed the #if blocks that
+        tried to make this header work in non-C++ ObjC files -- they were broken and unused.
+        Removed the _bridge method.
+
+        * WebView/WebFrameView.mm: Removed the _bridge method.
+
+        * WebView/WebHTMLRepresentation.mm:
+        (-[WebHTMLRepresentation setDataSource:]): Removed the code to set up the bridge
+        field.
+        (-[WebHTMLRepresentation receivedData:withDataSource:]): Use WebFrame instead of bridge.
+        (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): Ditto.
+        (-[WebHTMLRepresentation canProvideDocumentSource]): Ditto.
+        (-[WebHTMLRepresentation canSaveAsWebArchive]): Ditto.
+        (-[WebHTMLRepresentation documentSource]): Ditto.
+        (-[WebHTMLRepresentation DOMDocument]): Ditto.
+        (-[WebHTMLRepresentation elementWithName:inForm:]): Ditto.
+        (-[WebHTMLRepresentation elementDoesAutoComplete:]): Ditto.
+        (-[WebHTMLRepresentation elementIsPassword:]): Ditto.
+        (-[WebHTMLRepresentation formForElement:]): Ditto.
+        (-[WebHTMLRepresentation currentForm]): Ditto.
+        (-[WebHTMLRepresentation controlsInForm:]): Ditto.
+        (-[WebHTMLRepresentation searchForLabels:beforeElement:]): Ditto.
+        (-[WebHTMLRepresentation matchLabels:againstElement:]): Ditto.
+
+        * WebView/WebHTMLRepresentationPrivate.h: Removed the _bridge method.
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView _documentFragmentWithPaths:]): Use WebFrame instead of bridge.
+        (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Ditto.
+        (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Ditto.
+        (-[WebHTMLView _updateTextSizeMultiplier]): Ditto.
+        (-[WebHTMLView _frameOrBoundsChanged]): Ditto.
+        (-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
+        (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): Ditto.
+        (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto.
+        (-[WebHTMLView drawSingleRect:]): Ditto.
+        (-[WebHTMLView draggedImage:movedTo:]): Ditto.
+        (-[WebHTMLView draggedImage:endedAt:operation:]): Ditto.
+        (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Ditto.
+        (-[WebHTMLView knowsPageRange:]): Ditto.
+        (-[WebHTMLView accessibilityAttributeValue:]): Ditto.
+        (-[WebHTMLView accessibilityFocusedUIElement]): Ditto.
+        (-[WebHTMLView accessibilityHitTest:]): Ditto.
+        (-[WebHTMLView _accessibilityParentForSubview:]): Ditto.
+        (-[WebHTMLView changeDocumentBackgroundColor:]): Ditto.
+        (-[WebHTMLView _changeWordCaseWithSelector:]): Ditto.
+        (-[WebHTMLView _changeSpellingToWord:]): Ditto.
+        (-[WebHTMLView startSpeaking:]): Ditto.
+        (-[WebHTMLView _updateFontPanel]): Ditto.
+        (-[WebHTMLView _canSmartCopyOrDelete]): Ditto.
+        (-[WebHTMLView _layoutIfNeeded]): Ditto.
+        (-[WebHTMLView characterIndexForPoint:]): Ditto.
+        (-[WebHTMLView firstRectForCharacterRange:]): Ditto.
+        (-[WebHTMLView selectedRange]): Ditto.
+        (-[WebHTMLView markedRange]): Ditto.
+        (-[WebHTMLView attributedSubstringFromRange:]): Ditto.
+        (-[WebHTMLView setMarkedText:selectedRange:]): Ditto.
+        (-[WebHTMLView insertText:]): Ditto.
+        (-[WebTextCompleteController _insertMatch:]): Ditto.
+        (-[WebTextCompleteController doCompletion]): Ditto.
+        (-[WebTextCompleteController endRevertingChange:moveLeft:]): Ditto.
+        (-[WebHTMLView string]): Ditto.
+        (-[WebHTMLView selectedString]): Ditto.
+        (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto.
+        (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Ditto.
+        (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): Ditto.
+        (-[WebHTMLView markedTextMatchesAreHighlighted]): Ditto.
+        (-[WebHTMLView unmarkAllTextMatches]): Ditto.
+        (-[WebHTMLView rectsForTextMatches]): Ditto.
+        * WebView/WebRenderNode.mm:
+        (-[WebRenderNode initWithWebFrameView:]): Ditto.
+        * WebView/WebResource.mm:
+        (-[WebResource _stringValue]): Ditto.
+
+        * WebView/WebScriptDebugDelegate.mm: Removed unneeded include.
+
+        * WebView/WebView.mm:
+        (-[WebView _dashboardRegions]): Use WebFrame instead of bridge.
+        (-[WebView setProhibitsMainFrameScrolling:]): Ditto.
+        (-[WebView _setInViewSourceMode:]): Ditto.
+        (-[WebView _inViewSourceMode]): Ditto.
+        (-[WebView _executeCoreCommandByName:value:]): Ditto.
+        (-[WebView stringByEvaluatingJavaScriptFromString:]): Ditto.
+        (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto.
+        (-[WebView scrollDOMRangeToVisible:]): Ditto.
+        (-[WebView setSelectedDOMRange:affinity:]): Ditto.
+        (-[WebView setEditable:]): Ditto.
+        (-[WebView setTypingStyle:]): Ditto.
+        (-[WebView typingStyle]): Ditto.
+        (-[WebView replaceSelectionWithNode:]): Ditto.
+        (-[WebView replaceSelectionWithText:]): Ditto.
+        (-[WebView replaceSelectionWithMarkupString:]): Ditto.
+        (-[WebView replaceSelectionWithArchive:]): Ditto.
+        (-[WebView _insertNewlineInQuotedContent]): Ditto.
+        (-[WebView _replaceSelectionWithNode:matchStyle:]): Ditto.
+
 2008-03-12  David Hyatt  <hyatt@apple.com>
 
         Make the zoom factor a float and not a percent.
index 5cfdfd2..b812c8a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,7 +30,6 @@
 
 #import "WebArchiver.h"
 #import "WebDataSourcePrivate.h"
-#import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import "WebFramePrivate.h"
 #import "WebKitNSStringExtras.h"
@@ -47,17 +46,6 @@ using namespace WebCore;
 
 @implementation DOMNode (WebDOMNodeOperations)
 
-- (WebFrameBridge *)_bridge
-{
-    Document* document = core(self)->document();
-    if (!document)
-        return nil;
-    Frame* frame = document->frame();
-    if (!frame)
-        return nil;
-    return [kit(frame) _bridge];
-}
-
 - (WebArchive *)webArchive
 {
     return [WebArchiver archiveNode:self];
@@ -65,9 +53,13 @@ using namespace WebCore;
 
 - (NSString *)markupString
 {
-    return [[self _bridge] markupStringFromNode:self nodes:nil];
+    return [[[self ownerDocument] webFrame] _markupStringFromNode:self nodes:nil];
 }
 
+@end
+
+@implementation DOMNode (WebDOMNodeOperationsPrivate)
+
 - (NSArray *)_URLsFromSelectors:(SEL)firstSel, ...
 {
     NSMutableArray *URLs = [NSMutableArray array];
@@ -107,12 +99,16 @@ using namespace WebCore;
 
 - (WebFrame *)webFrame
 {
-    return [[self _bridge] webFrame];
+    Document* document = core(self);
+    Frame* frame = document->frame();
+    if (!frame)
+        return nil;
+    return kit(frame);
 }
 
 - (NSURL *)URLWithAttributeString:(NSString *)string
 {
-    return [[self _bridge] URLWithAttributeString:string];
+    return [[self webFrame] _URLWithAttributeString:string];
 }
 
 @end
@@ -135,11 +131,6 @@ using namespace WebCore;
 
 @implementation DOMRange (WebDOMRangeOperations)
 
-- (WebFrameBridge *)_bridge
-{
-    return [[self startContainer] _bridge];
-}
-
 - (WebArchive *)webArchive
 {
     return [WebArchiver archiveRange:self];
@@ -147,7 +138,7 @@ using namespace WebCore;
 
 - (NSString *)markupString
 {
-    return [[self _bridge] markupStringFromRange:self nodes:nil];
+    return [[[[self startContainer] ownerDocument] webFrame] _markupStringFromRange:self nodes:nil];
 }
 
 @end
index a16eee8..107ab5d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-@class WebFrameBridge;
-
 #import <WebKit/WebDOMOperations.h>
 
 @interface DOMNode (WebDOMNodeOperationsPrivate)
-- (WebFrameBridge *)_bridge;
 - (NSArray *)_URLsFromSelectors:(SEL)firstSel, ...;
 - (NSArray *)_subresourceURLs;
 @end
 
-@interface DOMRange (WebDOMRangeOperationsPrivate)
-- (WebFrameBridge *)_bridge;
-@end
-
 @interface DOMDocument (WebDOMDocumentOperationsPrivate)
 - (DOMRange *)_createRangeWithNode:(DOMNode *)node;
 - (DOMRange *)_documentRange;
index d82e059..65d8fb7 100644 (file)
@@ -31,7 +31,6 @@
 #import "WebDOMOperations.h"
 #import "WebDataSourcePrivate.h"
 #import "WebDefaultUIDelegate.h"
-#import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import "WebFrameView.h"
 #import "WebHTMLViewPrivate.h"
index 9ef293e..94fd865 100644 (file)
@@ -29,7 +29,6 @@
 #import "WebHistoryItemInternal.h"
 #import "WebHistoryItemPrivate.h"
 
-#import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import "WebFrameView.h"
 #import "WebHTMLViewInternal.h"
index 624197f..e0a37fa 100644 (file)
@@ -62,6 +62,7 @@ all : \
     $(PUBLIC_HEADERS_DIR)/DOMDocument.h \
     $(INTERNAL_HEADERS_DIR)/DOMDocumentInternal.h \
     $(PUBLIC_HEADERS_DIR)/DOMDocumentFragment.h \
+    $(INTERNAL_HEADERS_DIR)/DOMDocumentFragmentInternal.h \
     $(PRIVATE_HEADERS_DIR)/DOMDocumentPrivate.h \
     $(PUBLIC_HEADERS_DIR)/DOMDocumentType.h \
     $(PUBLIC_HEADERS_DIR)/DOMElement.h \
index 1dc553f..37f31e4 100644 (file)
@@ -34,7 +34,6 @@
 #import <WebCore/GCController.h>
 #import <WebCore/IconDatabase.h>
 #import <WebCore/Node.h>
-#import <WebKit/WebFrameBridge.h>
 #import <WebKit/WebFrameInternal.h>
 
 using namespace KJS;
@@ -181,7 +180,7 @@ using namespace WebCore;
 
 - (NSString *)renderTreeAsExternalRepresentation
 {
-    return [[self _bridge] renderTreeAsExternalRepresentation];
+    return [self _renderTreeAsExternalRepresentation];
 }
 
 @end
index f45e294..2176abd 100644 (file)
@@ -30,7 +30,6 @@
 
 #import "WebDOMOperations.h"
 #import "WebFrame.h"
-#import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import "WebKitLogging.h"
 #import "WebTypesInternal.h"
index 9b4cd4f..3e40324 100644 (file)
@@ -30,7 +30,6 @@
 
 #import "WebKitStatisticsPrivate.h"
 
-int WebBridgeCount;
 int WebViewCount;
 int WebDataSourceCount;
 int WebFrameCount;
@@ -61,7 +60,8 @@ int WebFrameViewCount;
 
 + (int)bridgeCount
 {
-    return WebBridgeCount;
+    // No such thing as a bridge any more. Just return 0.
+    return 0;
 }
 
 + (int)HTMLRepresentationCount
index ed8ce6a..e69bc51 100644 (file)
@@ -26,7 +26,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-extern int WebBridgeCount;
 extern int WebViewCount;
 extern int WebDataSourceCount;
 extern int WebFrameCount;
index 7f52493..7a61050 100644 (file)
@@ -31,7 +31,6 @@
 #import "DOMRangeInternal.h"
 #import "WebDataSourcePrivate.h"
 #import "WebFrame.h"
-#import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import <WebCore/BlockExceptions.h>
 #import <WebCore/ColorMac.h>
index cdf47cc..64e7cb6 100644 (file)
@@ -29,7 +29,6 @@
 #import "WebNSPasteboardExtras.h"
 
 #import "WebArchive.h"
-#import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import "WebHTMLViewInternal.h"
 #import "WebNSURLExtras.h"
index daad708..3bc6d07 100644 (file)
@@ -32,7 +32,6 @@
 
 #import "WebDataSourceInternal.h"
 #import "WebDefaultUIDelegate.h"
-#import "WebFrameBridge.h"
 #import "WebFrameInternal.h" 
 #import "WebFrameView.h"
 #import "WebGraphicsExtras.h"
@@ -2053,7 +2052,7 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
     NSString *JSString = [URL _webkit_scriptIfJavaScriptURL];
     ASSERT(JSString);
     
-    NSString *result = [[[self webFrame] _bridge] stringByEvaluatingJavaScriptFromString:JSString forceUserGesture:[JSPluginRequest isCurrentEventUserGesture]];
+    NSString *result = [[self webFrame] _stringByEvaluatingJavaScriptFromString:JSString forceUserGesture:[JSPluginRequest isCurrentEventUserGesture]];
     
     // Don't continue if stringByEvaluatingJavaScriptFromString caused the plug-in to stop.
     if (!isStarted) {
index d8a0bee..5f732a2 100644 (file)
@@ -32,7 +32,6 @@
 #import "WebBaseNetscapePluginViewPrivate.h"
 #import "WebDataSource.h"
 #import "WebFrame.h"
-#import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import "WebFrameView.h"
 #import "WebNSURLExtras.h"
index 2e7fdb9..1d028c8 100644 (file)
@@ -35,7 +35,6 @@
 #import <WebCore/FrameLoader.h>
 #import <WebCore/NetscapePlugInStreamLoader.h>
 #import <WebKit/WebDataSourceInternal.h>
-#import <WebKit/WebFrameBridge.h>
 #import <WebKit/WebFrameInternal.h>
 #import <WebKit/WebKitErrorsPrivate.h>
 #import <WebKit/WebKitLogging.h>
index e784224..3aa289d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 #import "WebPluginContainerCheck.h"
 
-#import "WebFrame.h"
-#import "WebFrameBridge.h"
-#import "WebPluginContainer.h"
+#import "WebFrameInternal.h"
 #import "WebPluginContainerPrivate.h"
 #import "WebPluginController.h"
-#import "WebPolicyDelegate.h"
 #import "WebPolicyDelegatePrivate.h"
 #import "WebView.h"
 #import "WebViewInternal.h"
@@ -95,9 +92,9 @@ using namespace WebCore;
 
 - (BOOL)_isForbiddenFileLoad
 {
-   WebFrameBridge *bridge = [_controller bridge];
-   ASSERT(bridge);
-   if (![bridge _frame]->loader()->canLoad([_request URL], [bridge _frame]->document())) {
+   Frame* coreFrame = core([_controller webFrame]);
+   ASSERT(coreFrame);
+   if (!coreFrame->loader()->canLoad([_request URL], coreFrame->document())) {
        [self _continueWithPolicy:PolicyIgnore];
        return YES;
    }
index 4f25326..58217c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <Foundation/Foundation.h>
 #import <WebKit/WebBasePluginPackage.h>
 
+@class WebFrame;
 @class WebHTMLView;
 @class WebPluginPackage;
-@class WebFrameBridge;
 @class WebView;
 @class WebDataSource;
 
@@ -58,7 +57,7 @@
 - (void)stopAllPlugins;
 - (void)destroyAllPlugins;
 
-- (WebFrameBridge *)bridge;
+- (WebFrame *)webFrame;
 - (WebView *)webView;
 
 - (NSString *)URLPolicyCheckReferrer;
index 363911f..9638291 100644 (file)
@@ -36,7 +36,6 @@
 #import <WebCore/PlatformString.h>
 #import <WebCore/DocumentLoader.h>
 #import <WebKit/WebDataSourceInternal.h>
-#import <WebKit/WebFrameBridge.h>
 #import <WebKit/WebFrameInternal.h>
 #import <WebKit/WebFrameView.h>
 #import <WebKit/WebHTMLViewPrivate.h>
@@ -325,7 +324,7 @@ static void cancelOutstandingCheck(const void *item, void *context)
             LOG_ERROR("JavaScript requests can only be made on the frame that contains the plug-in");
             return;
         }
-        [[frame _bridge] stringByEvaluatingJavaScriptFromString:JSString];
+        [frame _stringByEvaluatingJavaScriptFromString:JSString];
     } else {
         if (!request) {
             LOG_ERROR("could not load URL %@", [request URL]);
@@ -379,11 +378,6 @@ static void cancelOutstandingCheck(const void *item, void *context)
     return [_dataSource webFrame];
 }
 
-- (WebFrameBridge *)bridge
-{
-    return [[self webFrame] _bridge];
-}
-
 - (WebView *)webView
 {
     return [[self webFrame] webView];
index 62a6675..e44fb63 100644 (file)
@@ -471,7 +471,7 @@ void WebEditorClient::textDidChangeInTextField(Element* element)
 
 static SEL selectorForKeyEvent(KeyboardEvent* event)
 {
-    // FIXME: This helper function is for the auto-fill code so the bridge can pass a selector to the form delegate.  
+    // FIXME: This helper function is for the auto-fill code so we can pass a selector to the form delegate.  
     // Eventually, we should move all of the auto-fill code down to WebKit and remove the need for this function by
     // not relying on the selector in the new implementation.
     // The key identifiers are from <http://www.w3.org/TR/DOM-Level-3-Events/keyset.html#KeySet-Set>
diff --git a/WebKit/mac/WebCoreSupport/WebFrameBridge.h b/WebKit/mac/WebCoreSupport/WebFrameBridge.h
deleted file mode 100644 (file)
index 070111f..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <WebCore/WebCoreFrameBridge.h>
-
-@class WebFrame;
-
-@interface WebFrameBridge : WebCoreFrameBridge {
-@public
-    WebFrame *_webFrame;
-}
-- (void)setWebFrame:(WebFrame *)webFrame;
-- (WebFrame *)webFrame;
-@end
diff --git a/WebKit/mac/WebCoreSupport/WebFrameBridge.mm b/WebKit/mac/WebCoreSupport/WebFrameBridge.mm
deleted file mode 100644 (file)
index 9d90581..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "WebFrameBridge.h"
-
-#import "WebFrame.h"
-
-@implementation WebFrameBridge
-
-- (void)setWebFrame:(WebFrame *)webFrame;
-{
-    _webFrame = webFrame;
-}
-
-- (WebFrame *)webFrame
-{
-    return _webFrame;
-}
-
-@end
index c8b1887..8a51e5d 100644 (file)
@@ -44,7 +44,6 @@
 #import "WebDynamicScrollBarsViewInternal.h"
 #import "WebElementDictionary.h"
 #import "WebFormDelegate.h"
-#import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import "WebFrameLoadDelegate.h"
 #import "WebFrameViewInternal.h"
@@ -145,7 +144,6 @@ WebFrameLoaderClient::WebFrameLoaderClient(WebFrame *webFrame)
 
 void WebFrameLoaderClient::frameLoaderDestroyed()
 {
-    ASSERT(!m_webFrame->_private->bridge);
     delete this;
 }
 
@@ -212,8 +210,6 @@ void WebFrameLoaderClient::detachedFromParent3()
 
 void WebFrameLoaderClient::detachedFromParent4()
 {
-    [m_webFrame->_private->bridge close];
-    m_webFrame->_private->bridge = nil;
 }
 
 void WebFrameLoaderClient::download(ResourceHandle* handle, const ResourceRequest& request, const ResourceRequest& initialRequest, const ResourceResponse& response)
@@ -908,8 +904,8 @@ void WebFrameLoaderClient::prepareForDataSourceReplacement()
     
     // Make sure that any work that is triggered by resigning first reponder can get done.
     // The main example where this came up is the textDidEndEditing that is sent to the
-    // FormsDelegate (3223413).  We need to do this before _detachChildren, since that will
-    // remove the views as a side-effect of freeing the bridge, at which point we can't
+    // FormsDelegate (3223413). We need to do this before _detachChildren, since that will
+    // remove the views as a side-effect of freeing the frame, at which point we can't
     // post the FormDelegate messages.
     //
     // Note that this can also take FirstResponder away from a child of our frameView that
index 71db114..937f1c8 100644 (file)
@@ -29,7 +29,6 @@
 #import <WebKit/WebViewFactory.h>
 
 #import <JavaScriptCore/Assertions.h>
-#import <WebKit/WebFrameBridge.h>
 #import <WebKit/WebFrameInternal.h>
 #import <WebKit/WebViewInternal.h>
 #import <WebKit/WebHTMLViewInternal.h>
index 19d5f1c..aaa6db2 100644 (file)
@@ -33,7 +33,6 @@
 #import "WebDataSource.h"
 #import "WebDocument.h"
 #import "WebFrame.h"
-#import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import "WebResource.h"
 #import <JavaScriptCore/Assertions.h>
@@ -137,19 +136,17 @@ using namespace WebCore;
 
 + (WebArchive *)archiveRange:(DOMRange *)range
 {
-    WebFrameBridge *bridge = [range _bridge];
-    WebFrame *frame = [bridge webFrame];
+    WebFrame *frame = [[[range startContainer] ownerDocument] webFrame];
     NSArray *nodes;
-    NSString *markupString = [bridge markupStringFromRange:range nodes:&nodes];
+    NSString *markupString = [frame _markupStringFromRange:range nodes:&nodes];
     return [self _archiveWithMarkupString:markupString fromFrame:frame nodes:nodes];
 }
 
 + (WebArchive *)archiveNode:(DOMNode *)node
 {
     WebFrame *frame = [[node ownerDocument] webFrame];
-    WebFrameBridge *bridge = [frame _bridge];
     NSArray *nodes;
-    NSString *markupString = [bridge markupStringFromNode:node nodes:&nodes];
+    NSString *markupString = [frame _markupStringFromNode:node nodes:&nodes];
     return [self _archiveWithMarkupString:markupString fromFrame:frame nodes:nodes];
 }
 
@@ -159,9 +156,8 @@ using namespace WebCore;
     if (!coreFrame)
         return nil;
 
-    WebFrameBridge *bridge = [frame _bridge];
     NSArray *nodes;
-    NSString *markupString = [bridge markupStringFromRange:kit(coreFrame->selectionController()->toRange().get()) nodes:&nodes];
+    NSString *markupString = [frame _markupStringFromRange:kit(coreFrame->selectionController()->toRange().get()) nodes:&nodes];
     WebArchive *archive = [self _archiveWithMarkupString:markupString fromFrame:frame nodes:nodes];
 
     if (coreFrame->isFrameSet()) {
index 7be4aff..1f735d8 100644 (file)
@@ -33,7 +33,6 @@
 #import "WebDataSourceInternal.h"
 #import "WebDocument.h"
 #import "WebDocumentLoaderMac.h"
-#import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import "WebFrameLoadDelegate.h"
 #import "WebFrameLoaderClient.h"
@@ -248,7 +247,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
 {
     DOMDocumentFragment *fragment = [self _documentFragmentWithArchive:archive];
     if (fragment)
-        [[self _bridge] replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:NO matchStyle:NO];
+        [[self webFrame] _replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:NO matchStyle:NO];
 }
 
 - (DOMDocumentFragment *)_documentFragmentWithArchive:(WebArchive *)archive
@@ -261,7 +260,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
             NSString *markupString = [[NSString alloc] initWithData:[mainResource data] encoding:NSUTF8StringEncoding];
             // FIXME: seems poor form to do this as a side effect of getting a document fragment
             [self _addToUnarchiveState:archive];
-            DOMDocumentFragment *fragment = [[self _bridge] documentFragmentWithMarkupString:markupString baseURLString:[[mainResource URL] _web_originalDataAsString]];
+            DOMDocumentFragment *fragment = [[self webFrame] _documentFragmentWithMarkupString:markupString baseURLString:[[mainResource URL] _web_originalDataAsString]];
             [markupString release];
             return fragment;
         } else if (MIMETypeRegistry::isSupportedImageMIMEType(MIMEType)) {
@@ -312,12 +311,6 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
     return [_private->unarchivingState popSubframeArchiveWithFrameName:frameName];
 }
 
-- (WebFrameBridge *)_bridge
-{
-    ASSERT(_private->loader->isCommitted());
-    return [[self webFrame] _bridge];
-}
-
 - (WebView *)_webView
 {
     return [[self webFrame] webView];
@@ -491,7 +484,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
 
     NSArray *datas;
     NSArray *responses;
-    [[self _bridge] getAllResourceDatas:&datas andResponses:&responses];
+    [[self webFrame] _getAllResourceDatas:&datas andResponses:&responses];
     ASSERT([datas count] == [responses count]);
 
     NSMutableArray *subresources = [[NSMutableArray alloc] initWithCapacity:[datas count]];
@@ -510,7 +503,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
 
     NSData *data;
     NSURLResponse *response;
-    if (![[self _bridge] getData:&data andResponse:&response forURL:[URL _web_originalDataAsString]])
+    if (![[self webFrame] _getData:&data andResponse:&response forURL:[URL _web_originalDataAsString]])
         return [self _archivedSubresourceForURL:URL];
 
     return [[[WebResource alloc] _initWithData:data URL:URL response:response] autorelease];
index 94a6fd1..8caad1b 100644 (file)
@@ -41,10 +41,7 @@ class WebDocumentLoaderMac;
 
 @class DOMDocumentFragment;
 @class DOMElement;
-@class NSError;
-@class NSURL;
 @class WebArchive;
-@class WebFrameBridge;
 @class WebResource;
 @class WebView;
 
@@ -55,7 +52,6 @@ class WebDocumentLoaderMac;
 - (void)_makeRepresentation;
 - (BOOL)_isDocumentHTML;
 - (WebView *)_webView;
-- (WebFrameBridge *)_bridge;
 - (WebArchive *)_popSubframeArchiveWithName:(NSString *)frameName;
 - (NSURL *)_URL;
 - (DOMElement *)_imageElementWithImageResource:(WebResource *)resource;
index 50933e6..45ed4d7 100644 (file)
 #import "WebFrameInternal.h"
 
 #import "DOMCSSStyleDeclarationInternal.h"
+#import "DOMDocumentFragmentInternal.h"
 #import "DOMDocumentInternal.h"
 #import "DOMElementInternal.h"
 #import "DOMHTMLElementInternal.h"
 #import "DOMNodeInternal.h"
 #import "DOMRangeInternal.h"
-#import "WebBackForwardList.h"
 #import "WebChromeClient.h"
-#import "WebScriptDebugger.h"
 #import "WebDataSourceInternal.h"
-#import "WebDocumentInternal.h"
 #import "WebDocumentLoaderMac.h"
-#import "WebFrameBridge.h"
-#import "WebFrameLoadDelegate.h"
 #import "WebFrameLoaderClient.h"
 #import "WebFrameViewInternal.h"
 #import "WebHTMLViewInternal.h"
-#import "WebHistoryItem.h"
-#import "WebHistoryItemInternal.h"
-#import "WebHistoryItemPrivate.h"
 #import "WebKitLogging.h"
 #import "WebKitStatisticsPrivate.h"
 #import "WebNSURLExtras.h"
-#import "WebNSURLRequestExtras.h"
-#import "WebNetscapePluginEmbeddedView.h"
-#import "WebNullPluginView.h"
-#import "WebPlugin.h"
-#import "WebPluginController.h"
-#import "WebPreferencesPrivate.h"
+#import "WebScriptDebugger.h"
 #import "WebViewInternal.h"
-#import <WebCore/Chrome.h>
+#import <JavaScriptCore/APICast.h>
+#import <JavaScriptCore/array_object.h>
+#import <JavaScriptCore/date_object.h>
+#import <WebCore/AXObjectCache.h>
 #import <WebCore/ColorMac.h>
-#import <WebCore/Document.h>
-#import <WebCore/Event.h>
-#import <WebCore/FrameLoader.h>
+#import <WebCore/DOMImplementation.h>
+#import <WebCore/DocLoader.h>
+#import <WebCore/DocumentFragment.h>
+#import <WebCore/Editor.h>
+#import <WebCore/EventHandler.h>
 #import <WebCore/Frame.h>
+#import <WebCore/FrameLoader.h>
 #import <WebCore/FrameTree.h>
-#import <WebCore/HistoryItem.h>
-#import <WebCore/HTMLFormElement.h>
+#import <WebCore/GraphicsContext.h>
 #import <WebCore/HTMLFrameOwnerElement.h>
+#import <WebCore/HTMLInputElement.h>
+#import <WebCore/HistoryItem.h>
+#import <WebCore/HitTestResult.h>
 #import <WebCore/Page.h>
-#import <WebCore/SelectionController.h>
-#import <WebCore/SharedBuffer.h>
-#import <WebCore/FormState.h>
-#import <WebCore/ResourceRequest.h>
-#import <WebCore/kjs_binding.h>
+#import <WebCore/PluginData.h>
+#import <WebCore/RenderTreeAsText.h>
+#import <WebCore/RenderView.h>
+#import <WebCore/RenderWidget.h>
+#import <WebCore/ReplaceSelectionCommand.h>
+#import <WebCore/SimpleFontData.h>
+#import <WebCore/SmartReplace.h>
+#import <WebCore/SystemTime.h>
+#import <WebCore/TextIterator.h>
+#import <WebCore/TextResourceDecoder.h>
+#import <WebCore/TypingCommand.h>
+#import <WebCore/htmlediting.h>
 #import <WebCore/kjs_proxy.h>
-#import <WebKit/DOMDocument.h>
-#import <WebKit/DOMElement.h>
-#import <WebKit/DOMHTMLElement.h>
-#import <WebKit/DOMNode.h>
-#import <WebKit/DOMRange.h>
-#import <JavaScriptCore/APICast.h>
+#import <WebCore/markup.h>
+#import <WebCore/visible_units.h>
 
+using namespace std;
 using namespace WebCore;
+using namespace HTMLNames;
+
+using KJS::ArrayInstance;
+using KJS::BooleanType;
+using KJS::DateInstance;
+using KJS::ExecState;
+using KJS::GetterSetterType;
+using KJS::JSGlobalObject;
+using KJS::JSLock;
+using KJS::JSObject;
+using KJS::JSValue;
+using KJS::NullType;
+using KJS::NumberType;
+using KJS::ObjectType;
+using KJS::StringType;
+using KJS::UndefinedType;
+using KJS::UnspecifiedType;
 
 /*
 Here is the current behavior matrix for four types of navigations:
@@ -116,18 +133,10 @@ Repeat load of the same URL (by any other means of navigation other than the rel
  Add to back/forward list: NO
 */
 
-using namespace WebCore;
-
 NSString *WebPageCacheEntryDateKey = @"WebPageCacheEntryDateKey";
 NSString *WebPageCacheDataSourceKey = @"WebPageCacheDataSourceKey";
 NSString *WebPageCacheDocumentViewKey = @"WebPageCacheDocumentViewKey";
 
-@interface WebFrame (ForwardDecls)
-- (void)_loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL unreachableURL:(NSURL *)unreachableURL;
-- (WebHistoryItem *)_createItem:(BOOL)useOriginal;
-- (WebHistoryItem *)_createItemTreeWithTargetFrame:(WebFrame *)targetFrame clippedAtTarget:(BOOL)doClip;
-@end
-
 @interface NSView (WebFramePluginHosting)
 - (void)setWebFrame:(WebFrame *)webFrame;
 @end
@@ -136,7 +145,6 @@ NSString *WebPageCacheDocumentViewKey = @"WebPageCacheDocumentViewKey";
 
 - (void)dealloc
 {
-    [bridge release];
     [webFrameView release];
 
     delete scriptDebugger;
@@ -247,13 +255,7 @@ EditableLinkBehavior core(WebKitEditableLinkBehavior editableLinkBehavior)
 
 Frame* core(WebFrame *frame)
 {
-    if (!frame)
-        return 0;
-    
-    if (!frame->_private->bridge)
-        return 0;
-
-    return frame->_private->bridge->m_frame;
+    return frame ? frame->_private->coreFrame : 0;
 }
 
 WebFrame *kit(Frame* frame)
@@ -281,16 +283,12 @@ WebView *getWebView(WebFrame *webFrame)
 
 + (PassRefPtr<Frame>)_createFrameWithPage:(Page*)page frameName:(const String&)name frameView:(WebFrameView *)frameView ownerElement:(HTMLFrameOwnerElement*)ownerElement
 {
-    ++WebBridgeCount;
-
     WebView *webView = kit(page);
 
-    WebFrameBridge *bridge = [[WebFrameBridge alloc] init];
-    WebFrame *frame = [[self alloc] _initWithWebFrameView:frameView webView:webView bridge:bridge];
+    WebFrame *frame = [[self alloc] _initWithWebFrameView:frameView webView:webView];
     RefPtr<Frame> coreFrame = new Frame(page, ownerElement, new WebFrameLoaderClient(frame));
     [frame release];
-    [bridge setWebCoreFrame:coreFrame.get()];
-    [bridge release];
+    frame->_private->coreFrame = coreFrame.get();
 
     coreFrame->tree()->setName(name);
     coreFrame->init();
@@ -322,11 +320,6 @@ WebView *getWebView(WebFrame *webFrame)
     return FrameLoader::timeOfLastCompletedLoad() - kCFAbsoluteTimeIntervalSince1970;
 }
 
-- (WebFrameBridge *)_bridge
-{
-    return _private->bridge;
-}
-
 - (void)_loadURL:(NSURL *)URL referrer:(NSString *)referrer intoChild:(WebFrame *)childFrame
 {
     ASSERT(childFrame);
@@ -400,7 +393,7 @@ WebView *getWebView(WebFrame *webFrame)
     if (_private->scriptDebugger)
         return;
 
-    KJS::JSGlobalObject* globalObject = core(self)->scriptProxy()->globalObject();
+    JSGlobalObject* globalObject = core(self)->scriptProxy()->globalObject();
     if (!globalObject)
         return;
 
@@ -416,21 +409,21 @@ WebView *getWebView(WebFrame *webFrame)
     _private->scriptDebugger = 0;
 }
 
-- (id)_initWithWebFrameView:(WebFrameView *)fv webView:(WebView *)v bridge:(WebFrameBridge *)bridge
+- (id)_initWithWebFrameView:(WebFrameView *)fv webView:(WebView *)v
 {
     self = [super init];
     if (!self)
         return nil;
 
     _private = [[WebFramePrivate alloc] init];
-    _private->bridge = [bridge retain];
-    [bridge setWebFrame:self];
 
     if (fv) {
         [_private setWebFrameView:fv];
         [fv _setWebFrame:self];
     }
 
+    _private->shouldCreateRenderers = YES;
+
     ++WebFrameCount;
 
     return self;
@@ -456,7 +449,6 @@ WebView *getWebView(WebFrame *webFrame)
     Frame* coreFrame = core(self);
     for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
         WebFrame *webFrame = kit(frame);
-        WebFrameBridge *bridge = [webFrame _bridge];
         // 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)
@@ -467,8 +459,8 @@ WebView *getWebView(WebFrame *webFrame)
             [documentView setDrawsBackground:drawsBackground];
         if ([documentView respondsToSelector:@selector(setBackgroundColor:)])
             [documentView setBackgroundColor:backgroundColor];
-        [bridge setDrawsBackground:drawsBackground];
-        [bridge setBaseBackgroundColor:backgroundColor];
+        [self _setDrawsBackground:drawsBackground];
+        [self _setBaseBackgroundColor:backgroundColor];
     }
 }
 
@@ -629,6 +621,961 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
 }
 #endif
 
+static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue* jsValue)
+{
+    NSAppleEventDescriptor* aeDesc = 0;
+    switch (jsValue->type()) {
+        case BooleanType:
+            aeDesc = [NSAppleEventDescriptor descriptorWithBoolean:jsValue->getBoolean()];
+            break;
+        case StringType:
+            aeDesc = [NSAppleEventDescriptor descriptorWithString:String(jsValue->getString())];
+            break;
+        case NumberType: {
+            double value = jsValue->getNumber();
+            int intValue = (int)value;
+            if (value == intValue)
+                aeDesc = [NSAppleEventDescriptor descriptorWithDescriptorType:typeSInt32 bytes:&intValue length:sizeof(intValue)];
+            else
+                aeDesc = [NSAppleEventDescriptor descriptorWithDescriptorType:typeIEEE64BitFloatingPoint bytes:&value length:sizeof(value)];
+            break;
+        }
+        case ObjectType: {
+            JSObject* object = jsValue->getObject();
+            if (object->inherits(&DateInstance::info)) {
+                DateInstance* date = static_cast<DateInstance*>(object);
+                double ms = 0;
+                int tzOffset = 0;
+                if (date->getTime(ms, tzOffset)) {
+                    CFAbsoluteTime utcSeconds = ms / 1000 - kCFAbsoluteTimeIntervalSince1970;
+                    LongDateTime ldt;
+                    if (noErr == UCConvertCFAbsoluteTimeToLongDateTime(utcSeconds, &ldt))
+                        aeDesc = [NSAppleEventDescriptor descriptorWithDescriptorType:typeLongDateTime bytes:&ldt length:sizeof(ldt)];
+                }
+            }
+            else if (object->inherits(&ArrayInstance::info)) {
+                static HashSet<JSObject*> visitedElems;
+                if (!visitedElems.contains(object)) {
+                    visitedElems.add(object);
+                    
+                    ArrayInstance* array = static_cast<ArrayInstance*>(object);
+                    aeDesc = [NSAppleEventDescriptor listDescriptor];
+                    unsigned numItems = array->getLength();
+                    for (unsigned i = 0; i < numItems; ++i)
+                        [aeDesc insertDescriptor:aeDescFromJSValue(exec, array->getItem(i)) atIndex:0];
+                    
+                    visitedElems.remove(object);
+                }
+            }
+            if (!aeDesc) {
+                JSValue* primitive = object->toPrimitive(exec);
+                if (exec->hadException()) {
+                    exec->clearException();
+                    return [NSAppleEventDescriptor nullDescriptor];
+                }
+                return aeDescFromJSValue(exec, primitive);
+            }
+            break;
+        }
+        case UndefinedType:
+            aeDesc = [NSAppleEventDescriptor descriptorWithTypeCode:cMissingValue];
+            break;
+        default:
+            LOG_ERROR("Unknown JavaScript type: %d", jsValue->type());
+            // no break;
+        case UnspecifiedType:
+        case NullType:
+        case GetterSetterType:
+            aeDesc = [NSAppleEventDescriptor nullDescriptor];
+            break;
+    }
+    
+    return aeDesc;
+}
+
+- (NSString *)_domain
+{
+    Document *doc = _private->coreFrame->document();
+    if (doc)
+        return doc->domain();
+    return nil;
+}
+
+- (void)_addData:(NSData *)data
+{
+    Document *doc = _private->coreFrame->document();
+    
+    // Document may be nil if the part is about to redirect
+    // as a result of JS executing during load, i.e. one frame
+    // changing another's location before the frame's document
+    // has been created. 
+    if (doc) {
+        doc->setShouldCreateRenderers(_private->shouldCreateRenderers);
+        _private->coreFrame->loader()->addData((const char *)[data bytes], [data length]);
+    }
+}
+
+- (NSString *)_stringWithDocumentTypeStringAndMarkupString:(NSString *)markupString
+{
+    return _private->coreFrame->documentTypeString() + markupString;
+}
+
+- (NSArray *)_nodesFromList:(Vector<Node*> *)nodesVector
+{
+    size_t size = nodesVector->size();
+    NSMutableArray *nodes = [NSMutableArray arrayWithCapacity:size];
+    for (size_t i = 0; i < size; ++i)
+        [nodes addObject:[DOMNode _wrapNode:(*nodesVector)[i]]];
+    return nodes;
+}
+
+- (NSString *)_markupStringFromNode:(DOMNode *)node nodes:(NSArray **)nodes
+{
+    // FIXME: This is never "for interchange". Is that right? See the next method.
+    Vector<Node*> nodeList;
+    NSString *markupString = createMarkup([node _node], IncludeNode, nodes ? &nodeList : 0);
+    if (nodes)
+        *nodes = [self _nodesFromList:&nodeList];
+
+    return [self _stringWithDocumentTypeStringAndMarkupString:markupString];
+}
+
+- (NSString *)_markupStringFromRange:(DOMRange *)range nodes:(NSArray **)nodes
+{
+    // FIXME: This is always "for interchange". Is that right? See the previous method.
+    Vector<Node*> nodeList;
+    NSString *markupString = createMarkup([range _range], nodes ? &nodeList : 0, AnnotateForInterchange);
+    if (nodes)
+        *nodes = [self _nodesFromList:&nodeList];
+
+    return [self _stringWithDocumentTypeStringAndMarkupString:markupString];
+}
+
+- (NSString *)_selectedString
+{
+    String text = _private->coreFrame->selectedText();
+    text.replace('\\', _private->coreFrame->backslashAsCurrencySymbol());
+    return text;
+}
+
+- (NSString *)_stringForRange:(DOMRange *)range
+{
+    // This will give a system malloc'd buffer that can be turned directly into an NSString
+    unsigned length;
+    UChar* buf = plainTextToMallocAllocatedBuffer([range _range], length);
+    
+    if (!buf)
+        return [NSString string];
+    
+    UChar backslashAsCurrencySymbol = _private->coreFrame->backslashAsCurrencySymbol();
+    if (backslashAsCurrencySymbol != '\\')
+        for (unsigned n = 0; n < length; n++) 
+            if (buf[n] == '\\')
+                buf[n] = backslashAsCurrencySymbol;
+
+    // Transfer buffer ownership to NSString
+    return [[[NSString alloc] initWithCharactersNoCopy:buf length:length freeWhenDone:YES] autorelease];
+}
+
+- (void)_forceLayoutAdjustingViewSize:(BOOL)flag
+{
+    _private->coreFrame->forceLayout(!flag);
+    if (flag)
+        _private->coreFrame->view()->adjustViewSize();
+}
+
+- (void)_forceLayoutWithMinimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustingViewSize:(BOOL)flag
+{
+    _private->coreFrame->forceLayoutWithPageWidthRange(minPageWidth, maxPageWidth, flag);
+}
+
+- (void)_sendScrollEvent
+{
+    _private->coreFrame->sendScrollEvent();
+}
+
+- (void)_drawRect:(NSRect)rect
+{
+    PlatformGraphicsContext* platformContext = static_cast<PlatformGraphicsContext*>([[NSGraphicsContext currentContext] graphicsPort]);
+    ASSERT([[NSGraphicsContext currentContext] isFlipped]);
+    GraphicsContext context(platformContext);
+    
+    _private->coreFrame->paint(&context, enclosingIntRect(rect));
+}
+
+// Used by pagination code called from AppKit when a standalone web page is printed.
+- (NSArray*)_computePageRectsWithPrintWidthScaleFactor:(float)printWidthScaleFactor printHeight:(float)printHeight
+{
+    NSMutableArray* pages = [NSMutableArray arrayWithCapacity:5];
+    if (printWidthScaleFactor <= 0) {
+        LOG_ERROR("printWidthScaleFactor has bad value %.2f", printWidthScaleFactor);
+        return pages;
+    }
+    
+    if (printHeight <= 0) {
+        LOG_ERROR("printHeight has bad value %.2f", printHeight);
+        return pages;
+    }
+
+    if (!_private->coreFrame || !_private->coreFrame->document() || !_private->coreFrame->view()) return pages;
+    RenderView* root = static_cast<RenderView *>(_private->coreFrame->document()->renderer());
+    if (!root) return pages;
+    
+    FrameView* view = _private->coreFrame->view();
+    if (!view)
+        return pages;
+
+    NSView* documentView = view->documentView();
+    if (!documentView)
+        return pages;
+
+    float currPageHeight = printHeight;
+    float docHeight = root->layer()->height();
+    float docWidth = root->layer()->width();
+    float printWidth = docWidth/printWidthScaleFactor;
+    
+    // We need to give the part the opportunity to adjust the page height at each step.
+    for (float i = 0; i < docHeight; i += currPageHeight) {
+        float proposedBottom = min(docHeight, i + printHeight);
+        _private->coreFrame->adjustPageHeight(&proposedBottom, i, proposedBottom, i);
+        currPageHeight = max(1.0f, proposedBottom - i);
+        for (float j = 0; j < docWidth; j += printWidth) {
+            NSValue* val = [NSValue valueWithRect: NSMakeRect(j, i, printWidth, currPageHeight)];
+            [pages addObject: val];
+        }
+    }
+    
+    return pages;
+}
+
+// This is to support the case where a webview is embedded in the view that's being printed
+- (void)_adjustPageHeightNew:(float *)newBottom top:(float)oldTop bottom:(float)oldBottom limit:(float)bottomLimit
+{
+    _private->coreFrame->adjustPageHeight(newBottom, oldTop, oldBottom, bottomLimit);
+}
+
+- (NSObject *)_copyRenderNode:(RenderObject *)node copier:(id <WebCoreRenderTreeCopier>)copier
+{
+    NSMutableArray *children = [[NSMutableArray alloc] init];
+    for (RenderObject *child = node->firstChild(); child; child = child->nextSibling()) {
+        [children addObject:[self _copyRenderNode:child copier:copier]];
+    }
+          
+    NSString *name = [[NSString alloc] initWithUTF8String:node->renderName()];
+    
+    RenderWidget* renderWidget = node->isWidget() ? static_cast<RenderWidget*>(node) : 0;
+    Widget* widget = renderWidget ? renderWidget->widget() : 0;
+    NSView *view = widget ? widget->getView() : nil;
+    
+    int nx, ny;
+    node->absolutePosition(nx, ny);
+    NSObject *copiedNode = [copier nodeWithName:name
+                                       position:NSMakePoint(nx,ny)
+                                           rect:NSMakeRect(node->xPos(), node->yPos(), node->width(), node->height())
+                                           view:view
+                                       children:children];
+    
+    [name release];
+    [children release];
+    
+    return copiedNode;
+}
+
+- (NSObject *)_copyRenderTree:(id <WebCoreRenderTreeCopier>)copier
+{
+    RenderObject *renderer = _private->coreFrame->renderer();
+    if (!renderer) {
+        return nil;
+    }
+    return [self _copyRenderNode:renderer copier:copier];
+}
+
+static HTMLInputElement* inputElementFromDOMElement(DOMElement* element)
+{
+    Node* node = [element _node];
+    if (node->hasTagName(inputTag))
+        return static_cast<HTMLInputElement*>(node);
+    return nil;
+}
+
+static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
+{
+    Node *node = [element _node];
+    // This should not be necessary, but an XSL file on
+    // maps.google.com crashes otherwise because it is an xslt file
+    // that contains <form> elements that aren't in any namespace, so
+    // they come out as generic CML elements
+    if (node && node->hasTagName(formTag)) {
+        return static_cast<HTMLFormElement *>(node);
+    }
+    return nil;
+}
+
+- (DOMElement *)_elementWithName:(NSString *)name inForm:(DOMElement *)form
+{
+    HTMLFormElement *formElement = formElementFromDOMElement(form);
+    if (formElement) {
+        Vector<HTMLGenericFormElement*>& elements = formElement->formElements;
+        AtomicString targetName = name;
+        for (unsigned int i = 0; i < elements.size(); i++) {
+            HTMLGenericFormElement *elt = elements[i];
+            // Skip option elements, other duds
+            if (elt->name() == targetName)
+                return [DOMElement _wrapElement:elt];
+        }
+    }
+    return nil;
+}
+
+- (BOOL)_elementDoesAutoComplete:(DOMElement *)element
+{
+    HTMLInputElement *inputElement = inputElementFromDOMElement(element);
+    return inputElement != nil
+        && inputElement->inputType() == HTMLInputElement::TEXT
+        && inputElement->autoComplete();
+}
+
+- (BOOL)_elementIsPassword:(DOMElement *)element
+{
+    HTMLInputElement *inputElement = inputElementFromDOMElement(element);
+    return inputElement != nil
+        && inputElement->inputType() == HTMLInputElement::PASSWORD;
+}
+
+- (DOMElement *)_formForElement:(DOMElement *)element;
+{
+    HTMLInputElement *inputElement = inputElementFromDOMElement(element);
+    if (inputElement) {
+        HTMLFormElement *formElement = inputElement->form();
+        if (formElement) {
+            return [DOMElement _wrapElement:formElement];
+        }
+    }
+    return nil;
+}
+
+- (DOMElement *)_currentForm
+{
+    return [DOMElement _wrapElement:_private->coreFrame->currentForm()];
+}
+
+- (NSArray *)_controlsInForm:(DOMElement *)form
+{
+    NSMutableArray *results = nil;
+    HTMLFormElement *formElement = formElementFromDOMElement(form);
+    if (formElement) {
+        Vector<HTMLGenericFormElement*>& elements = formElement->formElements;
+        for (unsigned int i = 0; i < elements.size(); i++) {
+            if (elements.at(i)->isEnumeratable()) { // Skip option elements, other duds
+                DOMElement *de = [DOMElement _wrapElement:elements.at(i)];
+                if (!results) {
+                    results = [NSMutableArray arrayWithObject:de];
+                } else {
+                    [results addObject:de];
+                }
+            }
+        }
+    }
+    return results;
+}
+
+- (NSString *)_searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element
+{
+    return _private->coreFrame->searchForLabelsBeforeElement(labels, [element _element]);
+}
+
+- (NSString *)_matchLabels:(NSArray *)labels againstElement:(DOMElement *)element
+{
+    return _private->coreFrame->matchLabelsAgainstElement(labels, [element _element]);
+}
+
+- (NSURL *)_URLWithAttributeString:(NSString *)string
+{
+    Document* doc = _private->coreFrame->document();
+    if (!doc)
+        return nil;
+    // FIXME: is parseURL appropriate here?
+    return doc->completeURL(parseURL(string));
+}
+
+- (BOOL)_searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag startInSelection:(BOOL)startInSelection
+{
+    return _private->coreFrame->findString(string, forward, caseFlag, wrapFlag, startInSelection);
+}
+
+- (unsigned)_markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(unsigned)limit
+{
+    return _private->coreFrame->markAllMatchesForText(string, caseFlag, limit);
+}
+
+- (BOOL)_markedTextMatchesAreHighlighted
+{
+    return _private->coreFrame->markedTextMatchesAreHighlighted();
+}
+
+- (void)_setMarkedTextMatchesAreHighlighted:(BOOL)doHighlight
+{
+    _private->coreFrame->setMarkedTextMatchesAreHighlighted(doHighlight);
+}
+
+- (void)_unmarkAllTextMatches
+{
+    Document *doc = _private->coreFrame->document();
+    if (!doc) {
+        return;
+    }
+    doc->removeMarkers(DocumentMarker::TextMatch);
+}
+
+- (NSArray *)_rectsForTextMatches
+{
+    Document *doc = _private->coreFrame->document();
+    if (!doc)
+        return [NSArray array];
+    
+    NSMutableArray *result = [NSMutableArray array];
+    Vector<IntRect> rects = doc->renderedRectsForMarkers(DocumentMarker::TextMatch);
+    unsigned count = rects.size();
+    for (unsigned index = 0; index < count; ++index)
+        [result addObject:[NSValue valueWithRect:rects[index]]];
+    
+    return result;
+}
+
+- (NSString *)_stringByEvaluatingJavaScriptFromString:(NSString *)string
+{
+    return [self _stringByEvaluatingJavaScriptFromString:string forceUserGesture:true];
+}
+
+- (NSString *)_stringByEvaluatingJavaScriptFromString:(NSString *)string forceUserGesture:(BOOL)forceUserGesture
+{
+    ASSERT(_private->coreFrame->document());
+    
+    JSValue* result = _private->coreFrame->loader()->executeScript(string, forceUserGesture);
+
+    if (!_private->coreFrame) // In case the script removed our frame from the page.
+        return @"";
+
+    // This bizarre set of rules matches behavior from WebKit for Safari 2.0.
+    // If you don't like it, use -[WebScriptObject evaluateWebScript:] or 
+    // JSEvaluateScript instead, since they have less surprising semantics.
+    if (!result || !result->isBoolean() && !result->isString() && !result->isNumber())
+        return @"";
+
+    JSLock lock;
+    return String(result->toString(_private->coreFrame->scriptProxy()->globalObject()->globalExec()));
+}
+
+- (NSAppleEventDescriptor *)_aeDescByEvaluatingJavaScriptFromString:(NSString *)string
+{
+    ASSERT(_private->coreFrame->document());
+    ASSERT(_private->coreFrame == _private->coreFrame->page()->mainFrame());
+    JSValue* result = _private->coreFrame->loader()->executeScript(string, true);
+    if (!result) // FIXME: pass errors
+        return 0;
+    JSLock lock;
+    return aeDescFromJSValue(_private->coreFrame->scriptProxy()->globalObject()->globalExec(), result);
+}
+
+- (NSRect)_caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity
+{
+    return [node _node]->renderer()->caretRect(offset, static_cast<EAffinity>(affinity));
+}
+
+- (NSRect)_firstRectForDOMRange:(DOMRange *)range
+{
+   return _private->coreFrame->firstRectForRange([range _range]);
+}
+
+- (void)_scrollDOMRangeToVisible:(DOMRange *)range
+{
+    NSRect rangeRect = [self _firstRectForDOMRange:range];    
+    Node *startNode = [[range startContainer] _node];
+        
+    if (startNode && startNode->renderer()) {
+        RenderLayer *layer = startNode->renderer()->enclosingLayer();
+        if (layer)
+            layer->scrollRectToVisible(enclosingIntRect(rangeRect), RenderLayer::gAlignToEdgeIfNeeded, RenderLayer::gAlignToEdgeIfNeeded);
+    }
+}
+
+- (NSURL *)_baseURL
+{
+    return _private->coreFrame->document()->baseURL();
+}
+
+- (NSString *)_stringWithData:(NSData *)data
+{
+    Document* doc = _private->coreFrame->document();
+    if (!doc)
+        return nil;
+    TextResourceDecoder* decoder = doc->decoder();
+    if (!decoder)
+        return nil;
+    return decoder->encoding().decode(reinterpret_cast<const char*>([data bytes]), [data length]);
+}
+
++ (NSString *)_stringWithData:(NSData *)data textEncodingName:(NSString *)textEncodingName
+{
+    WebCore::TextEncoding encoding(textEncodingName);
+    if (!encoding.isValid())
+        encoding = WindowsLatin1Encoding();
+    return encoding.decode(reinterpret_cast<const char*>([data bytes]), [data length]);
+}
+
+- (BOOL)_needsLayout
+{
+    return _private->coreFrame->view() ? _private->coreFrame->view()->needsLayout() : false;
+}
+
+- (NSString *)_renderTreeAsExternalRepresentation
+{
+    return externalRepresentation(_private->coreFrame->renderer());
+}
+
+- (id)_accessibilityTree
+{
+    AXObjectCache::enableAccessibility();
+    if (!_private->coreFrame || !_private->coreFrame->document())
+        return nil;
+    RenderView* root = static_cast<RenderView *>(_private->coreFrame->document()->renderer());
+    if (!root)
+        return nil;
+    return _private->coreFrame->document()->axObjectCache()->get(root);
+}
+
+- (void)_setBaseBackgroundColor:(NSColor *)backgroundColor
+{
+    if (_private->coreFrame && _private->coreFrame->view()) {
+        Color color = colorFromNSColor([backgroundColor colorUsingColorSpaceName:NSDeviceRGBColorSpace]);
+        _private->coreFrame->view()->setBaseBackgroundColor(color);
+    }
+}
+
+- (void)_setDrawsBackground:(BOOL)drawsBackground
+{
+    if (_private->coreFrame && _private->coreFrame->view())
+        _private->coreFrame->view()->setTransparent(!drawsBackground);
+}
+
+- (DOMRange *)_rangeByAlteringCurrentSelection:(SelectionController::EAlteration)alteration direction:(SelectionController::EDirection)direction granularity:(TextGranularity)granularity
+{
+    if (_private->coreFrame->selectionController()->isNone())
+        return nil;
+
+    SelectionController selectionController;
+    selectionController.setSelection(_private->coreFrame->selectionController()->selection());
+    selectionController.modify(alteration, direction, granularity);
+    return [DOMRange _wrapRange:selectionController.toRange().get()];
+}
+
+- (TextGranularity)_selectionGranularity
+{
+    return _private->coreFrame->selectionGranularity();
+}
+
+- (NSRange)_convertToNSRange:(Range *)range
+{
+    if (!range || !range->startContainer())
+        return NSMakeRange(NSNotFound, 0);
+
+    Element* selectionRoot = _private->coreFrame->selectionController()->rootEditableElement();
+    Element* scope = selectionRoot ? selectionRoot : _private->coreFrame->document()->documentElement();
+    
+    // Mouse events may cause TSM to attempt to create an NSRange for a portion of the view
+    // that is not inside the current editable region.  These checks ensure we don't produce
+    // potentially invalid data when responding to such requests.
+    if (range->startContainer() != scope && !range->startContainer()->isDescendantOf(scope))
+        return NSMakeRange(NSNotFound, 0);
+    if (range->endContainer() != scope && !range->endContainer()->isDescendantOf(scope))
+        return NSMakeRange(NSNotFound, 0);
+    
+    RefPtr<Range> testRange = Range::create(scope->document(), scope, 0, range->startContainer(), range->startOffset());
+    ASSERT(testRange->startContainer() == scope);
+    int startPosition = TextIterator::rangeLength(testRange.get());
+
+    ExceptionCode ec;
+    testRange->setEnd(range->endContainer(), range->endOffset(), ec);
+    ASSERT(testRange->startContainer() == scope);
+    int endPosition = TextIterator::rangeLength(testRange.get());
+
+    return NSMakeRange(startPosition, endPosition - startPosition);
+}
+
+- (PassRefPtr<Range>)_convertToDOMRange:(NSRange)nsrange
+{
+    if (nsrange.location > INT_MAX)
+        return 0;
+    if (nsrange.length > INT_MAX || nsrange.location + nsrange.length > INT_MAX)
+        nsrange.length = INT_MAX - nsrange.location;
+
+    // our critical assumption is that we are only called by input methods that
+    // concentrate on a given area containing the selection
+    // We have to do this because of text fields and textareas. The DOM for those is not
+    // directly in the document DOM, so serialization is problematic. Our solution is
+    // to use the root editable element of the selection start as the positional base.
+    // That fits with AppKit's idea of an input context.
+    Element* selectionRoot = _private->coreFrame->selectionController()->rootEditableElement();
+    Element* scope = selectionRoot ? selectionRoot : _private->coreFrame->document()->documentElement();
+    return TextIterator::rangeFromLocationAndLength(scope, nsrange.location, nsrange.length);
+}
+
+- (DOMRange *)_convertNSRangeToDOMRange:(NSRange)nsrange
+{
+    return [DOMRange _wrapRange:[self _convertToDOMRange:nsrange].get()];
+}
+
+- (NSRange)_convertDOMRangeToNSRange:(DOMRange *)range
+{
+    return [self _convertToNSRange:[range _range]];
+}
+
+- (DOMRange *)_markDOMRange
+{
+    return [DOMRange _wrapRange:_private->coreFrame->mark().toRange().get()];
+}
+
+- (NSRange)_markedTextNSRange
+{
+    return [self _convertToNSRange:_private->coreFrame->editor()->compositionRange().get()];
+}
+
+// Given proposedRange, returns an extended range that includes adjacent whitespace that should
+// be deleted along with the proposed range in order to preserve proper spacing and punctuation of
+// the text surrounding the deletion.
+- (DOMRange *)_smartDeleteRangeForProposedRange:(DOMRange *)proposedRange
+{
+    Node *startContainer = [[proposedRange startContainer] _node];
+    Node *endContainer = [[proposedRange endContainer] _node];
+    if (startContainer == nil || endContainer == nil)
+        return nil;
+
+    ASSERT(startContainer->document() == endContainer->document());
+    
+    _private->coreFrame->document()->updateLayoutIgnorePendingStylesheets();
+
+    Position start(startContainer, [proposedRange startOffset]);
+    Position end(endContainer, [proposedRange endOffset]);
+    Position newStart = start.upstream().leadingWhitespacePosition(DOWNSTREAM, true);
+    if (newStart.isNull())
+        newStart = start;
+    Position newEnd = end.downstream().trailingWhitespacePosition(DOWNSTREAM, true);
+    if (newEnd.isNull())
+        newEnd = end;
+
+    newStart = rangeCompliantEquivalent(newStart);
+    newEnd = rangeCompliantEquivalent(newEnd);
+
+    RefPtr<Range> range = _private->coreFrame->document()->createRange();
+    int exception = 0;
+    range->setStart(newStart.node(), newStart.offset(), exception);
+    range->setEnd(newStart.node(), newStart.offset(), exception);
+    return [DOMRange _wrapRange:range.get()];
+}
+
+// Determines whether whitespace needs to be added around aString to preserve proper spacing and
+// punctuation when it‚Äôs inserted into the receiver‚Äôs text over charRange. Returns by reference
+// in beforeString and afterString any whitespace that should be added, unless either or both are
+// nil. Both are returned as nil if aString is nil or if smart insertion and deletion are disabled.
+- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)rangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString
+{
+    // give back nil pointers in case of early returns
+    if (beforeString)
+        *beforeString = nil;
+    if (afterString)
+        *afterString = nil;
+        
+    // inspect destination
+    Node *startContainer = [[rangeToReplace startContainer] _node];
+    Node *endContainer = [[rangeToReplace endContainer] _node];
+
+    Position startPos(startContainer, [rangeToReplace startOffset]);
+    Position endPos(endContainer, [rangeToReplace endOffset]);
+
+    VisiblePosition startVisiblePos = VisiblePosition(startPos, VP_DEFAULT_AFFINITY);
+    VisiblePosition endVisiblePos = VisiblePosition(endPos, VP_DEFAULT_AFFINITY);
+    
+    // this check also ensures startContainer, startPos, endContainer, and endPos are non-null
+    if (startVisiblePos.isNull() || endVisiblePos.isNull())
+        return;
+
+    bool addLeadingSpace = startPos.leadingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isStartOfParagraph(startVisiblePos);
+    if (addLeadingSpace)
+        if (UChar previousChar = startVisiblePos.previous().characterAfter())
+            addLeadingSpace = !isCharacterSmartReplaceExempt(previousChar, true);
+    
+    bool addTrailingSpace = endPos.trailingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isEndOfParagraph(endVisiblePos);
+    if (addTrailingSpace)
+        if (UChar thisChar = endVisiblePos.characterAfter())
+            addTrailingSpace = !isCharacterSmartReplaceExempt(thisChar, false);
+    
+    // inspect source
+    bool hasWhitespaceAtStart = false;
+    bool hasWhitespaceAtEnd = false;
+    unsigned pasteLength = [pasteString length];
+    if (pasteLength > 0) {
+        NSCharacterSet *whiteSet = [NSCharacterSet whitespaceAndNewlineCharacterSet];
+        
+        if ([whiteSet characterIsMember:[pasteString characterAtIndex:0]]) {
+            hasWhitespaceAtStart = YES;
+        }
+        if ([whiteSet characterIsMember:[pasteString characterAtIndex:(pasteLength - 1)]]) {
+            hasWhitespaceAtEnd = YES;
+        }
+    }
+    
+    // issue the verdict
+    if (beforeString && addLeadingSpace && !hasWhitespaceAtStart)
+        *beforeString = @" ";
+    if (afterString && addTrailingSpace && !hasWhitespaceAtEnd)
+        *afterString = @" ";
+}
+
+- (DOMDocumentFragment *)_documentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString 
+{
+    if (!_private->coreFrame || !_private->coreFrame->document())
+        return 0;
+
+    return [DOMDocumentFragment _wrapDocumentFragment:createFragmentFromMarkup(_private->coreFrame->document(), markupString, baseURLString).get()];
+}
+
+- (DOMDocumentFragment *)_documentFragmentWithText:(NSString *)text inContext:(DOMRange *)context
+{
+    return [DOMDocumentFragment _wrapDocumentFragment:createFragmentFromText([context _range], text).get()];
+}
+
+- (DOMDocumentFragment *)_documentFragmentWithNodesAsParagraphs:(NSArray *)nodes
+{
+    if (!_private->coreFrame || !_private->coreFrame->document())
+        return 0;
+    
+    NSEnumerator *nodeEnum = [nodes objectEnumerator];
+    Vector<Node*> nodesVector;
+    DOMNode *node;
+    while ((node = [nodeEnum nextObject]))
+        nodesVector.append([node _node]);
+    
+    return [DOMDocumentFragment _wrapDocumentFragment:createFragmentFromNodes(_private->coreFrame->document(), nodesVector).get()];
+}
+
+- (void)_replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle
+{
+    if (_private->coreFrame->selectionController()->isNone() || !fragment)
+        return;
+    
+    applyCommand(new ReplaceSelectionCommand(_private->coreFrame->document(), [fragment _documentFragment], selectReplacement, smartReplace, matchStyle));
+    _private->coreFrame->revealSelection(RenderLayer::gAlignToEdgeIfNeeded);
+}
+
+- (void)_replaceSelectionWithNode:(DOMNode *)node selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle
+{
+    DOMDocumentFragment *fragment = [DOMDocumentFragment _wrapDocumentFragment:_private->coreFrame->document()->createDocumentFragment().get()];
+    [fragment appendChild:node];
+    [self _replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:smartReplace matchStyle:matchStyle];
+}
+
+- (void)_replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace
+{
+    DOMDocumentFragment *fragment = [self _documentFragmentWithMarkupString:markupString baseURLString:baseURLString];
+    [self _replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:smartReplace matchStyle:NO];
+}
+
+- (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace
+{
+    [self _replaceSelectionWithFragment:[self _documentFragmentWithText:text
+        inContext:[DOMRange _wrapRange:_private->coreFrame->selectionController()->toRange().get()]]
+        selectReplacement:selectReplacement smartReplace:smartReplace matchStyle:YES];
+}
+
+- (void)_insertParagraphSeparatorInQuotedContent
+{
+    if (_private->coreFrame->selectionController()->isNone())
+        return;
+    
+    TypingCommand::insertParagraphSeparatorInQuotedContent(_private->coreFrame->document());
+    _private->coreFrame->revealSelection(RenderLayer::gAlignToEdgeIfNeeded);
+}
+
+- (VisiblePosition)_visiblePositionForPoint:(NSPoint)point
+{
+    IntPoint outerPoint(point);
+    HitTestResult result = _private->coreFrame->eventHandler()->hitTestResultAtPoint(outerPoint, true);
+    Node* node = result.innerNode();
+    if (!node)
+        return VisiblePosition();
+    RenderObject* renderer = node->renderer();
+    if (!renderer)
+        return VisiblePosition();
+    VisiblePosition visiblePos = renderer->positionForCoordinates(result.localPoint().x(), result.localPoint().y());
+    if (visiblePos.isNull())
+        visiblePos = VisiblePosition(Position(node, 0));
+    return visiblePos;
+}
+
+- (DOMRange *)_characterRangeAtPoint:(NSPoint)point
+{
+    VisiblePosition position = [self _visiblePositionForPoint:point];
+    if (position.isNull())
+        return nil;
+    
+    VisiblePosition previous = position.previous();
+    if (previous.isNotNull()) {
+        DOMRange *previousCharacterRange = [DOMRange _wrapRange:makeRange(previous, position).get()];
+        NSRect rect = [self _firstRectForDOMRange:previousCharacterRange];
+        if (NSPointInRect(point, rect))
+            return previousCharacterRange;
+    }
+
+    VisiblePosition next = position.next();
+    if (next.isNotNull()) {
+        DOMRange *nextCharacterRange = [DOMRange _wrapRange:makeRange(position, next).get()];
+        NSRect rect = [self _firstRectForDOMRange:nextCharacterRange];
+        if (NSPointInRect(point, rect))
+            return nextCharacterRange;
+    }
+    
+    return nil;
+}
+
+- (DOMCSSStyleDeclaration *)_typingStyle
+{
+    if (!_private->coreFrame || !_private->coreFrame->typingStyle())
+        return nil;
+    return [DOMCSSStyleDeclaration _wrapCSSStyleDeclaration:_private->coreFrame->typingStyle()->copy().get()];
+}
+
+- (void)_setTypingStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(EditAction)undoAction
+{
+    if (!_private->coreFrame)
+        return;
+    _private->coreFrame->computeAndSetTypingStyle([style _CSSStyleDeclaration], undoAction);
+}
+
+- (NSFont *)_fontForSelection:(BOOL *)hasMultipleFonts
+{
+    bool multipleFonts = false;
+    NSFont *font = nil;
+    if (_private->coreFrame) {
+        const SimpleFontData* fd = _private->coreFrame->editor()->fontForSelection(multipleFonts);
+        if (fd)
+            font = fd->getNSFont();
+    }
+    
+    if (hasMultipleFonts)
+        *hasMultipleFonts = multipleFonts;
+    return font;
+}
+
+- (void)_dragSourceMovedTo:(NSPoint)windowLoc
+{
+    if (!_private->coreFrame)
+        return;
+    FrameView* view = _private->coreFrame->view();
+    if (!view)
+        return;
+    // FIXME: These are fake modifier keys here, but they should be real ones instead.
+    PlatformMouseEvent event(IntPoint(windowLoc), globalPoint(windowLoc, [view->getView() window]),
+        LeftButton, MouseEventMoved, 0, false, false, false, false, currentTime());
+    _private->coreFrame->eventHandler()->dragSourceMovedTo(event);
+}
+
+- (void)_dragSourceEndedAt:(NSPoint)windowLoc operation:(NSDragOperation)operation
+{
+    if (!_private->coreFrame)
+        return;
+    FrameView* view = _private->coreFrame->view();
+    if (!view)
+        return;
+    // FIXME: These are fake modifier keys here, but they should be real ones instead.
+    PlatformMouseEvent event(IntPoint(windowLoc), globalPoint(windowLoc, [view->getView() window]),
+        LeftButton, MouseEventMoved, 0, false, false, false, false, currentTime());
+    _private->coreFrame->eventHandler()->dragSourceEndedAt(event, (DragOperation)operation);
+}
+
+- (BOOL)_getData:(NSData **)data andResponse:(NSURLResponse **)response forURL:(NSString *)url
+{
+    Document* doc = _private->coreFrame->document();
+    if (!doc)
+        return NO;
+
+    CachedResource* resource = doc->docLoader()->cachedResource(url);
+    if (!resource)
+        return NO;
+
+    SharedBuffer* buffer = resource->data();
+    if (buffer)
+        *data = [buffer->createNSData() autorelease];
+    else
+        *data = nil;
+
+    *response = resource->response().nsURLResponse();
+    return YES;
+}
+
+- (void)_getAllResourceDatas:(NSArray **)datas andResponses:(NSArray **)responses
+{
+    Document* doc = _private->coreFrame->document();
+    if (!doc) {
+        NSArray* emptyArray = [NSArray array];
+        *datas = emptyArray;
+        *responses = emptyArray;
+        return;
+    }
+
+    const HashMap<String, CachedResource*>& allResources = doc->docLoader()->allCachedResources();
+
+    NSMutableArray *d = [[NSMutableArray alloc] initWithCapacity:allResources.size()];
+    NSMutableArray *r = [[NSMutableArray alloc] initWithCapacity:allResources.size()];
+
+    HashMap<String, CachedResource*>::const_iterator end = allResources.end();
+    for (HashMap<String, CachedResource*>::const_iterator it = allResources.begin(); it != end; ++it) {
+        SharedBuffer* buffer = it->second->data();
+        NSData *data;
+        if (buffer)
+            data = buffer->createNSData();
+        else
+            data = [[NSData alloc] init];
+        [d addObject:data];
+        [data release];
+        [r addObject:it->second->response().nsURLResponse()];
+    }
+
+    *datas = [d autorelease];
+    *responses = [r autorelease];
+}
+
+- (BOOL)_canProvideDocumentSource
+{
+    String mimeType = _private->coreFrame->loader()->responseMIMEType();
+    
+    if (WebCore::DOMImplementation::isTextMIMEType(mimeType) ||
+        Image::supportsType(mimeType) ||
+        (_private->coreFrame->page() && _private->coreFrame->page()->pluginData()->supportsMimeType(mimeType)))
+        return NO;
+    
+    return YES;
+}
+
+- (BOOL)_canSaveAsWebArchive
+{
+    // Currently, all documents that we can view source for
+    // (HTML and XML documents) can also be saved as web archives
+    return [self _canProvideDocumentSource];
+}
+
+- (void)_receivedData:(NSData *)data textEncodingName:(NSString *)textEncodingName
+{
+    // Set the encoding. This only needs to be done once, but it's harmless to do it again later.
+    String encoding;
+    if (_private->coreFrame)
+        encoding = _private->coreFrame->loader()->documentLoader()->overrideEncoding();
+    bool userChosen = !encoding.isNull();
+    if (encoding.isNull())
+        encoding = textEncodingName;
+    _private->coreFrame->loader()->setEncoding(encoding, userChosen);
+    [self _addData:data];
+}
+
 @end
 
 @implementation WebFrame (WebPrivate)
@@ -640,9 +1587,9 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
     return coreFrame && coreFrame->tree()->isDescendantOf(core(ancestor));
 }
 
-- (void)_setShouldCreateRenderers:(BOOL)frame
+- (void)_setShouldCreateRenderers:(BOOL)shouldCreateRenderers
 {
-    [_private->bridge setShouldCreateRenderers:frame];
+    _private->shouldCreateRenderers = shouldCreateRenderers;
 }
 
 - (NSColor *)_bodyBackgroundColor
@@ -679,12 +1626,14 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
 
 - (NSRange)_selectedNSRange
 {
-    return [_private->bridge selectedNSRange];
+    return [self _convertToNSRange:_private->coreFrame->selectionController()->toRange().get()];
 }
 
 - (void)_selectNSRange:(NSRange)range
 {
-    [_private->bridge selectNSRange:range];
+    RefPtr<Range> domRange = [self _convertToDOMRange:range];
+    if (domRange)
+        _private->coreFrame->selectionController()->setSelection(Selection(domRange.get(), SEL_DEFAULT_AFFINITY));
 }
 
 - (BOOL)_isDisplayingStandaloneImage
@@ -710,7 +1659,6 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
 
 - (void)dealloc
 {
-    [_private->bridge setWebFrame:nil];
     [_private release];
     --WebFrameCount;
     [super dealloc];
@@ -718,7 +1666,6 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
 
 - (void)finalize
 {
-    [_private->bridge setWebFrame:nil];
     --WebFrameCount;
     [super finalize];
 }
index f8d5241..096c006 100644 (file)
 #import "WebFramePrivate.h"
 #import "WebPreferencesPrivate.h"
 
-#ifdef __cplusplus
+#import <WebCore/EditAction.h>
 #import <WebCore/FrameLoaderTypes.h>
+#import <WebCore/SelectionController.h>
 #import <WebCore/Settings.h>
-#endif
 
 @class DOMCSSStyleDeclaration;
+@class DOMDocumentFragment;
 @class DOMElement;
 @class DOMNode;
 @class DOMRange;
 @class WebFrameView;
-@class WebFrameBridge;
 @class WebHistoryItem;
-class WebScriptDebugger;
 
-#ifdef __cplusplus
+class WebScriptDebugger;
 
 namespace WebCore {
     class CSSStyleDeclaration;
@@ -97,15 +96,15 @@ WebView *getWebView(WebFrame *webFrame);
 @public
     WebCore::Frame* coreFrame;
     WebFrameView *webFrameView;
-    WebFrameBridge *bridge;
     WebScriptDebugger* scriptDebugger;
     id internalLoadDelegate;
+    BOOL shouldCreateRenderers;
 }
 @end
 
-#else
-struct WebCoreHistoryItem;
-#endif
+@protocol WebCoreRenderTreeCopier <NSObject>
+- (NSObject *)nodeWithName:(NSString *)name position:(NSPoint)position rect:(NSRect)rect view:(NSView *)view children:(NSArray *)children;
+@end
 
 @interface WebFrame (WebInternal)
 
@@ -126,23 +125,15 @@ struct WebCoreHistoryItem;
 - (void)_clearSelection;
 - (WebFrame *)_findFrameWithSelection;
 - (void)_clearSelectionInOtherFrames;
-#ifdef __cplusplus
-- (id)_initWithWebFrameView:(WebFrameView *)fv webView:(WebView *)v bridge:(WebFrameBridge *)bridge;
-#endif
+- (id)_initWithWebFrameView:(WebFrameView *)webFrameView webView:(WebView *)webView;
 
 - (BOOL)_isMainFrame;
 
-#ifdef __cplusplus
-
 - (WebCore::FrameLoader*)_frameLoader;
 - (WebDataSource *)_dataSourceForDocumentLoader:(WebCore::DocumentLoader*)loader;
 
 - (void)_addDocumentLoader:(WebCore::DocumentLoader*)loader toUnarchiveState:(WebArchive *)archive;
 
-#endif
-
-- (WebFrameBridge *)_bridge;
-
 - (void)_loadURL:(NSURL *)URL referrer:(NSString *)referrer intoChild:(WebFrame *)childFrame;
 
 - (void)_viewWillMoveToHostWindow:(NSWindow *)hostWindow;
@@ -168,6 +159,96 @@ struct WebCoreHistoryItem;
 - (void)_recursive_pauseNullEventsForAllNetscapePlugins;
 #endif
 
+- (NSURL *)_baseURL;
+
+- (void)_forceLayoutAdjustingViewSize:(BOOL)adjustSizeFlag;
+- (void)_forceLayoutWithMinimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustingViewSize:(BOOL)adjustSizeFlag;
+- (void)_sendScrollEvent;
+- (BOOL)_needsLayout;
+- (void)_drawRect:(NSRect)rect;
+- (void)_adjustPageHeightNew:(float *)newBottom top:(float)oldTop bottom:(float)oldBottom limit:(float)bottomLimit;
+- (NSArray*)_computePageRectsWithPrintWidthScaleFactor:(float)printWidthScaleFactor printHeight:(float)printHeight;
+
+- (NSObject *)_copyRenderTree:(id <WebCoreRenderTreeCopier>)copier;
+- (NSString *)_renderTreeAsExternalRepresentation;
+
+- (NSURL *)_URLWithAttributeString:(NSString *)string;
+
+- (DOMElement *)_elementWithName:(NSString *)name inForm:(DOMElement *)form;
+- (BOOL)_elementDoesAutoComplete:(DOMElement *)element;
+- (BOOL)_elementIsPassword:(DOMElement *)element;
+- (DOMElement *)_formForElement:(DOMElement *)element;
+- (DOMElement *)_currentForm;
+- (NSArray *)_controlsInForm:(DOMElement *)form;
+- (NSString *)_searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element;
+- (NSString *)_matchLabels:(NSArray *)labels againstElement:(DOMElement *)element;
+
+- (BOOL)_searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag startInSelection:(BOOL)startInSelection;
+- (unsigned)_markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(unsigned)limit;
+- (BOOL)_markedTextMatchesAreHighlighted;
+- (void)_setMarkedTextMatchesAreHighlighted:(BOOL)doHighlight;
+- (void)_unmarkAllTextMatches;
+- (NSArray *)_rectsForTextMatches;
+
+- (NSString *)_stringByEvaluatingJavaScriptFromString:(NSString *)string;
+- (NSString *)_stringByEvaluatingJavaScriptFromString:(NSString *)string forceUserGesture:(BOOL)forceUserGesture;
+- (NSAppleEventDescriptor *)_aeDescByEvaluatingJavaScriptFromString:(NSString *)string;
+
+- (NSString *)_selectedString;
+
+- (NSString *)_stringForRange:(DOMRange *)range;
+
+- (NSString *)_markupStringFromNode:(DOMNode *)node nodes:(NSArray **)nodes;
+- (NSString *)_markupStringFromRange:(DOMRange *)range nodes:(NSArray **)nodes;
+
+- (NSRect)_caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity;
+- (NSRect)_firstRectForDOMRange:(DOMRange *)range;
+- (void)_scrollDOMRangeToVisible:(DOMRange *)range;
+
+- (NSFont *)_fontForSelection:(BOOL *)hasMultipleFonts;
+
+- (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
+
+- (void)_setBaseBackgroundColor:(NSColor *)backgroundColor;
+- (void)_setDrawsBackground:(BOOL)drawsBackround;
+
+- (id)_accessibilityTree;
+
+- (DOMRange *)_rangeByAlteringCurrentSelection:(WebCore::SelectionController::EAlteration)alteration direction:(WebCore::SelectionController::EDirection)direction granularity:(WebCore::TextGranularity)granularity;
+- (WebCore::TextGranularity)_selectionGranularity;
+- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)charRangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString;
+- (NSRange)_markedTextNSRange;
+- (DOMRange *)_convertNSRangeToDOMRange:(NSRange)range;
+- (NSRange)_convertDOMRangeToNSRange:(DOMRange *)range;
+
+- (DOMDocumentFragment *)_documentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString;
+- (DOMDocumentFragment *)_documentFragmentWithText:(NSString *)text inContext:(DOMRange *)context;
+- (DOMDocumentFragment *)_documentFragmentWithNodesAsParagraphs:(NSArray *)nodes;
+
+- (void)_replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
+- (void)_replaceSelectionWithNode:(DOMNode *)node selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
+- (void)_replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
+- (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
+
+- (void)_insertParagraphSeparatorInQuotedContent;
+
+- (DOMRange *)_characterRangeAtPoint:(NSPoint)point;
+
+- (DOMCSSStyleDeclaration *)_typingStyle;
+- (void)_setTypingStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(WebCore::EditAction)undoAction;
+
+- (void)_dragSourceMovedTo:(NSPoint)windowLoc;
+- (void)_dragSourceEndedAt:(NSPoint)windowLoc operation:(NSDragOperation)operation;
+
+- (BOOL)_getData:(NSData **)data andResponse:(NSURLResponse **)response forURL:(NSString *)URL;
+- (void)_getAllResourceDatas:(NSArray **)datas andResponses:(NSArray **)responses;
+
+- (BOOL)_canProvideDocumentSource;
+- (BOOL)_canSaveAsWebArchive;
+
+- (void)_receivedData:(NSData *)data textEncodingName:(NSString *)textEncodingName;
+
 @end
 
 @interface NSObject (WebInternalFrameLoadDelegate)
index b5b9c35..9503626 100644 (file)
@@ -34,7 +34,6 @@
 #import "WebDynamicScrollBarsViewInternal.h"
 #import "WebFrame.h"
 #import "WebFrameInternal.h"
-#import "WebFrameBridge.h"
 #import "WebFrameViewInternal.h"
 #import "WebFrameViewPrivate.h"
 #import "WebHistoryItemInternal.h"
@@ -503,11 +502,6 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
     [super setFrameSize:size];
 }
 
-- (WebFrameBridge *)_bridge
-{
-    return [[self webFrame] _bridge];
-}
-
 - (BOOL)_scrollOverflowInDirection:(ScrollDirection)direction granularity:(ScrollGranularity)granularity
 {
     // scrolling overflows is only applicable if we're dealing with an WebHTMLView
index 4fa9ff7..6a62789 100644 (file)
@@ -34,7 +34,6 @@
 #import "WebBasePluginPackage.h"
 #import "WebDataSourceInternal.h"
 #import "WebDocumentPrivate.h"
-#import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import "WebKitNSStringExtras.h"
 #import "WebKitStatisticsPrivate.h"
 
 using namespace WebCore;
 
-@interface WebHTMLRepresentationPrivate : NSObject
-{
+@interface WebHTMLRepresentationPrivate : NSObject {
 @public
     WebDataSource *dataSource;
-    WebFrameBridge *bridge;
     NSData *parsedArchiveData;
     
     BOOL hasSentResponseToPlugin;
@@ -144,11 +141,6 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
     [super finalize];
 }
 
-- (WebFrameBridge *)_bridge
-{
-    return _private->bridge;
-}
-
 - (void)_redirectDataToManualLoader:(id<WebPluginManualLoader>)manualLoader forPluginView:(NSView *)pluginView;
 {
     _private->manualLoader = manualLoader;
@@ -158,7 +150,6 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
 - (void)setDataSource:(WebDataSource *)dataSource
 {
     _private->dataSource = dataSource;
-    _private->bridge = [[dataSource webFrame] _bridge];
 }
 
 - (BOOL)_isDisplayingWebArchive
@@ -168,9 +159,10 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
 
 - (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)dataSource
 {
-    if ([dataSource webFrame] && ![self _isDisplayingWebArchive]) {
+    WebFrame *frame = [dataSource webFrame];
+    if (frame && ![self _isDisplayingWebArchive]) {
         if (!_private->pluginView)
-            [_private->bridge receivedData:data textEncodingName:[[_private->dataSource response] textEncodingName]];
+            [frame _receivedData:data textEncodingName:[[_private->dataSource response] textEncodingName]];
 
         if (_private->pluginView) {
             if (!_private->hasSentResponseToPlugin) {
@@ -227,11 +219,12 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
     if (frame) {
         if ([self _isDisplayingWebArchive])
             [self _loadDataSourceAsWebArchive];
-        else
-            // Telling the bridge we received some data and passing nil as the data is our
+        else {
+            // Telling the frame 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]];
+            [frame _receivedData:nil textEncodingName:[[_private->dataSource response] textEncodingName]];
+        }
         
         WebView *webView = [frame webView];
         if ([webView isEditable])
@@ -241,12 +234,12 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
 
 - (BOOL)canProvideDocumentSource
 {
-    return [_private->bridge canProvideDocumentSource];
+    return [[_private->dataSource webFrame] _canProvideDocumentSource];
 }
 
 - (BOOL)canSaveAsWebArchive
 {
-    return [_private->bridge canSaveAsWebArchive];
+    return [[_private->dataSource webFrame] _canSaveAsWebArchive];
 }
 
 - (NSString *)documentSource
@@ -254,7 +247,7 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
     if ([self _isDisplayingWebArchive])
         return [[[NSString alloc] initWithData:_private->parsedArchiveData encoding:NSUTF8StringEncoding] autorelease]; 
 
-    return [_private->bridge stringWithData:[_private->dataSource data]];
+    return [[_private->dataSource webFrame] _stringWithData:[_private->dataSource data]];
 }
 
 - (NSString *)title
@@ -264,7 +257,7 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
 
 - (DOMDocument *)DOMDocument
 {
-    return [[_private->bridge webFrame] DOMDocument];
+    return [[_private->dataSource webFrame] DOMDocument];
 }
 
 - (NSAttributedString *)attributedText
@@ -280,42 +273,42 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
 
 - (DOMElement *)elementWithName:(NSString *)name inForm:(DOMElement *)form
 {
-    return [_private->bridge elementWithName:name inForm:form];
+    return [[_private->dataSource webFrame] _elementWithName:name inForm:form];
 }
 
 - (BOOL)elementDoesAutoComplete:(DOMElement *)element
 {
-    return [_private->bridge elementDoesAutoComplete:element];
+    return [[_private->dataSource webFrame] _elementDoesAutoComplete:element];
 }
 
 - (BOOL)elementIsPassword:(DOMElement *)element
 {
-    return [_private->bridge elementIsPassword:element];
+    return [[_private->dataSource webFrame] _elementIsPassword:element];
 }
 
 - (DOMElement *)formForElement:(DOMElement *)element
 {
-    return [_private->bridge formForElement:element];
+    return [[_private->dataSource webFrame] _formForElement:element];
 }
 
 - (DOMElement *)currentForm
 {
-    return [_private->bridge currentForm];
+    return [[_private->dataSource webFrame] _currentForm];
 }
 
 - (NSArray *)controlsInForm:(DOMElement *)form
 {
-    return [_private->bridge controlsInForm:form];
+    return [[_private->dataSource webFrame] _controlsInForm:form];
 }
 
 - (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element
 {
-    return [_private->bridge searchForLabels:labels beforeElement:element];
+    return [[_private->dataSource webFrame] _searchForLabels:labels beforeElement:element];
 }
 
 - (NSString *)matchLabels:(NSArray *)labels againstElement:(DOMElement *)element
 {
-    return [_private->bridge matchLabels:labels againstElement:element];
+    return [[_private->dataSource webFrame] _matchLabels:labels againstElement:element];
 }
 
 @end
index 3737bb2..d0c18ab 100644 (file)
 
 #import <WebKit/WebHTMLRepresentation.h>
 
-@class WebFrameBridge;
 @protocol WebPluginManualLoader;
 
 @interface WebHTMLRepresentation (WebPrivate)
-- (WebFrameBridge *)_bridge;
 - (void)_redirectDataToManualLoader:(id<WebPluginManualLoader>)manualLoader forPluginView:(NSView *)pluginView;
 - (void)printDOMTree;
 @end
index 50e86a7..82c85da 100644 (file)
@@ -42,7 +42,6 @@
 #import "WebDynamicScrollBarsView.h"
 #import "WebEditingDelegate.h"
 #import "WebElementDictionary.h"
-#import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import "WebFramePrivate.h"
 #import "WebFrameViewInternal.h"
@@ -295,7 +294,6 @@ static CachedResourceClient* promisedDataClient()
 - (NSView *)_hitViewForEvent:(NSEvent *)event;
 - (void)_writeSelectionWithPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard cachedAttributedString:(NSAttributedString *)attributedString;
 - (DOMRange *)_documentRange;
-- (WebFrameBridge *)_bridge;
 - (void)_setMouseDownEvent:(NSEvent *)event;
 - (WebHTMLView *)_topHTMLView;
 - (BOOL)_isTopHTMLView;
@@ -541,11 +539,6 @@ static NSCellStateValue kit(TriState state)
     return _private->dataSource;
 }
 
-- (WebFrameBridge *)_bridge
-{
-    return [_private->dataSource _bridge];
-}
-
 - (WebView *)_webView
 {
     return [_private->dataSource _webView];
@@ -570,7 +563,7 @@ static NSCellStateValue kit(TriState state)
         [domNodes addObject:[[[self _frame] DOMDocument] createTextNode: url]];
     }
     
-    fragment = [[self _bridge] documentFragmentWithNodesAsParagraphs:domNodes]; 
+    fragment = [[self _frame] _documentFragmentWithNodesAsParagraphs:domNodes]; 
     
     [domNodes release];
     
@@ -724,9 +717,9 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
     DOMRange *range = [self _selectedRange];
     DOMDocumentFragment *fragment = [self _documentFragmentFromPasteboard:pasteboard
         inContext:range allowPlainText:allowPlainText];
-    WebFrameBridge *bridge = [self _bridge];
+    WebFrame *frame = [self _frame];
     if (fragment && [self _shouldInsertFragment:fragment replacingDOMRange:[self _selectedRange] givenAction:WebViewInsertActionPasted]) {
-        [bridge replaceSelectionWithFragment:fragment selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard] matchStyle:NO];
+        [frame _replaceSelectionWithFragment:fragment selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard] matchStyle:NO];
     }
 }
 
@@ -734,7 +727,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
 {
     NSString *text = [self _plainTextFromPasteboard:pasteboard];
     if ([self _shouldReplaceSelectionWithText:text givenAction:WebViewInsertActionPasted])
-        [[self _bridge] replaceSelectionWithText:text selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard]];
+        [[self _frame] _replaceSelectionWithText:text selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard]];
 }
 
 - (BOOL)_shouldInsertFragment:(DOMDocumentFragment *)fragment replacingDOMRange:(DOMRange *)range givenAction:(WebViewInsertAction)action
@@ -1035,7 +1028,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
 
     NSPoint origin = [[self superview] bounds].origin;
     if (!NSEqualPoints(_private->lastScrollPosition, origin)) {
-        [[self _bridge] sendScrollEvent];
+        [[self _frame] _sendScrollEvent];
         [_private->compController endRevertingChange:NO moveLeft:NO];
         
         WebView *webView = [self _webView];
@@ -1573,7 +1566,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
         return;
     }
     
-    [[self _bridge] smartInsertForString:pasteString replacingRange:rangeToReplace beforeString:beforeString afterString:afterString];
+    [[self _frame] _smartInsertForString:pasteString replacingRange:rangeToReplace beforeString:beforeString afterString:afterString];
 }
 
 - (BOOL)_canSmartReplaceWithPasteboard:(NSPasteboard *)pasteboard
@@ -1870,7 +1863,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
         if ([HTMLString length] == 0)
             return nil;
         
-        return [[self _bridge] documentFragmentWithMarkupString:HTMLString baseURLString:nil];
+        return [[self _frame] _documentFragmentWithMarkupString:HTMLString baseURLString:nil];
     }
 
     // The _hasHTMLDocument clause here is a workaround for a bug in NSAttributedString: Radar 5052369.
@@ -1952,7 +1945,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
         return fragment;
     }
     if (pboardType == NSStringPboardType)
-        return [[self _bridge] documentFragmentWithText:[pasteboard stringForType:NSStringPboardType]
+        return [[self _frame] _documentFragmentWithText:[pasteboard stringForType:NSStringPboardType]
                                               inContext:context];
                                               
     return nil;
@@ -2697,7 +2690,7 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
 {
     [self reapplyStyles];
     
-    if (!_private->needsLayout && ![[self _bridge] needsLayout])
+    if (!_private->needsLayout && ![[self _frame] _needsLayout])
         return;
 
 #ifdef LOG_TIMES        
@@ -2707,9 +2700,9 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
     LOG(View, "%@ doing layout", self);
 
     if (minPageWidth > 0.0) {
-        [[self _bridge] forceLayoutWithMinimumPageWidth:minPageWidth maximumPageWidth:maxPageWidth adjustingViewSize:adjustViewSize];
+        [[self _frame] _forceLayoutWithMinimumPageWidth:minPageWidth maximumPageWidth:maxPageWidth adjustingViewSize:adjustViewSize];
     } else {
-        [[self _bridge] forceLayoutAdjustingViewSize:adjustViewSize];
+        [[self _frame] _forceLayoutAdjustingViewSize:adjustViewSize];
     }
     _private->needsLayout = NO;
     
@@ -2823,7 +2816,7 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
             NSRectFill (rect);
         }
 
-        [[self _bridge] drawRect:rect];
+        [[self _frame] _drawRect:rect];
 
         // This hack is needed for <rdar://problem/5023545>. We can hit a race condition where drawRect will be
         // called after the WebView has closed. If the client did not properly close the WebView and set the 
@@ -3095,7 +3088,7 @@ done:
         NSPoint windowMouseLoc = NSMakePoint(windowImageLoc.x + dragController->dragOffset().x(), windowImageLoc.y + dragController->dragOffset().y());
     }
     
-    [[self _bridge] dragSourceMovedTo:windowMouseLoc];
+    [[self _frame] _dragSourceMovedTo:windowMouseLoc];
 }
 
 - (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation
@@ -3111,7 +3104,7 @@ done:
         dragController->dragEnded();
     }
     
-    [[self _bridge] dragSourceEndedAt:windowMouseLoc operation:operation];
+    [[self _frame] _dragSourceEndedAt:windowMouseLoc operation:operation];
     
     // Prevent queued mouseDragged events from coming after the drag and fake mouseUp event.
     _private->ignoringMouseDraggedEvents = YES;
@@ -3335,7 +3328,7 @@ noPromisedData:
         [self _setPrinting:YES minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO];
 
     float newBottomFloat = *newBottom;
-    [[self _bridge] adjustPageHeightNew:&newBottomFloat top:oldTop bottom:oldBottom limit:bottomLimit];
+    [[self _frame] _adjustPageHeightNew:&newBottomFloat top:oldTop bottom:oldBottom limit:bottomLimit];
     *newBottom = newBottomFloat;
 
     if (!wasInPrintingMode) {
@@ -3457,7 +3450,7 @@ noPromisedData:
     float userScaleFactor = [printOperation _web_pageSetupScaleFactor];
     [_private->pageRects release];
     float fullPageHeight = floorf([self _calculatePrintHeight]/totalScaleFactor);
-    NSArray *newPageRects = [[self _bridge] computePageRectsWithPrintWidthScaleFactor:userScaleFactor
+    NSArray *newPageRects = [[self _frame] _computePageRectsWithPrintWidthScaleFactor:userScaleFactor
                                                                           printHeight:fullPageHeight];
     
     // AppKit gets all messed up if you give it a zero-length page count (see 3576334), so if we
@@ -3471,7 +3464,7 @@ noPromisedData:
         // content onto one fewer page. If it does, use the adjusted scale. If not, use the original scale.
         float lastPageHeight = NSHeight([[newPageRects lastObject] rectValue]);
         if (lastPageHeight/fullPageHeight < LastPrintedPageOrphanRatio) {
-            NSArray *adjustedPageRects = [[self _bridge] computePageRectsWithPrintWidthScaleFactor:userScaleFactor
+            NSArray *adjustedPageRects = [[self _frame] _computePageRectsWithPrintWidthScaleFactor:userScaleFactor
                                                                                        printHeight:fullPageHeight*PrintingOrphanShrinkAdjustment];
             // Use the adjusted rects only if the page count went down
             if ([adjustedPageRects count] < [newPageRects count]) {
@@ -3580,7 +3573,7 @@ noPromisedData:
 - (id)accessibilityAttributeValue:(NSString*)attributeName
 {
     if ([attributeName isEqualToString: NSAccessibilityChildrenAttribute]) {
-        id accTree = [[self _bridge] accessibilityTree];
+        id accTree = [[self _frame] _accessibilityTree];
         if (accTree)
             return [NSArray arrayWithObject:accTree];
         return nil;
@@ -3590,7 +3583,7 @@ noPromisedData:
 
 - (id)accessibilityFocusedUIElement
 {
-    id accTree = [[self _bridge] accessibilityTree];
+    id accTree = [[self _frame] _accessibilityTree];
     if (accTree)
         return [accTree accessibilityFocusedUIElement];
     return self;
@@ -3598,7 +3591,7 @@ noPromisedData:
 
 - (id)accessibilityHitTest:(NSPoint)point
 {
-    id accTree = [[self _bridge] accessibilityTree];
+    id accTree = [[self _frame] _accessibilityTree];
     if (accTree) {
         NSPoint windowCoord = [[self window] convertScreenToBase:point];
         return [accTree accessibilityHitTest:[self convertPoint:windowCoord fromView:nil]];
@@ -3608,7 +3601,7 @@ noPromisedData:
 
 - (id)_accessibilityParentForSubview:(NSView *)subview
 {
-    id accTree = [[self _bridge] accessibilityTree];
+    id accTree = [[self _frame] _accessibilityTree];
     if (!accTree)
         return self;
     id parent = [accTree _accessibilityParentForSubview:subview];
@@ -4095,7 +4088,7 @@ NSStrokeColorAttributeName        /* NSColor, default nil: same as foreground co
     // to do the right thing because it works in startSpeaking:, and I know setBackgroundColor: does the
     // right thing because I tested it with [self _selectedRange].
     // FIXME: This won't actually apply the style to the entire range here, because it ends up calling
-    // [bridge applyStyle:], which operates on the current selection. To make this work right, we'll
+    // [frame _applyStyle:], which operates on the current selection. To make this work right, we'll
     // need to save off the selection, temporarily set it to the entire range, make the change, then
     // restore the old selection.
     [self _changeCSSColorUsingSelector:@selector(setBackgroundColor:) inRange:[self _documentRange]];
@@ -4119,12 +4112,12 @@ NSStrokeColorAttributeName        /* NSColor, default nil: same as foreground co
     if (![self _canEdit])
         return;
 
-    WebFrameBridge *bridge = [self _bridge];
+    WebFrame *frame = [self _frame];
     [self selectWord:nil];
-    NSString *word = [[bridge selectedString] performSelector:selector];
+    NSString *word = [[frame _selectedString] performSelector:selector];
     // FIXME: Does this need a different action context other than "typed"?
     if ([self _shouldReplaceSelectionWithText:word givenAction:WebViewInsertActionTyped])
-        [bridge replaceSelectionWithText:word selectReplacement:NO smartReplace:NO];
+        [frame _replaceSelectionWithText:word selectReplacement:NO smartReplace:NO];
 }
 
 - (void)uppercaseWord:(id)sender
@@ -4207,7 +4200,7 @@ NSStrokeColorAttributeName        /* NSColor, default nil: same as foreground co
         return;
 
     if ([self _shouldReplaceSelectionWithText:newWord givenAction:WebViewInsertActionPasted])
-        [[self _bridge] replaceSelectionWithText:newWord selectReplacement:YES smartReplace:NO];
+        [[self _frame] _replaceSelectionWithText:newWord selectReplacement:YES smartReplace:NO];
 }
 
 - (void)changeSpelling:(id)sender
@@ -4248,11 +4241,11 @@ NSStrokeColorAttributeName        /* NSColor, default nil: same as foreground co
 {
     COMMAND_PROLOGUE
 
-    WebFrameBridge *bridge = [self _bridge];
+    WebFrame *frame = [self _frame];
     DOMRange *range = [self _selectedRange];
     if (!range || [range collapsed])
         range = [self _documentRange];
-    [NSApp speakString:[bridge stringForRange:range]];
+    [NSApp speakString:[frame _stringForRange:range]];
 }
 
 - (void)stopSpeaking:(id)sender
@@ -4511,7 +4504,7 @@ static BOOL writingDirectionKeyBindingsEnabled()
         return;
     
     BOOL multiple = NO;
-    NSFont *font = [[self _bridge] fontForSelection:&multiple];
+    NSFont *font = [[self _frame] _fontForSelection:&multiple];
 
     // FIXME: for now, return a bogus font that distinguishes the empty selection from the non-empty
     // selection. We should be able to remove this once the rest of this code works properly.
@@ -4529,7 +4522,7 @@ static BOOL writingDirectionKeyBindingsEnabled()
 
 - (BOOL)_canSmartCopyOrDelete
 {
-    return [[self _webView] smartInsertDeleteEnabled] && [[self _bridge] selectionGranularity] == WordGranularity;
+    return [[self _webView] smartInsertDeleteEnabled] && [[self _frame] _selectionGranularity] == WordGranularity;
 }
 
 - (NSEvent *)_mouseDownEvent
@@ -4808,7 +4801,7 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
 {
     ASSERT(!_private->subviewsSetAside);
 
-    if ([[self _bridge] needsLayout])
+    if ([[self _frame] _needsLayout])
         _private->needsLayout = YES;
     if (_private->needsToApplyStyles || _private->needsLayout)
         [self layout];
@@ -4895,26 +4888,26 @@ static BOOL isTextInput(Frame* coreFrame)
 - (NSUInteger)characterIndexForPoint:(NSPoint)thePoint
 {
     NSWindow *window = [self window];
-    WebFrameBridge *bridge = [self _bridge];
+    WebFrame *frame = [self _frame];
 
     if (window)
         thePoint = [window convertScreenToBase:thePoint];
     thePoint = [self convertPoint:thePoint fromView:nil];
 
-    DOMRange *range = [bridge characterRangeAtPoint:thePoint];
+    DOMRange *range = [frame _characterRangeAtPoint:thePoint];
     if (!range) {
         LOG(TextInput, "characterIndexForPoint:(%f, %f) -> NSNotFound", thePoint.x, thePoint.y);
         return NSNotFound;
     }
     
-    unsigned result = [bridge convertDOMRangeToNSRange:range].location;
+    unsigned result = [frame _convertDOMRangeToNSRange:range].location;
     LOG(TextInput, "characterIndexForPoint:(%f, %f) -> %u", thePoint.x, thePoint.y, result);
     return result;
 }
 
 - (NSRect)firstRectForCharacterRange:(NSRange)theRange
 {    
-    WebFrameBridge *bridge = [self _bridge];
+    WebFrame *frame = [self _frame];
     
     // Just to match NSTextView's behavior. Regression tests cannot detect this;
     // to reproduce, use a test application from http://bugs.webkit.org/show_bug.cgi?id=4682
@@ -4922,7 +4915,7 @@ static BOOL isTextInput(Frame* coreFrame)
     if ((theRange.location + theRange.length < theRange.location) && (theRange.location + theRange.length != 0))
         theRange.length = 0;
     
-    DOMRange *range = [bridge convertNSRangeToDOMRange:theRange];
+    DOMRange *range = [frame _convertNSRangeToDOMRange:theRange];
     if (!range) {
         LOG(TextInput, "firstRectForCharacterRange:(%u, %u) -> (0, 0, 0, 0)", theRange.location, theRange.length);
         return NSMakeRect(0, 0, 0, 0);
@@ -4931,7 +4924,7 @@ static BOOL isTextInput(Frame* coreFrame)
     ASSERT([range startContainer]);
     ASSERT([range endContainer]);
     
-    NSRect resultRect = [bridge firstRectForDOMRange:range];
+    NSRect resultRect = [frame _firstRectForDOMRange:range];
     resultRect = [self convertRect:resultRect toView:nil];
 
     NSWindow *window = [self window];
@@ -4948,7 +4941,7 @@ static BOOL isTextInput(Frame* coreFrame)
         LOG(TextInput, "selectedRange -> (NSNotFound, 0)");
         return NSMakeRange(NSNotFound, 0);
     }
-    NSRange result = [[self _bridge] selectedNSRange];
+    NSRange result = [[self _frame] _selectedNSRange];
 
     LOG(TextInput, "selectedRange -> (%u, %u)", result.location, result.length);
     return result;
@@ -4956,7 +4949,7 @@ static BOOL isTextInput(Frame* coreFrame)
 
 - (NSRange)markedRange
 {
-    NSRange result = [[self _bridge] markedTextNSRange];
+    NSRange result = [[self _frame] _markedTextNSRange];
     LOG(TextInput, "markedRange -> (%u, %u)", result.location, result.length);
     return result;
 }
@@ -4967,8 +4960,8 @@ static BOOL isTextInput(Frame* coreFrame)
         LOG(TextInput, "attributedSubstringFromRange:(%u, %u) -> nil", nsRange.location, nsRange.length);
         return nil;
     }
-    WebFrameBridge *bridge = [self _bridge];
-    DOMRange *domRange = [bridge convertNSRangeToDOMRange:nsRange];
+    WebFrame *frame = [self _frame];
+    DOMRange *domRange = [frame _convertNSRangeToDOMRange:nsRange];
     if (!domRange) {
         LOG(TextInput, "attributedSubstringFromRange:(%u, %u) -> nil", nsRange.location, nsRange.length);
         return nil;
@@ -5078,7 +5071,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
         // The AppKit adds a 'secret' property to the string that contains the replacement range.
         // The replacement range is the range of the the text that should be replaced with the new string.
         if (rangeString)
-            [[self _bridge] selectNSRange:NSRangeFromString(rangeString)];
+            [[self _frame] _selectNSRange:NSRangeFromString(rangeString)];
 
         text = [string string];
         extractUnderlines(string, underlines);
@@ -5159,7 +5152,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
         NSString *rangeString = [string attribute:NSTextInputReplacementRangeAttributeName atIndex:0 longestEffectiveRange:NULL inRange:NSMakeRange(0, [text length])];
         LOG(TextInput, "    ReplacementRange: %@", rangeString);
         if (rangeString) {
-            [[self _bridge] selectNSRange:NSRangeFromString(rangeString)];
+            [[self _frame] _selectNSRange:NSRangeFromString(rangeString)];
             isFromInputMethod = YES;
         }
     } else
@@ -5264,9 +5257,9 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
 {
     // FIXME: 3769654 - We should preserve case of string being inserted, even in prefix (but then also be
     // able to revert that).  Mimic NSText.
-    WebFrameBridge *bridge = [_view _bridge];
+    WebFrame *frame = [_view _frame];
     NSString *newText = [match substringFromIndex:prefixLength];
-    [bridge replaceSelectionWithText:newText selectReplacement:YES smartReplace:NO];
+    [frame _replaceSelectionWithText:newText selectReplacement:YES smartReplace:NO];
 }
 
 // mostly lifted from NSTextView_KeyBinding.m
@@ -5363,9 +5356,9 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
         }
 
         // Get preceeding word stem
-        WebFrameBridge *bridge = [_view _bridge];
-        DOMRange *selection = kit(core([_view _frame])->selectionController()->toRange().get());
-        DOMRange *wholeWord = [bridge rangeByAlteringCurrentSelection:SelectionController::EXTEND
+        WebFrame *frame = [_view _frame];
+        DOMRange *selection = kit(core(frame)->selectionController()->toRange().get());
+        DOMRange *wholeWord = [frame _rangeByAlteringCurrentSelection:SelectionController::EXTEND
             direction:SelectionController::BACKWARD granularity:WordGranularity];
         DOMRange *prefix = [wholeWord cloneRange];
         [prefix setEnd:[selection startContainer] offset:[selection startOffset]];
@@ -5375,7 +5368,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
             NSBeep();
             return;
         }
-        NSString *prefixStr = [bridge stringForRange:prefix];
+        NSString *prefixStr = [frame _stringForRange:prefix];
         NSString *trimmedPrefix = [prefixStr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
         if ([trimmedPrefix length] == 0) {
             NSBeep();
@@ -5394,9 +5387,9 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
             [self _insertMatch:[_completions objectAtIndex:0]];
         } else {
             ASSERT(!_originalString);       // this should only be set IFF we have a popup window
-            _originalString = [[bridge stringForRange:selection] retain];
+            _originalString = [[frame _stringForRange:selection] retain];
             [self _buildUI];
-            NSRect wordRect = [bridge caretRectAtNode:[wholeWord startContainer] offset:[wholeWord startOffset] affinity:NSSelectionAffinityDownstream];
+            NSRect wordRect = [frame _caretRectAtNode:[wholeWord startContainer] offset:[wholeWord startOffset] affinity:NSSelectionAffinityDownstream];
             // +1 to be under the word, not the caret
             // FIXME - 3769652 - Wrong positioning for right to left languages.  We should line up the upper
             // right corner with the caret instead of upper left, and the +1 would be a -1.
@@ -5419,8 +5412,8 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
         _popupWindow = nil;
 
         if (revertChange) {
-            WebFrameBridge *bridge = [_view _bridge];
-            [bridge replaceSelectionWithText:_originalString selectReplacement:YES smartReplace:NO];
+            WebFrame *frame = [_view _frame];
+            [frame _replaceSelectionWithText:_originalString selectReplacement:YES smartReplace:NO];
         } else if ([_view _hasSelection]) {
             if (goLeft)
                 [_view moveBackward:nil];
@@ -5595,7 +5588,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
 
 - (NSString *)string
 {
-    return [[self _bridge] stringForRange:[self _documentRange]];
+    return [[self _frame] _stringForRange:[self _documentRange]];
 }
 
 - (NSAttributedString *)_attributeStringFromDOMRange:(DOMRange *)range
@@ -5625,7 +5618,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
 
 - (NSString *)selectedString
 {
-    return [[self _bridge] selectedString];
+    return [[self _frame] _selectedString];
 }
 
 - (NSAttributedString *)selectedAttributedString
@@ -5651,7 +5644,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
     if (![string length])
         return NO;
     
-    return [[self _bridge] searchFor:string direction:forward caseSensitive:caseFlag wrap:wrapFlag startInSelection:startInSelection];
+    return [[self _frame] _searchFor:string direction:forward caseSensitive:caseFlag wrap:wrapFlag startInSelection:startInSelection];
 }
 
 @end
@@ -5673,27 +5666,27 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
 
 - (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(NSUInteger)limit
 {
-    return [[self _bridge] markAllMatchesForText:string caseSensitive:caseFlag limit:limit];
+    return [[self _frame] _markAllMatchesForText:string caseSensitive:caseFlag limit:limit];
 }
 
 - (void)setMarkedTextMatchesAreHighlighted:(BOOL)newValue
 {
-    [[self _bridge] setMarkedTextMatchesAreHighlighted:newValue];
+    [[self _frame] _setMarkedTextMatchesAreHighlighted:newValue];
 }
 
 - (BOOL)markedTextMatchesAreHighlighted
 {
-    return [[self _bridge] markedTextMatchesAreHighlighted];
+    return [[self _frame] _markedTextMatchesAreHighlighted];
 }
 
 - (void)unmarkAllTextMatches
 {
-    return [[self _bridge] unmarkAllTextMatches];
+    return [[self _frame] _unmarkAllTextMatches];
 }
 
 - (NSArray *)rectsForTextMatches
 {
-    return [[self _bridge] rectsForTextMatches];
+    return [[self _frame] _rectsForTextMatches];
 }
 
 @end
index 8d626e8..265fdb0 100644 (file)
@@ -28,7 +28,6 @@
 
 #import "WebRenderNode.h"
 
-#import <WebKit/WebFrameBridge.h>
 #import <WebKit/WebFrameView.h>
 #import <WebKit/WebHTMLView.h>
 #import <WebKit/WebDataSourceInternal.h>
@@ -82,7 +81,7 @@
     }
     
     copier = [[WebKitRenderTreeCopier alloc] init];
-    self = [[[[[view webFrame] _dataSource] _bridge] copyRenderTree:copier] retain];
+    self = [[[view webFrame] _copyRenderTree:copier] retain];
     [copier release];
     
     return self;
index 9866d39..8b62fa0 100644 (file)
@@ -28,7 +28,7 @@
 
 #import "WebResourcePrivate.h"
 
-#import "WebFrameBridge.h"
+#import "WebFrameInternal.h"
 #import "WebNSDictionaryExtras.h"
 #import "WebNSURLExtras.h"
 #import <WebCore/WebCoreURLResponse.h>
@@ -343,7 +343,7 @@ static NSString * const WebResourceResponseKey =          @"WebResourceResponse"
 - (NSString *)_stringValue
 {
     NSString *textEncodingName = [self textEncodingName];
-    return [WebFrameBridge stringWithData:_private->data textEncodingName:textEncodingName];
+    return [WebFrame _stringWithData:_private->data textEncodingName:textEncodingName];
 }
 
 @end
index 32082ac..71643fa 100644 (file)
@@ -29,7 +29,6 @@
 #import "WebScriptDebugger.h"
 #import "WebDataSource.h"
 #import "WebDataSourceInternal.h"
-#import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import "WebScriptDebugServerPrivate.h"
 #import "WebViewInternal.h"
index 5464830..d98a7f6 100644 (file)
@@ -50,7 +50,6 @@
 #import "WebEditingDelegate.h"
 #import "WebEditorClient.h"
 #import "WebFormDelegatePrivate.h"
-#import "WebFrameBridge.h"
 #import "WebFrameInternal.h"
 #import "WebFrameViewInternal.h"
 #import "WebHTMLRepresentation.h"
@@ -372,7 +371,6 @@ static int pluginDatabaseClientCount = 0;
 
 @interface WebView (WebFileInternal)
 - (WebFrame *)_selectedOrMainFrame;
-- (WebFrameBridge *)_bridgeForSelectedOrMainFrame;
 - (BOOL)_isLoading;
 - (WebFrameView *)_frameViewAtWindowPoint:(NSPoint)point;
 - (WebFrame *)_focusedFrame;
@@ -1369,7 +1367,7 @@ WebFrameLoadDelegateImplementationCache* WebViewGetFrameLoadDelegateImplementati
 - (NSDictionary *)_dashboardRegions
 {
     // Only return regions from main frame.
-    Frame* mainFrame = [[[self mainFrame] _bridge] _frame];
+    Frame* mainFrame = core([self mainFrame]);
     if (!mainFrame)
         return nil;
     NSMutableDictionary *regions = mainFrame->dashboardRegionsDictionary();
@@ -1487,7 +1485,7 @@ WebFrameLoadDelegateImplementationCache* WebViewGetFrameLoadDelegateImplementati
 
 - (void)setProhibitsMainFrameScrolling:(BOOL)prohibits
 {
-    Frame* mainFrame = [[[self mainFrame] _bridge] _frame];
+    Frame* mainFrame = core([self mainFrame]);
     if (mainFrame)
         mainFrame->setProhibitsScrolling(prohibits);
 }
@@ -1500,14 +1498,14 @@ WebFrameLoadDelegateImplementationCache* WebViewGetFrameLoadDelegateImplementati
 
 - (void)_setInViewSourceMode:(BOOL)flag
 {
-    Frame* mainFrame = [[[self mainFrame] _bridge] _frame];
+    Frame* mainFrame = core([self mainFrame]);
     if (mainFrame)
         mainFrame->setInViewSourceMode(flag);
 }
 
 - (BOOL)_inViewSourceMode
 {
-    Frame* mainFrame = [[[self mainFrame] _bridge] _frame];
+    Frame* mainFrame = core([self mainFrame]);
     return mainFrame && mainFrame->inViewSourceMode();
 }
 
@@ -1619,7 +1617,7 @@ WebFrameLoadDelegateImplementationCache* WebViewGetFrameLoadDelegateImplementati
 
 - (void)_executeCoreCommandByName:(NSString *)name value:(NSString *)value
 {
-    Frame* coreFrame = [[[self mainFrame] _bridge] _frame];
+    Frame* coreFrame = core([self mainFrame]);
     if (!coreFrame)
         return;
     coreFrame->editor()->command(name).execute(value);
@@ -2406,7 +2404,7 @@ WebFrameLoadDelegateImplementationCache* WebViewGetFrameLoadDelegateImplementati
             script = [script substringFromIndex:returnStringRange.location + returnStringRange.length];
     }
 
-    NSString *result = [[[self mainFrame] _bridge] stringByEvaluatingJavaScriptFromString:script];
+    NSString *result = [[self mainFrame] _stringByEvaluatingJavaScriptFromString:script];
     // The only way stringByEvaluatingJavaScriptFromString can return nil is if the frame was removed by the script
     // Since there's no way to get rid of the main frame, result will never ever be nil here.
     ASSERT(result);
@@ -3086,7 +3084,7 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
 
 - (NSAppleEventDescriptor *)aeDescByEvaluatingJavaScriptFromString:(NSString *)script
 {
-    return [[[self mainFrame] _bridge] aeDescByEvaluatingJavaScriptFromString:script];
+    return [[self mainFrame] _aeDescByEvaluatingJavaScriptFromString:script];
 }
 
 - (BOOL)canMarkAllTextMatches
@@ -3177,7 +3175,7 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
 
 - (void)scrollDOMRangeToVisible:(DOMRange *)range
 {
-    [[[range startContainer] _bridge] scrollDOMRangeToVisible:range];
+    [[[[range startContainer] ownerDocument] webFrame] _scrollDOMRangeToVisible:range];
 }
 
 - (BOOL)allowsUndo
@@ -3406,7 +3404,7 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
         coreFrame->selectionController()->clear();
     else {
         // Derive the frame to use from the range passed in.
-        // Using _bridgeForSelectedOrMainFrame could give us a different document than
+        // Using _selectedOrMainFrame could give us a different document than
         // the one the range uses.
         coreFrame = core([range startContainer])->document()->frame();
         if (!coreFrame)
@@ -3438,7 +3436,7 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
         _private->editable = flag;
         if (!_private->tabKeyCyclesThroughElementsChanged && _private->page)
             _private->page->setTabKeyCyclesThroughElements(!flag);
-        Frame* mainFrame = [[[self mainFrame] _bridge] _frame];
+        Frame* mainFrame = core([self mainFrame]);
         if (mainFrame) {
             if (flag) {
                 mainFrame->applyEditingStyleToBodyElement();
@@ -3460,12 +3458,12 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
 {
     // We don't know enough at thls level to pass in a relevant WebUndoAction; we'd have to
     // change the API to allow this.
-    [[self _bridgeForSelectedOrMainFrame] setTypingStyle:style withUndoAction:EditActionUnspecified];
+    [[self _selectedOrMainFrame] _setTypingStyle:style withUndoAction:EditActionUnspecified];
 }
 
 - (DOMCSSStyleDeclaration *)typingStyle
 {
-    return [[self _bridgeForSelectedOrMainFrame] typingStyle];
+    return [[self _selectedOrMainFrame] _typingStyle];
 }
 
 - (void)setSmartInsertDeleteEnabled:(BOOL)flag
@@ -3613,22 +3611,22 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
 
 - (void)replaceSelectionWithNode:(DOMNode *)node
 {
-    [[self _bridgeForSelectedOrMainFrame] replaceSelectionWithNode:node selectReplacement:YES smartReplace:NO matchStyle:NO];
+    [[self _selectedOrMainFrame] _replaceSelectionWithNode:node selectReplacement:YES smartReplace:NO matchStyle:NO];
 }    
 
 - (void)replaceSelectionWithText:(NSString *)text
 {
-    [[self _bridgeForSelectedOrMainFrame] replaceSelectionWithText:text selectReplacement:YES smartReplace:NO];
+    [[self _selectedOrMainFrame] _replaceSelectionWithText:text selectReplacement:YES smartReplace:NO];
 }
 
 - (void)replaceSelectionWithMarkupString:(NSString *)markupString
 {
-    [[self _bridgeForSelectedOrMainFrame] replaceSelectionWithMarkupString:markupString baseURLString:nil selectReplacement:YES smartReplace:NO];
+    [[self _selectedOrMainFrame] _replaceSelectionWithMarkupString:markupString baseURLString:nil selectReplacement:YES smartReplace:NO];
 }
 
 - (void)replaceSelectionWithArchive:(WebArchive *)archive
 {
-    [[[[self _bridgeForSelectedOrMainFrame] webFrame] _dataSource] _replaceSelectionWithArchive:archive selectReplacement:YES];
+    [[[self _selectedOrMainFrame] _dataSource] _replaceSelectionWithArchive:archive selectReplacement:YES];
 }
 
 - (void)deleteSelection
@@ -3695,12 +3693,12 @@ FOR_EACH_RESPONDER_SELECTOR(FORWARD)
 
 - (void)_insertNewlineInQuotedContent;
 {
-    [[self _bridgeForSelectedOrMainFrame] insertParagraphSeparatorInQuotedContent];
+    [[self _selectedOrMainFrame] _insertParagraphSeparatorInQuotedContent];
 }
 
 - (void)_replaceSelectionWithNode:(DOMNode *)node matchStyle:(BOOL)matchStyle
 {
-    [[self _bridgeForSelectedOrMainFrame] replaceSelectionWithNode:node selectReplacement:YES smartReplace:NO matchStyle:matchStyle];
+    [[self _selectedOrMainFrame] _replaceSelectionWithNode:node selectReplacement:YES smartReplace:NO matchStyle:matchStyle];
 }
 
 @end
@@ -3975,11 +3973,6 @@ static WebFrameView *containingFrameView(NSView *view)
     return result;
 }
 
-- (WebFrameBridge *)_bridgeForSelectedOrMainFrame
-{
-    return [[self _selectedOrMainFrame] _bridge];
-}
-
 - (BOOL)_isLoading
 {
     WebFrame *mainFrame = [self mainFrame];