Add Chrome::mouseDidMoveOverElement
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jul 2007 03:00:16 +0000 (03:00 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jul 2007 03:00:16 +0000 (03:00 +0000)
WebCore:

        Add Chrome::mouseDidMoveOverElement

        This does the work of calling up to the ChromeClient (which will call
        the UI delegate).

        Reviewed by Sam.

        * page/Chrome.cpp:
        (WebCore::Chrome::mouseDidMoveOverElement): Added.
        * page/Chrome.h:
        * page/ChromeClient.h:
        * platform/graphics/svg/SVGImageEmptyClients.h: Updated for change to
        ChromeClient.
        * platform/gdk/ChromeClientGdk.h:
        * platform/gdk/TemporaryLinkStubs.cpp:
        (ChromeClientGdk::mouseDidMoveOverElement):

WebKit:

        Add WebChromeClient::mouseDidMoveOverElement

        This is not called yet.

        Reviewed by Sam.

        * WebCoreSupport/WebChromeClient.h:
        * WebCoreSupport/WebChromeClient.mm:

WebKit/win:

        Add WebChromeClient::mouseDidMoveOverElement

        This is not called yet.

        Reviewed by Sam.

        * WebChromeClient.cpp:
        (WebChromeClient::mouseDidMoveOverElement):
        * WebChromeClient.h:

WebKitQt:

        Added a stub for ChromeClientQt::mouseDidMoveOverElement

        Reviewed by Sam.

        * WebCoreSupport/ChromeClientQt.cpp:
        (WebCore::ChromeClientQt::mouseDidMoveOverElement):
        * WebCoreSupport/ChromeClientQt.h:

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

16 files changed:
WebCore/ChangeLog
WebCore/page/Chrome.cpp
WebCore/page/Chrome.h
WebCore/page/ChromeClient.h
WebCore/platform/gdk/ChromeClientGdk.h
WebCore/platform/gdk/TemporaryLinkStubs.cpp
WebCore/platform/graphics/svg/SVGImageEmptyClients.h
WebKit/ChangeLog
WebKit/WebCoreSupport/WebChromeClient.h
WebKit/WebCoreSupport/WebChromeClient.mm
WebKit/win/ChangeLog
WebKit/win/WebChromeClient.cpp
WebKit/win/WebChromeClient.h
WebKitQt/ChangeLog
WebKitQt/WebCoreSupport/ChromeClientQt.cpp
WebKitQt/WebCoreSupport/ChromeClientQt.h

index d59b79a06337917d0c9cfd12232cbee1e385dfcf..b7ad5e37559b6c5fb653c576dc04768fdf90fd7d 100644 (file)
@@ -1,3 +1,22 @@
+2007-07-04  Adam Roben  <aroben@apple.com>
+
+        Add Chrome::mouseDidMoveOverElement
+
+        This does the work of calling up to the ChromeClient (which will call
+        the UI delegate).
+
+        Reviewed by Sam.
+
+        * page/Chrome.cpp:
+        (WebCore::Chrome::mouseDidMoveOverElement): Added.
+        * page/Chrome.h:
+        * page/ChromeClient.h:
+        * platform/graphics/svg/SVGImageEmptyClients.h: Updated for change to
+        ChromeClient.
+        * platform/gdk/ChromeClientGdk.h:
+        * platform/gdk/TemporaryLinkStubs.cpp:
+        (ChromeClientGdk::mouseDidMoveOverElement):
+
 2007-07-04  Adam Roben  <aroben@apple.com>
 
         Changed PlatformMouseEvent to store the modifier flags of the event
index 102a8a858c717e245b68ab9abef3ae94ba15f78a..dc7d70fbd0b7b8cb2e9a2d1a1c85ed7e5f3425ef 100644 (file)
@@ -128,7 +128,7 @@ void Chrome::runModal() const
         return;
     }
 
-    // Defer callbacks in all the other pages in this group, so we don't try to run JavaScript\r
+    // Defer callbacks in all the other pages in this group, so we don't try to run JavaScript
     // in a way that could interact with this view.
     PageGroupLoadDeferrer deferrer(m_page, false);
 
@@ -293,6 +293,11 @@ void Chrome::updateBackingStore()
     m_client->updateBackingStore();
 }
 
+void Chrome::mouseDidMoveOverElement(const HitTestResult& result, unsigned modifierFlags)
+{
+    m_client->mouseDidMoveOverElement(result, modifierFlags);
+}
+
 PageGroupLoadDeferrer::PageGroupLoadDeferrer(Page* page, bool deferSelf)
 {
     if (const HashSet<Page*>* group = page->frameNamespace()) {
index 54d5c84816fe1da1220c33e4ccc71fce4ac73011..82fa4eda4a0debaa1f1f8e84476220d20d7ed54a 100644 (file)
@@ -37,6 +37,7 @@ namespace WebCore {
     class ContextMenu;
     class FloatRect;
     class Frame;
+    class HitTestResult;
     class IntRect;
     class Page;
     class String;
@@ -118,6 +119,8 @@ namespace WebCore {
         void scrollBackingStore(int dx, int dy, const IntRect& scrollViewRect, const IntRect& clipRect);
         void updateBackingStore();
 
+        void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
+
 #if PLATFORM(MAC)
         void focusNSView(NSView*);
 #endif
index 68a329482dc8d0cc8dc450fbc087cd0177d4ad19..db883395cf2ab0bd4a262732c1855df31bf7b8c7 100644 (file)
@@ -27,6 +27,7 @@ namespace WebCore {
 
     class FloatRect;
     class Frame;
+    class HitTestResult;
     class IntRect;
     class Page;
     class String;
@@ -95,6 +96,8 @@ namespace WebCore {
         virtual void addToDirtyRegion(const IntRect&) = 0;
         virtual void scrollBackingStore(int dx, int dy, const IntRect& scrollViewRect, const IntRect& clipRect) = 0;
         virtual void updateBackingStore() = 0;
+
+        virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags) = 0;
 };
 
 }
index 13e7ef447a4f9937f7c847106c7684c2ff64b2e1..7c91d54506fd95f973e1768abd409861c249f3da 100644 (file)
@@ -87,6 +87,8 @@ namespace WebCore {
         virtual void addToDirtyRegion(const IntRect&);
         virtual void scrollBackingStore(int dx, int dy, const IntRect& scrollViewRect, const IntRect& clipRect);
         virtual void updateBackingStore();
+
+        virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
     };
 }
 
index 28e0cddb71794ac961bbd41a5b6f95ac7e2cd712..f73fdb2a3929d318e63070cfecdd9720a54bb917 100644 (file)
@@ -168,6 +168,11 @@ void ChromeClientGdk::updateBackingStore()
     notImplemented();
 }
 
+void ChromeClientGdk::mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags)
+{
+    notImplemented();
+}
+
 /********************************************************/
 /* Completely empty stubs (mostly to allow DRT to run): */
 /********************************************************/
index b207d56af995ed506c8644311d580acc4456bbce..3e78fdbb32ea154d32026ae2d2b6e855b515604f 100644 (file)
@@ -109,6 +109,8 @@ public:
     virtual void addToDirtyRegion(const IntRect&) { }
     virtual void scrollBackingStore(int dx, int dy, const IntRect& scrollViewRect, const IntRect& clipRect) { }
     virtual void updateBackingStore() { }
+
+    virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags) { }
     
 };
 
index ba56ec566855ad3342b491107cbaf40b38333185..a63881cac12f82cf5bebb477f6180d605bf8c58f 100644 (file)
@@ -1,3 +1,14 @@
+2007-07-04  Adam Roben  <aroben@apple.com>
+
+        Add WebChromeClient::mouseDidMoveOverElement
+
+        This is not called yet.
+
+        Reviewed by Sam.
+
+        * WebCoreSupport/WebChromeClient.h:
+        * WebCoreSupport/WebChromeClient.mm:
+
 2007-07-03  Darin Adler  <darin@apple.com>
 
         * StringsNotToBeLocalized.txt: Updated for recent changes.
index 0fa58debf0115f26e7855b653913a108e36466c5..145dfe3535b72a5f31f81e7d2cf326294f8b1335 100644 (file)
@@ -95,6 +95,8 @@ public:
     
     virtual void setStatusbarText(const WebCore::String&);
 
+    virtual void mouseDidMoveOverElement(const WebCore::HitTestResult&, unsigned modifierFlags);
+
 private:
     WebView *m_webView;
 };
index bc56ebbe5771aa6d89308fdc760fd69355a4366f..b77f60957b294fbfdfc27b245be6b93b98077693 100644 (file)
@@ -30,6 +30,7 @@
 #import "WebChromeClient.h"
 
 #import "WebDefaultUIDelegate.h"
+#import "WebElementDictionary.h"
 #import "WebFrameInternal.h"
 #import "WebFrameView.h"
 #import "WebHTMLView.h"
@@ -41,6 +42,7 @@
 #import <WebCore/BlockExceptions.h>
 #import <WebCore/FloatRect.h>
 #import <WebCore/FrameLoadRequest.h>
+#import <WebCore/HitTestResult.h>
 #import <WebCore/IntRect.h>
 #import <WebCore/PlatformScreen.h>
 #import <WebCore/PlatformString.h>
@@ -367,3 +369,10 @@ void WebChromeClient::scrollBackingStore(int, int, const IntRect&, const IntRect
 void WebChromeClient::updateBackingStore()
 {
 }
+
+void WebChromeClient::mouseDidMoveOverElement(const HitTestResult& result, unsigned modifierFlags)
+{
+    WebElementDictionary *element = [[WebElementDictionary alloc] initWithHitTestResult:result];
+    [m_webView _mouseDidMoveOverElement:element modifierFlags:modifierFlags];
+    [element release];
+}
index 5935fe7497069861c35687104eddf9cdac5dd71a..7f35debd9c13eed8b7c552d112be3263cdbac9ef 100644 (file)
@@ -1,3 +1,15 @@
+2007-07-04  Adam Roben  <aroben@apple.com>
+
+        Add WebChromeClient::mouseDidMoveOverElement
+
+        This is not called yet.
+
+        Reviewed by Sam.
+
+        * WebChromeClient.cpp:
+        (WebChromeClient::mouseDidMoveOverElement):
+        * WebChromeClient.h:
+
 2007-07-03  Adam Roben  <aroben@apple.com>
 
         Merge the Windows and Mac localized strings and exceptions files
index 37ce220a401748a9020f889454a3deb7966dfd7c..915cf75b890af35d4d2303329c8d85d30badb0b1 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "WebChromeClient.h"
 
+#include "WebElementPropertyBag.h"
 #include "WebFrame.h"
 #include "WebMutableURLRequest.h"
 #include "WebView.h"
@@ -425,3 +426,14 @@ void WebChromeClient::updateBackingStore()
     m_webView->updateBackingStore(core(m_webView->topLevelFrame())->view(), 0, false);
 }
 
+void WebChromeClient::mouseDidMoveOverElement(const HitTestResult& result, unsigned modifierFlags)
+{
+    COMPtr<IWebUIDelegate> uiDelegate;
+    if (FAILED(m_webView->uiDelegate(&uiDelegate)))
+        return;
+
+    COMPtr<WebElementPropertyBag> element;
+    element.adoptRef(WebElementPropertyBag::createInstance(result));
+
+    uiDelegate->mouseDidMoveOverElement(m_webView, element.get(), modifierFlags);
+}
index b534c335af9605b61fca317ff9dea04047ddacd7..c085213e4b2c82a5ff5a08f4fb8ecaf22257725a 100644 (file)
@@ -87,6 +87,9 @@ public:
     virtual void addToDirtyRegion(const WebCore::IntRect&);
     virtual void scrollBackingStore(int dx, int dy, const WebCore::IntRect& scrollViewRect, const WebCore::IntRect& clipRect);
     virtual void updateBackingStore();
+
+    virtual void mouseDidMoveOverElement(const WebCore::HitTestResult&, unsigned modifierFlags);
+
 private:
     WebView* m_webView;
 };
index def927b838961cc938660cce0ae98b0bc2291fa3..28910c85daa5a9d9057c30139b5a269c8e0c5de1 100644 (file)
@@ -1,3 +1,13 @@
+2007-07-04  Adam Roben  <aroben@apple.com>
+
+        Added a stub for ChromeClientQt::mouseDidMoveOverElement
+
+        Reviewed by Sam.
+
+        * WebCoreSupport/ChromeClientQt.cpp:
+        (WebCore::ChromeClientQt::mouseDidMoveOverElement):
+        * WebCoreSupport/ChromeClientQt.h:
+
 2007-06-28  Simon Hausmann  <hausmann@kde.org>
 
         Reviewed by Zack.
index 932b16c8ea2317f42836246d3dc7b9f3bf624c64..6716d17d13b551547e220fd92434a4873650f5c3 100644 (file)
@@ -294,6 +294,11 @@ void ChromeClientQt::updateBackingStore()
 {
 }
 
+void ChromeClientQt::mouseDidMoveOverElement(const HitTestResult&, unsigned /*modifierFlags*/)
+{
+    notImplemented();
+}
+
 }
 
 
index a8414b5094369175a24bb5452bec71b618caed6b..5000d2dda9ffabf07c663e37c127acadb36a3a73 100644 (file)
@@ -102,6 +102,8 @@ namespace WebCore {
         virtual void scrollBackingStore(int, int, const IntRect&, const IntRect&);
         virtual void updateBackingStore();
 
+        virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
+
         QWebPage* m_webPage;
     };
 }