[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
weinig at apple.com
weinig at apple.com
Wed Dec 22 11:17:42 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 9df6052a011a26ef9930488afc0f338427f100e2
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jul 16 22:20:11 2010 +0000
Fix for https://bugs.webkit.org/show_bug.cgi?id=42482
<rdar://problem/8197701>
Add notification of when the BackForwardList changes
to aid invalidation of Back/Forward related UI elements.
Reviewed by Anders Carlsson.
WebKit2:
* UIProcess/API/C/WKPage.h:
Add didChangeBackForwardList to the WKPageLoaderClient. This
fires whenever an item is added or removed from the back forward
list or when the cursor changes position.
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::addItem):
(WebKit::WebBackForwardList::goToItem):
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didChangeBackForwardList):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeBackForwardList):
* UIProcess/WebPageProxy.h:
Pipe changes to the WebBackForwardList up to the page load client.
WebKitTools:
* MiniBrowser/mac/BrowserWindowController.m:
(_didStartProvisionalLoadForFrame):
(_didCommitLoadForFrame):
(_didFailLoadWithErrorForFrame):
(_didChangeBackForwardList):
(-[BrowserWindowController awakeFromNib]):
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index d28eb68..5beb656 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,28 @@
+2010-07-16 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=42482
+ <rdar://problem/8197701>
+ Add notification of when the BackForwardList changes
+ to aid invalidation of Back/Forward related UI elements.
+
+ * UIProcess/API/C/WKPage.h:
+ Add didChangeBackForwardList to the WKPageLoaderClient. This
+ fires whenever an item is added or removed from the back forward
+ list or when the cursor changes position.
+
+ * UIProcess/WebBackForwardList.cpp:
+ (WebKit::WebBackForwardList::addItem):
+ (WebKit::WebBackForwardList::goToItem):
+ * UIProcess/WebLoaderClient.cpp:
+ (WebKit::WebLoaderClient::didChangeBackForwardList):
+ * UIProcess/WebLoaderClient.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::didChangeBackForwardList):
+ * UIProcess/WebPageProxy.h:
+ Pipe changes to the WebBackForwardList up to the page load client.
+
2010-07-16 Alice Liu <alice.liu at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h
index 267a8a0..ea050ee 100644
--- a/WebKit2/UIProcess/API/C/WKPage.h
+++ b/WebKit2/UIProcess/API/C/WKPage.h
@@ -69,6 +69,8 @@ typedef void (*WKPageDidFinishProgressCallback)(WKPageRef page, const void *clie
typedef void (*WKPageDidBecomeUnresponsiveCallback)(WKPageRef page, const void *clientInfo);
typedef void (*WKPageDidBecomeResponsiveCallback)(WKPageRef page, const void *clientInfo);
+typedef void (*WKPageDidChangeBackForwardListCallback)(WKPageRef page, const void *clientInfo);
+
struct WKPageLoaderClient {
int version;
const void * clientInfo;
@@ -90,6 +92,8 @@ struct WKPageLoaderClient {
// FIXME: These two methods should not be part of this client.
WKPageDidBecomeUnresponsiveCallback didBecomeUnresponsive;
WKPageDidBecomeResponsiveCallback didBecomeResponsive;
+
+ WKPageDidChangeBackForwardListCallback didChangeBackForwardList;
};
typedef struct WKPageLoaderClient WKPageLoaderClient;
diff --git a/WebKit2/UIProcess/WebBackForwardList.cpp b/WebKit2/UIProcess/WebBackForwardList.cpp
index c740dab..1a45778 100644
--- a/WebKit2/UIProcess/WebBackForwardList.cpp
+++ b/WebKit2/UIProcess/WebBackForwardList.cpp
@@ -25,6 +25,8 @@
#include "WebBackForwardList.h"
+#include "WebPageProxy.h"
+
namespace WebKit {
static const unsigned DefaultCapacity = 100;
@@ -63,10 +65,16 @@ void WebBackForwardList::addItem(WebBackForwardListItem* newItem)
RefPtr<WebBackForwardListItem> item = m_entries[0];
m_entries.remove(0);
m_current--;
+
+ if (m_page)
+ m_page->didChangeBackForwardList();
}
m_entries.insert(m_current + 1, newItem);
m_current++;
+
+ if (m_page)
+ m_page->didChangeBackForwardList();
}
void WebBackForwardList::goToItem(WebBackForwardListItem* item)
@@ -79,8 +87,11 @@ void WebBackForwardList::goToItem(WebBackForwardListItem* item)
if (m_entries[index] == item)
break;
}
- if (index < m_entries.size())
+ if (index < m_entries.size()) {
m_current = index;
+ if (m_page)
+ m_page->didChangeBackForwardList();
+ }
}
WebBackForwardListItem* WebBackForwardList::currentItem()
diff --git a/WebKit2/UIProcess/WebLoaderClient.cpp b/WebKit2/UIProcess/WebLoaderClient.cpp
index 307942f..ab2a664 100644
--- a/WebKit2/UIProcess/WebLoaderClient.cpp
+++ b/WebKit2/UIProcess/WebLoaderClient.cpp
@@ -127,4 +127,10 @@ void WebLoaderClient::didBecomeResponsive(WebPageProxy* page)
m_pageLoaderClient.didBecomeResponsive(toRef(page), m_pageLoaderClient.clientInfo);
}
+void WebLoaderClient::didChangeBackForwardList(WebPageProxy* page)
+{
+ if (m_pageLoaderClient.didChangeBackForwardList)
+ m_pageLoaderClient.didChangeBackForwardList(toRef(page), m_pageLoaderClient.clientInfo);
+}
+
} // namespace WebKit
diff --git a/WebKit2/UIProcess/WebLoaderClient.h b/WebKit2/UIProcess/WebLoaderClient.h
index fa2de1b..f9e0c2f 100644
--- a/WebKit2/UIProcess/WebLoaderClient.h
+++ b/WebKit2/UIProcess/WebLoaderClient.h
@@ -59,6 +59,8 @@ public:
void didBecomeUnresponsive(WebPageProxy*);
void didBecomeResponsive(WebPageProxy*);
+ void didChangeBackForwardList(WebPageProxy*);
+
private:
WKPageLoaderClient m_pageLoaderClient;
};
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index 93680fe..e49e76e 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -267,6 +267,11 @@ void WebPageProxy::goToBackForwardItem(WebBackForwardListItem* item)
process()->send(WebPageMessage::GoToBackForwardItem, m_pageID, CoreIPC::In(item->itemID()));
}
+void WebPageProxy::didChangeBackForwardList()
+{
+ m_loaderClient.didChangeBackForwardList(this);
+}
+
void WebPageProxy::setFocused(bool isFocused)
{
if (!isValid())
@@ -367,6 +372,7 @@ void WebPageProxy::getStatistics(WKContextStatistics* statistics)
statistics->numberOfWKFrames += m_frameMap.size();
}
+
WebFrameProxy* WebPageProxy::webFrame(uint64_t frameID) const
{
return m_frameMap.get(frameID).get();
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index 1401481..454d2ac 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -112,6 +112,7 @@ public:
bool canGoBack() const;
void goToBackForwardItem(WebBackForwardListItem*);
+ void didChangeBackForwardList();
void setFocused(bool isFocused);
void setActive(bool active);
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 417f4ff..c578193 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,20 @@
+2010-07-16 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=42482
+ <rdar://problem/8197701>
+ Add notification of when the BackForwardList changes
+ to aid invalidation of Back/Forward related UI elements.
+
+ * MiniBrowser/mac/BrowserWindowController.m:
+ (_didStartProvisionalLoadForFrame):
+ (_didCommitLoadForFrame):
+ (_didFailLoadWithErrorForFrame):
+ (_didChangeBackForwardList):
+ (-[BrowserWindowController awakeFromNib]):
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+
2010-07-16 Kent Tamura <tkent at chromium.org>
Reviewed by Darin Fisher.
diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
index 9e8f48a..a12a926 100644
--- a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
+++ b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
@@ -150,7 +150,6 @@
static void _didStartProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo)
{
LOG(@"didStartProvisionalLoadForFrame");
- [(BrowserWindowController *)clientInfo validateToolbar];
}
static void _didReceiveServerRedirectForProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo)
@@ -166,7 +165,6 @@ static void _didFailProvisionalLoadWithErrorForFrame(WKPageRef page, WKFrameRef
static void _didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo)
{
LOG(@"didCommitLoadForFrame");
- [(BrowserWindowController *)clientInfo validateToolbar];
}
static void _didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo)
@@ -177,7 +175,6 @@ static void _didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, const void
static void _didFailLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo)
{
LOG(@"didFailLoadWithErrorForFrame");
- [(BrowserWindowController *)clientInfo validateToolbar];
}
static void _didReceiveTitleForFrame(WKPageRef page, WKStringRef title, WKFrameRef frame, const void *clientInfo)
@@ -222,6 +219,11 @@ static void _didBecomeResponsive(WKPageRef page, const void *clientInfo)
LOG(@"didBecomeResponsive");
}
+static void _didChangeBackForwardList(WKPageRef page, const void *clientInfo)
+{
+ [(BrowserWindowController *)clientInfo validateToolbar];
+}
+
#pragma mark Policy Client Callbacks
static void _decidePolicyForNavigationAction(WKPageRef page, WKFrameNavigationType navigationType, WKURLRef url, WKFrameRef frame, WKFramePolicyListenerRef listener, const void *clientInfo)
@@ -348,7 +350,8 @@ static void _didUpdateHistoryTitle(WKPageRef page, WKStringRef title, WKURLRef U
_didChangeProgress,
_didFinishProgress,
_didBecomeUnresponsive,
- _didBecomeResponsive
+ _didBecomeResponsive,
+ _didChangeBackForwardList
};
WKPageSetPageLoaderClient(_webView.pageRef, &loadClient);
diff --git a/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj b/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
index 080d370..5e739a0 100644
--- a/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
+++ b/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
@@ -171,15 +171,15 @@
BC25183511D1571D002EBC01 /* InjectedBundle */ = {
isa = PBXGroup;
children = (
- BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */,
- 65EB859D11EC67CC0034D300 /* ActivateFonts.h */,
65EB859E11EC67CC0034D300 /* mac */,
+ 65EB859D11EC67CC0034D300 /* ActivateFonts.h */,
+ BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */,
BCC997A111D3C8F60017BCA2 /* InjectedBundle.h */,
BC25184611D15767002EBC01 /* InjectedBundleMain.cpp */,
BCC997A211D3C8F60017BCA2 /* InjectedBundlePage.cpp */,
BCC997A311D3C8F60017BCA2 /* InjectedBundlePage.h */,
- BCC9981611D3F51E0017BCA2 /* LayoutTestController.h */,
BCC9981711D3F51E0017BCA2 /* LayoutTestController.cpp */,
+ BCC9981611D3F51E0017BCA2 /* LayoutTestController.h */,
);
path = InjectedBundle;
sourceTree = "<group>";
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list