Skip to content

Check if percentages are resolvable in CSSParserLocalContext#57778

Merged
chromium-wpt-export-bot merged 1 commit into
masterfrom
chromium-export-3cad39a943
Feb 13, 2026
Merged

Check if percentages are resolvable in CSSParserLocalContext#57778
chromium-wpt-export-bot merged 1 commit into
masterfrom
chromium-export-3cad39a943

Conversation

@chromium-wpt-export-bot
Copy link
Copy Markdown
Collaborator

Let CSSParserLocalContext check whether percentages can be resolved
without used value information or not for the specified property. Since
some color functions, like color-mix(), shape or transform functions has
their own context when resolving percentages, some of the properties may
have both, percentages that depend on a used value and percentages that
don't (for instance, inside some color function), we need to keep track
whether we are currently parsing values inside some css function.
CSSParserLocalContext keep track of that by maintaining a stack of the
current parsed functions.

Note: the border-image-slice test fails since we expect only simplified
percentages and not kCalcLengthFunction for that property. To be fixed
in next CL.

Bug: 413385732
Change-Id: I937675f2d8e138fc3e23cc401e313eed3dc86b3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7544868
Commit-Queue: Munira Tursunova <moonira@google.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1584580}

Let CSSParserLocalContext check whether percentages can be resolved
without used value information or not for the specified property. Since
some color functions, like color-mix(), shape or transform functions has
their own context when resolving percentages, some of the properties may
have both, percentages that depend on a used value and percentages that
don't (for instance, inside some color function), we need to keep track
whether we are currently parsing values inside some css function.
CSSParserLocalContext keep track of that by maintaining a stack of the
current parsed functions.

Note: the border-image-slice test fails since we expect only simplified
percentages and not `kCalcLengthFunction` for that property. To be fixed
in next CL.

Bug: 413385732
Change-Id: I937675f2d8e138fc3e23cc401e313eed3dc86b3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7544868
Commit-Queue: Munira Tursunova <moonira@google.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1584580}
Copy link
Copy Markdown
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit a8358ab into master Feb 13, 2026
27 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-3cad39a943 branch February 13, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants