Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding sync method to update atrr from inline style updates #9410

Closed
wants to merge 15 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Removing unnecessary field from serialization css enum

  • Loading branch information
craftytrickster committed May 19, 2016
commit e828d2f6787032f0a136e88c80641118c34e7b44
@@ -397,7 +397,7 @@ enum AppendableValue<'a, I>
where I: Iterator<Item=&'a PropertyDeclaration> {
Declaration(&'a PropertyDeclaration),
DeclarationsForShorthand(I),
Css(&'a str, bool)
Css(&'a str)
}

fn append_property_name<W>(dest: &mut W,
@@ -423,7 +423,7 @@ fn append_declaration_value<'a, W, I>
-> fmt::Result
where W: fmt::Write, I: Iterator<Item=&'a PropertyDeclaration> {
match appendable_value {
AppendableValue::Css(css, _) => {
AppendableValue::Css(css) => {
try!(write!(dest, "{}", css))
},
AppendableValue::Declaration(decl) => {
@@ -461,10 +461,8 @@ fn append_serialization<'a, W, I>(dest: &mut W,

// for normal parsed values, add a space between key: and value
match &appendable_value {
&AppendableValue::Css(_, is_unparsed) => {
if !is_unparsed {
try!(write!(dest, " "))
}
&AppendableValue::Css(_) => {
try!(write!(dest, " "))
},
&AppendableValue::Declaration(decl) => {
if !decl.value_is_unparsed() {
@@ -696,8 +694,7 @@ impl Shorthand {
// https://drafts.csswg.org/css-variables/#variables-in-shorthands
if let Some(css) = first_declaration.with_variables_from_shorthand(self) {
if declarations2.all(|d| d.with_variables_from_shorthand(self) == Some(css)) {
let is_unparsed = first_declaration.value_is_unparsed();
return Some(AppendableValue::Css(css, is_unparsed));
return Some(AppendableValue::Css(css));
}
else {
return None;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.