WebCore:
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Feb 2007 07:54:13 +0000 (07:54 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Feb 2007 07:54:13 +0000 (07:54 +0000)
commited5b9a47f6a18dd2baf72e1bbcf48b443702990e
tree1247d5c04a7b288f2e055d7ef92512e2682ac371
parentefddee64078c93518452a4d8a7e6506810d4afaa
WebCore:

        Reviewed by Maciej.

        Additional coding by Maciej, additional review by Oliver.

        Get rid of the FrameMac and FrameQt classes. Instead
        move all methods into Frame directly, and implement
        some platform specific methods in foo/FrameFoo.cpp.

        Some general cleanup in Frame:
        * Move some methods out of Frame, to the place where they
        belong.
        * Unify the different ways of creating the JavaScript wrappers
        for <object>, <embed> and <applet>
        * Some cleanup of the WebCoreFrameBridge

        * ForwardingHeaders/bindings/NP_jsobject.h: Added.
        * ForwardingHeaders/bindings/npruntime_impl.h: Added.
        * ForwardingHeaders/bindings/runtime_root.h: Added.
        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/kjs_binding.cpp:
        (KJS::ScriptInterpreter::shouldInterruptScript):
        * bindings/objc/DOM.mm:
        (-[DOMNode KJS::Bindings::]):
        * bindings/objc/DOMInternal.mm:
        (-[WebScriptObject _initializeScriptDOMNodeImp]):
        * bridge/EditorClient.h:
        * bridge/mac/FrameViewMac.mm:
        (WebCore::FrameView::updateBorder):
        (WebCore::FrameView::updateDashboardRegions):
        * bridge/mac/WebCoreAXObject.mm:
        (-[WebCoreAXObject rendererForView:]):
        * dom/Position.cpp:
        (WebCore::Position::next):
        * editing/CommandByName.cpp:
        (WebCore::Frame::execCopy):
        (WebCore::Frame::execCut):
        (WebCore::Frame::execPaste):
        * editing/Editor.cpp:
        (WebCore::Editor::canEdit):
        (WebCore::Editor::pasteWithPasteboard):
        (WebCore::Editor::paste):
        (WebCore::Editor::pasteAsPlainText):
        * editing/Editor.h:
        * editing/JSEditor.cpp:
        * html/HTMLAppletElement.cpp:
        (WebCore::HTMLAppletElement::getInstance):
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::getInstance):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::formData):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::getInstance):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::clear):
        (WebCore::FrameLoader::detachFromParent):
        * loader/mac/ImageDocumentMac.mm:
        (WebCore::finishImageLoad):
        * loader/qt/DocumentLoaderQt.cpp:
        * page/Chrome.cpp:
        (WebCore::Chrome::shouldInterruptJavaScript):
        * page/Chrome.h:
        * page/ChromeClient.h:
        * page/Frame.cpp:
        (WebCore::Frame::~Frame):
        (WebCore::Frame::markedTextRange):
        (WebCore::Frame::shouldChangeSelection):
        (WebCore::Frame::shouldDeleteSelection):
        (WebCore::Frame::isContentEditable):
        (WebCore::Frame::setSecureKeyboardEntry):
        (WebCore::Frame::isSecureKeyboardEntry):
        (WebCore::Frame::bindingRootObject):
        (WebCore::Frame::createRootObject):
        (WebCore::Frame::windowScriptNPObject):
        (WebCore::Frame::cleanupScriptObjects):
        (WebCore::FramePrivate::FramePrivate):
        * page/Frame.h:
        * page/FramePrivate.h:
        * page/FrameView.h:
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::tabsToLinks):
        (WebCore::EventHandler::tabsToAllControls):
        (WebCore::EventHandler::focusDocumentView):
        (WebCore::EventHandler::passMouseDownEventToWidget):
        (WebCore::EventHandler::handleDrag):
        (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):
        (WebCore::EventHandler::keyboardUIMode):
        * page/mac/FrameMac.h: Removed.
        * page/mac/FrameMac.mm:
        (WebCore::Frame::setBridge):
        (WebCore::Frame::bridge):
        (WebCore::Frame::searchForLabelsAboveCell):
        (WebCore::Frame::searchForLabelsBeforeElement):
        (WebCore::Frame::matchLabelsAgainstElement):
        (WebCore::Frame::focusWindow):
        (WebCore::Frame::unfocusWindow):
        (WebCore::Frame::imageFromRect):
        (WebCore::Frame::selectionImage):
        (WebCore::Frame::snapshotDragImage):
        (WebCore::Frame::fontAttributesForSelectionStart):
        (WebCore::Frame::baseWritingDirectionForSelectionStart):
        (WebCore::Frame::print):
        (WebCore::Frame::issuePasteCommand):
        (WebCore::Frame::issueTransposeCommand):
        (WebCore::Frame::respondToChangedSelection):
        (WebCore::Frame::textFieldDidBeginEditing):
        (WebCore::Frame::textFieldDidEndEditing):
        (WebCore::Frame::textDidChangeInTextField):
        (WebCore::Frame::textDidChangeInTextArea):
        (WebCore::Frame::doTextFieldCommandFromEvent):
        (WebCore::Frame::textWillBeDeletedInTextField):
        (WebCore::Frame::setSecureKeyboardEntry):
        (WebCore::Frame::isSecureKeyboardEntry):
        (WebCore::Frame::setMarkedTextRange):
        (WebCore::Frame::dashboardRegionsDictionary):
        (WebCore::Frame::dashboardRegionsChanged):
        (WebCore::Frame::willPopupMenu):
        (WebCore::Frame::isCharacterSmartReplaceExempt):
        (WebCore::Frame::setNeedsReapplyStyles):
        (WebCore::Frame::customHighlightLineRect):
        (WebCore::Frame::paintCustomHighlight):
        (WebCore::Frame::createScriptInstanceForWidget):
        (WebCore::Frame::windowScriptObject):
        (WebCore::Frame::cleanupPlatformScriptObjects):
        * page/mac/WebCoreFrameBridge.h:
        * page/mac/WebCoreFrameBridge.mm:
        (createRootObject):
        (bridge):
        (-[WebCoreFrameBridge _frame]):
        * page/qt/EventHandlerQt.cpp:
        * page/qt/FrameQt.cpp:
        (WebCore::Frame::unfocusWindow):
        (WebCore::Frame::focusWindow):
        (WebCore::Frame::issueTransposeCommand):
        (WebCore::Frame::respondToChangedSelection):
        (WebCore::Frame::print):
        (WebCore::Frame::createScriptInstanceForWidget):
        (WebCore::Frame::cleanupPlatformScriptObjects):
        (WebCore::Frame::isCharacterSmartReplaceExempt):
        * page/qt/FrameQt.h: Removed.
        * platform/MimeTypeRegistry.h:
        * platform/graphics/svg/SVGImage.cpp:
        (WebCore::SVGImage::setData):
        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyChromeClient::shouldInterruptJavaScript):
        (WebCore::SVGEmptyEditorClient::shouldChangeSelectedRange):
        * platform/mac/ClipboardMac.h:
        * platform/mac/ClipboardMac.mm:
        (WebCore::ClipboardMac::ClipboardMac):
        * platform/mac/FileChooserMac.mm:
        (-[OpenPanelController beginSheetWithFrame:]):
        * platform/mac/MimeTypeRegistryMac.mm:
        (WebCore::MimeTypeRegistry::getMIMETypeForPath):
        * platform/mac/PopupMenuMac.mm:
        (WebCore::PopupMenu::show):
        * platform/mac/WidgetMac.mm:
        (WebCore::Widget::setFocus):
        (WebCore::Widget::setIsSelected):
        * platform/network/mac/ResourceHandleMac.mm:
        * platform/network/qt/ResourceHandleManagerQt.cpp:
        * platform/network/qt/ResourceHandleQt.cpp:
        (WebCore::ResourceHandle::start):
        * platform/qt/MimeTypeRegistryQt.cpp:
        (WebCore::MimeTypeRegistry::getMIMETypeForPath):
        * platform/qt/PopupMenuQt.cpp:
        * platform/qt/ScrollViewCanvasQt.cpp:
        * platform/qt/ScrollViewQt.cpp:
        * platform/win/TemporaryLinkStubs.cpp:
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintCustomHighlight):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::paintCustomHighlight):
        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::addHighlightOverflow):
        (WebCore::RootInlineBox::paintCustomHighlight):

WebKit:

        Reviewed by Maciej.

        Additional coding by Maciej, additional review by Oliver.

        Added implementations for the new callbacks in EditorClient
        and ChromeClient (basically moved from WebFrameBridge).
        Cleaned up some code paths that are not called anymore
        and done fully inside WebCore now.

        * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
        * Misc/WebElementDictionary.mm:
        * Misc/WebNSAttributedStringExtras.mm:
        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView getVariable:value:]):
        * Plugins/WebNetscapePluginEmbeddedView.mm:
        * Plugins/WebNetscapePluginStream.mm:
        * Plugins/WebPluginContainerCheck.mm:
        * WebCoreSupport/WebChromeClient.h:
        * WebCoreSupport/WebChromeClient.mm:
        (WebChromeClient::shouldInterruptJavaScript):
        * WebCoreSupport/WebEditorClient.h:
        * WebCoreSupport/WebEditorClient.mm:
        (WebEditorClient::shouldChangeSelectedRange):
        * WebCoreSupport/WebFrameBridge.mm:
        (-[WebFrameBridge finishInitializingWithPage:frameName:frameView:ownerElement:]):
        (-[WebFrameBridge fini]):
        * WebCoreSupport/WebFrameLoaderClient.mm:
        * WebView/WebArchiver.mm:
        * WebView/WebFrame.mm:
        (core):
        (kit):
        (-[WebFrame _updateBackground]):
        * WebView/WebFrameInternal.h:
        * WebView/WebFrameView.mm:
        * WebView/WebHTMLRepresentation.mm:
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _updateMouseoverWithEvent:]):
        (-[WebHTMLView _isEditable]):
        (-[WebHTMLView validateUserInterfaceItem:]):
        (-[WebHTMLView maintainsInactiveSelection]):
        (-[WebHTMLView scrollWheel:]):
        (-[WebHTMLView acceptsFirstMouse:]):
        (-[WebHTMLView shouldDelayWindowOrderingForEvent:]):
        (-[WebHTMLView cut:]):
        (-[WebHTMLView paste:]):
        (-[WebHTMLView selectedAttributedString]):
        * WebView/WebScriptDebugDelegate.mm:
        * WebView/WebView.mm:
        (-[WebView _dashboardRegions]):
        (-[WebView setProhibitsMainFrameScrolling:]):
        (-[WebView _setInViewSourceMode:]):
        (-[WebView _inViewSourceMode]):
        (-[WebView shouldClose]):
        (-[WebView setEditable:]):

WebKitQt:

        Reviewed by Maciej.

        Additional coding by Maciej, additional review by Oliver.

        Add stubs for the new methods in ChormeClient and EditorClient,
        remove all references to FrameQt.

        * Api/qwebframe.cpp:
        (QWebFrame::QWebFrame):
        * Api/qwebframe_p.h:
        * Api/qwebpage.cpp:
        * WebCoreSupport/ChromeClientQt.cpp:
        (WebCore::ChromeClientQt::shouldInterruptJavaScript):
        * WebCoreSupport/ChromeClientQt.h:
        * WebCoreSupport/EditorClientQt.cpp:
        (WebCore::EditorClientQt::shouldChangeSelectedRange):
        (WebCore::EditorClientQt::isEditable):
        * WebCoreSupport/EditorClientQt.h:
        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::setFrame):
        (WebCore::FrameLoaderClientQt::webFrame):
        * WebCoreSupport/FrameLoaderClientQt.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
96 files changed:
WebCore/ChangeLog
WebCore/ForwardingHeaders/bindings/NP_jsobject.h [new file with mode: 0644]
WebCore/ForwardingHeaders/bindings/npruntime_impl.h [new file with mode: 0644]
WebCore/ForwardingHeaders/bindings/runtime_root.h [new file with mode: 0644]
WebCore/WebCore.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/kjs_binding.cpp
WebCore/bindings/objc/DOM.mm
WebCore/bindings/objc/DOMInternal.mm
WebCore/bridge/EditorClient.h
WebCore/bridge/mac/FrameViewMac.mm
WebCore/bridge/mac/WebCoreAXObject.mm
WebCore/editing/CommandByName.cpp
WebCore/editing/Editor.cpp
WebCore/editing/Editor.h
WebCore/editing/JSEditor.cpp
WebCore/editing/mac/EditorMac.mm
WebCore/html/HTMLAppletElement.cpp
WebCore/html/HTMLEmbedElement.cpp
WebCore/html/HTMLFormElement.cpp
WebCore/html/HTMLObjectElement.cpp
WebCore/loader/FrameLoader.cpp
WebCore/loader/mac/ImageDocumentMac.mm
WebCore/loader/qt/DocumentLoaderQt.cpp
WebCore/page/Chrome.cpp
WebCore/page/Chrome.h
WebCore/page/ChromeClient.h
WebCore/page/EventHandler.cpp
WebCore/page/EventHandler.h
WebCore/page/Frame.cpp
WebCore/page/Frame.h
WebCore/page/FramePrivate.h
WebCore/page/FrameView.h
WebCore/page/mac/EventHandlerMac.mm
WebCore/page/mac/FrameMac.h [deleted file]
WebCore/page/mac/FrameMac.mm
WebCore/page/mac/WebCoreFrameBridge.h
WebCore/page/mac/WebCoreFrameBridge.mm
WebCore/page/qt/EventHandlerQt.cpp
WebCore/page/qt/FrameQt.cpp
WebCore/page/qt/FrameQt.h [deleted file]
WebCore/platform/MimeTypeRegistry.cpp
WebCore/platform/MimeTypeRegistry.h
WebCore/platform/graphics/svg/SVGImage.cpp
WebCore/platform/graphics/svg/SVGImageEmptyClients.h
WebCore/platform/mac/ClipboardMac.h
WebCore/platform/mac/ClipboardMac.mm
WebCore/platform/mac/FileChooserMac.mm
WebCore/platform/mac/MimeTypeRegistryMac.mm
WebCore/platform/mac/PopupMenuMac.mm
WebCore/platform/mac/WidgetMac.mm
WebCore/platform/network/mac/ResourceHandleMac.mm
WebCore/platform/network/qt/ResourceHandleManagerQt.cpp
WebCore/platform/network/qt/ResourceHandleQt.cpp
WebCore/platform/qt/MimeTypeRegistryQt.cpp
WebCore/platform/qt/PopupMenuQt.cpp
WebCore/platform/qt/ScrollViewCanvasQt.cpp
WebCore/platform/qt/ScrollViewQt.cpp
WebCore/platform/win/TemporaryLinkStubs.cpp
WebCore/rendering/InlineTextBox.cpp
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RootInlineBox.cpp
WebKit/ChangeLog
WebKit/DefaultDelegates/WebDefaultContextMenuDelegate.mm
WebKit/MigrateHeaders.make
WebKit/Misc/WebElementDictionary.mm
WebKit/Misc/WebNSAttributedStringExtras.mm
WebKit/Plugins/WebBaseNetscapePluginView.mm
WebKit/Plugins/WebNetscapePluginEmbeddedView.mm
WebKit/Plugins/WebNetscapePluginStream.mm
WebKit/Plugins/WebPluginContainerCheck.mm
WebKit/WebCoreSupport/WebChromeClient.h
WebKit/WebCoreSupport/WebChromeClient.mm
WebKit/WebCoreSupport/WebEditorClient.h
WebKit/WebCoreSupport/WebEditorClient.mm
WebKit/WebCoreSupport/WebFrameBridge.mm
WebKit/WebCoreSupport/WebFrameLoaderClient.h
WebKit/WebView/WebArchiver.mm
WebKit/WebView/WebDocumentLoaderMac.h
WebKit/WebView/WebFrame.mm
WebKit/WebView/WebFrameInternal.h
WebKit/WebView/WebFrameView.mm
WebKit/WebView/WebHTMLRepresentation.mm
WebKit/WebView/WebHTMLView.mm
WebKit/WebView/WebScriptDebugDelegate.mm
WebKit/WebView/WebView.mm
WebKitQt/Api/qwebframe.cpp
WebKitQt/Api/qwebframe_p.h
WebKitQt/Api/qwebpage.cpp
WebKitQt/ChangeLog
WebKitQt/WebCoreSupport/ChromeClientQt.cpp
WebKitQt/WebCoreSupport/ChromeClientQt.h
WebKitQt/WebCoreSupport/EditorClientQt.cpp
WebKitQt/WebCoreSupport/EditorClientQt.h
WebKitQt/WebCoreSupport/FrameLoaderClientQt.cpp
WebKitQt/WebCoreSupport/FrameLoaderClientQt.h