2006-12-04 Don Gibson <dgibson77@gmail.com>
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Dec 2006 19:37:15 +0000 (19:37 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Dec 2006 19:37:15 +0000 (19:37 +0000)
        Reviewed and landed by Alexey.

        http://bugs.webkit.org/show_bug.cgi?id=11738:
        Make link clicking work again on Windows.

WebCore:
        This re-implements a few functions that used to be part of FrameWin in
        their new loader-based locations, and copies a few things from the Mac
        and Qt event handling code that aren't strictly necessary but are
        pretty simple.

        * WebCore.vcproj/WebCore/WebCore.vcproj:
        * bridge/win/ChromeClientWin.h:
        * bridge/win/ContextMenuClientWin.h:
        * bridge/win/EditorClientWin.h:
        * bridge/win/FrameWin.cpp:
        (WebCore::FrameWin::client):
        * bridge/win/FrameWin.h:
        * loader/win/DocumentLoaderWin.cpp: Added.
        (WebCore::DocumentLoader::setTitle):
        * loader/win/FrameLoaderClientWin.cpp: Added.
        (WebCore::FrameLoaderClientWin::userAgent):
        * loader/win/FrameLoaderClientWin.h:
        * loader/win/FrameLoaderWin.cpp: Added.
        (WebCore::FrameLoader::urlSelected):
        (WebCore::FrameLoader::submitForm):
        (WebCore::FrameLoader::setTitle):
        * page/win/EventHandlerWin.cpp: Added.
        (WebCore::EventHandler::passMousePressEventToSubframe):
        (WebCore::EventHandler::passMouseMoveEventToSubframe):
        (WebCore::EventHandler::passMouseReleaseEventToSubframe):
        (WebCore::EventHandler::passWheelEventToSubframe):
        (WebCore::EventHandler::passMousePressEventToScrollbar):
        (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::EventHandler::tabsToLinks):
        (WebCore::EventHandler::tabsToAllControls):
        (WebCore::EventHandler::lastEventIsMouseUp):
        (WebCore::EventHandler::passSubframeEventToSubframe):
        (WebCore::EventHandler::passMouseDownEventToWidget):
        (WebCore::EventHandler::passWheelEventToWidget):
        (WebCore::FrameLoader::getHistoryLength):
        (WebCore::FrameLoader::historyURL):
        (WebCore::FrameLoader::createFrame):
        (WebCore::FrameLoaderClientWin::setTitle):

WebKit:
        The WebKit changes are to ignore WM_MOUSEMOVED messages when the mouse
        hasn't actually moved, which were preventing clicks from actually
        getting dispatched in many cases.  It's a peculiarity of Windows mouse
        handling that we receive these at all.

        * COM/WebView.cpp:
        (WebView::WebView):
        (WebView::mouseMoved):
        * COM/WebView.h:

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

16 files changed:
WebCore/ChangeLog
WebCore/WebCore.vcproj/WebCore/WebCore.vcproj
WebCore/bridge/win/ChromeClientWin.h
WebCore/bridge/win/ContextMenuClientWin.h
WebCore/bridge/win/EditorClientWin.h
WebCore/bridge/win/FrameWin.cpp
WebCore/bridge/win/FrameWin.h
WebCore/loader/win/DocumentLoaderWin.cpp [new file with mode: 0644]
WebCore/loader/win/FrameLoaderClientWin.cpp [new file with mode: 0644]
WebCore/loader/win/FrameLoaderClientWin.h
WebCore/loader/win/FrameLoaderWin.cpp [new file with mode: 0644]
WebCore/page/win/EventHandlerWin.cpp [new file with mode: 0644]
WebCore/platform/win/TemporaryLinkStubs.cpp
WebKit/COM/WebView.cpp
WebKit/COM/WebView.h
WebKit/ChangeLog

index 1b2f2965272ec95bb51cbe7988bc96635bc60e9f..8148daebd5e966b619c5d4e3aadee69e3dd0aada 100644 (file)
@@ -1,3 +1,50 @@
+2006-12-04  Don Gibson  <dgibson77@gmail.com>
+
+        Reviewed and landed by Alexey.
+
+        http://bugs.webkit.org/show_bug.cgi?id=11738:
+        Make link clicking work again on Windows.
+
+        This re-implements a few functions that used to be part of FrameWin in
+        their new loader-based locations, and copies a few things from the Mac
+        and Qt event handling code that aren't strictly necessary but are
+        pretty simple.
+
+        * WebCore.vcproj/WebCore/WebCore.vcproj:
+        * bridge/win/ChromeClientWin.h:
+        * bridge/win/ContextMenuClientWin.h:
+        * bridge/win/EditorClientWin.h:
+        * bridge/win/FrameWin.cpp:
+        (WebCore::FrameWin::client):
+        * bridge/win/FrameWin.h:
+        * loader/win/DocumentLoaderWin.cpp: Added.
+        (WebCore::DocumentLoader::setTitle):
+        * loader/win/FrameLoaderClientWin.cpp: Added.
+        (WebCore::FrameLoaderClientWin::userAgent):
+        * loader/win/FrameLoaderClientWin.h:
+        * loader/win/FrameLoaderWin.cpp: Added.
+        (WebCore::FrameLoader::urlSelected):
+        (WebCore::FrameLoader::submitForm):
+        (WebCore::FrameLoader::setTitle):
+        * page/win/EventHandlerWin.cpp: Added.
+        (WebCore::EventHandler::passMousePressEventToSubframe):
+        (WebCore::EventHandler::passMouseMoveEventToSubframe):
+        (WebCore::EventHandler::passMouseReleaseEventToSubframe):
+        (WebCore::EventHandler::passWheelEventToSubframe):
+        (WebCore::EventHandler::passMousePressEventToScrollbar):
+        (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
+        * platform/win/TemporaryLinkStubs.cpp:
+        (WebCore::EventHandler::tabsToLinks):
+        (WebCore::EventHandler::tabsToAllControls):
+        (WebCore::EventHandler::lastEventIsMouseUp):
+        (WebCore::EventHandler::passSubframeEventToSubframe):
+        (WebCore::EventHandler::passMouseDownEventToWidget):
+        (WebCore::EventHandler::passWheelEventToWidget):
+        (WebCore::FrameLoader::getHistoryLength):
+        (WebCore::FrameLoader::historyURL):
+        (WebCore::FrameLoader::createFrame):
+        (WebCore::FrameLoaderClientWin::setTitle):
+
 2006-12-04  Don Gibson  <dgibson77@gmail.com>
 
         Reviewed by Mitz.
index ba0564e20a5f162de04209c6d603a992f5fe80f7..c3368f3f8e7beba0a4ff1aa919b98dcb6a85c13c 100644 (file)
                                RelativePath="..\..\page\Settings.h"
                                >
                        </File>
+                       <Filter
+                               Name="win"
+                               >
+                               <File
+                                       RelativePath="..\..\page\win\EventHandlerWin.cpp"
+                                       >
+                               </File>
+                       </Filter>
                </Filter>
                <Filter
                        Name="loader"
                        <Filter
                                Name="win"
                                >
+                               <File
+                                       RelativePath="..\..\loader\win\DocumentLoaderWin.cpp"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\..\loader\win\FrameLoaderClientWin.cpp"
+                                       >
+                               </File>
                                <File
                                        RelativePath="..\..\loader\win\FrameLoaderClientWin.h"
                                        >
                                </File>
+                               <File
+                                       RelativePath="..\..\loader\win\FrameLoaderWin.cpp"
+                                       >
+                               </File>
                        </Filter>
                </Filter>
                <Filter
index 8270d6203f17c3c0fc1c466a329ac71e0389a622..85559c73762fdf0f045ec35c71980bb06d559e78 100644 (file)
 
 namespace WebCore {
 
-    class ChromeClientWin : public ChromeClient, public Shared<ChromeClientWin> {
+    class ChromeClientWin : public ChromeClient {
     public:
         virtual ~ChromeClientWin() { }
         virtual void chromeDestroyed();
 
-        virtual void ref() { Shared<ChromeClientWin>::ref(); }
-        virtual void deref() { Shared<ChromeClientWin>::deref(); }
-
         virtual void setWindowRect(const FloatRect&);
         virtual FloatRect windowRect();
 
index 787944f6b9ed3b239fc6f30d92a21dcf3678f07a..ef73331e1b7965dd6bb9db8c2ec156c17ae25686 100644 (file)
 
 namespace WebCore {
 
-    class ContextMenuClientWin : public ContextMenuClient, public Shared<ContextMenuClientWin> {
+    class ContextMenuClientWin : public ContextMenuClient {
     public:
         virtual ~ContextMenuClientWin() { }
         virtual void contextMenuDestroyed();
 
-        virtual void ref() { Shared<ContextMenuClientWin>::ref(); }
-        virtual void deref() { Shared<ContextMenuClientWin>::deref(); }
-
         virtual void addCustomContextMenuItems(ContextMenu*);
         virtual void contextMenuItemSelected(ContextMenuItem*);
 
index e01c7631782231c94910bd8d42e949982fbaed45..5d4c12fbb72c385d5bc95a2827b522d2b0681020 100644 (file)
 
 namespace WebCore {
 
-    class EditorClientWin : public EditorClient, public Shared<EditorClientWin> {
+    class EditorClientWin : public EditorClient {
     public:
         virtual ~EditorClientWin() { }
         virtual void pageDestroyed();
 
-        virtual void ref() { Shared<EditorClientWin>::ref(); }
-        virtual void deref() { Shared<EditorClientWin>::deref(); }
-
         virtual bool shouldDeleteRange(Range*);
         virtual bool shouldShowDeleteInterface(HTMLElement*);
         virtual bool smartInsertDeleteEnabled();
index b091204bad7ab8ca738d911a11539c670739cac1..9ef90506403e51a79e18478881dd658c1dd7bd67 100644 (file)
@@ -113,4 +113,9 @@ bool FrameWin::keyPress(const PlatformKeyboardEvent& keyEvent)
     return result;
 }
 
+FrameWinClient* FrameWin::client() const
+{
+    return m_client;
+}
+
 } // namespace WebCore
index 853df4af5949b108f0fb9b4f783f9e2a8a79301b..8cea6d16cccecc8f14e2d8fe21fe74c459eab5ab 100644 (file)
@@ -83,6 +83,8 @@ namespace WebCore {
 
         virtual bool keyPress(const PlatformKeyboardEvent&);
 
+        FrameWinClient* client() const;
+
     protected:
         virtual bool isLoadTypeReload();
 
diff --git a/WebCore/loader/win/DocumentLoaderWin.cpp b/WebCore/loader/win/DocumentLoaderWin.cpp
new file mode 100644 (file)
index 0000000..bab7de6
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2006 Don Gibson <dgibson77@gmail.com>
+ *
+ * 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.
+ */
+
+#include "config.h"
+#include "DocumentLoader.h"
+
+#include "FrameWin.h"
+#include "PlatformString.h"
+
+namespace WebCore {
+
+void DocumentLoader::setTitle(const String& title)
+{
+    String text = title;
+    text.replace('//', m_frame->backslashAsCurrencySymbol());
+
+    FrameWin* frameWin = static_cast<FrameWin*>(m_frame);
+    if (frameWin->client())
+        frameWin->client()->setTitle(text);
+}
+
+}
diff --git a/WebCore/loader/win/FrameLoaderClientWin.cpp b/WebCore/loader/win/FrameLoaderClientWin.cpp
new file mode 100644 (file)
index 0000000..884b7c7
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2006 Don Gibson <dgibson77@gmail.com>
+ *
+ * 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.
+ */
+#include "config.h"
+#include "FrameLoaderClientWin.h"
+
+#include "PlatformString.h"
+
+namespace WebCore
+{
+
+String FrameLoaderClientWin::userAgent()
+{
+    return "Mozilla/5.0 (PC; U; Intel; Windows; en) AppleWebKit/420+ (KHTML, like Gecko)";
+}
+
+}
index 37ce18496cef0e0fcf0980d26bd31f5f7f9ec18f..3724dece5233e657bc578a42fdb96a2bd82e3ad8 100644 (file)
 
 namespace WebCore {
 
-    class FrameLoaderClientWin : public FrameLoaderClient, public Shared<FrameLoaderClientWin> {
+    class FrameLoaderClientWin : public FrameLoaderClient {
     public:
         virtual ~FrameLoaderClientWin() { }
         virtual void frameLoaderDestroyed();
 
-        virtual void ref() { Shared<FrameLoaderClientWin>::ref(); }
-        virtual void deref() { Shared<FrameLoaderClientWin>::deref(); }
-
         virtual bool hasWebView() const;
         virtual bool hasFrameView() const;
 
diff --git a/WebCore/loader/win/FrameLoaderWin.cpp b/WebCore/loader/win/FrameLoaderWin.cpp
new file mode 100644 (file)
index 0000000..300d5a6
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2006 Don Gibson <dgibson77@gmail.com>
+ *
+ * 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.
+ */
+
+#include "config.h"
+#include "FrameLoader.h"
+
+#include "DocumentLoader.h"
+#include "FrameLoadRequest.h"
+#include "FrameWin.h"
+#include "ResourceRequest.h"
+
+namespace WebCore {
+
+void FrameLoader::urlSelected(const FrameLoadRequest& request, Event* /*triggering Event*/)
+{
+    FrameWin* frameWin = static_cast<FrameWin*>(m_frame);
+    if (frameWin->client())
+        frameWin->client()->openURL(request.resourceRequest().url().url(), request.lockHistory());
+}
+
+void FrameLoader::submitForm(const FrameLoadRequest& request, Event*)
+{
+    // FIXME: this is a hack inherited from FrameMac, and should be pushed into Frame
+    const ResourceRequest& resourceRequest = request.resourceRequest();
+    if (m_submittedFormURL == resourceRequest.url())
+        return;
+    m_submittedFormURL = resourceRequest.url();
+
+    FrameWin* frameWin = static_cast<FrameWin*>(m_frame);
+    if (frameWin->client())
+        frameWin->client()->submitForm(resourceRequest.httpMethod(), resourceRequest.url(), resourceRequest.httpBody());
+
+    clearRecordedFormValues();
+}
+
+void FrameLoader::setTitle(const String &title)
+{
+    documentLoader()->setTitle(title);
+}
+
+}
diff --git a/WebCore/page/win/EventHandlerWin.cpp b/WebCore/page/win/EventHandlerWin.cpp
new file mode 100644 (file)
index 0000000..21b1521
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2006 Don Gibson <dgibson77@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. 
+ */
+
+#include "config.h"
+#include "EventHandler.h"
+
+#include "Frame.h"
+#include "FrameView.h"
+#include "KeyboardEvent.h"
+#include "MouseEventWithHitTestResults.h"
+#include "PlatformScrollBar.h"
+#include "RenderWidget.h"
+
+namespace WebCore {
+
+bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
+{
+    return passSubframeEventToSubframe(mev, subframe);
+}
+
+bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
+{
+    return passSubframeEventToSubframe(mev, subframe);
+}
+
+bool EventHandler::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
+{
+    return passSubframeEventToSubframe(mev, subframe);
+}
+
+bool EventHandler::passWheelEventToSubframe(PlatformWheelEvent&, Frame* subframe)
+{
+    return passWheelEventToWidget(subframe->view());
+}
+
+bool EventHandler::passMousePressEventToScrollbar(MouseEventWithHitTestResults&, PlatformScrollbar* scrollbar)
+{
+    return passWheelEventToWidget(scrollbar);
+}
+
+bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults& event)
+{
+    // Figure out which view to send the event to.
+    if (!event.targetNode() || !event.targetNode()->renderer() || !event.targetNode()->renderer()->isWidget())
+        return false;
+    
+    return passMouseDownEventToWidget(static_cast<RenderWidget*>(event.targetNode()->renderer())->widget());
+}
+
+bool EventHandler::passWidgetMouseDownEventToWidget(RenderWidget* renderWidget)
+{
+    return passMouseDownEventToWidget(renderWidget->widget());
+}
+
+}
index b607dff277acd8a2c0fb118fb3750a3d849f28c8..9af45b85344b0d0e0fb412893fbe726701f6b84e 100644 (file)
@@ -215,19 +215,16 @@ bool EditorClientWin::canRedo() const { notImplemented(); return false; }
 void EditorClientWin::undo() { notImplemented(); }
 void EditorClientWin::redo() { notImplemented(); }
 
+bool EventHandler::tabsToLinks(KeyboardEvent* event) const { notImplemented(); return false; }
+bool EventHandler::tabsToAllControls(KeyboardEvent* event) const { notImplemented(); return false; }
 void EventHandler::focusDocumentView() { notImplemented(); }
 bool EventHandler::handleDrag(const MouseEventWithHitTestResults&) { notImplemented(); return false; }
 bool EventHandler::handleMouseUp(const MouseEventWithHitTestResults&) { notImplemented(); return false; }
 bool EventHandler::lastEventIsMouseUp() const { notImplemented(); return false; }
-bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe) { notImplemented(); return true; }
-bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe) { notImplemented(); return true; }
-bool EventHandler::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe) { notImplemented(); return true; }
-bool EventHandler::passWheelEventToSubframe(PlatformWheelEvent& e, Frame* subframe) { notImplemented(); return false; }
-bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults&) { notImplemented(); return false; }
-bool EventHandler::passMousePressEventToScrollbar(MouseEventWithHitTestResults&, PlatformScrollbar*) { notImplemented(); return false; }
 bool EventHandler::shouldDragAutoNode(Node*, const IntPoint&) const { notImplemented(); return false; }
-bool EventHandler::tabsToAllControls(KeyboardEvent*) const { notImplemented(); return false; }
-bool EventHandler::tabsToLinks(KeyboardEvent*) const { notImplemented(); return false; }
+bool EventHandler::passSubframeEventToSubframe(MouseEventWithHitTestResults&, Frame* subframe) { notImplemented(); return false; }
+bool EventHandler::passMouseDownEventToWidget(Widget*) { notImplemented(); return false; }
+bool EventHandler::passWheelEventToWidget(Widget*) { notImplemented(); return false; }
 
 FileChooser::FileChooser(Document*, RenderFileUploadControl*) { notImplemented(); }
 FileChooser::~FileChooser() { notImplemented(); }
@@ -244,15 +241,12 @@ String FrameLoader::overrideMediaType() const { notImplemented(); return String(
 Widget* FrameLoader::createJavaAppletWidget(const IntSize&, Element*, const HashMap<String, String>&) { notImplemented(); return 0; }
 void FrameLoader::redirectDataToPlugin(Widget* pluginWidget) { notImplemented(); }
 int FrameLoader::getHistoryLength() { notImplemented(); return 0; }
-void FrameLoader::setTitle(const String& title) { notImplemented(); }
 String FrameLoader::referrer() const { notImplemented(); return String(); }
 void FrameLoader::saveDocumentState() { notImplemented(); }
 void FrameLoader::restoreDocumentState() { notImplemented(); }
 void FrameLoader::goBackOrForward(int distance) { notImplemented(); }
 KURL FrameLoader::historyURL(int distance) { notImplemented(); return KURL();}
-void FrameLoader::urlSelected(const FrameLoadRequest&, Event*) { notImplemented(); }
 Frame* FrameLoader::createFrame(KURL const&, String const&, Element*, String const&) { notImplemented(); return 0; }
-void FrameLoader::submitForm(const FrameLoadRequest&, Event*) { notImplemented(); }
 void FrameLoader::partClearedInBegin() { notImplemented(); }
 KURL FrameLoader::originalRequestURL() const { notImplemented(); return KURL(); }
 bool FrameLoader::canGoBackOrForward(int) const { notImplemented(); return false; }
@@ -333,7 +327,6 @@ void FrameLoaderClientWin::addHistoryItemForFragmentScroll() { notImplemented();
 void FrameLoaderClientWin::didFinishLoad() { notImplemented(); }
 void FrameLoaderClientWin::prepareForDataSourceReplacement() { notImplemented(); }
 void FrameLoaderClientWin::setTitle(const String&, const KURL&) { notImplemented(); }
-String FrameLoaderClientWin::userAgent() { notImplemented(); return String(); }
 
 void FrameView::updateBorder() { notImplemented(); }
 
index cdf98fb6c25f2bed35ee773ef79f1eea30dca29a..0ffc20051a2a2762a419496019d92c2743306eec 100644 (file)
@@ -70,6 +70,10 @@ WebView::WebView()
 {
     SetRectEmpty(&m_frame);
 
+    // set to impossible point so we always get the first mouse pos
+    m_lastMousePos.x = -1;
+    m_lastMousePos.y = -1;
+
     m_mainFrame = WebFrame::createInstance();
     m_backForwardList = WebBackForwardList::createInstance();
 
@@ -99,8 +103,16 @@ WebView* WebView::createInstance()
 
 void WebView::mouseMoved(UINT message, WPARAM wParam, LPARAM lParam)
 {
-    PlatformMouseEvent mouseEvent(m_viewWindow, message, wParam, lParam);
-    m_mainFrame->impl()->eventHandler()->handleMouseMoveEvent(mouseEvent);
+    // don't send mouse move messages if the mouse hasn't moved.
+    if (LOWORD(lParam) != m_lastMousePos.x ||
+        HIWORD(lParam) != m_lastMousePos.y)
+    {
+        m_lastMousePos.x = LOWORD(lParam);
+        m_lastMousePos.y = HIWORD(lParam);
+
+        PlatformMouseEvent mouseEvent(m_viewWindow, message, wParam, lParam);
+        m_mainFrame->impl()->eventHandler()->handleMouseMoveEvent(mouseEvent);
+    }
 }
 
 void WebView::mouseDown(UINT message, WPARAM wParam, LPARAM lParam)
index 9024cfe0a8d5aea142f2be74cf6c896e2b9405f3..5f09e9a4a6e4ab88ac01a66f4c503ef1abb60b0c 100644 (file)
@@ -408,6 +408,7 @@ protected:
     HWND m_hostWindow;
     HWND m_viewWindow;
     WebFrame* m_mainFrame;
+    POINT m_lastMousePos;
     IWebFrameLoadDelegate* m_frameLoadDelegate;
     IWebUIDelegate* m_uiDelegate;
     IWebBackForwardList* m_backForwardList;
index dd37bbc6b72f0a86bfb4b48d51637d776a2a244e..6bf911c0393a3daa6d4478bdd2dea32ba5102a51 100644 (file)
@@ -1,3 +1,20 @@
+2006-12-04  Don Gibson  <dgibson77@gmail.com>
+
+        Reviewed and landed by Alexey.
+
+        http://bugs.webkit.org/show_bug.cgi?id=11738:
+        Make link clicking work again on Windows.
+
+        The WebKit changes are to ignore WM_MOUSEMOVED messages when the mouse
+        hasn't actually moved, which were preventing clicks from actually
+        getting dispatched in many cases.  It's a peculiarity of Windows mouse
+        handling that we receive these at all.
+
+        * COM/WebView.cpp:
+        (WebView::WebView):
+        (WebView::mouseMoved):
+        * COM/WebView.h:
+
 2006-12-04  John Sullivan  <sullivan@apple.com>
 
         Reviewed by Anders