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

Issue 11756043: Added sanitizeMediaQuery to sanitizecss.js (Closed)

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

Description

Implemented a function to verify that the [media-query] production in HTML: <link rel="stylesheet" media="[media-query]"> CSS: @import "[url]" [media-query] ; CSS: @media [media-query] { [stylesheet-element] } JS: window.matchMedia("[media-query]") is valid. Submitted @ r5503 This CL handles the @media case above, but does not yet handle the other cases. Follow-on CLs will handle media-queries in @import by passing the media query to the continuation and implementing support in the ES5 parser.

Patch Set 1 #

Patch Set 2 : Added sanitizeMediaQuery to sanitizecss.js #

Total comments: 8

Patch Set 3 : Added sanitizeMediaQuery to sanitizecss.js #

Patch Set 4 : Added sanitizeMediaQuery to sanitizecss.js #

Patch Set 5 : Added sanitizeMediaQuery to sanitizecss.js #

Unified diffs Side-by-side diffs Delta from patch set Stats (+196 lines, -20 lines) Patch
M src/com/google/caja/plugin/sanitizecss.js View 1 2 3 4 4 chunks +97 lines, -20 lines 0 comments Download
M tests/com/google/caja/plugin/sanitizecss_test.js View 1 2 3 4 1 chunk +99 lines, -0 lines 0 comments Download

Messages

Total messages: 8
MikeSamuel
12 years, 7 months ago (2013-07-24 06:13:17 UTC) #1
MikeSamuel
Implemented a function to verify that the [media-query] production in HTML: <link rel="stylesheet" media="[media-query]"> CSS: ...
12 years, 7 months ago (2013-07-24 06:25:58 UTC) #2
felix8a
https://codereview.appspot.com/11756043/diff/4001/src/com/google/caja/plugin/sanitizecss.js File src/com/google/caja/plugin/sanitizecss.js (right): https://codereview.appspot.com/11756043/diff/4001/src/com/google/caja/plugin/sanitizecss.js#newcode646 src/com/google/caja/plugin/sanitizecss.js:646: var MEDIA_EXPR = '\\( ' + MEDIA_FEATURE + ' ...
12 years, 7 months ago (2013-07-24 17:49:47 UTC) #3
MikeSamuel
Implemented a function to verify that the [media-query] production in HTML: <link rel="stylesheet" media="[media-query]"> CSS: ...
12 years, 7 months ago (2013-07-24 17:54:39 UTC) #4
MikeSamuel
Implemented a function to verify that the [media-query] production in HTML: <link rel="stylesheet" media="[media-query]"> CSS: ...
12 years, 7 months ago (2013-07-24 18:03:21 UTC) #5
MikeSamuel
https://codereview.appspot.com/11756043/diff/4001/src/com/google/caja/plugin/sanitizecss.js File src/com/google/caja/plugin/sanitizecss.js (right): https://codereview.appspot.com/11756043/diff/4001/src/com/google/caja/plugin/sanitizecss.js#newcode646 src/com/google/caja/plugin/sanitizecss.js:646: var MEDIA_EXPR = '\\( ' + MEDIA_FEATURE + ' ...
12 years, 7 months ago (2013-07-24 18:03:32 UTC) #6
felix8a
lgtm
12 years, 7 months ago (2013-07-24 18:14:36 UTC) #7
MikeSamuel
12 years, 7 months ago (2013-07-24 18:21:33 UTC) #8
Implemented a function to verify that the [media-query] production in

HTML: <link rel="stylesheet" media="[media-query]">
CSS:  @import "[url]" [media-query] ;
CSS:  @media [media-query] { [stylesheet-element] }
JS:   window.matchMedia("[media-query]")

is valid.


This CL handles the @media case above, but does not yet handle the other cases.
Follow-on CLs will handle media-queries in @import by passing the media
query to the continuation and implementing support in the ES5 parser.
Sign in to reply to this message.

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