ScrollingCoordinatorBlackBerry.cpp [plain text]
#include "config.h"
#include "ScrollingCoordinatorBlackBerry.h"
#include "Frame.h"
#include "FrameView.h"
#include "LayerWebKitThread.h"
#include "Page.h"
#include "PlatformLayer.h"
#include "RenderLayerCompositor.h"
#include "RenderView.h"
namespace WebCore {
ScrollingCoordinatorBlackBerry::ScrollingCoordinatorBlackBerry(Page* page)
: ScrollingCoordinator(page)
{
}
void ScrollingCoordinatorBlackBerry::setLayerIsContainerForFixedPositionLayers(GraphicsLayer* layer, bool isContainer)
{
if (m_page->mainFrame() && scrollLayerForFrameView(m_page->mainFrame()->view()) == layer)
isContainer = false;
if (layer->platformLayer())
layer->platformLayer()->setIsContainerForFixedPositionLayers(isContainer);
}
void ScrollingCoordinatorBlackBerry::setLayerIsFixedToContainerLayer(GraphicsLayer* layer, bool isFixed)
{
if (layer->platformLayer())
layer->platformLayer()->setFixedPosition(isFixed);
}
void ScrollingCoordinatorBlackBerry::setLayerFixedToContainerLayerEdge(GraphicsLayer* layer, bool fixedToTop, bool fixedToLeft)
{
if (!layer->platformLayer())
return;
layer->platformLayer()->setFixedToTop(fixedToTop);
layer->platformLayer()->setFixedToLeft(fixedToLeft);
}
void ScrollingCoordinatorBlackBerry::frameViewLayoutUpdated(FrameView* frameView)
{
if (GraphicsLayer* scrollLayer = scrollLayerForFrameView(frameView)) {
scrollLayer->platformLayer()->setFrameContentsSize(frameView->contentsSize());
scrollLayer->platformLayer()->setFrameVisibleRect(frameView->visibleContentRect());
}
}
}