bool Axis::ScaleWillOverscrollBothSides(float aScale) { const FrameMetrics& metrics = mAsyncPanZoomController->GetFrameMetrics(); CSSToParentLayerScale scale(metrics.GetZoomToParent().scale * aScale); CSSRect cssCompositionBounds = metrics.mCompositionBounds / scale; return GetRectLength(metrics.GetExpandedScrollableRect()) < GetRectLength(cssCompositionBounds); }
bool Axis::ScaleWillOverscrollBothSides(float aScale) { const FrameMetrics& metrics = mAsyncPanZoomController->GetFrameMetrics(); CSSToScreenScale scale(metrics.mZoom.scale * aScale); CSSRect cssCompositionBounds = metrics.mCompositionBounds / scale; return GetRectLength(metrics.mScrollableRect) < GetRectLength(cssCompositionBounds); }
bool Axis::ScaleWillOverscrollBothSides(float aScale) { const FrameMetrics& metrics = GetFrameMetrics(); CSSToParentLayerScale scale(metrics.GetZoomToParent().scale * aScale); CSSRect cssCompositionBounds = metrics.mCompositionBounds / scale; return GetRectLength(cssCompositionBounds) - GetRectLength(metrics.GetExpandedScrollableRect()) > COORDINATE_EPSILON; }
bool Axis::ScaleWillOverscrollBothSides(float aScale) { const FrameMetrics& metrics = mAsyncPanZoomController->GetFrameMetrics(); CSSRect cssContentRect = metrics.mScrollableRect; CSSToScreenScale scale(metrics.CalculateResolution().scale * aScale); CSSIntRect cssCompositionBounds = RoundedIn(metrics.mCompositionBounds / scale); return GetRectLength(cssContentRect) < GetRectLength(CSSRect(cssCompositionBounds)); }
bool Axis::ScaleWillOverscrollBothSides(float aScale) { const FrameMetrics& metrics = mAsyncPanZoomController->GetFrameMetrics(); gfx::Rect cssContentRect = metrics.mScrollableRect; float currentScale = metrics.mZoom.width; nsIntRect compositionBounds = metrics.mCompositionBounds; gfx::Rect scaledCompositionBounds = gfx::Rect(compositionBounds.x, compositionBounds.y, compositionBounds.width, compositionBounds.height); scaledCompositionBounds.ScaleInverseRoundIn(currentScale * aScale); return GetRectLength(cssContentRect) < GetRectLength(scaledCompositionBounds); }
float Axis::GetCompositionLength() { nsIntRect compositionBounds = mAsyncPanZoomController->GetFrameMetrics().mCompositionBounds; gfx::Rect scaledCompositionBounds = gfx::Rect(compositionBounds.x, compositionBounds.y, compositionBounds.width, compositionBounds.height); scaledCompositionBounds.ScaleInverseRoundIn( mAsyncPanZoomController->GetFrameMetrics().mZoom.width); return GetRectLength(scaledCompositionBounds); }
float Axis::GetPageLength() { gfx::Rect pageRect = mAsyncPanZoomController->GetFrameMetrics().mScrollableRect; return GetRectLength(pageRect); }
float Axis::GetCompositionLength() { const FrameMetrics& metrics = mAsyncPanZoomController->GetFrameMetrics(); gfx::Rect cssCompositedRect = AsyncPanZoomController::CalculateCompositedRectInCssPixels(metrics); return GetRectLength(cssCompositedRect); }
float Axis::GetPageLength() const { CSSRect pageRect = mAsyncPanZoomController->GetFrameMetrics().GetExpandedScrollableRect(); return GetRectLength(pageRect); }
float Axis::GetCompositionLength() const { const FrameMetrics& metrics = mAsyncPanZoomController->GetFrameMetrics(); return GetRectLength(metrics.CalculateCompositedRectInCssPixels()); }
CSSCoord Axis::GetPageLength() const { CSSRect pageRect = GetFrameMetrics().GetExpandedScrollableRect(); return GetRectLength(pageRect); }
CSSCoord Axis::GetCompositionLength() const { return GetRectLength(GetFrameMetrics().CalculateCompositedRectInCssPixels()); }
bool Axis::ScaleWillOverscrollBothSides(float aScale) const { const FrameMetrics& metrics = GetFrameMetrics(); ParentLayerRect screenCompositionBounds = metrics.GetCompositionBounds() / ParentLayerToParentLayerScale(aScale); return GetRectLength(screenCompositionBounds) - GetPageLength() > COORDINATE_EPSILON; }
ParentLayerCoord Axis::GetPageLength() const { ParentLayerRect pageRect = GetFrameMetrics().GetExpandedScrollableRect() * GetFrameMetrics().GetZoom(); return GetRectLength(pageRect); }
ParentLayerCoord Axis::GetCompositionLength() const { return GetRectLength(GetFrameMetrics().GetCompositionBounds()); }