mirror of
https://github.com/servo/servo.git
synced 2025-10-02 01:29:15 +01:00
PropertyDeclarationParseResult -> Result<(), PropertyDeclarationParseError>
This commit is contained in:
parent
da6316fbe3
commit
7455ad5eb4
5 changed files with 30 additions and 45 deletions
|
@ -68,7 +68,7 @@ use style::keyframes::KeyframesStepValue;
|
|||
use style::parallel;
|
||||
use style::parser::{ParserContext, ParserContextExtraData};
|
||||
use style::properties::{ComputedValues, Importance, PropertyDeclaration};
|
||||
use style::properties::{PropertyDeclarationParseResult, PropertyDeclarationBlock, PropertyId};
|
||||
use style::properties::{PropertyDeclarationBlock, PropertyId};
|
||||
use style::properties::animated_properties::{AnimationValue, Interpolate, TransitionProperty};
|
||||
use style::properties::parse_one_declaration;
|
||||
use style::restyle_hints::{self, RestyleHint};
|
||||
|
@ -714,10 +714,11 @@ pub extern "C" fn Servo_ParseProperty(property: *const nsACString, value: *const
|
|||
extra_data);
|
||||
|
||||
let mut results = vec![];
|
||||
match PropertyDeclaration::parse(id, &context, &mut Parser::new(value),
|
||||
&mut results, false) {
|
||||
PropertyDeclarationParseResult::ValidOrIgnoredDeclaration => {},
|
||||
_ => return RawServoDeclarationBlockStrong::null(),
|
||||
let result = PropertyDeclaration::parse(
|
||||
id, &context, &mut Parser::new(value), &mut results, false
|
||||
);
|
||||
if result.is_err() {
|
||||
return RawServoDeclarationBlockStrong::null()
|
||||
}
|
||||
|
||||
Arc::new(RwLock::new(PropertyDeclarationBlock {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue