FLEDGE: Enable screen height as unit and pure numbers input for ad size. #39730
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.
Currently, for generateBid() and joinAdInterestGroup(), the supported
ad size units are
This CL adds the unit:
The parser is also updated to support parsing pure numbers as pixels.
For example, "100" is parsed as 100 pixels.
A regular expression is used to match the input, and capture the
sub-patterns for value and unit.
^\s*((?:0|(?:[1-9][0-9]))(?:.[0-9]+)?)(px|sw|sh)?\s$
It basically means we match
entirely. (Sub-pattern captured)
Bug: http://b/239866637
See Turtledove issue: WICG/turtledove#312
See Turtledove PR: WICG/turtledove#417
Change-Id: I336055ff3dd635dcdfd78999d0cb5972569f5ac1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4402817
Commit-Queue: Xiaochen Zhou <[email protected]>
Reviewed-by: Garrett Tanzer <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1137102}