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

Issue 1714043: Upgrade Caja to r4135 (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 9 months ago by johnfargo
Modified:
15 years, 9 months ago
Reviewers:
dev-remailer, Jasvir
Base URL:
http://svn.apache.org/repos/asf/shindig/trunk/
Visibility:
Public.

Description

This change pulls in Caja updates that are relevant to Shindig in two ways: 1. DefaultGadgetRewriter class API has changed from accepting a PluginEnvironment to the pair of UriFetcher and UriPolicy. - Previous implementation modified to adapt to the new interfaces. 2. Several parser improvements now enable nearly all HTML parsing tests to succeed, esp. social data-related tests. - Caja's parser now compatible w/ os templates and data pipelining! - Only remaining test fails since Caja's parser eats a DOMException and turns it into a Warning. Will talk w/ Caja to assess best approach.

Patch Set 1 #

Total comments: 3

Patch Set 2 : Get rid of unnecessary AbstractParsingTestBase edit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -50 lines) Patch
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/caja/CajaHtmlParser.java View 1 chunk +1 line, -2 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/CajaContentRewriter.java View 6 chunks +33 lines, -14 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/caja/CajaSocialMarkupHtmlParserTest.java View 1 chunk +2 lines, -32 lines 0 comments Download
pom.xml View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 6
johnfargo
15 years, 9 months ago (2010-06-18 16:58:02 UTC) #1
Jasvir
heh. I *just* sent essentially the same upgrade your way at http://codereview.appspot.com/1460041/show I notice however ...
15 years, 9 months ago (2010-06-18 17:04:46 UTC) #2
johnfargo
Great minds ;) How does the UriManager break cajoled gadgets? Did I miss some caja=1 ...
15 years, 9 months ago (2010-06-18 17:11:38 UTC) #3
johnfargo
Get rid of unnecessary AbstractParsingTestBase edit.
15 years, 9 months ago (2010-06-18 17:13:41 UTC) #4
Jasvir
LGTM http://codereview.appspot.com/1714043/diff/1/5 File java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/caja/CajaHtmlParser.java (right): http://codereview.appspot.com/1714043/diff/1/5#newcode144 java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/caja/CajaHtmlParser.java:144: DomParser parser = new DomParser(lexer, true, is, ns, ...
15 years, 9 months ago (2010-06-18 17:30:16 UTC) #5
fargo
15 years, 9 months ago (2010-06-18 17:41:00 UTC) #6
On Fri, Jun 18, 2010 at 10:30 AM, <jasvir@gmail.com> wrote:

> LGTM
>
>
> http://codereview.appspot.com/1714043/diff/1/5
> File
>
>
>
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/caja/CajaHtmlParser.java
> (right):
>
> http://codereview.appspot.com/1714043/diff/1/5#newcode144
>
>
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/caja/CajaHtmlParser.java:144:
> DomParser parser = new DomParser(lexer, true, is, ns, mq);
> Please add a comment around the param labeling it as /* wantsComments */
>

Will do before commit.


>
> http://codereview.appspot.com/1714043/diff/1/2
> File
>
>
>
java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParsingTestBase.java
> (right):
>
> http://codereview.appspot.com/1714043/diff/1/2#newcode1
>
>
java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParsingTestBase.java:1:
> /*
> Debugging cruft.
>

removed.


>
> http://codereview.appspot.com/1714043/diff/1/3
> File
>
>
>
java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/caja/CajaSocialMarkupHtmlParserTest.java
> (right):
>
> http://codereview.appspot.com/1714043/diff/1/3#newcode37
>
>
java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/caja/CajaSocialMarkupHtmlParserTest.java:37:
> public void testInvalid() throws Exception { super.testInvalid(); }
> valign:"middle" is being treated as an malformed identifier hence the
> downgrade to warning.  Is there a reason to treated invalid characters
> as a continue-is-not-possible error?


That's what I wanted to ask you :) I understand the rationale and actually
appreciate that the parser keeps trying to chug along. Even so, in a case
like this if the intention of the input HTML was to provide an identifier
used by subsequent code (JS et al), and we just sort of dropped it, that
would seem a little opaque to me. Thoughts? Should we perhaps emit warnings
into the code somehow in a comment?


>
>
> http://codereview.appspot.com/1714043/show
>
Sign in to reply to this message.

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