Title: [269886] trunk
Revision
269886
Author
[email protected]
Date
2020-11-16 16:00:32 -0800 (Mon, 16 Nov 2020)

Log Message

PCM: Change attribute and JSON key names according to the W3C conversation
https://bugs.webkit.org/show_bug.cgi?id=218967

Reviewed by Brent Fulgham.

We've discussed extensively with Google and others on naming for the link
attributes and JSON key names in these issues:
https://github.com/privacycg/private-click-measurement/issues/30
https://github.com/privacycg/private-click-measurement/issues/56

This patch changes PCM accordingly.

Source/WebCore:

No new tests. Exiting tests updated.

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):
* html/HTMLAnchorElement.idl:
* html/HTMLAttributeNames.in:
* loader/PrivateClickMeasurement.cpp:
(WebCore::PrivateClickMeasurement::json const):

Tools:

* TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
(TestWebKitAPI::TEST):

LayoutTests:

* http/tests/contentextensions/block-private-click-measurement.html:
* http/tests/privateClickMeasurement/anchor-tag-attributes-reflect-expected.txt:
* http/tests/privateClickMeasurement/anchor-tag-attributes-reflect.html:
* http/tests/privateClickMeasurement/anchor-tag-attributes-validation-expected.txt:
* http/tests/privateClickMeasurement/anchor-tag-attributes-validation.html:
* http/tests/privateClickMeasurement/attribution-conversion-through-cross-site-image-redirect.html:
* http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window.html:
* http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority.html:
* http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority.html:
* http/tests/privateClickMeasurement/clear-through-website-data-removal.html:
* http/tests/privateClickMeasurement/conversion-disabled-in-ephemeral-session.html:
* http/tests/privateClickMeasurement/expired-attributions-removed.html:
* http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority.html:
* http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority.html:
* http/tests/privateClickMeasurement/second-conversion-with-higher-priority.html:
* http/tests/privateClickMeasurement/second-conversion-with-lower-priority.html:
* http/tests/privateClickMeasurement/send-attribution-conversion-request-expected.txt:
* http/tests/privateClickMeasurement/send-attribution-conversion-request.html:
* http/tests/privateClickMeasurement/store-disabled-in-ephemeral-session.html:
* http/tests/privateClickMeasurement/store-private-click-measurement.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (269885 => 269886)


--- trunk/LayoutTests/ChangeLog	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/ChangeLog	2020-11-17 00:00:32 UTC (rev 269886)
@@ -1,3 +1,38 @@
+2020-11-16  John Wilander  <[email protected]>
+
+        PCM: Change attribute and JSON key names according to the W3C conversation
+        https://bugs.webkit.org/show_bug.cgi?id=218967
+
+        Reviewed by Brent Fulgham.
+
+        We've discussed extensively with Google and others on naming for the link
+        attributes and JSON key names in these issues:
+        https://github.com/privacycg/private-click-measurement/issues/30
+        https://github.com/privacycg/private-click-measurement/issues/56
+
+        This patch changes PCM accordingly.
+
+        * http/tests/contentextensions/block-private-click-measurement.html:
+        * http/tests/privateClickMeasurement/anchor-tag-attributes-reflect-expected.txt:
+        * http/tests/privateClickMeasurement/anchor-tag-attributes-reflect.html:
+        * http/tests/privateClickMeasurement/anchor-tag-attributes-validation-expected.txt:
+        * http/tests/privateClickMeasurement/anchor-tag-attributes-validation.html:
+        * http/tests/privateClickMeasurement/attribution-conversion-through-cross-site-image-redirect.html:
+        * http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window.html:
+        * http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority.html:
+        * http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority.html:
+        * http/tests/privateClickMeasurement/clear-through-website-data-removal.html:
+        * http/tests/privateClickMeasurement/conversion-disabled-in-ephemeral-session.html:
+        * http/tests/privateClickMeasurement/expired-attributions-removed.html:
+        * http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority.html:
+        * http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority.html:
+        * http/tests/privateClickMeasurement/second-conversion-with-higher-priority.html:
+        * http/tests/privateClickMeasurement/second-conversion-with-lower-priority.html:
+        * http/tests/privateClickMeasurement/send-attribution-conversion-request-expected.txt:
+        * http/tests/privateClickMeasurement/send-attribution-conversion-request.html:
+        * http/tests/privateClickMeasurement/store-disabled-in-ephemeral-session.html:
+        * http/tests/privateClickMeasurement/store-private-click-measurement.html:
+
 2020-11-16  Antoine Quint  <[email protected]>
 
         Add an experimental <model> element

Modified: trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/contentextensions/block-private-click-measurement.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -8,7 +8,7 @@
 </head>
 <body _onload_="setTimeout(runTest, 0)">
 <div id="description">Tests that private click measurement redirects to well-known location don't trigger a conversion if they are blocked by content blockers.</div>
-<a id="targetLink" href="" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<a id="targetLink" href="" attributionsourceid="3" attributeon="http://localhost:8000">Link</a><br>
 <div id="output"></div>
 <script>
     prepareTest();

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-reflect-expected.txt (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-reflect-expected.txt	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-reflect-expected.txt	2020-11-17 00:00:32 UTC (rev 269886)
@@ -3,8 +3,8 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS anchorTag.adcampaignid is "40"
-PASS anchorTag.addestination is "destination.example"
+PASS anchorTag.attributionsourceid is "40"
+PASS anchorTag.attributeon is "destination.example"
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-reflect.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-reflect.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-reflect.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -5,13 +5,13 @@
     <script src=""
 </head>
 <body>
-<a id="testTag" href="" adcampaignid="40" addestination="destination.example"></a>
+<a id="testTag" href="" attributionsourceid="40" attributeon="destination.example"></a>
 <script>
     description("Test for the new private click measurement attributes on anchor tags.");
 
     const anchorTag = document.getElementById("testTag");
-    shouldBeEqualToString("anchorTag.adcampaignid", "40");
-    shouldBeEqualToString("anchorTag.addestination", "destination.example");
+    shouldBeEqualToString("anchorTag.attributionsourceid", "40");
+    shouldBeEqualToString("anchorTag.attributeon", "destination.example");
 </script>
 </body>
 </html>

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-validation-expected.txt (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-validation-expected.txt	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-validation-expected.txt	2020-11-17 00:00:32 UTC (rev 269886)
@@ -1,14 +1,14 @@
-CONSOLE MESSAGE: adcampaignid must have a non-negative value less than or equal to 63 for Private Click Measurement.
-CONSOLE MESSAGE: adcampaignid must have a non-negative value less than or equal to 63 for Private Click Measurement.
-CONSOLE MESSAGE: adcampaignid can not be converted to a non-negative integer which is required for Private Click Measurement.
-CONSOLE MESSAGE: adcampaignid can not be converted to a non-negative integer which is required for Private Click Measurement.
-CONSOLE MESSAGE: adcampaignid can not be converted to a non-negative integer which is required for Private Click Measurement.
-CONSOLE MESSAGE: addestination could not be converted to a valid HTTP-family URL.
-CONSOLE MESSAGE: addestination could not be converted to a valid HTTP-family URL.
-CONSOLE MESSAGE: addestination could not be converted to a valid HTTP-family URL.
-CONSOLE MESSAGE: Both adcampaignid and addestination need to be set for Private Click Measurement to work.
-CONSOLE MESSAGE: Both adcampaignid and addestination need to be set for Private Click Measurement to work.
-CONSOLE MESSAGE: addestination can not be the same site as the current website.
+CONSOLE MESSAGE: attributionsourceid must have a non-negative value less than or equal to 63 for Private Click Measurement.
+CONSOLE MESSAGE: attributionsourceid must have a non-negative value less than or equal to 63 for Private Click Measurement.
+CONSOLE MESSAGE: attributionsourceid can not be converted to a non-negative integer which is required for Private Click Measurement.
+CONSOLE MESSAGE: attributionsourceid can not be converted to a non-negative integer which is required for Private Click Measurement.
+CONSOLE MESSAGE: attributionsourceid can not be converted to a non-negative integer which is required for Private Click Measurement.
+CONSOLE MESSAGE: attributeon could not be converted to a valid HTTP-family URL.
+CONSOLE MESSAGE: attributeon could not be converted to a valid HTTP-family URL.
+CONSOLE MESSAGE: attributeon could not be converted to a valid HTTP-family URL.
+CONSOLE MESSAGE: Both attributionsourceid and attributeon need to be set for Private Click Measurement to work.
+CONSOLE MESSAGE: Both attributionsourceid and attributeon need to be set for Private Click Measurement to work.
+CONSOLE MESSAGE: attributeon can not be the same site as the current website.
 Test for validity of private click measurement attributes on anchor tags.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-validation.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-validation.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/anchor-tag-attributes-validation.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -24,8 +24,8 @@
         let anchorElement = document.createElement("a");
         anchorElement.id = elementID;
         anchorElement.classList.add("wide-link");
-        anchorElement.adcampaignid = adCampaignID;
-        anchorElement.addestination = adDestination;
+        anchorElement.attributionsourceid = adCampaignID;
+        anchorElement.attributeon = adDestination;
         anchorElement.href = ""
         anchorElement.innerText = "Link" + currentTest;
         return anchorElement;

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-cross-site-image-redirect.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-cross-site-image-redirect.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-cross-site-image-redirect.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -8,7 +8,7 @@
 </head>
 <body _onload_="setTimeout(runTest, 0)">
 <div id="description">Tests that triggering of private click measurement conversions through cross-site redirects do not work.</div>
-<a id="targetLink" href="" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<a id="targetLink" href="" attributionsourceid="3" attributeon="http://localhost:8000">Link</a><br>
 <div id="output"></div>
 <script>
     prepareTest();

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -8,7 +8,7 @@
 </head>
 <body _onload_="setTimeout(runTest, 0)">
 <div id="description">Tests triggering of private click measurement conversions in a new window.</div>
-<a target="_blank" rel="opener" id="targetLink" href="" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<a target="_blank" rel="opener" id="targetLink" href="" attributionsourceid="3" attributeon="http://localhost:8000">Link</a><br>
 <div id="output"></div>
 <script>
     prepareTest();

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -8,7 +8,7 @@
 </head>
 <body _onload_="setTimeout(runTest, 0)">
 <div id="description">Tests triggering of private click measurement conversions with priority.</div>
-<a id="targetLink" href="" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<a id="targetLink" href="" attributionsourceid="3" attributeon="http://localhost:8000">Link</a><br>
 <div id="output"></div>
 <script>
     prepareTest();

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -8,7 +8,7 @@
 </head>
 <body _onload_="setTimeout(runTest, 0)">
 <div id="description">Tests triggering of private click measurement conversions without priority.</div>
-<a id="targetLink" href="" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<a id="targetLink" href="" attributionsourceid="3" attributeon="http://localhost:8000">Link</a><br>
 <div id="output"></div>
 <script>
     prepareTest();

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/clear-through-website-data-removal.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/clear-through-website-data-removal.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/clear-through-website-data-removal.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -15,13 +15,13 @@
     const configuration = [
         {
             href: "http://localhost:8000" + path + "?stepTwo",
-            adcampaignid: "3",
-            addestination: "http://localhost:8000"
+            attributionsourceid: "3",
+            attributeon: "http://localhost:8000"
         },
         {
             href: "http://127.0.0.1:8000" + path + "?stepThree",
-            adcampaignid: "4",
-            addestination: "http://127.0.0.1:8000"
+            attributionsourceid: "4",
+            attributeon: "http://127.0.0.1:8000"
         }
     ];
 
@@ -30,8 +30,8 @@
     function configureLink(index) {
         let linkElement = document.getElementById("targetLink");
         linkElement.setAttribute("href", configuration[index].href);
-        linkElement.setAttribute("adcampaignid", configuration[index].adcampaignid);
-        linkElement.setAttribute("addestination", configuration[index].addestination);
+        linkElement.setAttribute("attributionsourceid", configuration[index].attributionsourceid);
+        linkElement.setAttribute("attributeon", configuration[index].attributeon);
     }
 
     function activateElement(elementID) {

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/conversion-disabled-in-ephemeral-session.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/conversion-disabled-in-ephemeral-session.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/conversion-disabled-in-ephemeral-session.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -8,7 +8,7 @@
 </head>
 <body _onload_="setTimeout(runTest, 0)">
 <div id="description">Tests that stored attributions cannot be converted in an ephemeral session.</div>
-<a id="targetLink" href="" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<a id="targetLink" href="" attributionsourceid="3" attributeon="http://localhost:8000">Link</a><br>
 <div id="output"></div>
 <script>
     const currentTimeMillis = (new Date()).getTime();

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/expired-attributions-removed.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/expired-attributions-removed.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/expired-attributions-removed.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -8,7 +8,7 @@
 </head>
 <body _onload_="setTimeout(runTest, 0)">
 <div id="description">Tests expiration of private click measurement.</div>
-<a id="targetLink" href="" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<a id="targetLink" href="" attributionsourceid="3" attributeon="http://localhost:8000">Link</a><br>
 <div id="output"></div>
 <script>
     prepareTest();

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -15,13 +15,13 @@
     const configuration = [
         {
             href: "http://localhost:8000" + path + "?stepTwo",
-            adcampaignid: "3",
-            addestination: "http://localhost:8000"
+            attributionsourceid: "3",
+            attributeon: "http://localhost:8000"
         },
         {
             href: "http://localhost:8000" + path + "?stepFour",
-            adcampaignid: "4",
-            addestination: "http://localhost:8000"
+            attributionsourceid: "4",
+            attributeon: "http://localhost:8000"
         }
     ];
 
@@ -30,8 +30,8 @@
     function configureLink(index) {
         let linkElement = document.getElementById("targetLink");
         linkElement.setAttribute("href", configuration[index].href);
-        linkElement.setAttribute("adcampaignid", configuration[index].adcampaignid);
-        linkElement.setAttribute("addestination", configuration[index].addestination);
+        linkElement.setAttribute("attributionsourceid", configuration[index].attributionsourceid);
+        linkElement.setAttribute("attributeon", configuration[index].attributeon);
     }
 
     function activateElement(elementID) {

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -15,13 +15,13 @@
     const configuration = [
         {
             href: "http://localhost:8000" + path + "?stepTwo",
-            adcampaignid: "3",
-            addestination: "http://localhost:8000"
+            attributionsourceid: "3",
+            attributeon: "http://localhost:8000"
         },
         {
             href: "http://localhost:8000" + path + "?stepFour",
-            adcampaignid: "4",
-            addestination: "http://localhost:8000"
+            attributionsourceid: "4",
+            attributeon: "http://localhost:8000"
         }
     ];
 
@@ -30,8 +30,8 @@
     function configureLink(index) {
         let linkElement = document.getElementById("targetLink");
         linkElement.setAttribute("href", configuration[index].href);
-        linkElement.setAttribute("adcampaignid", configuration[index].adcampaignid);
-        linkElement.setAttribute("addestination", configuration[index].addestination);
+        linkElement.setAttribute("attributionsourceid", configuration[index].attributionsourceid);
+        linkElement.setAttribute("attributeon", configuration[index].attributeon);
     }
 
     function activateElement(elementID) {

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/second-conversion-with-higher-priority.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/second-conversion-with-higher-priority.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/second-conversion-with-higher-priority.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -15,8 +15,8 @@
     const configuration = [
         {
             href: "http://localhost:8000" + path + "?stepTwo",
-            adcampaignid: "3",
-            addestination: "http://localhost:8000"
+            attributionsourceid: "3",
+            attributeon: "http://localhost:8000"
         }
     ];
 
@@ -25,8 +25,8 @@
     function configureLink(index) {
         let linkElement = document.getElementById("targetLink");
         linkElement.setAttribute("href", configuration[index].href);
-        linkElement.setAttribute("adcampaignid", configuration[index].adcampaignid);
-        linkElement.setAttribute("addestination", configuration[index].addestination);
+        linkElement.setAttribute("attributionsourceid", configuration[index].attributionsourceid);
+        linkElement.setAttribute("attributeon", configuration[index].attributeon);
     }
 
     function activateElement(elementID) {

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/second-conversion-with-lower-priority.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/second-conversion-with-lower-priority.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/second-conversion-with-lower-priority.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -15,8 +15,8 @@
     const configuration = [
         {
             href: "http://localhost:8000" + path + "?stepTwo",
-            adcampaignid: "3",
-            addestination: "http://localhost:8000"
+            attributionsourceid: "3",
+            attributeon: "http://localhost:8000"
         }
     ];
 
@@ -25,8 +25,8 @@
     function configureLink(index) {
         let linkElement = document.getElementById("targetLink");
         linkElement.setAttribute("href", configuration[index].href);
-        linkElement.setAttribute("adcampaignid", configuration[index].adcampaignid);
-        linkElement.setAttribute("addestination", configuration[index].addestination);
+        linkElement.setAttribute("attributionsourceid", configuration[index].attributionsourceid);
+        linkElement.setAttribute("attributeon", configuration[index].attributeon);
     }
 
     function activateElement(elementID) {

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/send-attribution-conversion-request-expected.txt (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/send-attribution-conversion-request-expected.txt	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/send-attribution-conversion-request-expected.txt	2020-11-17 00:00:32 UTC (rev 269886)
@@ -16,7 +16,7 @@
 REQUEST_URI: /privateClickMeasurement/resources/conversionReport.php
 No cookies in conversion request.
 Request body:
-{"content-type":"click","content-site":"127.0.0.1","content-id":3,"conversion-site":"localhost","conversion-data":12,"report-version":1}
+{"source-engagement-type":"click","source-site":"127.0.0.1","source-id":3,"attributed-on-site":"localhost","trigger-data":12,"report-version":1}
 
 
 --------

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/send-attribution-conversion-request.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/send-attribution-conversion-request.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/send-attribution-conversion-request.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -8,7 +8,7 @@
 </head>
 <body _onload_="setTimeout(runTest, 0)">
 <div id="description">Tests sending of private click measurement requests after a conversion. Also tests that cookies are not sent in those requests and cookies are not accepted in the responses.</div>
-<a id="targetLink" href="" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<a id="targetLink" href="" attributionsourceid="3" attributeon="http://localhost:8000">Link</a><br>
 <div id="output"></div>
 <script>
     const currentTimeMillis = (new Date()).getTime();

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/store-disabled-in-ephemeral-session.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/store-disabled-in-ephemeral-session.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/store-disabled-in-ephemeral-session.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -9,7 +9,7 @@
 </head>
 <body _onload_="setTimeout(runTest, 0)">
 <div id="description">Tests that storage of private click measurement is disabled in ephemeral sessions.</div>
-<a id="targetLink" href="" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<a id="targetLink" href="" attributionsourceid="3" attributeon="http://localhost:8000">Link</a><br>
 <div id="output"></div>
 <script>
     prepareTest();

Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/store-private-click-measurement.html (269885 => 269886)


--- trunk/LayoutTests/http/tests/privateClickMeasurement/store-private-click-measurement.html	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/store-private-click-measurement.html	2020-11-17 00:00:32 UTC (rev 269886)
@@ -8,7 +8,7 @@
 </head>
 <body _onload_="setTimeout(runTest, 0)">
 <div id="description">Tests storage of private click measurement.</div>
-<a id="targetLink" href="" adcampaignid="3" addestination="http://localhost:8000">Link</a><br>
+<a id="targetLink" href="" attributionsourceid="3" attributeon="http://localhost:8000">Link</a><br>
 <div id="output"></div>
 <script>
     prepareTest();

Modified: trunk/Source/WebCore/ChangeLog (269885 => 269886)


--- trunk/Source/WebCore/ChangeLog	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/Source/WebCore/ChangeLog	2020-11-17 00:00:32 UTC (rev 269886)
@@ -1,3 +1,26 @@
+2020-11-16  John Wilander  <[email protected]>
+
+        PCM: Change attribute and JSON key names according to the W3C conversation
+        https://bugs.webkit.org/show_bug.cgi?id=218967
+
+        Reviewed by Brent Fulgham.
+
+        We've discussed extensively with Google and others on naming for the link
+        attributes and JSON key names in these issues:
+        https://github.com/privacycg/private-click-measurement/issues/30
+        https://github.com/privacycg/private-click-measurement/issues/56
+
+        This patch changes PCM accordingly.
+
+        No new tests. Exiting tests updated.
+
+        * html/HTMLAnchorElement.cpp:
+        (WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):
+        * html/HTMLAnchorElement.idl:
+        * html/HTMLAttributeNames.in:
+        * loader/PrivateClickMeasurement.cpp:
+        (WebCore::PrivateClickMeasurement::json const):
+
 2020-11-16  Antoine Quint  <[email protected]>
 
         Add an experimental <model> element

Modified: trunk/Source/WebCore/html/HTMLAnchorElement.cpp (269885 => 269886)


--- trunk/Source/WebCore/html/HTMLAnchorElement.cpp	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.cpp	2020-11-17 00:00:32 UTC (rev 269886)
@@ -416,14 +416,14 @@
         || !UserGestureIndicator::processingUserGesture())
         return WTF::nullopt;
 
-    if (!hasAttributeWithoutSynchronization(adcampaignidAttr) && !hasAttributeWithoutSynchronization(addestinationAttr))
+    if (!hasAttributeWithoutSynchronization(attributionsourceidAttr) && !hasAttributeWithoutSynchronization(attributeonAttr))
         return WTF::nullopt;
     
-    auto adCampaignIDAttr = attributeWithoutSynchronization(adcampaignidAttr);
-    auto adDestinationAttr = attributeWithoutSynchronization(addestinationAttr);
+    auto attributionSourceIDAttr = attributeWithoutSynchronization(attributionsourceidAttr);
+    auto attributeOnAttr = attributeWithoutSynchronization(attributeonAttr);
     
-    if (adCampaignIDAttr.isEmpty() || adDestinationAttr.isEmpty()) {
-        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, "Both adcampaignid and addestination need to be set for Private Click Measurement to work."_s);
+    if (attributionSourceIDAttr.isEmpty() || attributeOnAttr.isEmpty()) {
+        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, "Both attributionsourceid and attributeon need to be set for Private Click Measurement to work."_s);
         return WTF::nullopt;
     }
 
@@ -433,30 +433,30 @@
         return WTF::nullopt;
     }
     
-    auto adCampaignID = parseHTMLNonNegativeInteger(adCampaignIDAttr);
-    if (!adCampaignID) {
-        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, "adcampaignid can not be converted to a non-negative integer which is required for Private Click Measurement."_s);
+    auto attributionSourceID = parseHTMLNonNegativeInteger(attributionSourceIDAttr);
+    if (!attributionSourceID) {
+        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, "attributionsourceid can not be converted to a non-negative integer which is required for Private Click Measurement."_s);
         return WTF::nullopt;
     }
     
-    if (adCampaignID.value() > PrivateClickMeasurement::MaxEntropy) {
-        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, makeString("adcampaignid must have a non-negative value less than or equal to ", PrivateClickMeasurement::MaxEntropy, " for Private Click Measurement."));
+    if (attributionSourceID.value() > PrivateClickMeasurement::MaxEntropy) {
+        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, makeString("attributionsourceid must have a non-negative value less than or equal to ", PrivateClickMeasurement::MaxEntropy, " for Private Click Measurement."));
         return WTF::nullopt;
     }
 
-    URL adDestinationURL { URL(), adDestinationAttr };
-    if (!adDestinationURL.isValid() || !adDestinationURL.protocolIsInHTTPFamily()) {
-        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, "addestination could not be converted to a valid HTTP-family URL."_s);
+    URL attributeOnURL { URL(), attributeOnAttr };
+    if (!attributeOnURL.isValid() || !attributeOnURL.protocolIsInHTTPFamily()) {
+        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, "attributeon could not be converted to a valid HTTP-family URL."_s);
         return WTF::nullopt;
     }
 
     RegistrableDomain documentRegistrableDomain { document().url() };
-    if (documentRegistrableDomain.matches(adDestinationURL)) {
-        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, "addestination can not be the same site as the current website."_s);
+    if (documentRegistrableDomain.matches(attributeOnURL)) {
+        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, "attributeon can not be the same site as the current website."_s);
         return WTF::nullopt;
     }
 
-    return PrivateClickMeasurement { Campaign(adCampaignID.value()), Source(documentRegistrableDomain), Destination(adDestinationURL) };
+    return PrivateClickMeasurement { Campaign(attributionSourceID.value()), Source(documentRegistrableDomain), Destination(attributeOnURL) };
 }
 
 void HTMLAnchorElement::handleClick(Event& event)

