Bug 1160281 - Add support for -webkit-transform-origin via CSS Unprefixing Service. r=dholbert

This commit is contained in:
Mike Taylor 2015-05-08 12:28:00 +02:00
parent 05d3e3d64c
commit 0c9d568ddd
2 changed files with 20 additions and 1 deletions

View File

@ -44,6 +44,7 @@ CSSUnprefixingService.prototype = {
"-webkit-box-ordinal-group": "order",
"-webkit-box-sizing": "box-sizing",
"-webkit-transform": "transform",
"-webkit-transform-origin": "transform-origin",
};
let unprefixedPropName = propertiesThatAreJustAliases[aPropName];

View File

@ -4,9 +4,16 @@
<meta charset="utf-8">
<title>Helper file for testing CSS Unprefixing Service</title>
<script type="text/javascript" src="property_database.js"></script>
<style type="text/css">
#wrapper {
width: 500px;
}
</style>
</head>
<body>
<div id="content"></div>
<div id="wrapper">
<div id="content"></div>
</div>
<script type="application/javascript;version=1.7">
"use strict";
@ -140,6 +147,17 @@ const gTestcases = [
targetPropName: "transform",
expectedDOMStyleVal: "matrix(1, 2, 3, 4, 5, 6)" },
// -webkit-transform-origin: <value> maps directly to "transform-origin"
{ decl: "-webkit-transform-origin: 0 0",
targetPropName: "transform-origin",
expectedDOMStyleVal: "0px 0px 0px",
expectedCompStyleVal: "0px 0px" },
{ decl: "-webkit-transform-origin: 100% 0",
targetPropName: "transform-origin",
expectedDOMStyleVal: "100% 0px 0px",
expectedCompStyleVal: "500px 0px" },
// -webkit-transition: <property> maps directly to "transition"
{ decl: "-webkit-transition: width 1s linear 2s",
targetPropName: "transition",