Fix ancestry for unattached nodes http://codereview.appspot.com/98088
Fix ancestry for unattached nodes
http://codereview.appspot.com/98088

Fixes issue 1092.

Unattached nodes have no className, so their className
never matched idClass, which made domita think that
the parent belonged to some other gadget.  I added a
check to return null if we hit document.body (i.e.
it really does belong to another gadget) and added
code to return the parnet node if it exits the loop
(i.e. it's unattached).

R=ihab.awad@gmail.com


git-svn-id: eb21526166532bd3afc2c1499c0cf105ce815f5a@3628 360991c0-9f3b-0410-ba87-8b362a00edf4

googlearchive/caja,cepm-nate/caja,initaldk/caja,wishabi/caja-1,googlearchive/caja,jasvir/caja,wishabi/caja-1,googlearchive/caja,wishabi/caja-1,initaldk/caja,initaldk/caja,googlearchive/caja,googlearchive/caja,cepm-nate/caja,jasvir/caja,cepm-nate/caja,wishabi/caja-1,initaldk/caja,jasvir/caja,jasvir/caja,initaldk/caja,initaldk/caja,jasvir/caja,cepm-nate/caja,googlearchive/caja,cepm-nate/caja,cepm-nate/caja,wishabi/caja-1,jasvir/caja,wishabi/caja-1