コード例 #1
0
Axis::Overscroll Axis::GetOverscroll() {
  // If the current pan takes the window to the left of or above the current
  // page rect.
  bool minus = GetOrigin() < GetPageStart();
  // If the current pan takes the window to the right of or below the current
  // page rect.
  bool plus = GetCompositionEnd() > GetPageEnd();
  if (minus && plus) {
    return OVERSCROLL_BOTH;
  }
  if (minus) {
    return OVERSCROLL_MINUS;
  }
  if (plus) {
    return OVERSCROLL_PLUS;
  }
  return OVERSCROLL_NONE;
}
コード例 #2
0
Axis::Overscroll Axis::DisplacementWillOverscroll(float aDisplacement) {
  // If the current pan plus a displacement takes the window to the left of or
  // above the current page rect.
  bool minus = GetOrigin() + aDisplacement < GetPageStart();
  // If the current pan plus a displacement takes the window to the right of or
  // below the current page rect.
  bool plus = GetCompositionEnd() + aDisplacement > GetPageEnd();
  if (minus && plus) {
    return OVERSCROLL_BOTH;
  }
  if (minus) {
    return OVERSCROLL_MINUS;
  }
  if (plus) {
    return OVERSCROLL_PLUS;
  }
  return OVERSCROLL_NONE;
}
コード例 #3
0
ファイル: Axis.cpp プロジェクト: jraff/mozilla-central
Axis::Overscroll Axis::ScaleWillOverscroll(float aScale, int32_t aFocus) {
    float originAfterScale = (GetOrigin() + aFocus) * aScale - aFocus;

    bool both = ScaleWillOverscrollBothSides(aScale);
    bool minus = originAfterScale < GetPageStart() * aScale;
    bool plus = (originAfterScale + GetCompositionLength()) > GetPageEnd() * aScale;

    if ((minus && plus) || both) {
        return OVERSCROLL_BOTH;
    }
    if (minus) {
        return OVERSCROLL_MINUS;
    }
    if (plus) {
        return OVERSCROLL_PLUS;
    }
    return OVERSCROLL_NONE;
}
コード例 #4
0
int FrameBuffer::HandleAccess(char* pBase, char* pAddr, DWORD dwReadWrite)
{
	DWORD dwOldAccess;
	char* pPage = GetPageStart(pAddr);
	if (dwReadWrite == 0)
	{
		CopyInBitmapData();
	}
	else
	{
		if (!IsBufferUpToDate())
			CopyInBitmapData();

		VirtualProtect(pPage, m_iPageSize, PAGE_READWRITE, &dwOldAccess);
		m_setModifiedPages.insert(pPage);
	}
	
	return EXCEPTION_CONTINUE_EXECUTION;
}
コード例 #5
0
float Axis::GetPageEnd() {
  return GetPageStart() + GetPageLength();
}
コード例 #6
0
ファイル: Axis.cpp プロジェクト: Wrichik1999/gecko-dev
bool Axis::HasRoomToPan() const {
  return GetOrigin() > GetPageStart()
      || GetCompositionEnd() < GetPageEnd();
}
コード例 #7
0
ファイル: Axis.cpp プロジェクト: bebef1987/gecko-dev
CSSCoord Axis::GetPageEnd() const {
  return GetPageStart() + GetPageLength();
}
コード例 #8
0
ParentLayerCoord Axis::GetPageEnd() const {
  return GetPageStart() + GetPageLength();
}