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

Parse decimals in RGB/RGBA and update rounding #9189

Merged
merged 1 commit into from Jan 26, 2018

Conversation

Projects
None yet
5 participants
@chromium-wpt-export-bot
Copy link
Collaborator

chromium-wpt-export-bot commented Jan 25, 2018

CSS Color 4 states that all numbers should be parsed inside of the RGB
and RGBA functions, instead of only integers as previously defined.
This change updates our behavior to match this, with non-integers
rounded to the nearest value. This additionally changes the behavior
of percentage values, multiplying by 255 and rounding to match the spec
instead of multiplying by 256 and flooring. The new spec is located at
https://drafts.csswg.org/css-color-4/#rgb-functions.

Bug: 703898
Change-Id: I826e92e7f81576240ad9b06f866df3300140b12c
Reviewed-on: https://chromium-review.googlesource.com/885004
Reviewed-by: Eric Willigers ericwilligers@chromium.org
Reviewed-by: Dmitry Gozman dgozman@chromium.org
Commit-Queue: Chris Nardi cnardi@chromium.org
Cr-Commit-Position: refs/heads/master@{#532032}

@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Jan 25, 2018

Build PASSED

Started: 2018-01-26 19:05:24
Finished: 2018-01-26 19:11:04

Failing Jobs

  • MicrosoftEdge:14.14393

Unstable Results

Browser: "Microsoftedge 14.14393" (failures allowed)

View in: WPT PR Status | TravisCI

Test Subtest Results Messages
/css/css-color/rgb-008.html   FAIL: 9
ERROR: 1
@tobie

This comment has been minimized.

Copy link
Contributor

tobie commented Jan 25, 2018

Summoning @wpt-pr-bot.

@wpt-pr-bot
Copy link
Collaborator

wpt-pr-bot left a comment

Already reviewed downstream.

Parse decimals in RGB/RGBA and update rounding
CSS Color 4 states that all numbers should be parsed inside of the RGB
and RGBA functions, instead of only integers as previously defined.
This change updates our behavior to match this, with non-integers
rounded to the nearest value. This additionally changes the behavior
of percentage values, multiplying by 255 and rounding to match the spec
instead of multiplying by 256 and flooring. The new spec is located at
https://drafts.csswg.org/css-color-4/#rgb-functions.

Bug: 703898
Change-Id: I826e92e7f81576240ad9b06f866df3300140b12c
Reviewed-on: https://chromium-review.googlesource.com/885004
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Chris Nardi <cnardi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532032}

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-885004 branch from e4a73ac to 64c1ee3 Jan 26, 2018

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 1fcd486 into master Jan 26, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-885004 branch Jan 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.