[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
diegohcg at webkit.org
diegohcg at webkit.org
Wed Dec 22 11:09:13 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 9707b1a0a0d1afd2bd8ee5c24a4c0e19858ce209
Author: diegohcg at webkit.org <diegohcg at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jul 13 23:05:21 2010 +0000
2010-07-13 Diego Gonzalez <diegohcg at webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] [WebKit2] Hook up navigation actions
https://bugs.webkit.org/show_bug.cgi?id=42183
Make Back, Forward, Stop and Reload being enable/disabled according
page loading.
* UIProcess/API/qt/ClientImpl.cpp:
(qt_wk_didStartProvisionalLoadForFrame):
(qt_wk_didCommitLoadForFrame):
(qt_wk_didFinishLoadForFrame):
(qt_wk_didFailLoadWithErrorForFrame):
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::updateAction):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index d19ffea..3b4b183 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,21 @@
+2010-07-13 Diego Gonzalez <diegohcg at webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] [WebKit2] Hook up navigation actions
+ https://bugs.webkit.org/show_bug.cgi?id=42183
+
+ Make Back, Forward, Stop and Reload being enable/disabled according
+ page loading.
+
+ * UIProcess/API/qt/ClientImpl.cpp:
+ (qt_wk_didStartProvisionalLoadForFrame):
+ (qt_wk_didCommitLoadForFrame):
+ (qt_wk_didFinishLoadForFrame):
+ (qt_wk_didFailLoadWithErrorForFrame):
+ * UIProcess/API/qt/qwkpage.cpp:
+ (QWKPagePrivate::updateAction):
+
2010-07-13 John Sullivan <sullivan at apple.com>
Written by Simon Fraser, reviewed by me.
diff --git a/WebKit2/UIProcess/API/qt/ClientImpl.cpp b/WebKit2/UIProcess/API/qt/ClientImpl.cpp
index 2bb97bd..774823f 100644
--- a/WebKit2/UIProcess/API/qt/ClientImpl.cpp
+++ b/WebKit2/UIProcess/API/qt/ClientImpl.cpp
@@ -41,6 +41,7 @@ void qt_wk_didStartProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, con
if (!WKFrameIsMainFrame(frame))
return;
emit toQWKPage(clientInfo)->loadStarted();
+ QWKPagePrivate::get(toQWKPage(clientInfo))->updateNavigationActions();
}
void qt_wk_didReceiveServerRedirectForProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, const void* clientInfo)
@@ -59,6 +60,7 @@ void qt_wk_didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, const void* c
QString urlStr(wkframe->url());
QUrl qUrl = urlStr;
emit toQWKPage(clientInfo)->urlChanged(qUrl);
+ QWKPagePrivate::get(toQWKPage(clientInfo))->updateNavigationActions();
}
void qt_wk_didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, const void* clientInfo)
@@ -66,6 +68,7 @@ void qt_wk_didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, const void* c
if (!WKFrameIsMainFrame(frame))
return;
emit toQWKPage(clientInfo)->loadFinished(true);
+ QWKPagePrivate::get(toQWKPage(clientInfo))->updateNavigationActions();
}
void qt_wk_didFailLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, const void* clientInfo)
@@ -73,6 +76,7 @@ void qt_wk_didFailLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, const
if (!WKFrameIsMainFrame(frame))
return;
emit toQWKPage(clientInfo)->loadFinished(false);
+ QWKPagePrivate::get(toQWKPage(clientInfo))->updateNavigationActions();
}
void qt_wk_didReceiveTitleForFrame(WKPageRef page, WKStringRef title, WKFrameRef frame, const void* clientInfo)
diff --git a/WebKit2/UIProcess/API/qt/qwkpage.cpp b/WebKit2/UIProcess/API/qt/qwkpage.cpp
index fbd23d6..5074c2a 100644
--- a/WebKit2/UIProcess/API/qt/qwkpage.cpp
+++ b/WebKit2/UIProcess/API/qt/qwkpage.cpp
@@ -144,21 +144,25 @@ void QWKPagePrivate::updateAction(QWKPage::WebAction action)
if (!a)
return;
+ RefPtr<WebKit::WebFrameProxy> mainFrame = page->mainFrame();
+ if (!mainFrame)
+ return;
+
bool enabled = a->isEnabled();
bool checked = a->isChecked();
switch (action) {
case QWKPage::Back:
- page->canGoBack();
+ enabled = page->canGoBack();
break;
case QWKPage::Forward:
- page->canGoForward();
+ enabled = page->canGoForward();
break;
case QWKPage::Stop:
- // FIXME
+ enabled = !(WebFrameProxy::LoadStateFinished == mainFrame->loadState());
break;
case QWKPage::Reload:
- // FIXME
+ enabled = (WebFrameProxy::LoadStateFinished == mainFrame->loadState());
break;
default:
break;
@@ -171,7 +175,6 @@ void QWKPagePrivate::updateAction(QWKPage::WebAction action)
#endif // QT_NO_ACTION
}
-// FIXME: hook up
void QWKPagePrivate::updateNavigationActions()
{
updateAction(QWKPage::Back);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list