mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Make use of generics for transform-origin
This allows us to preserve keywords during serialisation.
This commit is contained in:
parent
b42aaf28df
commit
5d70580813
12 changed files with 241 additions and 221 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use parsing::parse;
|
||||
use style::properties::longhands::{self, perspective_origin, transform_origin};
|
||||
use style::properties::longhands::{perspective_origin, transform_origin};
|
||||
use style_traits::ToCss;
|
||||
|
||||
#[test]
|
||||
|
@ -30,16 +30,6 @@ fn test_clip() {
|
|||
"rect(auto, auto, auto, auto)");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_longhands_parse_origin() {
|
||||
assert_parser_exhausted!(longhands::parse_origin, "1px some-rubbish", false);
|
||||
assert_parser_exhausted!(longhands::parse_origin, "1px 2px", true);
|
||||
assert_parser_exhausted!(longhands::parse_origin, "center left", true);
|
||||
assert_parser_exhausted!(longhands::parse_origin, "center right", true);
|
||||
assert_parser_exhausted!(longhands::parse_origin, "center right 1px", true);
|
||||
assert_parser_exhausted!(longhands::parse_origin, "1% right", false);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_effects_parser_exhaustion() {
|
||||
assert_parser_exhausted!(perspective_origin::parse, "1px 1px", true);
|
||||
|
|
|
@ -25454,7 +25454,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"mozilla/calc.html": [
|
||||
"47507adabc0d3642154b3ed4b1ab64d726fa682d",
|
||||
"a1f441f7fd4b9ab3ae9e1cb5403cfe8de90bb71c",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/canvas.initial.reset.2dstate.html": [
|
||||
|
|
|
@ -141,7 +141,7 @@ numberProperties.forEach(function(prop) {
|
|||
var otherProperties = [
|
||||
['border-width', 'calc(1px)', 'calc(1px)'],
|
||||
['border-spacing', 'calc(1px)', 'calc(1px)'],
|
||||
['transform-origin', 'calc(1px + 0%)', 'calc(1px + 0%) 50% 0px'],
|
||||
['transform-origin', 'calc(1px + 0%)', 'calc(1px + 0%) center 0px'],
|
||||
['perspective-origin', 'calc(1px + 0%)', 'calc(1px + 0%) center'],
|
||||
['background-size', 'calc(1px + 0%)', 'calc(1px + 0%) auto'],
|
||||
['background-position', 'calc(1px + 0%) calc(2px + 0%)', 'calc(1px + 0%) calc(2px + 0%)'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue