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 all 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
19 changes: 18 additions & 1 deletion spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -819,12 +819,29 @@ To <dfn>fill in a pending fenced frame config</dfn> given a [=fenced frame confi
1. Set |pendingConfig|'s [=fenced frame config/mapped url=]'s [=mapped url/value=] to
|replacedAdURL|.
1. Let |adSize| be |winningBid|'s [=generated bid/ad descriptor=]'s [=ad descriptor/size=].
1. Let |concreteAdSize| be the result of

Issue: resolving screen-relative sizes to pixel values for |adSize|.
(<a href="https://github.com/WICG/turtledove/issues/986">WICG/turtledove#986</a>)
1. Let |adWidthString| and |adHeightString| be the result of

Issue: converting |concreteAdSize| to strings.
(<a href="https://github.com/WICG/turtledove/issues/986">WICG/turtledove#986</a>)
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.
:: |concreteAdSize|.

Issue: Cast |concreteAdSize| into the format that is eventually chosen for
[=content size/value=].
(<a href="https://github.com/WICG/turtledove/issues/986">WICG/turtledove#986</a>)
: [=content size/visibility=]
:: "<a for=visibility>`opaque`</a>"
1. Set |pendingConfig|'s [=fenced frame config/interest group descriptor=]'s
Expand Down