Bug 193039 - Standardize rounding of percentage rgb() alpha values
Summary: Standardize rounding of percentage rgb() alpha values
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2018-12-26 12:08 PST by Simon Fraser (smfr)
Modified: 2018-12-26 15:12 PST (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2018-12-26 12:08:59 PST
We have:
        alphaComponent = static_cast<int>(clampTo<double>(alpha, 0.0, 1.0) * nextafter(256.0, 0.0));

Blink has:

    // W3 standard stipulates a 2.55 alpha value multiplication factor.
    int alpha_component = static_cast<int>(lround(clampTo<double>(alpha, 0.0, 1.0) * 255.0));