Revision: 5667
Author:   [email protected]
Date:     Tue Feb 18 19:38:35 2014 UTC
Log:      allow css background-size and resize (merge from trunk)

svn merge -c 5666 ^/trunk
https://codereview.appspot.com/65530043

http://code.google.com/p/google-caja/source/detail?r=5667

Modified:
 /branches/es53
 /branches/es53/src/com/google/caja/lang/css/css3-defs.json
 /branches/es53/src/com/google/caja/lang/css/css3-whitelist.json
 /branches/es53/tests/com/google/caja/plugin/sanitizecss_test.js

=======================================
--- /branches/es53/src/com/google/caja/lang/css/css3-defs.json Tue Feb 11 14:51:35 2014 UTC +++ /branches/es53/src/com/google/caja/lang/css/css3-defs.json Tue Feb 18 19:38:35 2014 UTC
@@ -907,6 +907,14 @@
       "inherited": true,
       "mediaGroups": ["visual"] },

+    { "key": "resize",
+      "signature": "none | both | horizontal | vertical",
+      "default": "none",
+      "appliesTo": "*",
+      "inherited": false,
+      "mediaGroups": ["visual"],
+ "source": "https://developer.mozilla.org/en-US/docs/Web/CSS/resize"; },
+
     { "key": "richness",
       "signature": "<number>",
       "default": "50",
=======================================
--- /branches/es53/src/com/google/caja/lang/css/css3-whitelist.json Tue Nov 26 22:29:42 2013 UTC +++ /branches/es53/src/com/google/caja/lang/css/css3-whitelist.json Tue Feb 18 19:38:35 2014 UTC
@@ -24,6 +24,7 @@
     "background-image",
     "background-position",
     "background-repeat",
+    "background-size",
     "border",
     "border-bottom",
     "border-bottom-color",
@@ -124,6 +125,7 @@
     "play-during",
     "position",
     "quotes",
+    "resize",
     "richness",
     "right",
     "speak",
=======================================
--- /branches/es53/tests/com/google/caja/plugin/sanitizecss_test.js Thu Nov 28 03:46:43 2013 UTC +++ /branches/es53/tests/com/google/caja/plugin/sanitizecss_test.js Tue Feb 18 19:38:35 2014 UTC
@@ -660,3 +660,81 @@
       'p{color:red;*zoom:1;color:blue}');
   jsunit.pass();
 });
+
+jsunitRegister('testResize', function testResize() {
+  assertSanitizedStylesheet(
+      ['.scopeClass p{',
+         'resize:both;',
+         'resize:horizontal;',
+         'resize:inherit;',
+         'resize:none;',
+         'resize:vertical;',
+       '}'
+      ].join(''),
+      ['p {',
+         'resize:invalid;',
+         'resize:both;',
+         'resize:horizontal;',
+         'resize:inherit;',
+         'resize:none;',
+         'resize:vertical;',
+       '}'
+      ].join(''));
+  jsunit.pass();
+});
+
+jsunitRegister('testBackgroundSize', function testBackgroundSize() {
+  assertSanitizedStylesheet(
+      ['.scopeClass p{',
+         'background-size:inherit;',
+         'background-size:1px;',
+         'background-size:2px , 3px;',
+         'background-size:4%;',
+         'background-size:5% 6%;',
+         'background-size:auto;',
+         'background-size:auto auto;',
+         'background-size:cover;',
+         'background-size:contain;',
+       '}'
+      ].join(''),
+      ['p {',
+         'background-size:invalid;',
+         'background-size:inherit;',
+         'background-size:1px;',
+         'background-size:2px,3px;',
+         'background-size:4%;',
+         'background-size:5% 6%;',
+         'background-size:auto;',
+         'background-size:auto auto;',
+         'background-size:cover;',
+         'background-size:contain;',
+       '}'
+      ].join(''));
+  jsunit.pass();
+});
+
+jsunitRegister('testTextOverflow', function testTextOverflow() {
+  assertSanitizedStylesheet(
+      ['.scopeClass p{',
+         'text-overflow:inherit;',
+         'text-overflow:clip;',
+         'text-overflow:ellipsis;',
+         'text-overflow:"1";',
+         'text-overflow:clip ellipsis;',
+         'text-overflow:ellipsis "2";',
+         'text-overflow:"3" "4";',
+       '}'
+      ].join(''),
+      ['p {',
+         'text-overflow:invalid;',
+         'text-overflow:inherit;',
+         'text-overflow:clip;',
+         'text-overflow:ellipsis;',
+         'text-overflow:"1";',
+         'text-overflow:clip ellipsis;',
+         'text-overflow:ellipsis "2";',
+         'text-overflow:"3" "4";',
+       '}'
+      ].join(''));
+  jsunit.pass();
+});

--

--- You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to