Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec update for ad size entries in ScoringBrowserSignals and BiddingBrowserSignals. #1141

Merged
merged 19 commits into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1579,6 +1579,9 @@ To <dfn>generate and score bids</dfn> given an [=auction config=] |auctionConfig
1. [=map/Set=] |browserSignals|["{{BiddingBrowserSignals/topWindowHostname}}"] to |topLevelHost|.
1. [=map/Set=] |browserSignals|["{{BiddingBrowserSignals/seller}}"] to the [=serialization of an
origin|serialization=] of |seller|.
1. If |auctionConfig|'s [=auction config/requested size=] is not null, [=map/set=]
|browserSignals|["{{BiddingBrowserSignals/requestedSize}}"] to the result of running
[=convert an ad size to a map=] with |auctionConfig|'s [=auction config/requested size=].
1. Let |auctionLevel| be "single-level-auction".
1. Let |componentAuctionExpectedCurrency| be null.
1. If |topLevelAuctionConfig| is not null:
Expand Down Expand Up @@ -1924,6 +1927,9 @@ or "component-auction", a [=currency tag=] |componentAuctionExpectedCurrency|, a
<dt>{{ScoringBrowserSignals/renderURL}}
<dd>The result of running the [=URL serializer=] on |generatedBid|'s
[=generated bid/ad descriptor=]'s [=ad descriptor/url=]
<dt>{{ScoringBrowserSignals/renderSize}}
<dd>The result of running [=convert an ad size to a map=] with |generatedBid|'s
[=generated bid/ad descriptor=]'s [=ad descriptor/size=] if it is not null, {{undefined}} otherwise
<dt>{{ScoringBrowserSignals/biddingDurationMsec}}
<dd>|generatedBid|'s [=generated bid/bid duration=]
<dt>{{ScoringBrowserSignals/bidCurrency}}
Expand Down Expand Up @@ -4741,6 +4747,7 @@ dictionary BiddingBrowserSignals {
required long recency;
required long adComponentsLimit;

record<DOMString, DOMString> requestedSize;
USVString topLevelSeller;
sequence<PreviousWin> prevWinsMs;
object wasmHelper;
Expand All @@ -4755,12 +4762,27 @@ dictionary ScoringBrowserSignals {
required unsigned long biddingDurationMsec;
required DOMString bidCurrency;

record<DOMString, DOMString> renderSize;
unsigned long dataVersion;
sequence<USVString> adComponents;
boolean forDebuggingOnlyInCooldownOrLockout = false;
};
</xmp>

<div algorithm>
To <dfn>convert an ad size to a map</dfn> given an [=ad size=] |adSize|:

1. Let |dict| be a new empty [=map=].
1. Let |jsWidth| be |adSize|'s [=ad size/width=], [=converted to an ECMAScript value=].
1. [=map/Set=] |dict|["width"] to the result of [=string/concatenating=] « [$ToString$](|jsWidth|),
|adSize|'s [=ad size/width units=] ».
1. Let |jsHeight| be |adSize|'s [=ad size/height=], [=converted to an ECMAScript value=].
1. [=map/Set=] |dict|["height"] to the result of [=string/concatenating=] « [$ToString$](|jsHeight|),
|adSize|'s [=ad size/height units=] ».
1. Return |dict|.

</div>

Note: {{ScoringBrowserSignals}}'s {{ScoringBrowserSignals/adComponents}} is {{undefined}} when
[=generated bid/ad component descriptors=] is null or [=list/is empty|an empty list=]. It cannot be
an [=list/is empty|empty list=].
Expand Down
Loading