Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upShorthand with variable reference should not have extra whitespace after colon for serialization #15422
Conversation
highfive
commented
Feb 7, 2017
highfive
commented
Feb 7, 2017
|
|
| &AppendableValue::Declaration(decl) => { | ||
| if !decl.value_is_unparsed() { | ||
| // for normal parsed values, add a space between key: and value | ||
| try!(write!(dest, " ")); | ||
| } | ||
| }, | ||
| &AppendableValue::DeclarationsForShorthand(..) => try!(write!(dest, " ")) | ||
| &AppendableValue::DeclarationsForShorthand(..) => try!(write!(dest, " ")), | ||
| _ => {}, |
This comment has been minimized.
This comment has been minimized.
emilio
Feb 7, 2017
•
Member
Instead of a wildcard, let's do &AppendableValue::Css(..) => {}, so if new AppendableValue kinds are added it's not forgotten here.
|
Looks good! Mostly nits and needs a rebase, thanks for working on this! :) |
| test(function() { | ||
| var elem = document.getElementById('longhand-whitespace'); | ||
|
|
||
| assert_equals(elem.style.cssText, 'font-size: var(--a);'); |
This comment has been minimized.
This comment has been minimized.
| @@ -0,0 +1,34 @@ | |||
| <!doctype html> | |||
| <meta charset="utf-8"> | |||
| <title></title> | |||
This comment has been minimized.
This comment has been minimized.
| @@ -9804,6 +9804,11 @@ | |||
| {} | |||
| ] | |||
| ], | |||
| "mozilla/referrer-policy/generic/subresource/mozresource.pyc": [ | |||
This comment has been minimized.
This comment has been minimized.
mdevlamynck
Feb 8, 2017
Author
Contributor
Are those changes normal after a ./mach update-manifest? They seem to make the travis build fail.
|
Fixed nits and rebase done ;) I'm just not sure of the changes to tests/wpt/mozilla/meta/MANIFEST.json, they appeared after a |
|
That looks like a new problem; go ahead and remove the pyc entries manually and we'll sort that out separately. |
|
r? @emilio |
| @@ -0,0 +1,34 @@ | |||
| <!doctype html> | |||
| <meta charset="utf-8"> | |||
| <title>CSSO - Serialize is consistent with whitespace.</title> | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| var elem = document.getElementById('longhand'); | ||
|
|
||
| assert_equals(elem.style.cssText, 'font-size:var(--a);'); | ||
| }, "Longhand without withspace doesn't had one") |
This comment has been minimized.
This comment has been minimized.
emilio
Feb 12, 2017
Member
Let's write this as "Longhand with variables preserves original serialization: without whitespace", and so on.
You have a few typos here too, please replace "withspace" with "whitespace".
Thanks!
| } | ||
| }, | ||
| &AppendableValue::DeclarationsForShorthand(..) => try!(write!(dest, " ")) | ||
| if !decl.value_is_unparsed() { |
This comment has been minimized.
This comment has been minimized.
|
|
|
@emilio Review ping. |
…ter colon for serialization
|
@emilio This has been sitting for almost a month :( |
|
Ouch, sorry for the lag here :(. Looks good, though it needs a manifest update. I'll take care of it landing it as soon as I have a more stable internet connection if @mdevlamynck doesn't get to it first. Thanks for the patch @mdevlamynck, sorry again :/ |
|
Note: the manifest update can be accomplished with |
|
Closed in favor of #16135, thanks for doing this! |
Shorthand with variable reference should not have extra whitespace after colon for serialization. This is #15422 + a manifest update. Fixes #15295. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16135) <!-- Reviewable:end -->
Shorthand with variable reference should not have extra whitespace after colon for serialization. This is #15422 + a manifest update. Fixes #15295. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16135) <!-- Reviewable:end -->
Shorthand with variable reference should not have extra whitespace after colon for serialization. This is #15422 + a manifest update. Fixes #15295. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16135) <!-- Reviewable:end -->
Shorthand with variable reference should not have extra whitespace after colon for serialization. This is #15422 + a manifest update. Fixes #15295. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16135) <!-- Reviewable:end -->
…ve extra whitespace after colon for serialization (from emilio:shorthand-reference-variable); r=upsuper This is servo/servo#15422 + a manifest update. Fixes #15295. Source-Repo: https://github.com/servo/servo Source-Revision: 3a3f258f33d7f1c18645df95d3ca72879a770266 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : ce5ef6e91c6f473be4e90d149f33a17757d49d06
…ve extra whitespace after colon for serialization (from emilio:shorthand-reference-variable); r=upsuper This is servo/servo#15422 + a manifest update. Fixes #15295. Source-Repo: https://github.com/servo/servo Source-Revision: 3a3f258f33d7f1c18645df95d3ca72879a770266
…ve extra whitespace after colon for serialization (from emilio:shorthand-reference-variable); r=upsuper This is servo/servo#15422 + a manifest update. Fixes #15295. Source-Repo: https://github.com/servo/servo Source-Revision: 3a3f258f33d7f1c18645df95d3ca72879a770266 UltraBlame original commit: d5e22d9308739ad39e78908a09c68cf9812ad1c1
…ve extra whitespace after colon for serialization (from emilio:shorthand-reference-variable); r=upsuper This is servo/servo#15422 + a manifest update. Fixes #15295. Source-Repo: https://github.com/servo/servo Source-Revision: 3a3f258f33d7f1c18645df95d3ca72879a770266 UltraBlame original commit: d5e22d9308739ad39e78908a09c68cf9812ad1c1
…ve extra whitespace after colon for serialization (from emilio:shorthand-reference-variable); r=upsuper This is servo/servo#15422 + a manifest update. Fixes #15295. Source-Repo: https://github.com/servo/servo Source-Revision: 3a3f258f33d7f1c18645df95d3ca72879a770266 UltraBlame original commit: d5e22d9308739ad39e78908a09c68cf9812ad1c1
mdevlamynck commentedFeb 7, 2017
•
edited by emilio
Fixes #15295. Tell me if anything is wrong with the tests, I'm not sure I created them correctly.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThese changes fix #15295.
There are tests for these changes
This change is