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

Issue 5654047: Fixes several failing jQuery tests (Closed)

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

Description

The lexCss() function requires a string as input but some callers weren't casting first. I added a cast at the start of the function. If you wrap the onreadystatechange property of XHR in an untame(), then when the feral native DOM layer tries to call the event callback, it will try to tame the |event| object passed in, which is neither possible (it's an unsupported weirdo object) nor necessary, so the correct thing to do is just to pass a plain function. We do not tame xhr.responseXML, but jquery tests crash if it does not contain at least documentElement.cloneNode. I added a kludge that allows the jQuery tests to continue to run and a message that Caja doesn't support it. attachDocumentStub() was renamed to attachDocument() a while back; this changes the error message to match. In one situation in jquery that I haven't been able to replicate outside it, traversing the parentNode chain can lead to a host page DOM node that has not yet had the caja properties attached so that cajoled Domado can use them. This change makes sure the properties are there. Before this change, the HTML element violated the spec that says the parentNode of the element should be the document, so this change fixes that.

Patch Set 1 #

Patch Set 2 : Fixes several failing jQuery tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -13 lines) Patch
M src/com/google/caja/plugin/csslexer.js View 1 chunk +1 line, -0 lines 0 comments Download
M src/com/google/caja/plugin/domado.js View 1 8 chunks +23 lines, -13 lines 0 comments Download
M tests/com/google/caja/plugin/es53-test-domado-dom-guest.html View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5
metaweta
14 years, 4 months ago (2012-02-10 00:28:41 UTC) #1
ihab.awad
lgtm
14 years, 4 months ago (2012-02-10 00:52:50 UTC) #2
metaweta
The updated handling of events fixes issue1418.
14 years, 4 months ago (2012-02-10 00:52:51 UTC) #3
metaweta
I had turned document into a getter property, and that broke all the tests. I ...
14 years, 4 months ago (2012-02-10 03:08:04 UTC) #4
ihab.awad
14 years, 4 months ago (2012-02-10 04:33:13 UTC) #5
lgtm
Sign in to reply to this message.

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