* Move the hoverElement from QWebFrame to QWebPage. As it is
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2008 09:55:21 +0000 (09:55 +0000)
committerhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2008 09:55:21 +0000 (09:55 +0000)
  only used there.

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

WebKit/qt/Api/qwebframe_p.h
WebKit/qt/Api/qwebpage.cpp
WebKit/qt/Api/qwebpage_p.h
WebKit/qt/ChangeLog

index 285c52dac0ecbec0990bbb2541adbcd2f74fb32d..136cf780e56dc1e5f1545afc25d20086abc4f18c 100644 (file)
@@ -34,7 +34,6 @@
 
 namespace WebCore
 {
-    class Element;
     class FrameLoaderClientQt;
     class Frame;
     class FrameView;
@@ -66,7 +65,6 @@ public:
         , frame(0)
         , frameView(0)
         , page(0)
-        , lastHoverElement(0)
         {}
     void init(QWebFrame *qframe, WebCore::Page *page,
               QWebFrameData *frameData);
@@ -87,7 +85,6 @@ public:
     WTF::RefPtr<WebCore::Frame> frame;
     WTF::RefPtr<WebCore::FrameView> frameView;
     QWebPage *page;
-    WebCore::Element *lastHoverElement;
 };
 
 #endif
index 460a16e759c9c5b5e5018ab14334de7bfc20daa2..88311994fade05072d5849e9ec656e0422d60dd4 100644 (file)
@@ -107,6 +107,7 @@ static inline Qt::DropAction dragOpToDropAction(unsigned actions)
 QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
     : q(qq)
     , view(0)
+    , lastHoverElement(0)
     , modified(false)
 {
     chromeClient = new ChromeClientQt(q);
@@ -340,8 +341,8 @@ void QWebPagePrivate::mouseMoveEvent(QMouseEvent *ev)
     IntPoint pt(ev->x() + xOffset, ev->y() + yOffset);
     WebCore::HitTestResult result = QWebFramePrivate::core(mainFrame)->eventHandler()->hitTestResultAtPoint(pt, false);
     WebCore::Element *link = result.URLElement();
-    if (link != mainFrame->d->lastHoverElement) {
-        mainFrame->d->lastHoverElement = link;
+    if (link != lastHoverElement) {
+        lastHoverElement = link;
         emit q->hoveringOverLink(result.absoluteLinkURL().prettyURL(), result.title(), result.textContent());
     }
 }
index ab8f443644374ccda02f507bdb85e3072f6d31c4..f87d5ad36f3b64c7dcc04b6cb7aff6fa5b550d6e 100644 (file)
@@ -38,6 +38,7 @@ namespace WebCore
     class ContextMenuItem;
     class ContextMenu;
     class EditorClientQt;
+    class Element;
     class Node;
     class Page;
 }
@@ -125,6 +126,7 @@ public:
     QWebPage *q;
     QUndoStack *undoStack;
     QWidget *view;
+    WebCore::Element *lastHoverElement;
 
     bool modified;
 
index 410944d9fb99d1258b9733988b82892fba8c798e..ec5eeb6777ace0ba3bc0ceecab10221522bf8a25 100644 (file)
@@ -1,3 +1,17 @@
+2008-01-16  Holger Freyther  <holger.freyther@trolltech.com>
+
+        Reviewed by Simon.
+
+        * Move the hoverElement from QWebFrame to QWebPage. As it is
+        only used there.
+        
+
+        * Api/qwebframe_p.h:
+        (QWebFramePrivate::QWebFramePrivate):
+        * Api/qwebpage.cpp:
+        (QWebPagePrivate::mouseMoveEvent):
+        * Api/qwebpage_p.h:
+
 2008-01-16  Holger Freyther  <holger.freyther@trolltech.com>
 
         Reviewed by Simon.