commit | 909793b85dd2eb0bd37954ec50fbc86d547be50a | [log] [tgz] |
---|---|---|
author | Florin Malita <fmalita@chromium.org> | Mon Dec 24 16:03:22 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Dec 24 16:03:22 2018 |
tree | d293b7e3bc72cd8465270915f71007d0ee5d09e7 | |
parent | 7fd49d1f5087977e7da796441189394a9d0a014d [diff] |
Update shadow blur-radius computations According to both CSS [1] and Canvas2D [2], the implementation is expected to perform a Gaussian blur with a standard deviation of half blur-radius. (SVG wisely chose to define the shadow parameters directly in terms of sigma [3]) Currently, for historical reasons, Blink uses a significantly smaller scale factor when computing sigma: ~0.28 instead of 0.5 -- thus shadows in Blink are about half the expected size. This change updates the sigma computation to match specs, and aligns Blink's shadow rendering with FF & WebKit. Newly passing (manual) test: http://test.csswg.org/suites/css3-background/nightly-unstable/html4/box-shadow-blur-definition-001.htm [1] https://www.w3.org/TR/css-backgrounds-3/#shadow-blur [2] https://html.spec.whatwg.org/multipage/canvas.html#when-shadows-are-drawn [3] https://drafts.fxtf.org/filter-effects/#element-attrdef-fedropshadow-stddeviation Bug: 179006 Test: wpt/css/css-backgrounds/box-shadow/box-shadow-blur-definition-001.xht Change-Id: Idb6e01f39f86bafa7b3c351bd1bff2f7f7ce1f92 Reviewed-on: https://chromium-review.googlesource.com/c/1377519 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/master@{#618825}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .