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

Issue 99060: Fix inline event handlers on IE. (Closed)

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

Description

domita.js exposes plugin_dispatchEvent___ through which all UI events are routed to handlers in untrusted HTML. Changed the way TemplateCompiler hooks inline event handlers into HTML. Now instead of hanging these handlers from IMPORTS___, they are instead declared in the module scope, and events are attached via (el___.onclick = ...) instead of htmlEmitter___.setAttr(...). These changes required fixing some problems in the synthetic checks in cajita and valija rewriters. Both had duplicate rules that handled synthetic nodes, but those rules were buggy and had diverged. I moved those rules to a common place, and fixed the synthetic function rule to create a scope to properly handle synthetic functions with formal parameters, and to allow synthetic formal parameters. Submitted @3648

Patch Set 1 #

Total comments: 6

Patch Set 2 : Fix inline event handlers on IE. #

Patch Set 3 : Fix inline event handlers on IE. #

Patch Set 4 : Fix inline event handlers on IE. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+599 lines, -503 lines) Patch
M src/com/google/caja/opensocial/DefaultGadgetRewriter.java View 1 3 1 chunk +0 lines, -2 lines 0 comments Download
M src/com/google/caja/parser/js/FunctionDeclaration.java View 1 3 2 chunks +2 lines, -1 line 0 comments Download
M src/com/google/caja/parser/quasiliteral/CajitaRewriter.java View 1 3 6 chunks +9 lines, -213 lines 0 comments Download
M src/com/google/caja/parser/quasiliteral/DefaultValijaRewriter.java View 1 3 4 chunks +3 lines, -212 lines 0 comments Download
A src/com/google/caja/parser/quasiliteral/SyntheticRuleSet.java View 1 chunk +295 lines, -0 lines 0 comments Download
M src/com/google/caja/plugin/templates/SafeHtmlMaker.java View 1 3 2 chunks +17 lines, -5 lines 0 comments Download
M src/com/google/caja/plugin/templates/TemplateCompiler.java View 1 3 2 chunks +21 lines, -11 lines 0 comments Download
M tests/com/google/caja/opensocial/example-rewritten.xml View 1 3 3 chunks +7 lines, -7 lines 0 comments Download
M tests/com/google/caja/parser/quasiliteral/CajitaRewriterTest.java View 4 chunks +59 lines, -8 lines 0 comments Download
M tests/com/google/caja/parser/quasiliteral/DefaultValijaRewriterTest.java View 2 chunks +145 lines, -0 lines 0 comments Download
M tests/com/google/caja/plugin/HtmlCompiledPluginTest.java View 1 3 1 chunk +4 lines, -4 lines 0 comments Download
M tests/com/google/caja/plugin/domita_test_untrusted.html View 1 2 3 2 chunks +6 lines, -4 lines 0 comments Download
M tests/com/google/caja/plugin/jsunit.js View 1 3 2 chunks +2 lines, -2 lines 0 comments Download
M tests/com/google/caja/plugin/templates/TemplateCompilerTest.java View 1 3 1 chunk +8 lines, -8 lines 0 comments Download
M tests/com/google/caja/plugin/templates/template-compiler-golden1-dynamic.js View 1 3 2 chunks +8 lines, -10 lines 0 comments Download
M tests/com/google/caja/plugin/templates/template-compiler-golden1-static.js View 1 3 3 chunks +8 lines, -10 lines 0 comments Download
M tests/com/google/caja/util/CajaTestCase.java View 1 3 1 chunk +1 line, -1 line 0 comments Download
M tools/myvn View 1 3 2 chunks +4 lines, -5 lines 0 comments Download

Messages

Total messages: 5
MikeSamuel
14 years, 8 months ago (2009-08-04 21:48:29 UTC) #1
MikeSamuel
http://codereview.appspot.com/99060/diff/1/12 File src/com/google/caja/parser/quasiliteral/SyntheticRuleSet.java (right): http://codereview.appspot.com/99060/diff/1/12#newcode57 Line 57: return rw.noexpand((Reference) node); This bit was missing from ...
14 years, 8 months ago (2009-08-05 00:03:12 UTC) #2
Jasvir
LGTM http://codereview.appspot.com/99060/diff/1/12 File src/com/google/caja/parser/quasiliteral/SyntheticRuleSet.java (right): http://codereview.appspot.com/99060/diff/1/12#newcode1 Line 1: // Copyright (C) 2009 Google Inc. Thanks ...
14 years, 8 months ago (2009-08-07 01:49:53 UTC) #3
MikeSamuel
http://codereview.appspot.com/99060/diff/1/12 File src/com/google/caja/parser/quasiliteral/SyntheticRuleSet.java (right): http://codereview.appspot.com/99060/diff/1/12#newcode1 Line 1: // Copyright (C) 2009 Google Inc. On 2009/08/07 ...
14 years, 8 months ago (2009-08-07 04:45:31 UTC) #4
MikeSamuel
14 years, 8 months ago (2009-08-07 21:37:16 UTC) #5
Added tests.

On 2009/08/07 04:45:31, MikeSamuel wrote:
> http://codereview.appspot.com/99060/diff/1/12
> File src/com/google/caja/parser/quasiliteral/SyntheticRuleSet.java (right):
> 
> http://codereview.appspot.com/99060/diff/1/12#newcode1
> Line 1: // Copyright (C) 2009 Google Inc.
> On 2009/08/07 01:49:55, jasvir wrote:
> > Thanks for refactoring out synthetic node handling.  Can you add tests for
> these
> > rules please?
> 
> Should I move the tests at
>
http://code.google.com/p/google-caja/source/browse/trunk/tests/com/google/caj...
> into CommonJsRewriterTestCase and add ones for the new rules?
Sign in to reply to this message.

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