<commit_before><?xml version="1.0" encoding="utf-8"?>

<!--

    ADOBE SYSTEMS INCORPORATED
    Copyright 2008 Adobe Systems Incorporated
    All Rights Reserved.

    NOTICE: Adobe permits you to use, modify, and distribute this file
    in accordance with the terms of the license agreement accompanying it.

-->

<Skin xmlns="http://ns.adobe.com/mxml/2009">

    <Metadata>
        [HostComponent("flex.component.Scroller")]
    </Metadata> 
        
    <VScrollBar id="verticalScrollBar" visible="false" />
    <HScrollBar id="horizontalScrollBar" visible="false" />

    <Script>  
      <![CDATA[
    
        import flex.component.ScrollBar;
        import flex.core.Group;
        import flex.layout.LayoutItemFactory;
        import flex.intf.ILayoutItem;
        import flex.intf.IViewport;
        import mx.core.ScrollPolicy;

        private function layoutItemFor(item:Object):ILayoutItem
        {
            return (item) ? LayoutItemFactory.getLayoutItemFor(item) : null;
        }
        
        /**
         *  Computes the union of the preferred size of the visible 
         *  scrollbars and the viewport.  
         * 
         *  This becomes the ScrollerSkin's measuredWidth,Height.
         *    
         *  The ScrollerSkin's minimum size is only big enough to 
         *  acccomodate the visible scrollbars.
         * 
         *  The viewport does not contribute to the minimum size.
         * 
         *  Note also: at updateDisplayList() time, we honor the vertical
         *  scrollbar's minimum height, and the horizontal scrollbar's 
         *  minimum width.  
         *  
         *  @see #updateDisplayList
         */
	    override protected function measure():void
	    {
            var hsb:ScrollBar = horizontalScrollBar;
            var showHSB:Boolean = false;
            switch(hostComponent.horizontalScrollPolicy) {
                case ScrollPolicy.ON: 
                    if (hsb) showHSB = true; 
                    break;
                case ScrollPolicy.AUTO: 
                    if (hsb) showHSB = hsb.visible; 
                    break;
            } 

            var vsb:ScrollBar = verticalScrollBar;
            var showVSB:Boolean = false;
            switch(hostComponent.verticalScrollPolicy) {
               case ScrollPolicy.ON: 
                    if (vsb) showVSB = true; 
                    break;
                case ScrollPolicy.AUTO: 
                    if (vsb) showVSB = vsb.visible; 
                    break;
            }
            
            var measuredW:Number = 0;
            var measuredH:Number = 0;
            var minW:Number = 0;
            var minH:Number = 0;            
            
            var viewport:IViewport = hostComponent.viewport;
            if (viewport)
            {
	            var viewportLI:ILayoutItem = layoutItemFor(viewport);
	            measuredW = viewportLI.preferredSize.x;
	            measuredH = viewportLI.preferredSize.y;
            }
            
            if (showHSB)
            {
                var hsbLI:ILayoutItem = layoutItemFor(hsb);
                measuredH += hsbLI.preferredSize.y;
                minW += hsbLI.minSize.x;              
                minH += hsbLI.minSize.y;  
            }
            if (showVSB)
            {
                var vsbLI:ILayoutItem = layoutItemFor(vsb);
                measuredW += vsbLI.preferredSize.x;
                minW += vsbLI.minSize.x;
                minH += vsbLI.minSize.y;
            }
            measuredWidth = measuredW;
            measuredHeight = measuredH;
            minWidth = 0; 
            minHeight = 0;
	    }
	    
        /** 
         *  Arrange the viewport and scrollbars conventionally within
         *  the specified width and height: vertical scrollbar on the 
         *  right, horizontal scrollbar along the bottom.
         * 
         *  In other words, the Scroller's height will not
         *  shrink below the vertical scrollbar's minimum height, and its
         *  width will not shrink below the horizontal scrollbar's
         *  minimum width.
         * 
         *  The scrollbars are made visible if the viewport's content size is
         *  bigger than the actual size.
         * 
         *  If the visibility of either scrollbar changes we apply invalidateSize()
         *  to the ScrollerSkin.
         * 
         *  This causes new values for measuredWidth,Height to be computed, and 
         *  it causes the update process to be restarted.
         * 
         *  Note also: the logic for calling updateDisplayList and then restarting
         *  the process if the component has become invalid is in
         *  mx.managers.LayoutManager::validateDisplayList.
         * 
         *  param w The skin's unscaled width.
         *  param h The skin's unscaled height.
         *
         *  @see #measure 
         */	    
        override protected function updateDisplayList(w:Number, h:Number):void
        {  
            var viewport:IViewport = hostComponent.viewport;
            var hsb:ScrollBar = horizontalScrollBar;
            var vsb:ScrollBar = verticalScrollBar;
            var hsbLI:ILayoutItem = layoutItemFor(hsb);<commit_msg>Transferred from the Adobe Open Source Subversion Repository<commit_after><?xml version="1.0" encoding="utf-8"?>

<!--

    ADOBE SYSTEMS INCORPORATED
    Copyright 2008 Adobe Systems Incorporated
    All Rights Reserved.

    NOTICE: Adobe permits you to use, modify, and distribute this file
    in accordance with the terms of the license agreement accompanying it.

-->

<Skin xmlns="http://ns.adobe.com/mxml/2009">

    <Metadata>
        [HostComponent("mx.components.FxScroller")]
    </Metadata> 
        
    <FxVScrollBar id="verticalScrollBar" visible="false" />
    <FxHScrollBar id="horizontalScrollBar" visible="false" />

    <Script>  
      <![CDATA[
    
        import mx.components.baseClasses.FxScrollBar;
        import mx.components.Group;
        import mx.layout.LayoutItemFactory;
        import mx.layout.ILayoutItem;
        import mx.core.IViewport;
        import mx.core.ScrollPolicy;

        private function layoutItemFor(item:Object):ILayoutItem
        {
            return (item) ? LayoutItemFactory.getLayoutItemFor(item) : null;
        }
        
        /**
         *  Computes the union of the preferred size of the visible 
         *  scrollbars and the viewport.  
         * 
         *  This becomes the ScrollerSkin's measuredWidth,Height.
         *    
         *  The ScrollerSkin's minimum size is only big enough to 
         *  acccomodate the visible scrollbars.
         * 
         *  The viewport does not contribute to the minimum size.
         * 
         *  Note also: at updateDisplayList() time, we honor the vertical
         *  scrollbar's minimum height, and the horizontal scrollbar's 
         *  minimum width.  
         *  
         *  @see #updateDisplayList
         */
	    override protected function measure():void
	    {
            var hsb:FxScrollBar = horizontalScrollBar;
            var showHSB:Boolean = false;
            switch(hostComponent.horizontalScrollPolicy) {
                case ScrollPolicy.ON: 
                    if (hsb) showHSB = true; 
                    break;
                case ScrollPolicy.AUTO: 
                    if (hsb) showHSB = hsb.visible; 
                    break;
            } 

            var vsb:FxScrollBar = verticalScrollBar;
            var showVSB:Boolean = false;
            switch(hostComponent.verticalScrollPolicy) {
               case ScrollPolicy.ON: 
                    if (vsb) showVSB = true; 
                    break;
                case ScrollPolicy.AUTO: 
                    if (vsb) showVSB = vsb.visible; 
                    break;
            }
            
            var measuredW:Number = 0;
            var measuredH:Number = 0;
            var minW:Number = 0;
            var minH:Number = 0;            
            
            var viewport:IViewport = hostComponent.viewport;
            if (viewport)
            {
	            var viewportLI:ILayoutItem = layoutItemFor(viewport);
	            measuredW = viewportLI.preferredSize.x;
	            measuredH = viewportLI.preferredSize.y;
            }
            
            if (showHSB)
            {
                var hsbLI:ILayoutItem = layoutItemFor(hsb);
                measuredH += hsbLI.preferredSize.y;
                minW += hsbLI.minSize.x;              
                minH += hsbLI.minSize.y;  
            }
            if (showVSB)
            {
                var vsbLI:ILayoutItem = layoutItemFor(vsb);
                measuredW += vsbLI.preferredSize.x;
                minW += vsbLI.minSize.x;
                minH += vsbLI.minSize.y;
            }
            measuredWidth = measuredW;
            measuredHeight = measuredH;
            minWidth = 0; 
            minHeight = 0;
	    }
	    
        /** 
         *  Arrange the viewport and scrollbars conventionally within
         *  the specified width and height: vertical scrollbar on the 
         *  right, horizontal scrollbar along the bottom.
         * 
         *  In other words, the Scroller's height will not
         *  shrink below the vertical scrollbar's minimum height, and its
         *  width will not shrink below the horizontal scrollbar's
         *  minimum width.
         * 
         *  The scrollbars are made visible if the viewport's content size is
         *  bigger than the actual size.
         * 
         *  If the visibility of either scrollbar changes we apply invalidateSize()
         *  to the ScrollerSkin.
         * 
         *  This causes new values for measuredWidth,Height to be computed, and 
         *  it causes the update process to be restarted.
         * 
         *  Note also: the logic for calling updateDisplayList and then restarting
         *  the process if the component has become invalid is in
         *  mx.managers.LayoutManager::validateDisplayList.
         * 
         *  param w The skin's unscaled width.
         *  param h The skin's unscaled height.
         *
         *  @see #measure 
         */	    
        override protected function updateDisplayList(w:Number, h:Number):void
        {  
            var viewport:IViewport = hostComponent.viewport;
            var hsb:FxScrollBar = horizontalScrollBar;
            var vsb:FxScrollBar = verticalScrollBar;
            var hsbLI:ILayoutItem = layoutItemFor(hsb);
{'fraction_non_alphanumeric': 0.0709873610187209, 'fraction_numerical': 0.0032310177705977385, 'mean_word_length': 1.5574726609963547, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 2, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '981304', 'n_tokens_mistral': 2893, 'n_tokens_neox': 2708, 'n_words': 760}