Moved all the event handlers from QWebFrame into QWebPage.
[WebKit-https.git] / WebKit / qt / Api / qwebpage_p.h
index aa320f5..b9fe140 100644 (file)
@@ -45,12 +45,18 @@ public:
     ~QWebPagePrivate();
     void createMainFrame();
 
+    QWebFrame *frameAt(const QPoint &pos) const;
+
     WebCore::ChromeClientQt *chromeClient;
     WebCore::ContextMenuClientQt *contextMenuClient;
     WebCore::EditorClientQt *editorClient;
     WebCore::Page *page;
 
     QPointer<QWebFrame> mainFrame;
+    QPointer<QWebFrame> frameUnderMouse;
+
+    inline QWebFrame *currentFrame(const QPoint &pos) const
+    { return frameUnderMouse ? static_cast<QWebFrame *>(frameUnderMouse) : frameAt(pos); }
 
     QWebPage *q;
     QUndoStack *undoStack;