By the way , i called the function "layout()" between "romove(or add)ChildWindow" and "getUnclippedOuterRect()",and it 's not working all the same.
--Sorry about this,it works, so outer rect isn't broken
My Problem was that VerticalLayoutContainer had one chlid whose type is VerticalLayoutContainer with some children attached on it.For this child, I removed its children, but called it's parent's layout()! sigh~
The correct behaviour is to call itself layout(),and then call its parent's layout(), and then getUnclippedOuterRect();
So,now the forcus is when layout() is called. I don't think that after removing child ,just markNeedtoLayout(),and when update(),the layout() is called automaticly is a good idea.
Obviously,if you don't call layout() manually between "removeChild"and "getUnclippedOuterRect", you'll get the wrong Rect.
If you call layout() manually ,next time update() is called, the layout() will be automatic called again,which is not necessary.