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

Issue 5488053: early-bind idClass in caja.js and Playground (Closed)

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

Description

Right now caja.js and the Playground will call the cajoler without an idClass parameter, which means that rewriting html ids is deferred until gadget instantiation time. I don't see much benefit to doing that, since there isn't an api for multiply-instantiatiating the same gadget on the same host page, and there isn't any particular demand for doing so. This change makes caja.js and the Playground pass an idClass to the cajoler in some cases, which has a few performance benefits: 1. With early-binding of idClass, the cajoler doesn't have to generate html-emitter statements to set every html id, which reduces the amount of js that the cajoler processes, which speeds up the cajoler. 2. Avoiding all those html-emitter statements also speeds up client-side rendering. If in the future we do want to support multiply-instantiating a gadget without calling cajole each time, then it's easy enough to add an option for that.

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -1415 lines) Patch
M src/com/google/caja/demos/playground/client/Playground.java View 3 chunks +8 lines, -6 lines 0 comments Download
M src/com/google/caja/demos/playground/client/PlaygroundService.java View 1 chunk +1 line, -1 line 0 comments Download
M src/com/google/caja/demos/playground/client/PlaygroundServiceAsync.java View 1 chunk +1 line, -1 line 0 comments Download
M src/com/google/caja/demos/playground/client/ui/PlaygroundView.java View 9 chunks +27 lines, -17 lines 1 comment Download
M src/com/google/caja/demos/playground/server/GWTCajolingServiceImpl.java View 2 chunks +5 lines, -1 line 0 comments Download
M src/com/google/caja/gwtbeans/shared/Caja.java View 2 chunks +9 lines, -6 lines 0 comments Download
M src/com/google/caja/plugin/CssDynamicExpressionRewriter.java View 1 chunk +1 line, -2 lines 0 comments Download
M src/com/google/caja/plugin/caja.js View 3 chunks +5 lines, -5 lines 0 comments Download
M src/com/google/caja/plugin/cajoling-service-client.js View 2 chunks +8 lines, -4 lines 0 comments Download
M src/com/google/caja/plugin/es53-frame-group.js View 3 chunks +5 lines, -4 lines 0 comments Download
M src/com/google/caja/plugin/guest-manager.js View 1 chunk +2 lines, -1 line 1 comment Download
D src/com/google/caja/plugin/oldcaja.js View 1 chunk +0 lines, -1352 lines 0 comments Download
M src/com/google/caja/plugin/ses-frame-group.js View 2 chunks +3 lines, -3 lines 2 comments Download
M src/com/google/caja/service/CajaArguments.java View 2 chunks +8 lines, -3 lines 0 comments Download
M src/com/google/caja/service/HtmlHandler.java View 3 chunks +7 lines, -7 lines 0 comments Download
M tests/com/google/caja/demos/playground/GWTCajolingServiceImplTest.java View 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 3
felix8a
14 years, 10 months ago (2011-12-13 00:57:49 UTC) #1
metaweta
LGTM. http://codereview.appspot.com/5488053/diff/1/src/com/google/caja/demos/playground/client/ui/PlaygroundView.java File src/com/google/caja/demos/playground/client/ui/PlaygroundView.java (right): http://codereview.appspot.com/5488053/diff/1/src/com/google/caja/demos/playground/client/ui/PlaygroundView.java#newcode436 src/com/google/caja/demos/playground/client/ui/PlaygroundView.java:436: o[key] = value; Someday I'll have to write ...
14 years, 10 months ago (2011-12-13 04:23:46 UTC) #2
felix8a
14 years, 10 months ago (2011-12-13 18:57:49 UTC) #3
@44679

http://codereview.appspot.com/5488053/diff/1/src/com/google/caja/plugin/ses-f...
File src/com/google/caja/plugin/ses-frame-group.js (right):

http://codereview.appspot.com/5488053/diff/1/src/com/google/caja/plugin/ses-f...
src/com/google/caja/plugin/ses-frame-group.js:78: '-' + divs.idClass, uriPolicy,
divs.inner);
On 2011/12/13 04:23:46, metaweta wrote:
> Ah, here it is.  Maybe extend the 'misnomer' comment in the last file to point
> here?

Done.
Sign in to reply to this message.

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