Skip to content

Commit

Permalink
Spec ad size macro substitution (#801)
Browse files Browse the repository at this point in the history
* spec ad size macro

* Small change to rerun checks

* Twiddle diff to rerun checks

* Add Issue: refs

* Clarify todo

* Update spec.bs

* Update spec.bs

* fix

---------

Co-authored-by: Garrett Tanzer <gtanzer@chromium.org>
  • Loading branch information
gtanzer and Garrett Tanzer committed Apr 2, 2024
1 parent 65e0219 commit 3d9ccfe
Showing 1 changed file with 18 additions and 1 deletion.
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

0 comments on commit 3d9ccfe

Please sign in to comment.