No, it doesn't consider clipping. It's a simple example script that shows the 3 lines of code necessary to resize one widget to envelop the content of some target object. If you want it to take clipping into consideration, write a custom function instead of calling NGUIMath.CalculateRelativeWidgetBounds, or at least skip the scroll view. However if I was at this point, I'd start wondering why I need to resize one widget to envelop the bounds of something that has been clipped, and why not just leave the widget with a fixed size.