https://codereview.appspot.com/8778046/diff/3002/src/com/google/caja/plugin/html-emitter.js
File src/com/google/caja/plugin/html-emitter.js (right):
https://codereview.appspot.com/8778046/diff/3002/src/com/google/caja/plugin/html-emitter.js#newcode457
src/com/google/caja/plugin/html-emitter.js:457: // TODO: Why is this
setting mime type to image/*?
On 2013/04/22 22:58:46, ihab.awad wrote:
Because, until this CL, that was the only envisioned use case for CSS
URIs?
Done.
https://codereview.appspot.com/8778046/diff/3002/src/com/google/caja/plugin/html-emitter.js#newcode458
src/com/google/caja/plugin/html-emitter.js:458: function
makeCssUriSanitizer(baseUri) { return makeCssUriHandler(baseUri,
'cssUri', 'image/*'); }
On 2013/04/22 22:58:46, ihab.awad wrote:
Long lines.
Done.
https://codereview.appspot.com/8778046/diff/3002/src/com/google/caja/plugin/html-emitter.js#newcode464
src/com/google/caja/plugin/html-emitter.js:464: function
continuation(sanitizeStyle, moreToCome) {
I did it that way initially but given that I want to apply the inline
css only after applying all the imports, the construction seemed easier
to understand with the repetition.
https://codereview.appspot.com/8778046/diff/3002/src/com/google/caja/plugin/html-emitter.js#newcode465
src/com/google/caja/plugin/html-emitter.js:465:
safeCss.push(sanitizeStyle);
The ordering is for a given CSS text, I apply all @imports contained in
it first in order, followed by the rest of the CSS.
https://codereview.appspot.com/8778046/diff/3002/src/com/google/caja/plugin/html-emitter.js#newcode473
src/com/google/caja/plugin/html-emitter.js:473: cssText,
domicile.suffixStr.replace(/^-/, ''),
On 2013/04/22 22:58:46, ihab.awad wrote:
Nit: Outdent 1 space.
Done.
https://codereview.appspot.com/8778046/diff/3002/src/com/google/caja/plugin/sanitizecss.js
File src/com/google/caja/plugin/sanitizecss.js (right):
https://codereview.appspot.com/8778046/diff/3002/src/com/google/caja/plugin/sanitizecss.js#newcode121
src/com/google/caja/plugin/sanitizecss.js:121: sanitizeCssProperty =
(function () {
Unless you insist, I'd rather defer that kind of refactoring to a
different CL.
https://codereview.appspot.com/8778046/diff/3002/src/com/google/caja/plugin/sanitizecss.js#newcode523
src/com/google/caja/plugin/sanitizecss.js:523: var match =
/^url[(]["'](.*)["'][)]/.exec(url);
On 2013/04/22 22:58:46, ihab.awad wrote:
Surprised the regex doesn't end in "$" for max para-know-ya.
Done.
https://codereview.appspot.com/8778046/diff/3002/src/com/google/caja/plugin/sanitizecss.js#newcode542
src/com/google/caja/plugin/sanitizecss.js:542: * @param
{function(string, boolean)} cont
On 2013/04/22 22:58:46, ihab.awad wrote:
inuation
Pun intended? :)
Done.
https://codereview.appspot.com/8778046/diff/3002/src/com/google/caja/plugin/sanitizecss.js#newcode542
src/com/google/caja/plugin/sanitizecss.js:542: * @param
{function(string, boolean)} cont
On 2013/04/22 22:58:46, ihab.awad wrote:
inuation
Pun intended? :)
Done.
https://codereview.appspot.com/8778046/diff/3002/src/com/google/caja/plugin/sanitizecss.js#newcode543
src/com/google/caja/plugin/sanitizecss.js:543: * Support external
stylesheets loaded via @import
On 2013/04/22 22:58:46, ihab.awad wrote:
Can you please be more specific about the function's API?
Done.
https://codereview.appspot.com/8778046/diff/3002/tests/com/google/caja/plugin/es53-test-css-imports-guest.html
File tests/com/google/caja/plugin/es53-test-css-imports-guest.html
(right):
https://codereview.appspot.com/8778046/diff/3002/tests/com/google/caja/plugin/es53-test-css-imports-guest.html#newcode58
tests/com/google/caja/plugin/es53-test-css-imports-guest.html:58:
pass('testCssImports');
On 2013/04/22 22:58:46, ihab.awad wrote:
Nice tests! I had to "macro-expand" the rulesets into a single file in
order to
understand them, but now that I do, it looks really good.
Done.
https://codereview.appspot.com/8778046/
--
---
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.