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 ad size macro substitution #801

Merged
merged 9 commits into from
Apr 2, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 11 additions & 3 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -646,14 +646,22 @@ To <dfn>construct a pending fenced frame config</dfn> given an [=auction config=
To <dfn>fill in a pending fenced frame config</dfn> given a [=fenced frame config=]
|pendingConfig|, [=auction config=] |auctionConfig|, and [=leading bid info=] |winningBidInfo|:
1. Let |winningBid| be |winningBidInfo|'s [=leading bid info/leading bid=].
1. Set |pendingConfig|'s [=fenced frame config/mapped url=]'s [=mapped url/value=] to
|winningBid|'s [=generated bid/ad descriptor=]'s [=ad descriptor/url=].
1. Let |adSize| be |winningBid|'s [=generated bid/ad descriptor=]'s [=ad descriptor/size=].
1. Let |concreteAdSize| be the result of TODO: resolving screen-relative sizes to pixel values for
gtanzer marked this conversation as resolved.
Show resolved Hide resolved
|adSize|.
1. Let |adWidthString| and |adHeightString| be the result of TODO: converting |concreteAdSize| to
strings.
1. Let |sizeMacroMap| be the [=ordered map=] «[ "{%AD_WIDTH%}" → |adWidthString|,
"{%AD_HEIGHT%}" → |adHeightString|, "${AD_WIDTH}" → |adWidthString|,
"${AD_HEIGHT}" → |adHeightString|]»
1. Set |pendingConfig|'s [=fenced frame config/mapped url=]'s [=mapped url/value=] to
the result of [=fencedframeutil/substituting macros=] with |sizeMacroMap| into |winningBid|'s
[=generated bid/ad descriptor=]'s [=ad descriptor/url=].
1. If |adSize| is not null:
1. Set |pendingConfig|'s [=fenced frame config/content size=] to a [=struct=] with the following
[=struct/items=]:
: [=content size/value=]
:: |adSize| TODO: Resolve screen-relative sizes and macros and cast this properly.
:: |adSize|, |concreteAdSize|. TODO: cast this properly
gtanzer marked this conversation as resolved.
Show resolved Hide resolved

: [=content size/visibility=]
:: "<a for=visibility>`opaque`</a>"
Expand Down