mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
style: Don't allow negative radii in radial gradients.
Mostly renaming for clarity, as the gradient parsing code is a bit hairy. This also changes -webkit- gradients, which is, I think, the right thing to do (otherwise I need to give up on the type system and sprinkle parse_non_negatives around, which would be unfortunate). I filed https://bugs.chromium.org/p/chromium/issues/detail?id=1008112 on Chromium still accepting negative radii for those, so will wait to submit the patch for review until they reply there with their intentions. Differential Revision: https://phabricator.services.mozilla.com/D47141
This commit is contained in:
parent
19ddfd57d5
commit
d43632c9f8
5 changed files with 61 additions and 46 deletions
|
@ -704,14 +704,14 @@ impl Parse for NonNegativeLength {
|
|||
impl From<NoCalcLength> for NonNegativeLength {
|
||||
#[inline]
|
||||
fn from(len: NoCalcLength) -> Self {
|
||||
NonNegative::<Length>(Length::NoCalc(len))
|
||||
NonNegative(Length::NoCalc(len))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Length> for NonNegativeLength {
|
||||
#[inline]
|
||||
fn from(len: Length) -> Self {
|
||||
NonNegative::<Length>(len)
|
||||
NonNegative(len)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue