bool APZController::GetRootZoomConstraints(ZoomConstraints* aOutConstraints) { if (aOutConstraints) { // Until we support the meta-viewport tag properly allow zooming // from 1/4 to 4x by default. aOutConstraints->mAllowZoom = true; aOutConstraints->mMinZoom = CSSToScreenScale(0.25f); aOutConstraints->mMaxZoom = CSSToScreenScale(4.0f); return true; } return false; }
CSSToScreenScale ThebesLayerComposite::GetEffectiveResolution() { for (ContainerLayer* parent = GetParent(); parent; parent = parent->GetParent()) { const FrameMetrics& metrics = parent->GetFrameMetrics(); if (metrics.mScrollId != FrameMetrics::NULL_SCROLL_ID) { return metrics.mZoom; } } return CSSToScreenScale(1.0); }