From a3a63e51c36b2877a63308611ae7d53f6d0299ed Mon Sep 17 00:00:00 2001 From: david Date: Fri, 30 Jan 2004 06:59:24 +0000 Subject: [PATCH] 2003/04/29 12:24:01 darcs-hash:20040130065924-0c9ea-7e3069b35376e9447800f330d3f157c0635a747e.gz --- src/org/xwt/Box.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/org/xwt/Box.java b/src/org/xwt/Box.java index caa7c8a..f0645aa 100644 --- a/src/org/xwt/Box.java +++ b/src/org/xwt/Box.java @@ -1091,6 +1091,16 @@ public final class Box extends JSObject { } else { Box newnode = (Box)value; + + // check if box being moved is currently target of a redirect + for(Box cur = newnode.getParent(); cur != null; cur = cur.getParent()) + if (cur.redirect == newnode) { + if (Log.on) Log.log(this, "attempt to move a box that is the target of a redirect at "+ + Context.enter().interpreterSourceFile + ":" + Context.enter().interpreterLine); + return; + } + + // check for recursive ancestor violation for(Box cur = this; cur != null; cur = cur.getParent()) if (cur == newnode) { if (Log.on) Log.log(this, "attempt to make a node a parent of its own ancestor at " + -- 1.7.10.4