Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(52)

Issue 10438046: Issue 1491: Add gradient support to CSS schema (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 8 months ago by MikeSamuel
Modified:
12 years, 8 months ago
Reviewers:
felix8a, felixz
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

From https://code.google.com/p/google-caja/issues/detail?id=1491 > Run `sanitizeStylesheet(".test{background-image: linear-gradient(to bottom right, red, rgba(255,0,0,0));}", "prefix", function(u){return(u)})` > The expected output is ".prefix .test{background-image: linear-gradient(to bottom right, red, rgba(255,0,0,0));}" > However I receive ".prefix .test{}"" This change updates the schema and fixes a bug in sanitizecss.js that caused nested function calls to fail. The function normalizeFunctionCall given the tokens ["name(", "foo", " ", "nested(", "bar", ")", ")"] and the index of "name(" should have returned the index past the last close parenthesis since it should count parentheses to identify the parenthesis that closes the call-token at the beginning. The paren-depth increment code looked for a token "(" though instead of a token like "nested(". I also changed ormalizeFunction so that a token sequence like ["foo(", "bar", ";", "completely-different-property", ":", "value"] doesn't treat the whole sequence as part of a broken "foo(" call. ---- Submitted at r5460

Patch Set 1 #

Total comments: 4

Patch Set 2 : Issue 1491: Add gradient support to CSS schema #

Patch Set 3 : Issue 1491: Add gradient support to CSS schema #

Patch Set 4 : Issue 1491: Add gradient support to CSS schema #

Total comments: 2

Patch Set 5 : Issue 1491: Add gradient support to CSS schema #

Patch Set 6 : Issue 1491: Add gradient support to CSS schema #

Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -29 lines) Patch
M src/com/google/caja/lang/css/CssPropertyPatterns.java View 1 1 chunk +2 lines, -1 line 0 comments Download
M src/com/google/caja/lang/css/css-extensions-defs.json View 1 2 3 4 2 chunks +71 lines, -6 lines 0 comments Download
M src/com/google/caja/lang/css/css21-defs.json View 1 3 chunks +6 lines, -2 lines 0 comments Download
M src/com/google/caja/plugin/sanitizecss.js View 1 2 3 4 5 5 chunks +31 lines, -15 lines 0 comments Download
M tests/com/google/caja/plugin/CssRewriterTest.java View 2 chunks +37 lines, -5 lines 0 comments Download
M tests/com/google/caja/plugin/sanitizecss_test.js View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 12
MikeSamuel
12 years, 8 months ago (2013-06-20 19:19:35 UTC) #1
felix8a
lgtm except typo noted below https://codereview.appspot.com/10438046/diff/1/src/com/google/caja/lang/css/css-extensions-defs.json File src/com/google/caja/lang/css/css-extensions-defs.json (right): https://codereview.appspot.com/10438046/diff/1/src/com/google/caja/lang/css/css-extensions-defs.json#newcode506 src/com/google/caja/lang/css/css-extensions-defs.json:506: "signature": "[ closest-side | ...
12 years, 8 months ago (2013-06-20 20:58:07 UTC) #2
MikeSamuel
From https://code.google.com/p/google-caja/issues/detail?id=1491 > Run `sanitizeStylesheet(".test{background-image: linear-gradient(to bottom right, red, rgba(255,0,0,0));}", "prefix", function(u){return(u)})` > The expected ...
12 years, 8 months ago (2013-06-20 22:09:54 UTC) #3
MikeSamuel
From https://code.google.com/p/google-caja/issues/detail?id=1491 > Run `sanitizeStylesheet(".test{background-image: linear-gradient(to bottom right, red, rgba(255,0,0,0));}", "prefix", function(u){return(u)})` > The expected ...
12 years, 8 months ago (2013-06-21 16:44:55 UTC) #4
MikeSamuel
I snapshotted with a test of the JS side and a fix to a bug ...
12 years, 8 months ago (2013-06-21 16:50:48 UTC) #5
MikeSamuel
https://codereview.appspot.com/10438046/diff/1/src/com/google/caja/lang/css/css-extensions-defs.json File src/com/google/caja/lang/css/css-extensions-defs.json (right): https://codereview.appspot.com/10438046/diff/1/src/com/google/caja/lang/css/css-extensions-defs.json#newcode506 src/com/google/caja/lang/css/css-extensions-defs.json:506: "signature": "[ closest-side | farthest-side | closest-corner | farthest-corner ...
12 years, 8 months ago (2013-06-21 16:52:31 UTC) #6
MikeSamuel
From https://code.google.com/p/google-caja/issues/detail?id=1491 > Run `sanitizeStylesheet(".test{background-image: linear-gradient(to bottom right, red, rgba(255,0,0,0));}", "prefix", function(u){return(u)})` > The expected ...
12 years, 8 months ago (2013-06-21 16:52:45 UTC) #7
MikeSamuel
On 2013/06/21 16:52:45, MikeSamuel wrote: > From https://code.google.com/p/google-caja/issues/detail?id=1491 > > > Run `sanitizeStylesheet(".test{background-image: linear-gradient(to bottom ...
12 years, 8 months ago (2013-06-24 17:51:15 UTC) #8
felix8a
lgtm except typo https://codereview.appspot.com/10438046/diff/4002/src/com/google/caja/lang/css/css-extensions-defs.json File src/com/google/caja/lang/css/css-extensions-defs.json (right): https://codereview.appspot.com/10438046/diff/4002/src/com/google/caja/lang/css/css-extensions-defs.json#newcode506 src/com/google/caja/lang/css/css-extensions-defs.json:506: "signature": "[ closest-side | farthest-side | ...
12 years, 8 months ago (2013-06-24 18:06:16 UTC) #9
MikeSamuel
https://codereview.appspot.com/10438046/diff/4002/src/com/google/caja/lang/css/css-extensions-defs.json File src/com/google/caja/lang/css/css-extensions-defs.json (right): https://codereview.appspot.com/10438046/diff/4002/src/com/google/caja/lang/css/css-extensions-defs.json#newcode506 src/com/google/caja/lang/css/css-extensions-defs.json:506: "signature": "[ closest-side | farthest-side | closest-corner | farthest-corner ...
12 years, 8 months ago (2013-06-24 19:03:07 UTC) #10
MikeSamuel
From https://code.google.com/p/google-caja/issues/detail?id=1491 > Run `sanitizeStylesheet(".test{background-image: linear-gradient(to bottom right, red, rgba(255,0,0,0));}", "prefix", function(u){return(u)})` > The expected ...
12 years, 8 months ago (2013-06-24 19:03:55 UTC) #11
MikeSamuel
12 years, 8 months ago (2013-06-24 19:35:49 UTC) #12
From https://code.google.com/p/google-caja/issues/detail?id=1491

> Run `sanitizeStylesheet(".test{background-image: linear-gradient(to bottom
right, red, rgba(255,0,0,0));}", "prefix", function(u){return(u)})`

> The expected output is ".prefix .test{background-image: linear-gradient(to
bottom right, red, rgba(255,0,0,0));}"

> However I receive ".prefix .test{}""
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b