Commit 8a2a58fd authored by darin's avatar darin
Browse files

Reviewed by Eric.

        - removed KWQWindowWidget
        - changed most event handling to use references instead of pointers
        - chagned PageMac to no longer be a subclass of Page

        Yes, I know there's no detail in this ChangeLog entry.
        No, I don't plan to make a habit of doing things this way.
        Yes, this will probably break the Windows build again.

        * WebCore.xcodeproj/project.pbxproj:
        * bridge/mac/BrowserExtensionMac.mm:
        (WebCore::BrowserExtensionMac::createNewWindow):
        * bridge/mac/FrameViewMac.mm:
        * bridge/mac/MacFrame.h:
        * bridge/mac/MacFrame.mm:
        (WebCore::MacFrame::MacFrame):
        (WebCore::MacFrame::~MacFrame):
        (WebCore::MacFrame::wheelEvent):
        (WebCore::MacFrame::keyEvent):
        (WebCore::MacFrame::khtmlMousePressEvent):
        (WebCore::MacFrame::khtmlMouseMoveEvent):
        (WebCore::MacFrame::khtmlMouseReleaseEvent):
        (WebCore::MacFrame::mouseDown):
        (WebCore::MacFrame::mouseDragged):
        (WebCore::MacFrame::mouseUp):
        (WebCore::MacFrame::mouseMoved):
        (WebCore::MacFrame::sendContextMenuEvent):
        (WebCore::MacFrame::setBridge):
        (WebCore::MacFrame::dragSourceMovedTo):
        (WebCore::MacFrame::dragSourceEndedAt):
        (WebCore::MacFrame::dispatchDragSrcEvent):
        * bridge/mac/PageMac.h: Removed.
        * bridge/mac/PageMac.mm: Added.
        (WebCore::Page::Page):
        (WebCore::Page::windowRect):
        (WebCore::Page::setWindowRect):
        * bridge/mac/WebCoreFrameBridge.h:
        * bridge/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge page]):
        (-[WebCoreFrameBridge initializeSettings:]):
        (globalPoint):
        (createMouseEventFromDraggingInfo):
        (-[WebCoreFrameBridge dragOperationForDraggingInfo:]):
        (-[WebCoreFrameBridge dragExitedWithDraggingInfo:]):
        (-[WebCoreFrameBridge concludeDragForDraggingInfo:]):
        (-[WebCoreFrameBridge dragSourceMovedTo:]):
        (-[WebCoreFrameBridge dragSourceEndedAt:operation:]):
        * bridge/mac/WebCoreFrameNamespaces.mm:
        (WebCore::):
        * bridge/mac/WebCorePageBridge.h:
        * bridge/mac/WebCorePageBridge.mm:
        (-[WebCorePageBridge init]):
        * dom/DocumentImpl.cpp:
        (WebCore::DocumentImpl::prepareMouseEvent):
        (WebCore::DocumentImpl::defaultEventHandler):
        * dom/DocumentImpl.h:
        * dom/NodeImpl.cpp:
        (WebCore::NodeImpl::dispatchMouseEvent):
        (WebCore::NodeImpl::dispatchKeyEvent):
        (WebCore::NodeImpl::dispatchWheelEvent):
        * dom/NodeImpl.h:
        * dom/dom2_eventsimpl.cpp:
        (WebCore::KeyboardEventImpl::KeyboardEventImpl):
        * dom/dom2_eventsimpl.h:
        (WebCore::KeyboardEventImpl::keyEvent):
        * khtml/ecma/kjs_window.cpp:
        (KJS::Window::getValueProperty):
        (KJS::WindowFunc::callAsFunction):
        * khtml/html/html_inlineimpl.cpp:
        (WebCore::HTMLAnchorElementImpl::defaultEventHandler):
        * ksvg2/svg/SVGDocumentImpl.cpp:
        * ksvg2/svg/SVGDocumentImpl.h:
        * kwq/KWQWindowWidget.h:
        * kwq/KWQWindowWidget.mm: Removed.
        * page/Frame.cpp:
        (WebCore::Frame::selectClosestWordFromMouseEvent):
        (WebCore::Frame::handleMousePressEventDoubleClick):
        (WebCore::Frame::handleMousePressEventTripleClick):
        (WebCore::Frame::handleMousePressEventSingleClick):
        (WebCore::Frame::khtmlMousePressEvent):
        (WebCore::Frame::handleMouseMoveEventSelection):
        (WebCore::Frame::khtmlMouseMoveEvent):
        (WebCore::Frame::khtmlMouseReleaseEvent):
        (WebCore::Frame::khtmlMouseDoubleClickEvent):
        (WebCore::Frame::passWidgetMouseDownEventToWidget):
        * page/Frame.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::viewportMousePressEvent):
        (WebCore::FrameView::viewportMouseDoubleClickEvent):
        (WebCore::FrameView::viewportMouseMoveEvent):
        (WebCore::FrameView::viewportMouseReleaseEvent):
        (WebCore::FrameView::dispatchDragEvent):
        (WebCore::FrameView::updateDragAndDrop):
        (WebCore::FrameView::cancelDragAndDrop):
        (WebCore::FrameView::performDragAndDrop):
        (WebCore::FrameView::dispatchMouseEvent):
        (WebCore::FrameView::viewportWheelEvent):
        * page/FrameView.h:
        * page/MouseEventWithHitTestResults.h:
        (WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults):
        (WebCore::MouseEventWithHitTestResults::event):
        * page/Page.cpp:
        (WebCore::Page::init):
        * page/Page.h:
        (WebCore::Page::bridge):
        * platform/KeyEvent.h:
        (WebCore::KeyEvent::isAutoRepeat):
        * platform/MouseEvent.h:
        (WebCore::MouseEvent::MouseEvent):
        * platform/mac/KeyEventMac.mm:
        (WebCore::KeyEvent::KeyEvent):
        * platform/win/TemporaryLinkStubs.cpp:
        (FrameView::isFrameView):
        * rendering/render_form.cpp:
        (WebCore::RenderFormElement::clicked):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2776d5a9
2006-03-16 Darin Adler <darin@apple.com>
Reviewed by Eric.
- removed KWQWindowWidget
- changed most event handling to use references instead of pointers
- chagned PageMac to no longer be a subclass of Page
Yes, I know there's no detail in this ChangeLog entry.
No, I don't plan to make a habit of doing things this way.
Yes, this will probably break the Windows build again.
* WebCore.xcodeproj/project.pbxproj:
* bridge/mac/BrowserExtensionMac.mm:
(WebCore::BrowserExtensionMac::createNewWindow):
* bridge/mac/FrameViewMac.mm:
* bridge/mac/MacFrame.h:
* bridge/mac/MacFrame.mm:
(WebCore::MacFrame::MacFrame):
(WebCore::MacFrame::~MacFrame):
(WebCore::MacFrame::wheelEvent):
(WebCore::MacFrame::keyEvent):
(WebCore::MacFrame::khtmlMousePressEvent):
(WebCore::MacFrame::khtmlMouseMoveEvent):
(WebCore::MacFrame::khtmlMouseReleaseEvent):
(WebCore::MacFrame::mouseDown):
(WebCore::MacFrame::mouseDragged):
(WebCore::MacFrame::mouseUp):
(WebCore::MacFrame::mouseMoved):
(WebCore::MacFrame::sendContextMenuEvent):
(WebCore::MacFrame::setBridge):
(WebCore::MacFrame::dragSourceMovedTo):
(WebCore::MacFrame::dragSourceEndedAt):
(WebCore::MacFrame::dispatchDragSrcEvent):
* bridge/mac/PageMac.h: Removed.
* bridge/mac/PageMac.mm: Added.
(WebCore::Page::Page):
(WebCore::Page::windowRect):
(WebCore::Page::setWindowRect):
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge page]):
(-[WebCoreFrameBridge initializeSettings:]):
(globalPoint):
(createMouseEventFromDraggingInfo):
(-[WebCoreFrameBridge dragOperationForDraggingInfo:]):
(-[WebCoreFrameBridge dragExitedWithDraggingInfo:]):
(-[WebCoreFrameBridge concludeDragForDraggingInfo:]):
(-[WebCoreFrameBridge dragSourceMovedTo:]):
(-[WebCoreFrameBridge dragSourceEndedAt:operation:]):
* bridge/mac/WebCoreFrameNamespaces.mm:
(WebCore::):
* bridge/mac/WebCorePageBridge.h:
* bridge/mac/WebCorePageBridge.mm:
(-[WebCorePageBridge init]):
* dom/DocumentImpl.cpp:
(WebCore::DocumentImpl::prepareMouseEvent):
(WebCore::DocumentImpl::defaultEventHandler):
* dom/DocumentImpl.h:
* dom/NodeImpl.cpp:
(WebCore::NodeImpl::dispatchMouseEvent):
(WebCore::NodeImpl::dispatchKeyEvent):
(WebCore::NodeImpl::dispatchWheelEvent):
* dom/NodeImpl.h:
* dom/dom2_eventsimpl.cpp:
(WebCore::KeyboardEventImpl::KeyboardEventImpl):
* dom/dom2_eventsimpl.h:
(WebCore::KeyboardEventImpl::keyEvent):
* khtml/ecma/kjs_window.cpp:
(KJS::Window::getValueProperty):
(KJS::WindowFunc::callAsFunction):
* khtml/html/html_inlineimpl.cpp:
(WebCore::HTMLAnchorElementImpl::defaultEventHandler):
* ksvg2/svg/SVGDocumentImpl.cpp:
* ksvg2/svg/SVGDocumentImpl.h:
* kwq/KWQWindowWidget.h:
* kwq/KWQWindowWidget.mm: Removed.
* page/Frame.cpp:
(WebCore::Frame::selectClosestWordFromMouseEvent):
(WebCore::Frame::handleMousePressEventDoubleClick):
(WebCore::Frame::handleMousePressEventTripleClick):
(WebCore::Frame::handleMousePressEventSingleClick):
(WebCore::Frame::khtmlMousePressEvent):
(WebCore::Frame::handleMouseMoveEventSelection):
(WebCore::Frame::khtmlMouseMoveEvent):
(WebCore::Frame::khtmlMouseReleaseEvent):
(WebCore::Frame::khtmlMouseDoubleClickEvent):
(WebCore::Frame::passWidgetMouseDownEventToWidget):
* page/Frame.h:
* page/FrameView.cpp:
(WebCore::FrameView::viewportMousePressEvent):
(WebCore::FrameView::viewportMouseDoubleClickEvent):
(WebCore::FrameView::viewportMouseMoveEvent):
(WebCore::FrameView::viewportMouseReleaseEvent):
(WebCore::FrameView::dispatchDragEvent):
(WebCore::FrameView::updateDragAndDrop):
(WebCore::FrameView::cancelDragAndDrop):
(WebCore::FrameView::performDragAndDrop):
(WebCore::FrameView::dispatchMouseEvent):
(WebCore::FrameView::viewportWheelEvent):
* page/FrameView.h:
* page/MouseEventWithHitTestResults.h:
(WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults):
(WebCore::MouseEventWithHitTestResults::event):
* page/Page.cpp:
(WebCore::Page::init):
* page/Page.h:
(WebCore::Page::bridge):
* platform/KeyEvent.h:
(WebCore::KeyEvent::isAutoRepeat):
* platform/MouseEvent.h:
(WebCore::MouseEvent::MouseEvent):
* platform/mac/KeyEventMac.mm:
(WebCore::KeyEvent::KeyEvent):
* platform/win/TemporaryLinkStubs.cpp:
(FrameView::isFrameView):
* rendering/render_form.cpp:
(WebCore::RenderFormElement::clicked):
2006-03-16 Eric Seidel <eseidel@apple.com>
 
