Пример #1
0
void ScrollingTree::commitNewTreeState(PassOwnPtr<ScrollingTreeState> scrollingTreeState)
{
    ASSERT(ScrollingThread::isCurrentThread());

    if (scrollingTreeState->changedProperties() & (ScrollingTreeState::WheelEventHandlerCount | ScrollingTreeState::NonFastScrollableRegion | ScrollingTreeState::ScrollLayer)) {
        MutexLocker lock(m_mutex);

        if (scrollingTreeState->changedProperties() & ScrollingTreeState::ScrollLayer)
            m_mainFrameScrollPosition = IntPoint();
        if (scrollingTreeState->changedProperties() & ScrollingTreeState::WheelEventHandlerCount)
            m_hasWheelEventHandlers = scrollingTreeState->wheelEventHandlerCount();
        if (scrollingTreeState->changedProperties() & ScrollingTreeState::NonFastScrollableRegion)
            m_nonFastScrollableRegion = scrollingTreeState->nonFastScrollableRegion();
    }
    
    TemporaryChange<bool> changeHandlingProgrammaticScroll(m_isHandlingProgrammaticScroll, scrollingTreeState->requestedScrollPositionRepresentsProgrammaticScroll());

    m_rootNode->update(scrollingTreeState.get());

    updateDebugRootLayer();
}
Пример #2
0
void ScrollingTree::commitNewTreeState(PassOwnPtr<ScrollingTreeState> scrollingTreeState)
{
    ASSERT(ScrollingThread::isCurrentThread());

    if (scrollingTreeState->changedProperties() & ScrollingTreeState::WheelEventHandlerCount) {
        MutexLocker lock(m_mutex);

        m_hasWheelEventHandlers = scrollingTreeState->wheelEventHandlerCount();
    }

    m_rootNode->update(scrollingTreeState.get());
}