Commit 2f4d87d5 authored by hausmann@webkit.org's avatar hausmann@webkit.org
Browse files

Holger Hans Peter Freyther <holger.freyther@trolltech.com>

* Propose the addition of updateRequest and scrollRequest to the QWebPage.

* The question is if these signals belong to QWebPage or  QWebFrame.
    -It is more easy to have them in QWebPage because ScrollView is invoking
     the ChromeClient with the right coordinates
    -On the other hand someone wants to render frames separately. But this is partly
     doomed as you can have overlapping frames and what you paint would not relate to
     what you normally see on webpages.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e4de5429
......@@ -1627,6 +1627,29 @@ QWebFrame *QWebPageContext::targetFrame() const
page to \a geom. This can happen for example through JavaScript.
*/
/*!
\fn void QWebPage::updateRequest(const QRect& dirtyRect)
This signal is emitted whenever this QWebPage should be updated and no view was set.
\a dirtyRect contains the area that needs to be updated. To paint the QWebPage get
the mainFrame() and call the render(QPainter*, const QRegion&) method with the
\a dirtyRect as the second parameter.
\sa mainFrame()
\sa QWebFrame::render(QPainter*, const QRegion&)
\sa view()
*/
/*!
\fn void QWebPage::scrollRequest(int dy, int dy, const QRect& rectToScroll)
This signal is emitted whenever the content given by \a rectToScroll needs
to be scrolled dx and dy downwards and no view was set.
\sa view()
*/
/*!
\fn void QWebPage::handleUnsupportedContent(QNetworkReply *reply)
......
......@@ -198,6 +198,8 @@ Q_SIGNALS:
void selectionChanged();
void frameCreated(QWebFrame *frame);
void geometryChangeRequest(const QRect& geom);
void updateRequest(const QRect& dirtyRect);
void scrollRequest(int dx, int dy, const QRect& scrollViewRect);
#if QT_VERSION >= 0x040400
void handleUnsupportedContent(QNetworkReply *reply);
......
2008-04-05 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
Reviewed by Simon.
* Propose the addition of updateRequest and scrollRequest to the QWebPage.
* The question is if these signals belong to QWebPage or QWebFrame.
-It is more easy to have them in QWebPage because ScrollView is invoking
the ChromeClient with the right coordinates
-On the other hand someone wants to render frames separately. But this is partly
doomed as you can have overlapping frames and what you paint would not relate to
what you normally see on webpages.
* Api/qwebpage.cpp:
* Api/qwebpage.h:
* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::scrollBackingStore):
(WebCore::ChromeClientQt::mouseDidMoveOverElement):
2008-04-03 Simon Hausmann <hausmann@webkit.org>
Reviewed by Mark Rowe.
......
......@@ -303,7 +303,8 @@ void ChromeClientQt::addToDirtyRegion(const IntRect& r)
rect = rect.intersected(QRect(QPoint(0, 0), m_webPage->viewportSize()));
if (!r.isEmpty())
view->update(r);
}
} else
emit m_webPage->updateRequest(r);
}
void ChromeClientQt::scrollBackingStore(int dx, int dy, const IntRect& scrollViewRect, const IntRect& clipRect)
......@@ -311,6 +312,8 @@ void ChromeClientQt::scrollBackingStore(int dx, int dy, const IntRect& scrollVie
QWidget* view = m_webPage->view();
if (view)
view->scroll(dx, dy, scrollViewRect);
else
emit m_webPage->scrollRequest(dx, dy, scrollViewRect);
}
void ChromeClientQt::updateBackingStore()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment