Title: [165604] trunk/Source/WebKit2
- Revision
- 165604
- Author
- m...@apple.com
- Date
- 2014-03-14 00:27:25 -0700 (Fri, 14 Mar 2014)
Log Message
<rdar://problem/16319722> [Cocoa] WKHistoryDelegate is being called for subframes
https://bugs.webkit.org/show_bug.cgi?id=130228
Reviewed by Mark Rowe.
* UIProcess/Cocoa/HistoryClient.mm:
(WebKit::HistoryClient::didNavigateWithNavigationData): Bail out if the frame is not the
main frame.
(WebKit::HistoryClient::didPerformClientRedirect): Ditto.
(WebKit::HistoryClient::didPerformServerRedirect): Ditto.
(WebKit::HistoryClient::didUpdateHistoryTitle): Ditto.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (165603 => 165604)
--- trunk/Source/WebKit2/ChangeLog 2014-03-14 06:45:39 UTC (rev 165603)
+++ trunk/Source/WebKit2/ChangeLog 2014-03-14 07:27:25 UTC (rev 165604)
@@ -1,3 +1,17 @@
+2014-03-14 Dan Bernstein <m...@apple.com>
+
+ <rdar://problem/16319722> [Cocoa] WKHistoryDelegate is being called for subframes
+ https://bugs.webkit.org/show_bug.cgi?id=130228
+
+ Reviewed by Mark Rowe.
+
+ * UIProcess/Cocoa/HistoryClient.mm:
+ (WebKit::HistoryClient::didNavigateWithNavigationData): Bail out if the frame is not the
+ main frame.
+ (WebKit::HistoryClient::didPerformClientRedirect): Ditto.
+ (WebKit::HistoryClient::didPerformServerRedirect): Ditto.
+ (WebKit::HistoryClient::didUpdateHistoryTitle): Ditto.
+
2014-03-13 Jinwoo Jeong <jw00.je...@samsung.com>
Refactor Vibration algorithm to use only one timer.
Modified: trunk/Source/WebKit2/UIProcess/Cocoa/HistoryClient.mm (165603 => 165604)
--- trunk/Source/WebKit2/UIProcess/Cocoa/HistoryClient.mm 2014-03-14 06:45:39 UTC (rev 165603)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/HistoryClient.mm 2014-03-14 07:27:25 UTC (rev 165604)
@@ -44,6 +44,9 @@
void HistoryClient::didNavigateWithNavigationData(WebContext*, WebPageProxy* webPageProxy, const WebNavigationDataStore& navigationDataStore, WebFrameProxy* webFrameProxy)
{
+ if (!webFrameProxy->isMainFrame())
+ return;
+
auto& navigationState = NavigationState::fromWebPage(*webPageProxy);
navigationState.didNavigateWithNavigationData(navigationDataStore);
@@ -51,6 +54,9 @@
void HistoryClient::didPerformClientRedirect(WebContext*, WebPageProxy* webPageProxy, const WTF::String& sourceURL, const WTF::String& destinationURL, WebFrameProxy* webFrameProxy)
{
+ if (!webFrameProxy->isMainFrame())
+ return;
+
auto& navigationState = NavigationState::fromWebPage(*webPageProxy);
navigationState.didPerformClientRedirect(sourceURL, destinationURL);
@@ -58,6 +64,9 @@
void HistoryClient::didPerformServerRedirect(WebContext*, WebPageProxy* webPageProxy, const WTF::String& sourceURL, const WTF::String& destinationURL, WebFrameProxy* webFrameProxy)
{
+ if (!webFrameProxy->isMainFrame())
+ return;
+
auto& navigationState = NavigationState::fromWebPage(*webPageProxy);
navigationState.didPerformServerRedirect(sourceURL, destinationURL);
@@ -65,6 +74,9 @@
void HistoryClient::didUpdateHistoryTitle(WebContext*, WebPageProxy* webPageProxy, const WTF::String& title, const WTF::String& url, WebFrameProxy* webFrameProxy)
{
+ if (!webFrameProxy->isMainFrame())
+ return;
+
auto& navigationState = NavigationState::fromWebPage(*webPageProxy);
navigationState.didUpdateHistoryTitle(title, url);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes