Esempio n. 1
0
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);
}
Esempio n. 2
0
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);
}
Esempio n. 3
0
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;
}
Esempio n. 4
0
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));
}
Esempio n. 5
0
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);
}
Esempio n. 6
0
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);
}
Esempio n. 7
0
float Axis::GetPageLength() {
  gfx::Rect pageRect = mAsyncPanZoomController->GetFrameMetrics().mScrollableRect;
  return GetRectLength(pageRect);
}
Esempio n. 8
0
float Axis::GetCompositionLength() {
  const FrameMetrics& metrics = mAsyncPanZoomController->GetFrameMetrics();
  gfx::Rect cssCompositedRect =
    AsyncPanZoomController::CalculateCompositedRectInCssPixels(metrics);
  return GetRectLength(cssCompositedRect);
}
Esempio n. 9
0
float Axis::GetPageLength() const {
  CSSRect pageRect = mAsyncPanZoomController->GetFrameMetrics().GetExpandedScrollableRect();
  return GetRectLength(pageRect);
}
Esempio n. 10
0
float Axis::GetCompositionLength() const {
  const FrameMetrics& metrics = mAsyncPanZoomController->GetFrameMetrics();
  return GetRectLength(metrics.CalculateCompositedRectInCssPixels());
}
Esempio n. 11
0
CSSCoord Axis::GetPageLength() const {
  CSSRect pageRect = GetFrameMetrics().GetExpandedScrollableRect();
  return GetRectLength(pageRect);
}
Esempio n. 12
0
CSSCoord Axis::GetCompositionLength() const {
  return GetRectLength(GetFrameMetrics().CalculateCompositedRectInCssPixels());
}
Esempio n. 13
0
bool Axis::ScaleWillOverscrollBothSides(float aScale) const {
  const FrameMetrics& metrics = GetFrameMetrics();
  ParentLayerRect screenCompositionBounds = metrics.GetCompositionBounds()
                                          / ParentLayerToParentLayerScale(aScale);
  return GetRectLength(screenCompositionBounds) - GetPageLength() > COORDINATE_EPSILON;
}
Esempio n. 14
0
ParentLayerCoord Axis::GetPageLength() const {
  ParentLayerRect pageRect = GetFrameMetrics().GetExpandedScrollableRect() * GetFrameMetrics().GetZoom();
  return GetRectLength(pageRect);
}
Esempio n. 15
0
ParentLayerCoord Axis::GetCompositionLength() const {
  return GetRectLength(GetFrameMetrics().GetCompositionBounds());
}