             case ScrollPolicy.AUTO: 
                 if (vsb && viewport)
                 { 
-                    showVSB = viewport.contentHeight > h;
+                    showVSB = viewport.contentHeight > (h - (minViewportInset * 2));
                     vAuto = true;
                 }                        
                 break;
         }
         
         // Shrink the viewport's width,height for the visible scrollbars
-        var viewportH:Number = h;
+        var viewportH:Number = h - minViewportInset;
         var hsbH:Number = 0;
         if (showHSB) 
         {
             hsbH = hsb.getPreferredBoundsHeight();
-            viewportH -= hsbH;
-        }
-        var viewportW:Number = w;
+            viewportH -= Math.max(minViewportInset, hsbH);
+        }
+        var viewportW:Number = w - minViewportInset;
         var vsbW:Number = 0;
         if (showVSB) 
         {
             vsbW = vsb.getPreferredBoundsWidth();
-            viewportW -= vsbW;
+            viewportW -= Math.max(minViewportInset, vsbW);
         }
         
         // If the scrollBarPolicy is auto, and we're only showing one scrollbar, 
         // the viewport may have shrunk enough to require showing the other one.
-        
         if (showVSB && !showHSB && hAuto && (viewport.contentWidth > viewportW))
         {
             showHSB = true;
             hsbH = hsb.getPreferredBoundsHeight();                
-            viewportH -= hsbH;
+            viewportH -= Math.max(minViewportInset, hsbH);
         }
         else if (!showVSB && showHSB && vAuto && (viewport.contentHeight > viewportH))
         {
             showVSB = true;
             vsbW = vsb.getPreferredBoundsWidth();                
-            viewportW -= vsbW;
-        }
+            viewportW -= Math.max(minViewportInset, vsbW);
+        }
+        
+        // Factor in scrollBar-side viewportInsets where there aren't scrollbars
+        if (!showHSB)
+            viewportH -= minViewportInset;
+        if (!showVSB)
+            viewportW -= minViewportInset;
 
         // layout the viewport
         if (viewport)
         {
             var viewportElt:ILayoutElement = ILayoutElement(viewport);
             viewportElt.setLayoutBoundsSize(viewportW, viewportH);
-            viewportElt.setLayoutBoundsPosition(0,0);
+            viewportElt.setLayoutBoundsPosition(minViewportInset, minViewportInset);
         }
         
         // layout the scrollbars

        
        if (showHSB)
        {
            measuredH += hsb.getPreferredBoundsHeight();
            minW += hsb.getMinBoundsWidth();              
            minH += hsb.getMinBoundsHeight();  
        }
        if (showVSB)
        {
            measuredW += vsb.getPreferredBoundsWidth();
            minW += vsb.getMinBoundsWidth();
            minH += vsb.getMinBoundsHeight();
        }
        
        var g:GroupBase = target;
        g.measuredWidth = measuredW;
        g.measuredHeight = measuredH;

        var viewport:IViewport = scroller.viewport;
        var hsb:ScrollBar = scroller.horizontalScrollBar;
        var vsb:ScrollBar = scroller.verticalScrollBar;
        var minViewportInset:Number = scroller.minViewportInset;
        
        // Decide which scrollbars will be visible based on the viewport's content size
        var showHSB:Boolean = false;
        var hAuto:Boolean = false; 
        switch(scroller.horizontalScrollPolicy) {
