void ScrollingCoordinatorChromium::setWheelEventHandlerCount(unsigned wheelEventHandlerCount)
{
    // We won't necessarily get a setScrollLayer() call before this one, so grab the root ourselves.
    setScrollLayer(scrollLayerForFrameView(m_page->mainFrame()->view()));
    if (m_private->scrollLayer())
        m_private->scrollLayer()->setHaveWheelEventHandlers(wheelEventHandlerCount > 0);
}
void ScrollingCoordinatorChromium::setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons reasons)
{
    // We won't necessarily get a setScrollLayer() call before this one, so grab the root ourselves.
    setScrollLayer(scrollLayerForFrameView(m_page->mainFrame()->view()));
    if (m_private->scrollLayer())
        m_private->scrollLayer()->setShouldScrollOnMainThread(reasons);
}
void ScrollingCoordinatorChromium::frameViewVerticalScrollbarLayerDidChange(FrameView* frameView, GraphicsLayer* verticalScrollbarLayer)
{
    if (!verticalScrollbarLayer || !coordinatesScrollingForFrameView(frameView))
        return;

    setScrollLayer(scrollLayerForFrameView(m_page->mainFrame()->view()));
    m_private->setVerticalScrollbarLayer(createScrollbarLayer(frameView->verticalScrollbar(), m_private->scrollLayer(), verticalScrollbarLayer, frameView));
}
Beispiel #4
0
void ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange(FrameView* frameView, GraphicsLayer* horizontalScrollbarLayer)
{
    if (!horizontalScrollbarLayer || !coordinatesScrollingForFrameView(frameView))
        return;

    setScrollLayer(scrollLayerForFrameView(m_page->mainFrame()->view()));
    m_private->setHorizontalScrollbarLayer(createScrollbarLayer(frameView->horizontalScrollbar(), m_private->scrollLayer(), horizontalScrollbarLayer, frameView));
}
Beispiel #5
0
void ScrollingCoordinatorChromium::setTouchEventTargetRects(const Vector<IntRect>& absoluteHitTestRects)
{
    // We won't necessarily get a setScrollLayer() call before this one, so grab the root ourselves.
    setScrollLayer(scrollLayerForFrameView(m_page->mainFrame()->view()));
    if (m_private->scrollLayer()) {
        WebVector<WebRect> webRects(absoluteHitTestRects.size());
        for (size_t i = 0; i < absoluteHitTestRects.size(); ++i)
            webRects[i] = absoluteHitTestRects[i];
        m_private->scrollLayer()->setTouchEventHandlerRegion(webRects);
    }
}
void ScrollingCoordinatorChromium::setNonFastScrollableRegion(const Region& region)
{
    // We won't necessarily get a setScrollLayer() call before this one, so grab the root ourselves.
    setScrollLayer(scrollLayerForFrameView(m_page->mainFrame()->view()));
    if (m_private->scrollLayer()) {
        Vector<IntRect> rects = region.rects();
        WebVector<WebRect> webRects(rects.size());
        for (size_t i = 0; i < rects.size(); ++i)
            webRects[i] = rects[i];
        m_private->scrollLayer()->setNonFastScrollableRegion(webRects);
    }
}
Beispiel #7
0
void ScrollingCoordinator::frameViewRootLayerDidChange(FrameView* frameView)
{
    ASSERT(isMainThread());
    ASSERT(m_page);

    if (frameView->frame() != m_page->mainFrame())
        return;

    frameViewLayoutUpdated(frameView);
    recomputeWheelEventHandlerCount();
    updateShouldUpdateScrollLayerPositionOnMainThread();
    setScrollLayer(scrollLayerForFrameView(frameView));
}
Beispiel #8
0
void ScrollingCoordinatorChromium::touchEventTargetRectsDidChange(const Document* document)
{
#if ENABLE(TOUCH_EVENT_TRACKING)
    // Wait until after layout to update.
    if (m_page->mainFrame()->view()->needsLayout())
        return;

    // We won't necessarily get a setScrollLayer() call before this one, so grab the root ourselves.
    setScrollLayer(scrollLayerForFrameView(m_page->mainFrame()->view()));
    if (m_private->scrollLayer()) {
        Vector<IntRect> touchEventTargetRects;
        computeAbsoluteTouchEventTargetRects(document, touchEventTargetRects);
        setTouchEventTargetRects(touchEventTargetRects);
    }
#else
    UNUSED_PARAM(document);
#endif
}
void ScrollingCoordinatorChromium::frameViewRootLayerDidChange(FrameView* frameView)
{
    ScrollingCoordinator::frameViewRootLayerDidChange(frameView);
    setScrollLayer(scrollLayerForFrameView(frameView));
}