void QWebFrameAdapter::setFixedVisibleContentRect(const QRect& rect) { ASSERT(pageAdapter->mainFrameAdapter() == this); FrameView* view = frame->view(); ASSERT(view); view->setFixedVisibleContentRect(rect); }
bool ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate(FrameView& frameView, const IntPoint& scrollPosition) { if (!frameView.delegatesScrolling()) return false; frameView.setFixedVisibleContentRect(IntRect(scrollPosition, frameView.visibleContentRect().size())); frameView.hostWindow()->delegatedScrollRequested(scrollPosition); return true; }
void CompositingCoordinator::setVisibleContentsRect(const FloatRect& rect, const FloatPoint& trajectoryVector) { // A zero trajectoryVector indicates that tiles all around the viewport are requested. if (CoordinatedGraphicsLayer* contentsLayer = mainContentsLayer()) contentsLayer->setVisibleContentRectTrajectoryVector(trajectoryVector); bool contentsRectDidChange = rect != m_visibleContentsRect; if (contentsRectDidChange) { m_visibleContentsRect = rect; for (auto& registeredLayer : m_registeredLayers.values()) registeredLayer->setNeedsVisibleRectAdjustment(); } FrameView* view = m_page->mainFrame().view(); if (view->useFixedLayout() && contentsRectDidChange) { // Round the rect instead of enclosing it to make sure that its size stays // the same while panning. This can have nasty effects on layout. view->setFixedVisibleContentRect(roundedIntRect(rect)); } }