def simple_container_do_layout(container, components=None):
    """ Actually performs a layout (called by do_layout()).
    """
    if components is None:
        components = container.components
    x = container.x
    y = container.y
    width = container.width
    height = container.height
    for component in components:
        if hasattr(container, '_should_layout'):
            if not container._should_layout(component):
                continue
        position = list(component.outer_position)
        bounds = list(component.outer_bounds)
        if 'h' in component.resizable:
            position[0] = 0
            bounds[0] = width
        if 'v' in component.resizable:
            position[1] = 0
            bounds[1] = height
        component.outer_position = position
        component.outer_bounds = bounds
    for component in components:
        component.do_layout()
    return
