Title: [199673] trunk
Revision
199673
Author
[email protected]
Date
2016-04-18 09:45:35 -0700 (Mon, 18 Apr 2016)

Log Message

Source/WebCore:
CSP: Remove stubs for dynamically-added favicons (via link rel="icon")
https://bugs.webkit.org/show_bug.cgi?id=153151
<rdar://problem/24383176>

Reviewed by Darin Adler.

Remove the unused dynamic favicon code and tests.

* loader/EmptyClients.h:
* loader/FrameLoaderClient.h:
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLink):

Source/WebKit/mac:
CSP: Remove stubs for dynamically-added favicons (via link rel="icon")
https://bugs.webkit.org/show_bug.cgi?id=153151
<rdar://problem/24383176>

Reviewed by Darin Adler.

Remove the unused dynamic favicon code and tests.

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidChangeIcons): Deleted.

Source/WebKit/win:
CSP: Make dynamically-added favicons (via link rel="icon") obey Content-Security-Policy
https://bugs.webkit.org/show_bug.cgi?id=153151
<rdar://problem/24383176>

Reviewed by Darin Adler.

Remove the unused dynamic favicon code and tests.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDidChangeIcons): Deleted.
* WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit2:
CSP: Remove stubs for dynamically-added favicons (via link rel="icon")
https://bugs.webkit.org/show_bug.cgi?id=153151
<rdar://problem/24383176>

Reviewed by Darin Adler.

Remove the unused dynamic favicon code and tests.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidChangeIcons): Deleted.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

LayoutTests:
CSP: Remove stubs for dynamically-added favicons (via link rel="icon")
https://bugs.webkit.org/show_bug.cgi?id=153151
<rdar://problem/24383176>

Reviewed by Darin Adler.

Remove the unused dynamic favicon code and tests.

* TestExpectations:
* http/tests/security/contentSecurityPolicy/icon-allowed-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/icon-allowed.html: Removed.
* http/tests/security/contentSecurityPolicy/icon-blocked-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/icon-blocked.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (199672 => 199673)


--- trunk/LayoutTests/ChangeLog	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/LayoutTests/ChangeLog	2016-04-18 16:45:35 UTC (rev 199673)
@@ -1,3 +1,19 @@
+2016-04-18  Brent Fulgham  <[email protected]>
+
+        CSP: Remove stubs for dynamically-added favicons (via link rel="icon")
+        https://bugs.webkit.org/show_bug.cgi?id=153151
+        <rdar://problem/24383176>
+
+        Reviewed by Darin Adler.
+
+        Remove the unused dynamic favicon code and tests.
+
+        * TestExpectations:
+        * http/tests/security/contentSecurityPolicy/icon-allowed-expected.txt: Removed.
+        * http/tests/security/contentSecurityPolicy/icon-allowed.html: Removed.
+        * http/tests/security/contentSecurityPolicy/icon-blocked-expected.txt: Removed.
+        * http/tests/security/contentSecurityPolicy/icon-blocked.html: Removed.
+
 2016-04-18  Eric Carlson  <[email protected]>
 
         Media element "user gesture for fullscreen" restriction is never lifted

Modified: trunk/LayoutTests/TestExpectations (199672 => 199673)


--- trunk/LayoutTests/TestExpectations	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/LayoutTests/TestExpectations	2016-04-18 16:45:35 UTC (rev 199673)
@@ -811,8 +811,6 @@
 webkit.org/b/153150 http/tests/security/contentSecurityPolicy/1.1/child-src/frame-fires-load-event-when-blocked.html
 webkit.org/b/153150 http/tests/security/contentSecurityPolicy/1.1/child-src/frame-fires-load-event-when-redirect-blocked.html
 webkit.org/b/153150 http/tests/security/contentSecurityPolicy/frame-src-cross-origin-load.html
-webkit.org/b/153151 http/tests/security/contentSecurityPolicy/icon-allowed.html [ Failure ]
-webkit.org/b/153151 http/tests/security/contentSecurityPolicy/icon-blocked.html [ Failure ]
 webkit.org/b/153152 http/tests/security/contentSecurityPolicy/manifest-src-allowed.html # Needs testRunner.getManifestThen()
 webkit.org/b/153152 http/tests/security/contentSecurityPolicy/manifest-src-blocked.html # Needs testRunner.getManifestThen()
 webkit.org/b/153155 http/tests/security/contentSecurityPolicy/1.1/scripthash-basic-blocked-error-event.html

Deleted: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/icon-allowed-expected.txt (199672 => 199673)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/icon-allowed-expected.txt	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/icon-allowed-expected.txt	2016-04-18 16:45:35 UTC (rev 199673)
@@ -1,2 +0,0 @@
-main frame - didChangeIcons
-Use callbacks to show that favicons are loaded as allowed by CSP when link tags are dynamically added to the page.

Deleted: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/icon-allowed.html (199672 => 199673)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/icon-allowed.html	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/icon-allowed.html	2016-04-18 16:45:35 UTC (rev 199673)
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta http-equiv="Content-Security-Policy" content="img-src http://localhost:8000"/>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-    testRunner.dumpResourceLoadCallbacks();
-    testRunner.dumpIconChanges();
-}
-
-function createLink(rel, src) {
-    var link = document.createElement('link');
-    link.rel = rel;
-    link.href = ""
-    document.head.appendChild(link);
-}
-
-window.addEventListener('DOMContentLoaded', function() {
-    createLink('icon', 'http://localhost:8000/foo?q=from_icon');
-    if (window.testRunner) {
-        testRunner.notifyDone();
-    }
-});
-</script>
-<p>Use callbacks to show that favicons are loaded as allowed by CSP when link tags are dynamically added to the page.</p>
-</html>

Deleted: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/icon-blocked-expected.txt (199672 => 199673)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/icon-blocked-expected.txt	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/icon-blocked-expected.txt	2016-04-18 16:45:35 UTC (rev 199673)
@@ -1,3 +0,0 @@
-CONSOLE MESSAGE: Refused to load the image 'http://localhost/foo?q=from_icon' because it violates the following Content Security Policy directive: "img-src 'none'".
-
-Use callbacks to show that favicons are not loaded in violation of CSP when link tags are dynamically added to the page.

Deleted: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/icon-blocked.html (199672 => 199673)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/icon-blocked.html	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/icon-blocked.html	2016-04-18 16:45:35 UTC (rev 199673)
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta http-equiv="Content-Security-Policy" content="img-src 'none'"/>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-    testRunner.dumpResourceLoadCallbacks();
-    testRunner.dumpIconChanges();
-}
-
-function createLink(rel, src) {
-    var link = document.createElement('link');
-    link.rel = rel;
-    link.href = ""
-    document.head.appendChild(link);
-}
-
-window.addEventListener('DOMContentLoaded', function() {
-    createLink('icon', 'http://localhost:8000/foo?q=from_icon');
-    if (window.testRunner) {
-        testRunner.notifyDone();
-    }
-});
-</script>
-<p>Use callbacks to show that favicons are not loaded in violation of CSP when link tags are dynamically added to the page.</p>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (199672 => 199673)


--- trunk/Source/WebCore/ChangeLog	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/Source/WebCore/ChangeLog	2016-04-18 16:45:35 UTC (rev 199673)
@@ -1,3 +1,18 @@
+2016-04-18  Brent Fulgham  <[email protected]>
+
+        CSP: Remove stubs for dynamically-added favicons (via link rel="icon")
+        https://bugs.webkit.org/show_bug.cgi?id=153151
+        <rdar://problem/24383176>
+
+        Reviewed by Darin Adler.
+
+        Remove the unused dynamic favicon code and tests.
+
+        * loader/EmptyClients.h:
+        * loader/FrameLoaderClient.h:
+        * loader/LinkLoader.cpp:
+        (WebCore::LinkLoader::loadLink):
+
 2016-04-15  Jer Noble  <[email protected]>
 
         [Mac][EME] Protected content over HLS is not notified when a HDCP violation occurs.

Modified: trunk/Source/WebCore/loader/EmptyClients.h (199672 => 199673)


--- trunk/Source/WebCore/loader/EmptyClients.h	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/Source/WebCore/loader/EmptyClients.h	2016-04-18 16:45:35 UTC (rev 199673)
@@ -294,7 +294,6 @@
     void dispatchDidReceiveIcon() override { }
     void dispatchDidStartProvisionalLoad() override { }
     void dispatchDidReceiveTitle(const StringWithDirection&) override { }
