Use the term icon instead of favicon
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Jun 2017 16:12:38 +0000 (16:12 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Jun 2017 16:12:38 +0000 (16:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173400

Patch by Daniel Bates <dabates@apple.com> on 2017-06-16
Reviewed by Alex Christensen.

Source/WebCore:

* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceContent):
(WebCore::InspectorPageAgent::cachedResourceType):
* loader/LinkLoader.cpp:
(WebCore::createLinkPreloadResourceClient):
* loader/ResourceLoadInfo.cpp:
(WebCore::toResourceType):
* loader/SubresourceLoader.cpp:
(WebCore::logResourceLoaded):
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::CachedRawResource):
* loader/cache/CachedRawResource.h:
(isType):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::defaultPriorityForResourceType):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::isMainOrMediaOrIconOrRawResource):
(WebCore::CachedResource::ignoreForRequestCount):
(WebCore::CachedResource::isMainOrMediaOrFaviconOrRawResource): Deleted.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource):
(WebCore::CachedResourceLoader::requestIcon):
(WebCore::contentTypeFromResourceType):
(WebCore::CachedResourceLoader::checkInsecureContent):
(WebCore::CachedResourceLoader::allowedByContentSecurityPolicy):
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
(WebCore::CachedResourceLoader::requestFavicon): Deleted.
* loader/cache/CachedResourceLoader.h:
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading):

Source/WebKit2:

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::maximumBufferingTime):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218393 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorPageAgent.cpp
Source/WebCore/loader/LinkLoader.cpp
Source/WebCore/loader/ResourceLoadInfo.cpp
Source/WebCore/loader/SubresourceLoader.cpp
Source/WebCore/loader/cache/CachedRawResource.cpp
Source/WebCore/loader/cache/CachedRawResource.h
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/loader/cache/CachedResource.h
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/loader/cache/CachedResourceLoader.h
Source/WebCore/loader/icon/IconLoader.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp

index d7242ee..eb0f879 100644 (file)
@@ -1,3 +1,41 @@
+2017-06-16  Daniel Bates  <dabates@apple.com>
+
+        Use the term icon instead of favicon
+        https://bugs.webkit.org/show_bug.cgi?id=173400
+
+        Reviewed by Alex Christensen.
+
+        * inspector/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::cachedResourceContent):
+        (WebCore::InspectorPageAgent::cachedResourceType):
+        * loader/LinkLoader.cpp:
+        (WebCore::createLinkPreloadResourceClient):
+        * loader/ResourceLoadInfo.cpp:
+        (WebCore::toResourceType):
+        * loader/SubresourceLoader.cpp:
+        (WebCore::logResourceLoaded):
+        * loader/cache/CachedRawResource.cpp:
+        (WebCore::CachedRawResource::CachedRawResource):
+        * loader/cache/CachedRawResource.h:
+        (isType):
+        * loader/cache/CachedResource.cpp:
+        (WebCore::CachedResource::defaultPriorityForResourceType):
+        * loader/cache/CachedResource.h:
+        (WebCore::CachedResource::isMainOrMediaOrIconOrRawResource):
+        (WebCore::CachedResource::ignoreForRequestCount):
+        (WebCore::CachedResource::isMainOrMediaOrFaviconOrRawResource): Deleted.
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::createResource):
+        (WebCore::CachedResourceLoader::requestIcon):
+        (WebCore::contentTypeFromResourceType):
+        (WebCore::CachedResourceLoader::checkInsecureContent):
+        (WebCore::CachedResourceLoader::allowedByContentSecurityPolicy):
+        (WebCore::CachedResourceLoader::determineRevalidationPolicy):
+        (WebCore::CachedResourceLoader::requestFavicon): Deleted.
+        * loader/cache/CachedResourceLoader.h:
+        * loader/icon/IconLoader.cpp:
+        (WebCore::IconLoader::startLoading):
+
 2017-06-16  Per Arne Vollan  <pvollan@apple.com>
 
         WebKit does not honor closed caption stroke width.
index 5a1c522..e4eacaa 100644 (file)
@@ -140,7 +140,7 @@ bool InspectorPageAgent::cachedResourceContent(CachedResource* cachedResource, S
             *result = downcast<CachedScript>(*cachedResource).script().toString();
             return true;
         case CachedResource::MediaResource:
-        case CachedResource::Favicon:
+        case CachedResource::Icon:
         case CachedResource::RawResource: {
             auto* buffer = cachedResource->resourceBuffer();
             if (!buffer)
@@ -292,7 +292,7 @@ InspectorPageAgent::ResourceType InspectorPageAgent::cachedResourceType(const Ca
     case CachedResource::MainResource:
         return InspectorPageAgent::DocumentResource;
     case CachedResource::MediaResource:
-    case CachedResource::Favicon:
+    case CachedResource::Icon:
     case CachedResource::RawResource: {
         switch (cachedResource.resourceRequest().requester()) {
         case ResourceRequest::Requester::Fetch:
index fd4ad89..36fe97b 100644 (file)
@@ -153,7 +153,7 @@ static std::unique_ptr<LinkPreloadResourceClient> createLinkPreloadResourceClien
     case CachedResource::RawResource:
         return LinkPreloadRawResourceClient::create(loader, static_cast<CachedRawResource&>(resource));
     case CachedResource::MainResource:
-    case CachedResource::Favicon:
+    case CachedResource::Icon:
 #if ENABLE(SVG_FONTS)
     case CachedResource::SVGFontResource:
 #endif
index 2b07bc6..027b3f7 100644 (file)
@@ -56,7 +56,7 @@ ResourceType toResourceType(CachedResource::Type type)
         return ResourceType::Font;
 
     case CachedResource::MediaResource:
-    case CachedResource::Favicon:
+    case CachedResource::Icon:
     case CachedResource::RawResource:
         return ResourceType::Raw;
 
index 23db02d..c78e3a0 100644 (file)
@@ -448,7 +448,7 @@ static void logResourceLoaded(Frame* frame, CachedResource::Type type)
         resourceType = DiagnosticLoggingKeys::fontKey();
         break;
     case CachedResource::MediaResource:
-    case CachedResource::Favicon:
+    case CachedResource::Icon:
     case CachedResource::RawResource:
         resourceType = DiagnosticLoggingKeys::rawKey();
         break;
index 4b1173f..29b8d87 100644 (file)
@@ -41,7 +41,7 @@ CachedRawResource::CachedRawResource(CachedResourceRequest&& request, Type type,
     , m_identifier(0)
     , m_allowEncodedDataReplacement(true)
 {
-    ASSERT(isMainOrMediaOrFaviconOrRawResource());
+    ASSERT(isMainOrMediaOrIconOrRawResource());
 }
 
 std::optional<SharedBufferDataView> CachedRawResource::calculateIncrementalDataChunk(const SharedBuffer* data) const
index 8e4239c..bb5a5b8 100644 (file)
@@ -98,5 +98,5 @@ private:
 } // namespace WebCore
 
 SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::CachedRawResource)
-    static bool isType(const WebCore::CachedResource& resource) { return resource.isMainOrMediaOrFaviconOrRawResource(); }
+    static bool isType(const WebCore::CachedResource& resource) { return resource.isMainOrMediaOrIconOrRawResource(); }
 SPECIALIZE_TYPE_TRAITS_END()
index f9f260e..d8d68fa 100644 (file)
@@ -78,7 +78,7 @@ ResourceLoadPriority CachedResource::defaultPriorityForResourceType(Type type)
     case CachedResource::MediaResource:
     case CachedResource::FontResource:
     case CachedResource::RawResource:
-    case CachedResource::Favicon:
+    case CachedResource::Icon:
         return ResourceLoadPriority::Medium;
     case CachedResource::ImageResource:
         return ResourceLoadPriority::Low;
index 3546669..242ffac 100644 (file)
@@ -71,7 +71,7 @@ public:
 #endif
         MediaResource,
         RawResource,
-        Favicon,
+        Icon,
         SVGDocumentResource
 #if ENABLE(XSLT)
         , XSLStyleSheet
@@ -162,7 +162,7 @@ public:
 
     bool isImage() const { return type() == ImageResource; }
     // FIXME: CachedRawResource could be a main resource, an audio/video resource, or a raw XHR/icon resource.
-    bool isMainOrMediaOrFaviconOrRawResource() const { return type() == MainResource || type() == MediaResource || type() == Favicon || type() == RawResource; }
+    bool isMainOrMediaOrIconOrRawResource() const { return type() == MainResource || type() == MediaResource || type() == Icon || type() == RawResource; }
     bool ignoreForRequestCount() const
     {
         return m_resourceRequest.ignoreForRequestCount()
@@ -171,7 +171,7 @@ public:
             || type() == LinkPrefetch
             || type() == LinkSubresource
 #endif
-            || type() == Favicon
+            || type() == Icon
             || type() == RawResource;
     }
 
index b8bfffa..dea7bc9 100644 (file)
@@ -105,7 +105,7 @@ static CachedResource* createResource(CachedResource::Type type, CachedResourceR
         return new CachedFont(WTFMove(request), sessionID);
     case CachedResource::MediaResource:
     case CachedResource::RawResource:
-    case CachedResource::Favicon:
+    case CachedResource::Icon:
     case CachedResource::MainResource:
         return new CachedRawResource(WTFMove(request), type, sessionID);
 #if ENABLE(XSLT)
@@ -277,9 +277,9 @@ CachedResourceHandle<CachedRawResource> CachedResourceLoader::requestMedia(Cache
     return downcast<CachedRawResource>(requestResource(CachedResource::MediaResource, WTFMove(request)).get());
 }
 
-CachedResourceHandle<CachedRawResource> CachedResourceLoader::requestFavicon(CachedResourceRequest&& request)
+CachedResourceHandle<CachedRawResource> CachedResourceLoader::requestIcon(CachedResourceRequest&& request)
 {
-    return downcast<CachedRawResource>(requestResource(CachedResource::Favicon, WTFMove(request)).get());
+    return downcast<CachedRawResource>(requestResource(CachedResource::Icon, WTFMove(request)).get());
 }
 
 CachedResourceHandle<CachedRawResource> CachedResourceLoader::requestRawResource(CachedResourceRequest&& request)
@@ -313,7 +313,7 @@ static MixedContentChecker::ContentType contentTypeFromResourceType(CachedResour
 #endif
 
     case CachedResource::RawResource:
-    case CachedResource::Favicon:
+    case CachedResource::Icon:
     case CachedResource::SVGDocumentResource:
         return MixedContentChecker::ContentType::Active;
 #if ENABLE(XSLT)
@@ -364,7 +364,7 @@ bool CachedResourceLoader::checkInsecureContent(CachedResource::Type type, const
 #endif
     case CachedResource::MediaResource:
     case CachedResource::RawResource:
-    case CachedResource::Favicon:
+    case CachedResource::Icon:
     case CachedResource::ImageResource:
 #if ENABLE(SVG_FONTS)
     case CachedResource::SVGFontResource:
@@ -412,7 +412,7 @@ bool CachedResourceLoader::allowedByContentSecurityPolicy(CachedResource::Type t
             return false;
         break;
     case CachedResource::SVGDocumentResource:
-    case CachedResource::Favicon:
+    case CachedResource::Icon:
     case CachedResource::ImageResource:
         if (!m_document->contentSecurityPolicy()->allowImageFromSource(url, redirectResponseReceived))
             return false;
@@ -953,7 +953,7 @@ CachedResourceLoader::RevalidationPolicy CachedResourceLoader::determineRevalida
 
     // FIXME: We should use the same cache policy for all resource types. The raw resource policy is overly strict
     //        while the normal subresource policy is too loose.
-    if (existingResource->isMainOrMediaOrFaviconOrRawResource() && frame()) {
+    if (existingResource->isMainOrMediaOrIconOrRawResource() && frame()) {
         bool strictPolicyDisabled = frame()->loader().isStrictRawResourceValidationPolicyDisabledForTesting();
         bool canReuseRawResource = strictPolicyDisabled || downcast<CachedRawResource>(*existingResource).canReuse(request);
         if (!canReuseRawResource)
index fffdcb8..7ae1306 100644 (file)
@@ -79,7 +79,7 @@ public:
     CachedResourceHandle<CachedScript> requestScript(CachedResourceRequest&&);
     CachedResourceHandle<CachedFont> requestFont(CachedResourceRequest&&, bool isSVG);
     CachedResourceHandle<CachedRawResource> requestMedia(CachedResourceRequest&&);
-    CachedResourceHandle<CachedRawResource> requestFavicon(CachedResourceRequest&&);
+    CachedResourceHandle<CachedRawResource> requestIcon(CachedResourceRequest&&);
     CachedResourceHandle<CachedRawResource> requestRawResource(CachedResourceRequest&&);
     CachedResourceHandle<CachedRawResource> requestMainResource(CachedResourceRequest&&);
     CachedResourceHandle<CachedSVGDocument> requestSVGDocument(CachedResourceRequest&&);
index 2b4779b..a048651 100644 (file)
@@ -88,7 +88,7 @@ void IconLoader::startLoading()
     request.setInitiator(cachedResourceRequestInitiators().icon);
 
     auto* frame = m_frame ? m_frame : m_documentLoader->frame();
-    m_resource = frame->document()->cachedResourceLoader().requestFavicon(WTFMove(request));
+    m_resource = frame->document()->cachedResourceLoader().requestIcon(WTFMove(request));
     if (m_resource)
         m_resource->addClient(*this);
     else
index 5e96577..e7cdfd0 100644 (file)
@@ -1,3 +1,13 @@
+2017-06-16  Daniel Bates  <dabates@apple.com>
+
+        Use the term icon instead of favicon
+        https://bugs.webkit.org/show_bug.cgi?id=173400
+
+        Reviewed by Alex Christensen.
+
+        * WebProcess/Network/WebLoaderStrategy.cpp:
+        (WebKit::maximumBufferingTime):
+
 2017-06-16  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK][WPE] Remove WKCookieManagerSoup
index 6795a3a..667bdd1 100644 (file)
@@ -117,7 +117,7 @@ static Seconds maximumBufferingTime(CachedResource* resource)
     case CachedResource::MediaResource:
         return 50_ms;
     case CachedResource::MainResource:
-    case CachedResource::Favicon:
+    case CachedResource::Icon:
     case CachedResource::RawResource:
     case CachedResource::SVGDocumentResource:
 #if ENABLE(LINK_PREFETCH)