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

Implement CSS comparison functions min/max #18409

Merged
merged 1 commit into from Aug 15, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Aug 13, 2019

This patch implements the CSSComparison functions min/max following
spec: https://drafts.csswg.org/css-values-4/#comp-func

  1. New CSSMathOperator types and a new CSSMathExpressionNode subclass
    are added, so that CSSMathFunctionValue can represent an expression
    that involves min() and max()

  2. Parser support for min() and max() are added

  3. Conversions between CSSMathFunctionValue and CalculationValue are
    augmented to support comparisons

A minimal test suite is also added to verify reachability of the newly
added code.

The following will be finished by future patches:

  • Bridging comparison functions with CSS typed OM objects
  • Supporting comparison functions in the 'sizes' attribute
  • Adding a comprehensive wpt test suite for comparison functions

Bug: 825895
Change-Id: I5bbf09b62818f733573f6d38837c68e555fcae59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1744799
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687414}

Copy link
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.

Already reviewed downstream.

This patch implements the CSSComparison functions min/max following
spec: https://drafts.csswg.org/css-values-4/#comp-func

1. New CSSMathOperator types and a new CSSMathExpressionNode subclass
   are added, so that CSSMathFunctionValue can represent an expression
   that involves min() and max()

2. Parser support for min() and max() are added

3. Conversions between CSSMathFunctionValue and CalculationValue are
   augmented to support comparisons

A minimal test suite is also added to verify reachability of the newly
added code.

The following will be finished by future patches:
- Bridging comparison functions with CSS typed OM objects
- Supporting comparison functions in the 'sizes' attribute
- Adding a comprehensive wpt test suite for comparison functions

Bug: 825895
Change-Id: I5bbf09b62818f733573f6d38837c68e555fcae59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1744799
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687414}
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.

None yet

3 participants