Modified: trunk/Source/WebCore/html/HTMLAnchorElement.idl (269885 => 269886)


--- trunk/Source/WebCore/html/HTMLAnchorElement.idl	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.idl	2020-11-17 00:00:32 UTC (rev 269886)
@@ -21,8 +21,8 @@
 [
     Exposed=Window
 ] interface HTMLAnchorElement : HTMLElement {
-    [CEReactions=NotNeeded, EnabledBySetting=PrivateClickMeasurement, Reflect] attribute DOMString adcampaignid;
-    [CEReactions=NotNeeded, EnabledBySetting=PrivateClickMeasurement, Reflect] attribute DOMString addestination;
+    [CEReactions=NotNeeded, EnabledBySetting=PrivateClickMeasurement, Reflect] attribute DOMString attributionsourceid;
+    [CEReactions=NotNeeded, EnabledBySetting=PrivateClickMeasurement, Reflect] attribute DOMString attributeon;
     [CEReactions=NotNeeded, Reflect] attribute DOMString charset;
     [CEReactions=NotNeeded, Reflect] attribute DOMString coords;
     [CEReactions=NotNeeded, Conditional=DOWNLOAD_ATTRIBUTE, EnabledBySetting=DownloadAttribute, Reflect] attribute DOMString download;

Modified: trunk/Source/WebCore/html/HTMLAttributeNames.in (269885 => 269886)


--- trunk/Source/WebCore/html/HTMLAttributeNames.in	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/Source/WebCore/html/HTMLAttributeNames.in	2020-11-17 00:00:32 UTC (rev 269886)
@@ -66,8 +66,8 @@
 aria-valuetext
 as
 async
-adcampaignid
-addestination
+attributionsourceid
+attributeon
 autocomplete
 autofocus
 autopictureinpicture

Modified: trunk/Source/WebCore/loader/PrivateClickMeasurement.cpp (269885 => 269886)


--- trunk/Source/WebCore/loader/PrivateClickMeasurement.cpp	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/Source/WebCore/loader/PrivateClickMeasurement.cpp	2020-11-17 00:00:32 UTC (rev 269886)
@@ -170,11 +170,11 @@
     if (!m_conversion)
         return reportDetails;
 
-    reportDetails->setString("content-type"_s, "click"_s);
-    reportDetails->setString("content-site"_s, m_source.registrableDomain.string());
-    reportDetails->setInteger("content-id"_s, m_campaign.id);
-    reportDetails->setString("conversion-site"_s, m_destination.registrableDomain.string());
-    reportDetails->setInteger("conversion-data"_s, m_conversion->data);
+    reportDetails->setString("source-engagement-type"_s, "click"_s);
+    reportDetails->setString("source-site"_s, m_source.registrableDomain.string());
+    reportDetails->setInteger("source-id"_s, m_campaign.id);
+    reportDetails->setString("attributed-on-site"_s, m_destination.registrableDomain.string());
+    reportDetails->setInteger("trigger-data"_s, m_conversion->data);
     reportDetails->setInteger("report-version"_s, 1);
     return reportDetails;
 }

Modified: trunk/Tools/ChangeLog (269885 => 269886)


--- trunk/Tools/ChangeLog	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/Tools/ChangeLog	2020-11-17 00:00:32 UTC (rev 269886)
@@ -1,3 +1,20 @@
+2020-11-16  John Wilander  <[email protected]>
+
+        PCM: Change attribute and JSON key names according to the W3C conversation
+        https://bugs.webkit.org/show_bug.cgi?id=218967
+
+        Reviewed by Brent Fulgham.
+
+        We've discussed extensively with Google and others on naming for the link
+        attributes and JSON key names in these issues:
+        https://github.com/privacycg/private-click-measurement/issues/30
+        https://github.com/privacycg/private-click-measurement/issues/56
+
+        This patch changes PCM accordingly.
+
+        * TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
+        (TestWebKitAPI::TEST):
+
 2020-11-16  Matt Lewis  <[email protected]>
 
         Bring up Big Sur Builders and Testers

Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp (269885 => 269886)


--- trunk/Tools/TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp	2020-11-16 23:51:48 UTC (rev 269885)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp	2020-11-17 00:00:32 UTC (rev 269886)
@@ -50,7 +50,7 @@
     
     ASSERT_EQ(attributionURL.string(), "https://webkit.org/.well-known/private-click-measurement/");
 
-    ASSERT_EQ(attribution.json()->toJSONString(), "{\"content-type\":\"click\",\"content-site\":\"webkit.org\",\"content-id\":0,\"conversion-site\":\"example.com\",\"conversion-data\":0,\"report-version\":1}");
+    ASSERT_EQ(attribution.json()->toJSONString(), "{\"source-engagement-type\":\"click\",\"source-site\":\"webkit.org\",\"source-id\":0,\"attributed-on-site\":\"example.com\",\"trigger-data\":0,\"report-version\":1}");
 }
 
 TEST(PrivateClickMeasurement, ValidMidValues)
@@ -62,7 +62,7 @@
     
     ASSERT_EQ(attributionURL.string(), "https://webkit.org/.well-known/private-click-measurement/");
 
-    ASSERT_EQ(attribution.json()->toJSONString(), "{\"content-type\":\"click\",\"content-site\":\"webkit.org\",\"content-id\":12,\"conversion-site\":\"example.com\",\"conversion-data\":44,\"report-version\":1}");
+    ASSERT_EQ(attribution.json()->toJSONString(), "{\"source-engagement-type\":\"click\",\"source-site\":\"webkit.org\",\"source-id\":12,\"attributed-on-site\":\"example.com\",\"trigger-data\":44,\"report-version\":1}");
 }
 
 TEST(PrivateClickMeasurement, ValidMaxValues)
@@ -74,7 +74,7 @@
     
     ASSERT_EQ(attributionURL.string(), "https://webkit.org/.well-known/private-click-measurement/");
 
-    ASSERT_EQ(attribution.json()->toJSONString(), "{\"content-type\":\"click\",\"content-site\":\"webkit.org\",\"content-id\":63,\"conversion-site\":\"example.com\",\"conversion-data\":63,\"report-version\":1}");
+    ASSERT_EQ(attribution.json()->toJSONString(), "{\"source-engagement-type\":\"click\",\"source-site\":\"webkit.org\",\"source-id\":63,\"attributed-on-site\":\"example.com\",\"trigger-data\":63,\"report-version\":1}");
 }
 
 TEST(PrivateClickMeasurement, EarliestTimeToSendAttributionMinimumDelay)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to