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

[css-properties-values-api] Compute <length> values to px. #15811

Merged
merged 1 commit into from Mar 14, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

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

According to the spec, the computed value of <length> registered properties
is the absolute value expressed in pixels. Currently, we are only behaving
correctly if the value is a calc() or if the CSSPrimitiveValue contains a
relative unit (e.g. em). This means that values like '1in' would not be
expressed in pixels.

As of this CL, we absolutize any <length> which isn't already a simple
(non-calc) px value.

R=futhark@chromium.org

Bug: 641877
Change-Id: Idec079671a094952e122847fc5ebd4b0cb609674
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1520586
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#640922}

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.

According to the spec, the computed value of <length> registered properties
is the absolute value expressed in pixels. Currently, we are only behaving
correctly if the value is a calc() or if the CSSPrimitiveValue contains a
relative unit (e.g. em). This means that values like '1in' would not be
expressed in pixels.

As of this CL, we absolutize any <length> which isn't already a simple
(non-calc) px value.

R=futhark@chromium.org

Bug: 641877
Change-Id: Idec079671a094952e122847fc5ebd4b0cb609674
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1520586
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#640922}
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