[wpt-sync] Sync PR 17741 - Handle non-negativeness of blur radius properly
Categories
(Core :: Layout, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 17741 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/17741
Details from upstream follow.
Xiaocheng Hu <xiaochengh@chromium.org> wrote:
Handle non-negativeness of blur radius properly
Spec on blur radius says [1]:
"... Specifies the blur radius. Negative values are not allowed."
Current implementation performs parse time range check, which is
incorrect as calc() doesn't always have a double value. And spec
requires clamping instead of parse time check for calc() [2]:"Parse-time range-checking of values is not performed within math
functions, and therefore out-of-range values do not cause the
declaration to become invalid. However, the value resulting from
an expression must be clamped to the range allowed in the target
context."This patch changes it to pass |kValueRangeNonNegative| to
|ConsumeLength| as it handles non-negative calc() more properly.This is also preparation for adding DCHECK into GetDoubleValue() to
avoid calling it on calc() without a double value.[1] https://drafts.csswg.org/css-backgrounds-3/#shadow-blur-radius
[2] https://drafts.csswg.org/css-values-4/#calc-rangeBug: 979895
Change-Id: Ia8c36641f4ec4111ecf5a94a6ffc6eaacf22049c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1691747
Reviewed-by: Emil A Eklund \<eae@chromium.org>
Commit-Queue: Xiaocheng Hu \<xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#675815}
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
Comment 3•6 years ago
|
||
bugherder |
Description
•