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 10 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
25 changes: 25 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=]
xiaochen-z marked this conversation as resolved.
Show resolved Hide resolved
|browserSignals|["{{BiddingBrowserSignals/requestedSize}}"] to the result of running the
xiaochen-z marked this conversation as resolved.
Show resolved Hide resolved
[=convert an ad size to a map=] on |auctionConfig|'s [=auction config/requested size=].
xiaochen-z marked this conversation as resolved.
Show resolved Hide resolved
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 the [=convert an ad size to a map=] on |generatedBid|'s
xiaochen-z marked this conversation as resolved.
Show resolved Hide resolved
[=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,30 @@ 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 |widthStr| be a new empty [=string=].
1. Let |jsWidth| be |adSize|'s [=ad size/width=], [=converted to an ECMAScript value=].
1. Append [$ToString$](|jsWidth|) to |widthStr|.
1. Append |adSize|'s [=ad size/width units=] to |widthStr|.
1. [=map/Set=] |dict|["width"] to |widthStr|.
xiaochen-z marked this conversation as resolved.
Show resolved Hide resolved
1. Let |heightStr| be a new empty [=string=].
1. Let |jsHeight| be |adSize|'s [=ad size/height=], [=converted to an ECMAScript value=].
1. Append [$ToString$](|jsHeight|) to |heightStr|.
1. Append |adSize|'s [=ad size/height units=] to |heightStr|.
1. [=map/Set=] |dict|["heigth"] to |heightStr|.
1. return |dict|.
xiaochen-z marked this conversation as resolved.
Show resolved Hide resolved
</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