void WebViewNix::viewportInteractionStop() { if (page()->pageScaleFactor() != contentScaleFactor()) page()->scalePage(contentScaleFactor(), roundedIntPoint(contentPosition())); updateViewportSize(); resumeActiveDOMObjectsAndAnimations(); }
void WebView::pageDidRequestScroll(const IntPoint& position) { FloatPoint uiPosition(position); uiPosition.scale(contentScaleFactor(), contentScaleFactor()); setContentPosition(uiPosition); m_client.didChangeContentsPosition(this, position); }
WebCore::FloatSize WebView::visibleContentsSize() const { FloatSize visibleContentsSize(dipSize()); visibleContentsSize.scale(1 / contentScaleFactor()); return visibleContentsSize; }
WebCore::FloatSize WebView::visibleContentsSize() const { FloatSize visibleContentsSize(dipSize()); if (m_page->useFixedLayout()) visibleContentsSize.scale(1 / contentScaleFactor()); return visibleContentsSize; }
AffineTransform WebView::transformToScene() const { FloatPoint position = -m_contentPosition; float effectiveScale = contentScaleFactor() * m_page->deviceScaleFactor(); position.scale(effectiveScale, effectiveScale); TransformationMatrix transform = m_userViewportTransform; transform.translate(position.x(), position.y()); transform.scale(effectiveScale); return transform.toAffineTransform(); }
void WebViewEfl::paintToCairoSurface(cairo_surface_t* surface) { CoordinatedGraphicsScene* scene = coordinatedGraphicsScene(); if (!scene) return; PlatformContextCairo context(cairo_create(surface)); const FloatPoint& position = contentPosition(); double effectiveScale = m_page->deviceScaleFactor() * contentScaleFactor(); cairo_matrix_t transform = { effectiveScale, 0, 0, effectiveScale, - position.x() * m_page->deviceScaleFactor(), - position.y() * m_page->deviceScaleFactor() }; cairo_set_matrix(context.cr(), &transform); scene->paintToGraphicsContext(&context, m_page->pageExtendedBackgroundColor(), m_page->drawsBackground()); }