Reviewers: MikeSamuel,

Description:
in IE[67] and IE8 in compatibility mode,
domita_test fails in a couple ways.

the problem is el.getAttribute(x) is broken on IE[67].
if you have
  <form id="f" foo="x"><input name="foo"></form>
then f.getAttribute('foo') will return the input node,
instead of 'x'.

setAttribute() is also broken in the same way.

this screws up a lot of things on IE[67].
for example, if a gadget has
      <form id="x"><input name="id"></form>
then html-emitter does not set the form id correctly.

the fix is to use getAttributeNode instead.

I've run domita_test.html manually on
 chrome-4.0.221.8   1 fail (unrelated)
 firefox-3.0.14     0 fail
 firefox-3.5.3      0 fail
 ie-6               7 fail (unrelated)
 ie-8-compat        7 fail (unrelated)
 ie-8-std           9 fail (unrelated)
 opera-10.00        7 fail (unrelated)
 safari-4.0.3       1 fail (unrelated)

safari-3.2.1 and opera-9.64 completely fail to run domita_test,
not sure why yet.

Please review this at http://codereview.appspot.com/130085

Affected files:
  M     src/com/google/caja/plugin/bridal.js
  M     src/com/google/caja/plugin/domita.js
  M     src/com/google/caja/plugin/html-emitter.js
  M     tests/com/google/caja/plugin/domita_test_untrusted.html
  M     third_party/js/jqueryjs/runtest/env.js


Reply via email to