Title: [234148] trunk/Source/WebCore
Revision
234148
Author
[email protected]
Date
2018-07-24 09:27:25 -0700 (Tue, 24 Jul 2018)

Log Message

Rename Document::firstPartyForSameSiteCookies() to siteForCookies()
https://bugs.webkit.org/show_bug.cgi?id=187892

Reviewed by Dean Jackson.

Standardize on the spec. language "site for cookies" for the names of the setter and getter
on Document. The latest description of Same-Site cookies is in <https://httpwg.org/http-extensions/rfc6265bis.html>.

No functionality changed. So, no new tests.

* dom/Document.h:
(WebCore::Document::siteForCookies const):
(WebCore::Document::setSiteForCookies):
(WebCore::Document::firstPartyForSameSiteCookies const): Deleted.
(WebCore::Document::setFirstPartyForSameSiteCookies): Deleted.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::setFirstPartyForCookies):
(WebCore::FrameLoader::addSameSiteInfoToRequestIfNeeded):
* workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::createPageForServiceWorker):
* xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::createDocumentFromSource):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (234147 => 234148)


--- trunk/Source/WebCore/ChangeLog	2018-07-24 15:15:34 UTC (rev 234147)
+++ trunk/Source/WebCore/ChangeLog	2018-07-24 16:27:25 UTC (rev 234148)
@@ -1,3 +1,28 @@
+2018-07-24  Daniel Bates  <[email protected]>
+
+        Rename Document::firstPartyForSameSiteCookies() to siteForCookies()
+        https://bugs.webkit.org/show_bug.cgi?id=187892
+
+        Reviewed by Dean Jackson.
+
+        Standardize on the spec. language "site for cookies" for the names of the setter and getter
+        on Document. The latest description of Same-Site cookies is in <https://httpwg.org/http-extensions/rfc6265bis.html>.
+
+        No functionality changed. So, no new tests.
+
+        * dom/Document.h:
+        (WebCore::Document::siteForCookies const):
+        (WebCore::Document::setSiteForCookies):
+        (WebCore::Document::firstPartyForSameSiteCookies const): Deleted.
+        (WebCore::Document::setFirstPartyForSameSiteCookies): Deleted.
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::setFirstPartyForCookies):
+        (WebCore::FrameLoader::addSameSiteInfoToRequestIfNeeded):
+        * workers/service/context/ServiceWorkerThreadProxy.cpp:
+        (WebCore::createPageForServiceWorker):
+        * xml/XSLTProcessor.cpp:
+        (WebCore::XSLTProcessor::createDocumentFromSource):
+
 2018-07-24  Ross Kirsling  <[email protected]>
 
         WebCore::URL::hostIsIPAddress needs a Windows implementation

Modified: trunk/Source/WebCore/dom/Document.h (234147 => 234148)


--- trunk/Source/WebCore/dom/Document.h	2018-07-24 15:15:34 UTC (rev 234147)
+++ trunk/Source/WebCore/dom/Document.h	2018-07-24 16:27:25 UTC (rev 234148)
@@ -939,8 +939,8 @@
     // the URL of the top-level document or the null URL depending on whether the registrable
     // domain of this document's URL matches the registrable domain of its parent's/opener's
     // URL. For the top-level document, it is set to the document's URL.
-    const URL& firstPartyForSameSiteCookies() const { return m_firstPartyForSameSiteCookies; }
-    void setFirstPartyForSameSiteCookies(const URL& url) { m_firstPartyForSameSiteCookies = url; }
+    const URL& siteForCookies() const { return m_siteForCookies; }
+    void setSiteForCookies(const URL& url) { m_siteForCookies = url; }
     
     // The following implements the rule from HTML 4 for what valid names are.
     // To get this right for all the XML cases, we probably have to improve this or move it
@@ -1606,7 +1606,7 @@
     URL m_baseElementURL; // The URL set by the <base> element.
     URL m_cookieURL; // The URL to use for cookie access.
     URL m_firstPartyForCookies; // The policy URL for third-party cookie blocking.
-    URL m_firstPartyForSameSiteCookies; // The policy URL for Same-Site cookies.
+    URL m_siteForCookies; // The policy URL for Same-Site cookies.
 
     // Document.documentURI:
     // Although URL-like, Document.documentURI can actually be set to any

Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (234147 => 234148)


--- trunk/Source/WebCore/loader/FrameLoader.cpp	2018-07-24 15:15:34 UTC (rev 234147)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2018-07-24 16:27:25 UTC (rev 234148)
@@ -1106,7 +1106,7 @@
     String registrableDomain = ResourceRequest::partitionName(url.host().toString());
     for (Frame* frame = &m_frame; frame; frame = frame->tree().traverseNext(&m_frame)) {
         if (SecurityPolicy::shouldInheritSecurityOriginFromOwner(frame->document()->url()) || registrableDomainsAreEqual(frame->document()->url(), registrableDomain))
-            frame->document()->setFirstPartyForSameSiteCookies(url);
+            frame->document()->setSiteForCookies(url);
     }
 }
 
@@ -2868,7 +2868,7 @@
         request.setIsSameSite(true);
         return;
     }
-    request.setIsSameSite(registrableDomainsAreEqual(initiator->firstPartyForSameSiteCookies(), request.url()));
+    request.setIsSameSite(registrableDomainsAreEqual(initiator->siteForCookies(), request.url()));
 }
 
 void FrameLoader::addHTTPUpgradeInsecureRequestsIfNeeded(ResourceRequest& request)

Modified: trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp (234147 => 234148)


--- trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp	2018-07-24 15:15:34 UTC (rev 234147)
+++ trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp	2018-07-24 16:27:25 UTC (rev 234148)
@@ -66,7 +66,7 @@
     auto origin = data.registration.key.topOrigin().securityOrigin();
     origin->setStorageBlockingPolicy(storageBlockingPolicy);
 
-    document->setFirstPartyForSameSiteCookies(topOriginURL(origin));
+    document->setSiteForCookies(topOriginURL(origin));
     document->setFirstPartyForCookies(data.scriptURL);
     document->setDomainForCachePartition(origin->domainForCachePartition());
     mainFrame.setDocument(WTFMove(document));

Modified: trunk/Source/WebCore/xml/XSLTProcessor.cpp (234147 => 234148)


--- trunk/Source/WebCore/xml/XSLTProcessor.cpp	2018-07-24 15:15:34 UTC (rev 234147)
+++ trunk/Source/WebCore/xml/XSLTProcessor.cpp	2018-07-24 16:27:25 UTC (rev 234148)
@@ -91,7 +91,7 @@
             result->setSecurityOriginPolicy(oldDocument->securityOriginPolicy());
             result->setCookieURL(oldDocument->cookieURL());
             result->setFirstPartyForCookies(oldDocument->firstPartyForCookies());
-            result->setFirstPartyForSameSiteCookies(oldDocument->firstPartyForSameSiteCookies());
+            result->setSiteForCookies(oldDocument->siteForCookies());
             result->setStrictMixedContentMode(oldDocument->isStrictMixedContentMode());
             result->contentSecurityPolicy()->copyStateFrom(oldDocument->contentSecurityPolicy());
             result->contentSecurityPolicy()->copyUpgradeInsecureRequestStateFrom(*oldDocument->contentSecurityPolicy());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to