-    void dispatchDidChangeIcons(IconType) override { }
     void dispatchDidCommitLoad() override { }
     void dispatchDidFailProvisionalLoad(const ResourceError&) override { }
     void dispatchDidFailLoad(const ResourceError&) override { }

Modified: trunk/Source/WebCore/loader/FrameLoaderClient.h (199672 => 199673)


--- trunk/Source/WebCore/loader/FrameLoaderClient.h	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/Source/WebCore/loader/FrameLoaderClient.h	2016-04-18 16:45:35 UTC (rev 199673)
@@ -168,7 +168,6 @@
         virtual void dispatchDidReceiveIcon() = 0;
         virtual void dispatchDidStartProvisionalLoad() = 0;
         virtual void dispatchDidReceiveTitle(const StringWithDirection&) = 0;
-        virtual void dispatchDidChangeIcons(IconType) = 0;
         virtual void dispatchDidCommitLoad() = 0;
         virtual void dispatchDidFailProvisionalLoad(const ResourceError&) = 0;
         virtual void dispatchDidFailLoad(const ResourceError&) = 0;

Modified: trunk/Source/WebCore/loader/LinkLoader.cpp (199672 => 199673)


--- trunk/Source/WebCore/loader/LinkLoader.cpp	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/Source/WebCore/loader/LinkLoader.cpp	2016-04-18 16:45:35 UTC (rev 199673)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -140,8 +141,6 @@
     if (relAttribute.iconType != InvalidIcon && href.isValid() && !href.isEmpty()) {
         if (!m_client.shouldLoadLink())
             return false;
-        if (Frame* frame = document.frame())
-            frame->loader().client().dispatchDidChangeIcons(relAttribute.iconType);
     }
 
     if (relAttribute.isDNSPrefetch) {

Modified: trunk/Source/WebKit/mac/ChangeLog (199672 => 199673)


--- trunk/Source/WebKit/mac/ChangeLog	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/Source/WebKit/mac/ChangeLog	2016-04-18 16:45:35 UTC (rev 199673)
@@ -1,3 +1,17 @@
+2016-04-18  Brent Fulgham  <[email protected]>
+
+        CSP: Remove stubs for dynamically-added favicons (via link rel="icon")
+        https://bugs.webkit.org/show_bug.cgi?id=153151
+        <rdar://problem/24383176>
+
+        Reviewed by Darin Adler.
+
+        Remove the unused dynamic favicon code and tests.
+
+        * WebCoreSupport/WebFrameLoaderClient.h:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::dispatchDidChangeIcons): Deleted.
+
 2016-04-15  Darin Adler  <[email protected]>
 
         Reduce use of Deprecated::ScriptXXX classes

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h (199672 => 199673)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h	2016-04-18 16:45:35 UTC (rev 199673)
@@ -112,7 +112,6 @@
     void dispatchDidReceiveIcon() override;
     void dispatchDidStartProvisionalLoad() override;
     void dispatchDidReceiveTitle(const WebCore::StringWithDirection&) override;
-    void dispatchDidChangeIcons(WebCore::IconType) override;
     void dispatchDidCommitLoad() override;
     void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&) override;
     void dispatchDidFailLoad(const WebCore::ResourceError&) override;

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (199672 => 199673)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm	2016-04-18 16:45:35 UTC (rev 199673)
@@ -702,11 +702,6 @@
         CallFrameLoadDelegate(implementations->didReceiveTitleForFrameFunc, webView, @selector(webView:didReceiveTitle:forFrame:), (NSString *)title.string(), m_webFrame.get());
 }
 
-void WebFrameLoaderClient::dispatchDidChangeIcons(WebCore::IconType)
-{
-     // FIXME: Implement this to allow container to update favicon.
-}
-
 void WebFrameLoaderClient::dispatchDidCommitLoad()
 {
     // Tell the client we've committed this URL.

Modified: trunk/Source/WebKit/win/ChangeLog (199672 => 199673)


--- trunk/Source/WebKit/win/ChangeLog	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/Source/WebKit/win/ChangeLog	2016-04-18 16:45:35 UTC (rev 199673)
@@ -1,3 +1,17 @@
+2016-04-15  Brent Fulgham  <[email protected]>
+
+        CSP: Make dynamically-added favicons (via link rel="icon") obey Content-Security-Policy
+        https://bugs.webkit.org/show_bug.cgi?id=153151
+        <rdar://problem/24383176>
+
+        Reviewed by Darin Adler.
+
+        Remove the unused dynamic favicon code and tests.
+
+        * WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebFrameLoaderClient::dispatchDidChangeIcons): Deleted.
+        * WebCoreSupport/WebFrameLoaderClient.h:
+
 2016-04-15  Darin Adler  <[email protected]>
 
         Reduce use of Deprecated::ScriptXXX classes

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp (199672 => 199673)


--- trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp	2016-04-18 16:45:35 UTC (rev 199673)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -434,23 +434,6 @@
         frameLoadDelegate->didReceiveTitle(webView, BString(title.string()), m_webFrame);
 }
 
-void WebFrameLoaderClient::dispatchDidChangeIcons(WebCore::IconType type)
-{
-    if (type != WebCore::Favicon)
-        return;
-
-    WebView* webView = m_webFrame->webView();
-    COMPtr<IWebFrameLoadDelegatePrivate> frameLoadDelegatePriv;
-    if (FAILED(webView->frameLoadDelegatePrivate(&frameLoadDelegatePriv)) || !frameLoadDelegatePriv)
-        return;
-
-    COMPtr<IWebFrameLoadDelegatePrivate2> frameLoadDelegatePriv2(Query, frameLoadDelegatePriv);
-    if (!frameLoadDelegatePriv2)
-        return;
-
-    frameLoadDelegatePriv2->didChangeIcons(webView, m_webFrame);
-}
-
 void WebFrameLoaderClient::dispatchDidCommitLoad()
 {
     WebView* webView = m_webFrame->webView();

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h (199672 => 199673)


--- trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h	2016-04-18 16:45:35 UTC (rev 199673)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2007, 2008, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -88,7 +88,6 @@
     void dispatchDidReceiveIcon() override;
     void dispatchDidStartProvisionalLoad() override;
     void dispatchDidReceiveTitle(const WebCore::StringWithDirection&) override;
-    void dispatchDidChangeIcons(WebCore::IconType) override;
     void dispatchDidCommitLoad() override;
     void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&) override;
     void dispatchDidFailLoad(const WebCore::ResourceError&) override;

Modified: trunk/Source/WebKit2/ChangeLog (199672 => 199673)


--- trunk/Source/WebKit2/ChangeLog	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/Source/WebKit2/ChangeLog	2016-04-18 16:45:35 UTC (rev 199673)
@@ -1,3 +1,17 @@
+2016-04-18  Brent Fulgham  <[email protected]>
+
+        CSP: Remove stubs for dynamically-added favicons (via link rel="icon")
+        https://bugs.webkit.org/show_bug.cgi?id=153151
+        <rdar://problem/24383176>
+
+        Reviewed by Darin Adler.
+
+        Remove the unused dynamic favicon code and tests.
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchDidChangeIcons): Deleted.
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+
 2016-04-18  Jer Noble  <[email protected]>
 
         REGRESSION( r199603): Pandora crashes WebKit in WebPlaybackSessionManager::removeClientForContext

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (199672 => 199673)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2016-04-18 16:45:35 UTC (rev 199673)
@@ -452,11 +452,6 @@
     webPage->send(Messages::WebPageProxy::DidReceiveTitleForFrame(m_frame->frameID(), title.string(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
 }
 
-void WebFrameLoaderClient::dispatchDidChangeIcons(WebCore::IconType)
-{
-    notImplemented();
-}
-
 void WebFrameLoaderClient::dispatchDidCommitLoad()
 {
     WebPage* webPage = m_frame->page();

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (199672 => 199673)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h	2016-04-18 16:14:36 UTC (rev 199672)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h	2016-04-18 16:45:35 UTC (rev 199673)
@@ -98,7 +98,6 @@
     void dispatchDidReceiveIcon() override;
     void dispatchDidStartProvisionalLoad() override;
     void dispatchDidReceiveTitle(const WebCore::StringWithDirection&) override;
-    void dispatchDidChangeIcons(WebCore::IconType) override;
     void dispatchDidCommitLoad() override;
     void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&) override;
     void dispatchDidFailLoad(const WebCore::ResourceError&) override;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to