Bug
1565141 [wpt PR 17684] - Fix decision of whether to drop y value for 2d translate, a=testonly
Automatic update from web-platform-tests
Fix decision of whether to drop y value for 2d translate
Spec requires dropping y value for 2d translate if it's zero (*). The
current implementation contains bug that:
1. It rounds the value before checking, which results in incorrect
dropping of '0.1px'
2. It calls DoubleValue() on calc() without type checking, while
DoubleValue() on calc() is meaningless when the calc() doesn't
resolve to a simple numeric value (e.g., 1px - 1%). This results in
incorrect dropping of some calc().
Both are fixed by this patch.
This is also a preparation for adding DCHECK in DoubleValue() to ensure
that it's called only when calc() can be resolved into a simple numeric
value.
Bug: 979895
Change-Id: Ie8b846729b91e55006485a25fab0b65533983eac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
1692202
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#675708}
--
wpt-commits:
d947446c473a627ee68835eab7dcb928d85488bd
wpt-pr: 17684