     }
     
     /**
+     *  Determine whether the given form is owned by an ancestor of this
+     *  StyleableStageText. This is used by bitmap swapping for popups. If a
+     *  text component or ancestor of one owns the popup, the text component
+     *  should not be swapped for a bitmap to support workflows where performing
+     *  an action within the text component displays the callout or determines
+     *  the callout's content.
+     */
+    private function isFormOwnedByAncestor(form:Object):Boolean
+    {
+        var result:Boolean = false;
+        
+        if (form is UIComponent)
+        {
+            var formComponent:UIComponent = form as UIComponent;
+            var formOwner:DisplayObjectContainer = formComponent.owner;
+            
+            result = formOwner != null && formOwner.contains(this);
+        }
+        
+        return result;
+    }
+    
+    /**
      *  Replace the existing proxy image representing this StageText with a new
      *  one. Call this whenever the StageText's properties, contents, or
      *  geometry changes. This does nothing if there is no proxy image, so it is

        
        if (form && form.hasOwnProperty("focusManager"))
        {
            if (form.focusManager != focusManager && hasOverlappingForm())
                createProxyImage();
            else
                disposeProxyImageLater();
        }
    }
    

import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.PixelSnapping;
import flash.events.Event;
import flash.events.EventDispatcher;