Reviewed by darin.
......@@ -208,7 +208,6 @@
935FBCF209BA143B00E230B1 /* ExceptionCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 935FBCF109BA143B00E230B1 /* ExceptionCode.h */; };
936B424E09A436CD00BAA820 /* KSVGCSSParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0F6F6089701F100BA5114 /* KSVGCSSParser.cpp */; };
937A36A7097E2E3200E4EE2F /* UserAgentStyleSheets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 937A36A6097E2E3200E4EE2F /* UserAgentStyleSheets.cpp */; };
937D809A09A063330092A01E /* PageMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 937D809909A063330092A01E /* PageMac.h */; };
9380F47309A11AB4001FDB34 /* Widget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9380F47109A11AB4001FDB34 /* Widget.cpp */; };
9380F47409A11AB4001FDB34 /* Widget.h in Headers */ = {isa = PBXBuildFile; fileRef = 9380F47209A11AB4001FDB34 /* Widget.h */; };
9380F47809A11ACC001FDB34 /* WidgetMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9380F47709A11ACC001FDB34 /* WidgetMac.mm */; };
......@@ -224,6 +223,7 @@
93CD4FE30995F9EA007ECC97 /* StringImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93CD4FDC0995F9EA007ECC97 /* StringImpl.cpp */; };
93CD4FE40995F9EA007ECC97 /* StringImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CD4FDD0995F9EA007ECC97 /* StringImpl.h */; };
93CD4FEC0995FD2A007ECC97 /* PlatformString.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CD4FEB0995FD2A007ECC97 /* PlatformString.h */; };
93E47C5C09BE2BBB0019C5C1 /* PageMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93E47C5B09BE2BBB0019C5C1 /* PageMac.mm */; };
93E62D9B0985F41600E1B5E3 /* SystemTime.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E62D990985F41600E1B5E3 /* SystemTime.h */; };
93EEC1F809C2877700C515D1 /* Attr.idl in Resources */ = {isa = PBXBuildFile; fileRef = 93EEC1E509C2877700C515D1 /* Attr.idl */; };
93EEC1F909C2877700C515D1 /* CharacterData.idl in Resources */ = {isa = PBXBuildFile; fileRef = 93EEC1E609C2877700C515D1 /* CharacterData.idl */; };
......@@ -301,7 +301,6 @@
93F1999B08245E59001E9ABC /* KWQTextStream.h in Headers */ = {isa = PBXBuildFile; fileRef = F58786BF02DE3B8601EA4122 /* KWQTextStream.h */; };
93F1999D08245E59001E9ABC /* KWQValueList.h in Headers */ = {isa = PBXBuildFile; fileRef = F58786C202DE3B8601EA4122 /* KWQValueList.h */; };
93F1999E08245E59001E9ABC /* KWQValueListImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F587853B02DE375901EA4122 /* KWQValueListImpl.h */; };
93F199A308245E59001E9ABC /* KWQWindowWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = F587854302DE375901EA4122 /* KWQWindowWidget.h */; };
93F199A508245E59001E9ABC /* WebCoreCache.h in Headers */ = {isa = PBXBuildFile; fileRef = F5B2A4FC02E2220F018635CB /* WebCoreCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
93F199A608245E59001E9ABC /* WebCoreCookieAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = F587854902DE375901EA4122 /* WebCoreCookieAdapter.h */; settings = {ATTRIBUTES = (Private, ); }; };
93F199A708245E59001E9ABC /* WebCoreEncodings.h in Headers */ = {isa = PBXBuildFile; fileRef = F56234DF03026D7301629B47 /* WebCoreEncodings.h */; settings = {ATTRIBUTES = (Private, ); }; };
......@@ -369,7 +368,6 @@
93F19A5308245E59001E9ABC /* KWQTextEdit.mm in Sources */ = {isa = PBXBuildFile; fileRef = F587853802DE375901EA4122 /* KWQTextEdit.mm */; };
93F19A5408245E59001E9ABC /* KWQTextStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F587853902DE375901EA4122 /* KWQTextStream.cpp */; };
93F19A5608245E59001E9ABC /* KWQValueListImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F587853C02DE375901EA4122 /* KWQValueListImpl.cpp */; };
93F19A5A08245E59001E9ABC /* KWQWindowWidget.mm in Sources */ = {isa = PBXBuildFile; fileRef = F587854402DE375901EA4122 /* KWQWindowWidget.mm */; };
93F19A5C08245E59001E9ABC /* WebCoreCookieAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = F587854A02DE375901EA4122 /* WebCoreCookieAdapter.m */; };
93F19A5D08245E59001E9ABC /* WebCoreImageRendererFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = F587854F02DE375901EA4122 /* WebCoreImageRendererFactory.m */; };
93F19A5E08245E59001E9ABC /* WebCoreTextRendererFactory.mm in Sources */ = {isa = PBXBuildFile; fileRef = F587855302DE375901EA4122 /* WebCoreTextRendererFactory.mm */; };
......@@ -1358,7 +1356,6 @@
935FBC4409BA00B900E230B1 /* EventListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventListener.h; sourceTree = "<group>"; };
935FBCF109BA143B00E230B1 /* ExceptionCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionCode.h; sourceTree = "<group>"; };
937A36A6097E2E3200E4EE2F /* UserAgentStyleSheets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserAgentStyleSheets.cpp; sourceTree = "<group>"; };
937D809909A063330092A01E /* PageMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageMac.h; sourceTree = "<group>"; };
9380F47109A11AB4001FDB34 /* Widget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Widget.cpp; path = platform/Widget.cpp; sourceTree = "<group>"; };
9380F47209A11AB4001FDB34 /* Widget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Widget.h; path = platform/Widget.h; sourceTree = "<group>"; };
9380F47709A11ACC001FDB34 /* WidgetMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WidgetMac.mm; sourceTree = "<group>"; };
......@@ -1384,6 +1381,7 @@
93CD4FDC0995F9EA007ECC97 /* StringImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringImpl.cpp; path = platform/StringImpl.cpp; sourceTree = "<group>"; };
93CD4FDD0995F9EA007ECC97 /* StringImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringImpl.h; path = platform/StringImpl.h; sourceTree = "<group>"; };
93CD4FEB0995FD2A007ECC97 /* PlatformString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformString.h; path = platform/PlatformString.h; sourceTree = "<group>"; };
93E47C5B09BE2BBB0019C5C1 /* PageMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = PageMac.mm; sourceTree = "<group>"; };
93E62D990985F41600E1B5E3 /* SystemTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SystemTime.h; path = platform/SystemTime.h; sourceTree = "<group>"; };
93EEC1E509C2877700C515D1 /* Attr.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Attr.idl; sourceTree = "<group>"; };
93EEC1E609C2877700C515D1 /* CharacterData.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CharacterData.idl; sourceTree = "<group>"; };
......@@ -2277,8 +2275,6 @@
F587853902DE375901EA4122 /* KWQTextStream.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KWQTextStream.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F587853B02DE375901EA4122 /* KWQValueListImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KWQValueListImpl.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F587853C02DE375901EA4122 /* KWQValueListImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KWQValueListImpl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F587854302DE375901EA4122 /* KWQWindowWidget.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KWQWindowWidget.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F587854402DE375901EA4122 /* KWQWindowWidget.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQWindowWidget.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F587854902DE375901EA4122 /* WebCoreCookieAdapter.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreCookieAdapter.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F587854A02DE375901EA4122 /* WebCoreCookieAdapter.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebCoreCookieAdapter.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F587854C02DE375901EA4122 /* WebCoreFrameView.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreFrameView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
......@@ -2511,7 +2507,7 @@
935C475E09AC4CAE00A6AAB4 /* HistoryMac.mm */,
65BF023B0974819000C43196 /* MacFrame.h */,
65BF023C0974819000C43196 /* MacFrame.mm */,
937D809909A063330092A01E /* PageMac.h */,
93E47C5B09BE2BBB0019C5C1 /* PageMac.mm */,
F5B2A4FC02E2220F018635CB /* WebCoreCache.h */,
F5B2A4FD02E2220F018635CB /* WebCoreCache.mm */,
F56234DF03026D7301629B47 /* WebCoreEncodings.h */,
......@@ -3533,8 +3529,6 @@
F587853602DE375901EA4122 /* KWQTextArea.mm */,
F587851B02DE375901EA4122 /* KWQTextField.h */,
F587851C02DE375901EA4122 /* KWQTextField.mm */,
F587854302DE375901EA4122 /* KWQWindowWidget.h */,
F587854402DE375901EA4122 /* KWQWindowWidget.mm */,
);
name = other;
sourceTree = "<group>";
......@@ -3993,7 +3987,6 @@
93F1999B08245E59001E9ABC /* KWQTextStream.h in Headers */,
93F1999D08245E59001E9ABC /* KWQValueList.h in Headers */,
93F1999E08245E59001E9ABC /* KWQValueListImpl.h in Headers */,
93F199A308245E59001E9ABC /* KWQWindowWidget.h in Headers */,
93F199A508245E59001E9ABC /* WebCoreCache.h in Headers */,
93F199A608245E59001E9ABC /* WebCoreCookieAdapter.h in Headers */,
93F199A708245E59001E9ABC /* WebCoreEncodings.h in Headers */,
......@@ -4412,7 +4405,6 @@
6550B6A2099DF0270090D781 /* CommentImpl.h in Headers */,
6550B6A4099DF0270090D781 /* EditingTextImpl.h in Headers */,
6550B6A6099DF0270090D781 /* TextImpl.h in Headers */,
937D809A09A063330092A01E /* PageMac.h in Headers */,
9380F47409A11AB4001FDB34 /* Widget.h in Headers */,
ED2BA83C09A24B91006C0AC4 /* DocumentMarker.h in Headers */,
BCC47E2709A3D6F100ADB771 /* FontFamily.h in Headers */,
......@@ -5145,7 +5137,6 @@
93F19A5308245E59001E9ABC /* KWQTextEdit.mm in Sources */,
93F19A5408245E59001E9ABC /* KWQTextStream.cpp in Sources */,
93F19A5608245E59001E9ABC /* KWQValueListImpl.cpp in Sources */,
93F19A5A08245E59001E9ABC /* KWQWindowWidget.mm in Sources */,
93F19A5C08245E59001E9ABC /* WebCoreCookieAdapter.m in Sources */,
93F19A5D08245E59001E9ABC /* WebCoreImageRendererFactory.m in Sources */,
93F19A5E08245E59001E9ABC /* WebCoreTextRendererFactory.mm in Sources */,
......@@ -5609,6 +5600,7 @@
935207C009BD412100F2038D /* LocalizedStringsMac.mm in Sources */,
9352084509BD43B900F2038D /* Language.mm in Sources */,
9352087709BD453400F2038D /* CookieJar.mm in Sources */,
93E47C5C09BE2BBB0019C5C1 /* PageMac.mm in Sources */,
93EEC1FF09C2877700C515D1 /* CanvasRenderingContext2D.cpp in Sources */,
93EEC20209C2877700C515D1 /* CanvasGradient.cpp in Sources */,
93EEC26F09C3218000C515D1 /* CanvasPattern.cpp in Sources */,
......
......@@ -130,7 +130,7 @@ void BrowserExtensionMac::createNewWindow(const KURL& url,
[bridge setScrollbarsVisible:winArgs.scrollBarsVisible];
[bridge setWindowIsResizable:winArgs.resizable];
NSRect windowFrame = [bridge windowFrame];
NSRect windowFrame = [page windowFrame];
NSSize size = { 1, 1 }; // workaround for 4213314
NSSize scaleRect = [[page outerView] convertSize:size toView:nil];
......@@ -162,7 +162,7 @@ void BrowserExtensionMac::createNewWindow(const KURL& url,
windowFrame.origin.y -= heightDelta;
}
[bridge setWindowFrame:windowFrame];
[page setWindowFrame:windowFrame];
[bridge showWindow];
......
......@@ -28,18 +28,12 @@
#import "DocumentImpl.h"
#import "KWQExceptions.h"
#import "KWQWindowWidget.h"
#import "MacFrame.h"
#import "WebCoreFrameBridge.h"
#import "render_object.h"
namespace WebCore {
Widget* FrameView::topLevelWidget() const
{
return Mac(frame())->topLevelWidget();
}
void FrameView::updateBorder()
{
KWQ_BLOCK_EXCEPTIONS;
......@@ -58,9 +52,4 @@ void FrameView::updateDashboardRegions()
}
}
IntPoint FrameView::viewportToGlobal(const IntPoint &p) const
{
return static_cast<KWQWindowWidget*>(topLevelWidget())->viewportToGlobal(p);
}
}
......@@ -30,6 +30,7 @@
#include "IntRect.h"
#include "KWQClipboard.h"
#include "KWQScrollBar.h"
#include "MouseEvent.h"
#include "NodeImpl.h"
#include "WebCoreKeyboardAccess.h"
#include "text_affinity.h"
......@@ -37,7 +38,6 @@
#import <CoreFoundation/CoreFoundation.h>
class KWQWindowWidget;
class NPObject;
namespace KJS {
......@@ -189,7 +189,7 @@ public:
NSImage *selectionImage() const;
NSImage *snapshotDragImage(NodeImpl *node, NSRect *imageRect, NSRect *elementRect) const;
bool dispatchDragSrcEvent(const AtomicString &eventType, const IntPoint &loc) const;
bool dispatchDragSrcEvent(const AtomicString &eventType, const MouseEvent&) const;
NSFont *fontForSelection(bool *hasMultipleFonts) const;
NSDictionary *fontAttributesForSelectionStart() const;
......@@ -216,8 +216,8 @@ public:
bool dragHysteresisExceeded(float dragLocationX, float dragLocationY) const;
bool eventMayStartDrag(NSEvent *) const;
void dragSourceMovedTo(const IntPoint &loc);
void dragSourceEndedAt(const IntPoint &loc, NSDragOperation operation);
void dragSourceMovedTo(const MouseEvent&);
void dragSourceEndedAt(const MouseEvent&, NSDragOperation);
bool mayCut();
bool mayCopy();
......@@ -241,8 +241,6 @@ public:
bool findString(NSString *str, bool forward, bool caseFlag, bool wrapFlag);
KWQWindowWidget *topLevelWidget();
virtual void tokenizerProcessedData();
virtual QString overrideMediaType() const;
......@@ -317,9 +315,9 @@ protected:
virtual void redirectionTimerFired(Timer<Frame>*);
private:
virtual void khtmlMousePressEvent(MouseEventWithHitTestResults *);
virtual void khtmlMouseMoveEvent(MouseEventWithHitTestResults *);
virtual void khtmlMouseReleaseEvent(MouseEventWithHitTestResults *);
virtual void khtmlMousePressEvent(const MouseEventWithHitTestResults&);
virtual void khtmlMouseMoveEvent(const MouseEventWithHitTestResults&);
virtual void khtmlMouseReleaseEvent(const MouseEventWithHitTestResults&);
NSView *mouseDownViewIfStillGood();
......@@ -343,8 +341,7 @@ private:
bool _sendingEventToSubview;
bool _mouseDownMayStartDrag;
bool _mouseDownMayStartSelect;
// in our window's coords
int _mouseDownWinX, _mouseDownWinY;
MouseEvent m_mouseDown;
// in our view's coords
int _mouseDownX, _mouseDownY;
float _mouseDownTimestamp;
......@@ -355,8 +352,6 @@ private:
NSMutableDictionary *_formValuesAboutToBeSubmitted;
ObjCDOMElement *_formAboutToBeSubmitted;
KWQWindowWidget *_windowWidget;
bool _haveUndoRedoOperations;
HashSet<RefPtr<DOMStringImpl> > urlsBridgeKnowsAbout;
......
......@@ -50,7 +50,6 @@
#import "KWQRegExp.h"
#import "KWQScrollBar.h"
#import "TextEncoding.h"
#import "KWQWindowWidget.h"
#import "KeyEvent.h"
#import "MouseEvent.h"
#import "MouseEventWithHitTestResults.h"
......@@ -123,7 +122,6 @@ MacFrame::MacFrame(Page* page, RenderPart* ownerRenderer)
, _activationEventNumber(0)
, _formValuesAboutToBeSubmitted(nil)
, _formAboutToBeSubmitted(nil)
, _windowWidget(0)
, _bindingRoot(0)
, _windowScriptObject(0)
, _windowScriptNPObject(0)
......@@ -143,8 +141,6 @@ MacFrame::~MacFrame()
[_bridge clearFrame];
KWQRelease(_bridge);
_bridge = nil;
delete _windowWidget;
}
void MacFrame::freeClipboard()
......@@ -789,7 +785,7 @@ bool MacFrame::wheelEvent(NSEvent *event)
_currentEvent = KWQRetain(event);
WheelEvent qEvent(event);
v->viewportWheelEvent(&qEvent);
v->viewportWheelEvent(qEvent);
ASSERT(_currentEvent == event);
KWQRelease(event);
......@@ -1373,7 +1369,7 @@ bool MacFrame::keyEvent(NSEvent *event)
_currentEvent = KWQRetain(event);
KeyEvent qEvent(event);
result = !node->dispatchKeyEvent(&qEvent);
result = !node->dispatchKeyEvent(qEvent);
// We want to send both a down and a press for the initial key event.
// To get KHTML to do this, we send a second KeyPress with "is repeat" set to true,
......@@ -1381,9 +1377,8 @@ bool MacFrame::keyEvent(NSEvent *event)
// That's not a great hack; it would be good to do this in a better way.
if ([event type] == NSKeyDown && ![event isARepeat]) {
KeyEvent repeatEvent(event, true);
if (!node->dispatchKeyEvent(&repeatEvent)) {
if (!node->dispatchKeyEvent(repeatEvent))
result = true;
}
}
ASSERT(_currentEvent == event);
......@@ -1397,18 +1392,18 @@ bool MacFrame::keyEvent(NSEvent *event)
return false;
}
void MacFrame::khtmlMousePressEvent(MouseEventWithHitTestResults *event)
void MacFrame::khtmlMousePressEvent(const MouseEventWithHitTestResults& event)
{
bool singleClick = [_currentEvent clickCount] <= 1;
// If we got the event back, that must mean it wasn't prevented,
// so it's allowed to start a drag or selection.
_mouseDownMayStartSelect = canMouseDownStartSelect(event->innerNode());
_mouseDownMayStartSelect = canMouseDownStartSelect(event.innerNode());
// Careful that the drag starting logic stays in sync with eventMayStartDrag()
_mouseDownMayStartDrag = singleClick;
d->m_mousePressNode = event->innerNode();
d->m_mousePressNode = event.innerNode();
if (!passWidgetMouseDownEventToWidget(event, false)) {
// We don't do this at the start of mouse down handling (before calling into WebCore),
......@@ -1609,7 +1604,7 @@ bool MacFrame::dragHysteresisExceeded(float dragLocationX, float dragLocationY)
return deltaX >= threshold || deltaY >= threshold;
}
void MacFrame::khtmlMouseMoveEvent(MouseEventWithHitTestResults *event)
void MacFrame::khtmlMouseMoveEvent(const MouseEventWithHitTestResults& event)
{
KWQ_BLOCK_EXCEPTIONS;
......@@ -1697,7 +1692,7 @@ void MacFrame::khtmlMouseMoveEvent(MouseEventWithHitTestResults *event)
_dragClipboard->setDragImageElement(_dragSrc.get(), IntPoint(_mouseDownX - srcX, _mouseDownY - srcY));
}
_mouseDownMayStartDrag = dispatchDragSrcEvent(dragstartEvent, IntPoint(_mouseDownWinX, _mouseDownWinY));
_mouseDownMayStartDrag = dispatchDragSrcEvent(dragstartEvent, m_mouseDown);
// Invalidate clipboard here against anymore pasteboard writing for security. The drag
// image can still be changed as we drag, but not the pasteboard data.
_dragClipboard->setAccessPolicy(KWQClipboard::ImageWritable);
......@@ -1724,7 +1719,8 @@ void MacFrame::khtmlMouseMoveEvent(MouseEventWithHitTestResults *event)
BOOL startedDrag = [_bridge startDraggingImage:dragImage at:dragLoc operation:srcOp event:_currentEvent sourceIsDHTML:_dragSrcIsDHTML DHTMLWroteData:wcWrotePasteboard];
if (!startedDrag && _dragSrcMayBeDHTML) {
// WebKit canned the drag at the last minute - we owe _dragSrc a DRAGEND event
dispatchDragSrcEvent(dragendEvent, IntPoint(dragLocation));
MouseEvent event;
dispatchDragSrcEvent(dragendEvent, event);
_mouseDownMayStartDrag = false;
}
}
......@@ -1747,7 +1743,7 @@ void MacFrame::khtmlMouseMoveEvent(MouseEventWithHitTestResults *event)
_mouseDownMayStartDrag = false;
d->m_view->invalidateClick();
NodeImpl* node = event->innerNode();
NodeImpl* node = event.innerNode();
RenderLayer* layer = 0;
if (node && node->renderer())
layer = node->renderer()->enclosingLayer();
......@@ -1840,7 +1836,7 @@ bool MacFrame::tryPaste()
return !dispatchCPPEvent(pasteEvent, KWQClipboard::Readable);
}
void MacFrame::khtmlMouseReleaseEvent(MouseEventWithHitTestResults *event)
void MacFrame::khtmlMouseReleaseEvent(const MouseEventWithHitTestResults& event)
{
NSView *view = mouseDownViewIfStillGood();
if (!view) {
......@@ -1849,9 +1845,8 @@ void MacFrame::khtmlMouseReleaseEvent(MouseEventWithHitTestResults *event)
// the mouse down and drag events to see if we might start a drag. For other first clicks
// in a window, we just don't acceptFirstMouse, and the whole down-drag-up sequence gets
// ignored upstream of this layer.
if (_activationEventNumber != [_currentEvent eventNumber]) {
if (_activationEventNumber != [_currentEvent eventNumber])
Frame::khtmlMouseReleaseEvent(event);
}
return;
}
stopAutoscrollTimer();
......@@ -1984,17 +1979,15 @@ void MacFrame::mouseDown(NSEvent *event)
NSEvent *oldCurrentEvent = _currentEvent;
_currentEvent = KWQRetain(event);
m_mouseDown = MouseEvent(event);
NSPoint loc = [event locationInWindow];
_mouseDownWinX = (int)loc.x;
_mouseDownWinY = (int)loc.y;
d->m_view->viewportToContents(_mouseDownWinX, _mouseDownWinY, _mouseDownX, _mouseDownY);
d->m_view->viewportToContents((int)loc.x, (int)loc.y, _mouseDownX, _mouseDownY);
_mouseDownTimestamp = [event timestamp];
_mouseDownMayStartDrag = false;
_mouseDownMayStartSelect = false;
MouseEvent kEvent(event);
v->viewportMousePressEvent(&kEvent);
v->viewportMousePressEvent(event);
ASSERT(_currentEvent == event);
KWQRelease(event);
......@@ -2015,8 +2008,7 @@ void MacFrame::mouseDragged(NSEvent *event)
NSEvent *oldCurrentEvent = _currentEvent;
_currentEvent = KWQRetain(event);
MouseEvent kEvent(event);
v->viewportMouseMoveEvent(&kEvent);
v->viewportMouseMoveEvent(event);
ASSERT(_currentEvent == event);
KWQRelease(event);
......@@ -2044,13 +2036,10 @@ void MacFrame::mouseUp(NSEvent *event)
// a triple click is treated as a single click, but the fourth is then
// treated as another double click. Hence the "% 2" below.
int clickCount = [event clickCount];
if (clickCount > 0 && clickCount % 2 == 0) {
MouseEvent doubleClickEvent(event);
v->viewportMouseDoubleClickEvent(&doubleClickEvent);
} else {
MouseEvent releaseEvent(event);
v->viewportMouseReleaseEvent(&releaseEvent);
}
if (clickCount > 0 && clickCount % 2 == 0)
v->viewportMouseDoubleClickEvent(event);
else
v->viewportMouseReleaseEvent(event);
ASSERT(_currentEvent == event);
KWQRelease(event);
......@@ -2135,8 +2124,7 @@ void MacFrame::mouseMoved(NSEvent *event)
NSEvent *oldCurrentEvent = _currentEvent;
_currentEvent = KWQRetain(event);
MouseEvent kEvent(event);
v->viewportMouseMoveEvent(&kEvent);
v->viewportMouseMoveEvent(event);
ASSERT(_currentEvent == event);
KWQRelease(event);
......@@ -2179,12 +2167,12 @@ bool MacFrame::sendContextMenuEvent(NSEvent *event)
int xm, ym;
v->viewportToContents(mouseEvent.x(), mouseEvent.y(), xm, ym);
MouseEventWithHitTestResults mev = doc->prepareMouseEvent(false, true, false, xm, ym, &mouseEvent);
MouseEventWithHitTestResults mev = doc->prepareMouseEvent(false, true, false, xm, ym, mouseEvent);
swallowEvent = v->dispatchMouseEvent(contextmenuEvent, mev.innerNode(), true, 0, &mouseEvent, true);
swallowEvent = v->dispatchMouseEvent(contextmenuEvent, mev.innerNode(), true, 0, mouseEvent, true);
if (!swallowEvent && !isPointInsideSelection(xm, ym) &&
([_bridge selectWordBeforeMenuEvent] || [_bridge isEditable] || mev.innerNode()->isContentEditable())) {
selectClosestWordFromMouseEvent(&mouseEvent, mev.innerNode(), xm, ym);
selectClosestWordFromMouseEvent(mouseEvent, mev.innerNode(), xm, ym);
}
ASSERT(_currentEvent == event);
......@@ -2889,11 +2877,6 @@ NSWritingDirection MacFrame::baseWritingDirectionForSelectionStart() const
return result;
}
KWQWindowWidget *MacFrame::topLevelWidget()
{
return _windowWidget;
}
void MacFrame::tokenizerProcessedData()
{
if (d->m_doc) {
......@@ -2907,11 +2890,9 @@ void MacFrame::setBridge(WebCoreFrameBridge *bridge)
if (_bridge == bridge)
return;
delete _windowWidget;
KWQRetain(bridge);
KWQRelease(_bridge);
_bridge = bridge;
_windowWidget = new KWQWindowWidget(_bridge);
}
QString MacFrame::overrideMediaType() const
......@@ -3451,29 +3432,29 @@ bool MacFrame::shouldClose()
return true;
}
void MacFrame::dragSourceMovedTo(const IntPoint &loc)
void MacFrame::dragSourceMovedTo(const MouseEvent& event)
{
if (_dragSrc && _dragSrcMayBeDHTML) {
// for now we don't care if event handler cancels default behavior, since there is none
dispatchDragSrcEvent(dragEvent, loc);
dispatchDragSrcEvent(dragEvent, event);
}
}
void MacFrame::dragSourceEndedAt(const IntPoint &loc, NSDragOperation operation)
void MacFrame::dragSourceEndedAt(const MouseEvent& event, NSDragOperation operation)
{
if (_dragSrc && _dragSrcMayBeDHTML) {
_dragClipboard->setDestinationOperation(operation);
// for now we don't care if event handler cancels default behavior, since there is none
dispatchDragSrcEvent(dragendEvent, loc);
dispatchDragSrcEvent(dragendEvent, event);
}
freeClipboard();
_dragSrc = 0;
}
// returns if we should continue "default processing", i.e., whether eventhandler canceled
bool MacFrame::dispatchDragSrcEvent(const AtomicString &eventType, const IntPoint &loc) const
bool MacFrame::dispatchDragSrcEvent(const AtomicString &eventType, const MouseEvent& event) const
{
bool noDefaultProc = d->m_view->dispatchDragEvent(eventType, _dragSrc.get(), loc, _dragClipboard.get());
bool noDefaultProc = d->m_view->dispatchDragEvent(eventType, _dragSrc.get(), event, _dragClipboard.get());
return !noDefaultProc;
}
......
......@@ -18,30 +18,35 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef PAGE_MAC_H
#define PAGE_MAC_H
#import "config.h"
#import "Page.h"
#include "Page.h"