Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add optional slot-size parameters to trustedBiddingSignalsURL requests #928
Add optional slot-size parameters to trustedBiddingSignalsURL requests #928
Changes from 5 commits
ce4855a
ce59178
f229705
4eefec4
c9af021
5bdac81
dc11454
1a4d6ae
462c55d
6be6a4d
6197823
e0c924b
edb343e
eeedda9
fa000ea
6f45465
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other size as string thing typos...
Thanks for the reminder re. normalized:
Quesitons, perhaps OT from the TBSU parameter, but adjacent...
And specific to the TBSU parameter,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I'm looking at the regexp our size parser uses, and it looks pretty rigid: R"(^\s*((?:0|(?:[1-9][0-9]*))(?:.[0-9]+)?)(px|sw|sh)?\s*$)".
Looks like the only thing it allows are leading/trailing whitespace, and trailing zeroes. It's case sensitive, does not allow negatives (though does allow 0), allows no whitespace between units, no unrecognized units (so just px, sw, sh, and empty, which is the same as pixels), no leading zeroes / leading "0x", etc. So I think we'll basically just remove leading/trailing whitespace, and potentially trailing 0's and the decimal if there are only zeroes after it. We basically parse the information we can from the value, store that.
When we want a string, we have to serialize that back to a string. We could remember the original string and what we parse it to, but that seems not great in terms of IG size and extra information leakage.
I think if there's demand for it, we could at least remember the "px" vs empty, though that would require a database format update, and we'd have to force pre-existing IGs into one bucket or the other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
What's the use case for a 0 anything banner dimension?
No legit/practical use for fractional/decimal pixel-specified banner sizes.
So you store the extracted string, then.
No, no demand for anything more. Just wanting to understand how it is parsed / normailzed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None that I'm aware of - I'm just describing what the existing parser does, at least according to my reading of it. Presumably at some point we'll require it to match a valid ad sizes, or at least silently throw away invalid sizes (for better forward compatibility, if new ad sizes are expected to occasionally be added).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate your readout.
Right. In PA there's no notion of 'globally valid' ad sizes. Sure, IAB has standard banner sizes, but in the spec the IG owner determines their creative assets' sizes. And that's fine, since they could have agreements for non-standard sizes with pubs, or use them in O&O cases, &c.
Want to better understand why the browser should permit a top-level seller to embed a 0-anything or fractional dimension banner. That's OT to this new TBS mode param.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've now added a description of the two transformations normalized does.
Looking at the code, we have an IsValidAdSize() method that rejects size 0, but we don't actually seem to call it when parsing ad sizes, so I think 0 is actually not allowed, we're just not disallowing it the way we should be (I think we might currently kill a renderer process if we see it? That's not good - anyhow, I'll work on that).