本文整理汇总了C++中FrameView::delegatesScrolling方法的典型用法代码示例。如果您正苦于以下问题:C++ FrameView::delegatesScrolling方法的具体用法?C++ FrameView::delegatesScrolling怎么用?C++ FrameView::delegatesScrolling使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameView
的用法示例。
在下文中一共展示了FrameView::delegatesScrolling方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: buildObjectForRendererFragments
PassRefPtr<InspectorObject> InspectorOverlay::buildObjectForHighlightedNode() const
{
if (!m_highlightNode)
return nullptr;
Node* node = m_highlightNode.get();
RenderObject* renderer = node->renderer();
if (!renderer)
return nullptr;
RefPtr<InspectorArray> highlightFragments = buildObjectForRendererFragments(renderer, m_nodeHighlightConfig);
if (!highlightFragments)
return nullptr;
RefPtr<InspectorObject> highlightObject = InspectorObject::create();
// The main view's scroll offset is shared across all quads.
FrameView* mainView = m_page.mainFrame().view();
highlightObject->setObject("scroll", buildObjectForPoint(!mainView->delegatesScrolling() ? mainView->visibleContentRect().location() : FloatPoint()));
highlightObject->setArray("fragments", highlightFragments.release());
if (m_nodeHighlightConfig.showInfo) {
RefPtr<InspectorObject> elementInfo = buildObjectForElementInfo(node);
if (elementInfo)
highlightObject->setObject("elementInfo", elementInfo.release());
}
return highlightObject.release();
}
示例2: contentsSizeChanged
void WebChromeClient::contentsSizeChanged(Frame* frame, const IntSize& size) const
{
if (!m_page->corePage()->settings().frameFlatteningEnabled()) {
WebFrame* largestFrame = findLargestFrameInFrameSet(m_page);
if (largestFrame != m_cachedFrameSetLargestFrame.get()) {
m_cachedFrameSetLargestFrame = largestFrame;
m_page->send(Messages::WebPageProxy::FrameSetLargestFrameChanged(largestFrame ? largestFrame->frameID() : 0));
}
}
if (&frame->page()->mainFrame() != frame)
return;
m_page->send(Messages::WebPageProxy::DidChangeContentSize(size));
m_page->drawingArea()->mainFrameContentSizeChanged(size);
FrameView* frameView = frame->view();
if (frameView && !frameView->delegatesScrolling()) {
bool hasHorizontalScrollbar = frameView->horizontalScrollbar();
bool hasVerticalScrollbar = frameView->verticalScrollbar();
if (hasHorizontalScrollbar != m_cachedMainFrameHasHorizontalScrollbar || hasVerticalScrollbar != m_cachedMainFrameHasVerticalScrollbar) {
m_page->send(Messages::WebPageProxy::DidChangeScrollbarsForMainFrame(hasHorizontalScrollbar, hasVerticalScrollbar));
m_cachedMainFrameHasHorizontalScrollbar = hasHorizontalScrollbar;
m_cachedMainFrameHasVerticalScrollbar = hasVerticalScrollbar;
}
}
}
示例3: requestScrollPositionUpdate
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;
}
示例4: contentsSizeChanged
void WebChromeClient::contentsSizeChanged(Frame* frame, const IntSize& size) const
{
if (!m_page->corePage()->settings()->frameFlatteningEnabled()) {
WebFrame* largestFrame = findLargestFrameInFrameSet(m_page);
if (largestFrame != m_cachedFrameSetLargestFrame.get()) {
m_cachedFrameSetLargestFrame = largestFrame;
m_page->send(Messages::WebPageProxy::FrameSetLargestFrameChanged(largestFrame ? largestFrame->frameID() : 0));
}
}
if (frame->page()->mainFrame() != frame)
return;
#if PLATFORM(QT) || (PLATFORM(EFL) && USE(TILED_BACKING_STORE))
if (m_page->useFixedLayout()) {
// The below method updates the size().
m_page->resizeToContentsIfNeeded();
m_page->drawingArea()->layerTreeHost()->sizeDidChange(m_page->size());
}
m_page->send(Messages::WebPageProxy::DidChangeContentsSize(m_page->size()));
#elif PLATFORM(EFL)
m_page->send(Messages::WebPageProxy::DidChangeContentsSize(size));
#endif
m_page->drawingArea()->mainFrameContentSizeChanged(size);
FrameView* frameView = frame->view();
if (frameView && !frameView->delegatesScrolling()) {
bool hasHorizontalScrollbar = frameView->horizontalScrollbar();
bool hasVerticalScrollbar = frameView->verticalScrollbar();
if (hasHorizontalScrollbar != m_cachedMainFrameHasHorizontalScrollbar || hasVerticalScrollbar != m_cachedMainFrameHasVerticalScrollbar) {
m_page->send(Messages::WebPageProxy::DidChangeScrollbarsForMainFrame(hasHorizontalScrollbar, hasVerticalScrollbar));
m_cachedMainFrameHasHorizontalScrollbar = hasHorizontalScrollbar;
m_cachedMainFrameHasVerticalScrollbar = hasVerticalScrollbar;
}
}
}
示例5: setPageScaleFactor
void Page::setPageScaleFactor(float scale, const IntPoint& origin)
{
Document* document = mainFrame()->document();
FrameView* view = document->view();
if (scale == m_pageScaleFactor) {
if (view && (view->scrollPosition() != origin || view->delegatesScrolling())) {
if (!m_settings->applyPageScaleFactorInCompositor())
document->updateLayoutIgnorePendingStylesheets();
view->setScrollPosition(origin);
}
return;
}
m_pageScaleFactor = scale;
if (!m_settings->applyPageScaleFactorInCompositor()) {
if (document->renderer())
document->renderer()->setNeedsLayout(true);
document->recalcStyle(Style::Force);
// Transform change on RenderView doesn't trigger repaint on non-composited contents.
mainFrame()->view()->invalidateRect(IntRect(LayoutRect::infiniteRect()));
}
#if USE(ACCELERATED_COMPOSITING)
mainFrame()->deviceOrPageScaleFactorChanged();
#endif
if (view && view->fixedElementsLayoutRelativeToFrame())
view->setViewportConstrainedObjectsNeedLayout();
if (view && view->scrollPosition() != origin) {
if (!m_settings->applyPageScaleFactorInCompositor() && document->renderer() && document->renderer()->needsLayout() && view->didFirstLayout())
view->layout();
view->setScrollPosition(origin);
}
}