Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Issue 2606143002: Fix RGBA alpha parsing and serialization to adhere to W3 standard. (Closed)

Created:
3 years, 11 months ago by ktyliu_google
Modified:
3 years, 11 months ago
Reviewers:
sashab, ktyliu
CC:
ajuma+watch_chromium.org, darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), jbroman, Justin Novosad, kinuko+watch, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix RGBA alpha parsing and serialization to adhere to W3 standard. Specifically, a 2.55 multiplication factor should be used, and serialization should be to two or three digits according to section <alphavalue> in https://drafts.csswg.org/cssom/#serializing-css-values This fixes test case "background-color: rgba(5, 7, 10, 0.5)" in https://w3c-test.org/cssom/serialize-values.html Note a large number of tests need to be fixed, many of them are because an alpha value of 0.5 was previously 127 but should have been 128. BUG=453414

Patch Set 1 #

Patch Set 2 : fix blending #

Total comments: 12

Patch Set 3 : fixes to address reviewer comments #

Messages

Total messages: 19 (13 generated)
ktyliu
Hi Sasha, Good to see you again after the break! Please help review my very ...
3 years, 11 months ago (2017-01-02 22:48:07 UTC) #10
sashab
Thanks for the patch -- not sure what a lot of it does, maybe you ...
3 years, 11 months ago (2017-01-02 23:04:16 UTC) #11
sashab
Example of clampTo<> usage, and a testharness.js test without -expectations file -- https://codereview.chromium.org/2597103002/
3 years, 11 months ago (2017-01-02 23:43:45 UTC) #14
ktyliu
Thanks for the detailed review and suggestions! However, I found that several layout tests seem ...
3 years, 11 months ago (2017-01-03 02:11:25 UTC) #16
ktyliu
https://codereview.chromium.org/2606143002/diff/20001/third_party/WebKit/LayoutTests/css-parser/serialize-css-alpha-value-expected.txt File third_party/WebKit/LayoutTests/css-parser/serialize-css-alpha-value-expected.txt (right): https://codereview.chromium.org/2606143002/diff/20001/third_party/WebKit/LayoutTests/css-parser/serialize-css-alpha-value-expected.txt#newcode1 third_party/WebKit/LayoutTests/css-parser/serialize-css-alpha-value-expected.txt:1: This tests if floating point alpha values of numbers ...
3 years, 11 months ago (2017-01-03 02:14:22 UTC) #17
sashab
3 years, 11 months ago (2017-01-03 02:14:39 UTC) #18
Sure.

I would also be happy to split this into two patches - one to update the layout
tests, and the other to add your fix.

Powered by Google App Engine
This is Rietveld 408576698