2012-07-31 04:42:26 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef GFX_FRAMEMETRICS_H
|
|
|
|
#define GFX_FRAMEMETRICS_H
|
|
|
|
|
2013-08-12 03:17:23 +04:00
|
|
|
#include <stdint.h> // for uint32_t, uint64_t
|
|
|
|
#include "Units.h" // for CSSRect, CSSPixel, etc
|
|
|
|
#include "mozilla/gfx/BasePoint.h" // for BasePoint
|
|
|
|
#include "mozilla/gfx/Rect.h" // for RoundedIn
|
|
|
|
#include "mozilla/gfx/ScaleFactor.h" // for ScaleFactor
|
2014-01-23 03:44:59 +04:00
|
|
|
#include "mozilla/gfx/Logging.h" // for Log
|
2014-08-29 16:23:25 +04:00
|
|
|
#include "gfxColor.h"
|
2014-08-29 16:23:25 +04:00
|
|
|
#include "nsString.h"
|
2012-07-31 04:42:26 +04:00
|
|
|
|
2014-01-21 21:33:52 +04:00
|
|
|
namespace IPC {
|
|
|
|
template <typename T> struct ParamTraits;
|
|
|
|
} // namespace IPC
|
|
|
|
|
2012-07-31 04:42:26 +04:00
|
|
|
namespace mozilla {
|
2014-03-11 01:56:59 +04:00
|
|
|
namespace layers {
|
|
|
|
|
2012-07-31 04:42:26 +04:00
|
|
|
/**
|
|
|
|
* The viewport and displayport metrics for the painted frame at the
|
|
|
|
* time of a layer-tree transaction. These metrics are especially
|
|
|
|
* useful for shadow layers, because the metrics values are updated
|
|
|
|
* atomically with new pixels.
|
|
|
|
*/
|
2013-05-30 01:59:24 +04:00
|
|
|
struct FrameMetrics {
|
2014-01-21 21:33:52 +04:00
|
|
|
friend struct IPC::ParamTraits<mozilla::layers::FrameMetrics>;
|
2012-07-31 04:42:26 +04:00
|
|
|
public:
|
|
|
|
// We use IDs to identify frames across processes.
|
2012-08-22 19:56:38 +04:00
|
|
|
typedef uint64_t ViewID;
|
2012-07-31 04:42:26 +04:00
|
|
|
static const ViewID NULL_SCROLL_ID; // This container layer does not scroll.
|
2013-11-22 23:45:50 +04:00
|
|
|
static const ViewID START_SCROLL_ID = 2; // This is the ID that scrolling subframes
|
2012-07-31 04:42:26 +04:00
|
|
|
// will begin at.
|
2014-08-28 06:13:41 +04:00
|
|
|
static const FrameMetrics sNullMetrics; // We often need an empty metrics
|
2012-07-31 04:42:26 +04:00
|
|
|
|
|
|
|
FrameMetrics()
|
2012-09-29 06:16:34 +04:00
|
|
|
: mCompositionBounds(0, 0, 0, 0)
|
2014-10-21 01:12:35 +04:00
|
|
|
, mPresShellResolution(1)
|
2014-12-23 18:35:58 +03:00
|
|
|
, mDisplayPort(0, 0, 0, 0)
|
2014-12-30 22:07:57 +03:00
|
|
|
, mCriticalDisplayPort(0, 0, 0, 0)
|
2014-12-27 20:48:27 +03:00
|
|
|
, mScrollableRect(0, 0, 0, 0)
|
2013-09-06 02:26:59 +04:00
|
|
|
, mCumulativeResolution(1)
|
2012-09-29 06:16:34 +04:00
|
|
|
, mDevPixelsPerCSSPixel(1)
|
2014-01-21 21:33:52 +04:00
|
|
|
, mMayHaveTouchListeners(false)
|
2014-06-03 11:08:54 +04:00
|
|
|
, mMayHaveTouchCaret(false)
|
2013-11-09 04:07:00 +04:00
|
|
|
, mIsRoot(false)
|
2013-09-23 23:09:48 +04:00
|
|
|
, mHasScrollgrab(false)
|
2014-03-22 01:48:08 +04:00
|
|
|
, mScrollId(NULL_SCROLL_ID)
|
2014-08-28 06:13:39 +04:00
|
|
|
, mScrollParentId(NULL_SCROLL_ID)
|
2014-03-13 10:34:34 +04:00
|
|
|
, mScrollOffset(0, 0)
|
2014-03-12 20:46:57 +04:00
|
|
|
, mZoom(1)
|
2014-02-06 02:43:20 +04:00
|
|
|
, mUpdateScrollOffset(false)
|
|
|
|
, mScrollGeneration(0)
|
2014-07-10 22:52:40 +04:00
|
|
|
, mDoSmoothScroll(false)
|
|
|
|
, mSmoothScrollOffset(0, 0)
|
2014-03-27 03:24:25 +04:00
|
|
|
, mRootCompositionSize(0, 0)
|
2014-03-27 05:46:24 +04:00
|
|
|
, mDisplayPortMargins(0, 0, 0, 0)
|
|
|
|
, mUseDisplayPortMargins(false)
|
2014-05-17 03:00:50 +04:00
|
|
|
, mPresShellId(-1)
|
2014-08-23 07:18:56 +04:00
|
|
|
, mViewport(0, 0, 0, 0)
|
2014-10-24 23:49:38 +04:00
|
|
|
, mExtraResolution(1)
|
2014-08-29 16:23:25 +04:00
|
|
|
, mBackgroundColor(0, 0, 0, 0)
|
2014-11-18 07:56:18 +03:00
|
|
|
, mLineScrollAmount(0, 0)
|
2014-08-29 16:23:25 +04:00
|
|
|
{
|
|
|
|
}
|
2012-07-31 04:42:26 +04:00
|
|
|
|
|
|
|
// Default copy ctor and operator= are fine
|
|
|
|
|
|
|
|
bool operator==(const FrameMetrics& aOther) const
|
|
|
|
{
|
2012-10-04 03:51:38 +04:00
|
|
|
return mCompositionBounds.IsEqualEdges(aOther.mCompositionBounds) &&
|
2014-03-27 03:24:25 +04:00
|
|
|
mRootCompositionSize == aOther.mRootCompositionSize &&
|
2012-10-04 03:51:38 +04:00
|
|
|
mDisplayPort.IsEqualEdges(aOther.mDisplayPort) &&
|
2014-03-27 05:46:24 +04:00
|
|
|
mDisplayPortMargins == aOther.mDisplayPortMargins &&
|
|
|
|
mUseDisplayPortMargins == aOther.mUseDisplayPortMargins &&
|
2012-11-22 02:34:18 +04:00
|
|
|
mCriticalDisplayPort.IsEqualEdges(aOther.mCriticalDisplayPort) &&
|
2012-10-04 03:51:38 +04:00
|
|
|
mViewport.IsEqualEdges(aOther.mViewport) &&
|
|
|
|
mScrollableRect.IsEqualEdges(aOther.mScrollableRect) &&
|
2014-10-21 01:12:35 +04:00
|
|
|
mPresShellResolution == aOther.mPresShellResolution &&
|
2013-09-06 02:26:59 +04:00
|
|
|
mCumulativeResolution == aOther.mCumulativeResolution &&
|
2012-10-04 03:51:38 +04:00
|
|
|
mDevPixelsPerCSSPixel == aOther.mDevPixelsPerCSSPixel &&
|
2013-05-24 05:43:36 +04:00
|
|
|
mMayHaveTouchListeners == aOther.mMayHaveTouchListeners &&
|
2014-06-03 11:08:54 +04:00
|
|
|
mMayHaveTouchCaret == aOther.mMayHaveTouchCaret &&
|
2013-11-09 04:07:00 +04:00
|
|
|
mPresShellId == aOther.mPresShellId &&
|
2013-12-16 21:04:45 +04:00
|
|
|
mIsRoot == aOther.mIsRoot &&
|
2014-03-22 01:48:08 +04:00
|
|
|
mScrollId == aOther.mScrollId &&
|
2014-08-28 06:13:39 +04:00
|
|
|
mScrollParentId == aOther.mScrollParentId &&
|
2014-03-13 10:34:34 +04:00
|
|
|
mScrollOffset == aOther.mScrollOffset &&
|
2014-07-10 22:52:40 +04:00
|
|
|
mSmoothScrollOffset == aOther.mSmoothScrollOffset &&
|
2014-01-21 21:33:52 +04:00
|
|
|
mHasScrollgrab == aOther.mHasScrollgrab &&
|
2014-08-29 16:23:25 +04:00
|
|
|
mUpdateScrollOffset == aOther.mUpdateScrollOffset &&
|
2015-02-16 00:01:00 +03:00
|
|
|
mScrollGeneration == aOther.mScrollGeneration &&
|
2014-10-24 23:49:38 +04:00
|
|
|
mExtraResolution == aOther.mExtraResolution &&
|
2014-07-10 22:52:40 +04:00
|
|
|
mBackgroundColor == aOther.mBackgroundColor &&
|
2014-11-18 07:56:18 +03:00
|
|
|
mDoSmoothScroll == aOther.mDoSmoothScroll &&
|
|
|
|
mLineScrollAmount == aOther.mLineScrollAmount;
|
2012-07-31 04:42:26 +04:00
|
|
|
}
|
|
|
|
bool operator!=(const FrameMetrics& aOther) const
|
|
|
|
{
|
|
|
|
return !operator==(aOther);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool IsDefault() const
|
|
|
|
{
|
2013-05-24 05:43:36 +04:00
|
|
|
FrameMetrics def;
|
|
|
|
|
|
|
|
def.mPresShellId = mPresShellId;
|
|
|
|
return (def == *this);
|
2012-07-31 04:42:26 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
bool IsRootScrollable() const
|
|
|
|
{
|
2013-11-09 04:07:00 +04:00
|
|
|
return mIsRoot;
|
2012-07-31 04:42:26 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
bool IsScrollable() const
|
|
|
|
{
|
|
|
|
return mScrollId != NULL_SCROLL_ID;
|
|
|
|
}
|
|
|
|
|
2014-10-24 23:49:38 +04:00
|
|
|
CSSToScreenScale DisplayportPixelsPerCSSPixel() const
|
|
|
|
{
|
2014-11-10 22:35:11 +03:00
|
|
|
// Note: use 'mZoom * ParentLayerToLayerScale(1.0f)' as the CSS-to-Layer scale
|
2014-10-24 23:49:38 +04:00
|
|
|
// instead of LayersPixelsPerCSSPixel(), because displayport calculations
|
|
|
|
// are done in the context of a repaint request, where we ask Layout to
|
|
|
|
// repaint at a new resolution that includes any async zoom. Until this
|
|
|
|
// repaint request is processed, LayersPixelsPerCSSPixel() does not yet
|
|
|
|
// include the async zoom, but it will when the displayport is interpreted
|
|
|
|
// for the repaint.
|
2014-11-10 22:35:11 +03:00
|
|
|
return mZoom * ParentLayerToLayerScale(1.0f) / mExtraResolution;
|
2014-10-24 23:49:38 +04:00
|
|
|
}
|
|
|
|
|
2013-06-22 01:03:56 +04:00
|
|
|
CSSToLayerScale LayersPixelsPerCSSPixel() const
|
2012-09-29 06:16:34 +04:00
|
|
|
{
|
2013-09-06 02:26:59 +04:00
|
|
|
return mCumulativeResolution * mDevPixelsPerCSSPixel;
|
2012-09-29 06:16:34 +04:00
|
|
|
}
|
|
|
|
|
2014-10-21 01:12:35 +04:00
|
|
|
// Get the amount by which this frame has been zoomed since the last repaint.
|
2014-11-10 22:35:11 +03:00
|
|
|
LayerToParentLayerScale GetAsyncZoom() const
|
2012-09-29 06:16:34 +04:00
|
|
|
{
|
2014-10-21 01:12:35 +04:00
|
|
|
return mZoom / LayersPixelsPerCSSPixel();
|
2013-09-06 02:26:59 +04:00
|
|
|
}
|
|
|
|
|
2013-12-13 21:23:47 +04:00
|
|
|
// Ensure the scrollableRect is at least as big as the compositionBounds
|
|
|
|
// because the scrollableRect can be smaller if the content is not large
|
|
|
|
// and the scrollableRect hasn't been updated yet.
|
|
|
|
// We move the scrollableRect up because we don't know if we can move it
|
|
|
|
// down. i.e. we know that scrollableRect can go back as far as zero.
|
|
|
|
// but we don't know how much further ahead it can go.
|
|
|
|
CSSRect GetExpandedScrollableRect() const
|
|
|
|
{
|
|
|
|
CSSRect scrollableRect = mScrollableRect;
|
2014-03-28 18:36:47 +04:00
|
|
|
CSSSize compSize = CalculateCompositedSizeInCssPixels();
|
|
|
|
if (scrollableRect.width < compSize.width) {
|
2013-12-13 21:23:47 +04:00
|
|
|
scrollableRect.x = std::max(0.f,
|
2014-03-28 18:36:47 +04:00
|
|
|
scrollableRect.x - (compSize.width - scrollableRect.width));
|
|
|
|
scrollableRect.width = compSize.width;
|
2013-12-13 21:23:47 +04:00
|
|
|
}
|
|
|
|
|
2014-03-28 18:36:47 +04:00
|
|
|
if (scrollableRect.height < compSize.height) {
|
2013-12-13 21:23:47 +04:00
|
|
|
scrollableRect.y = std::max(0.f,
|
2014-03-28 18:36:47 +04:00
|
|
|
scrollableRect.y - (compSize.height - scrollableRect.height));
|
|
|
|
scrollableRect.height = compSize.height;
|
2013-12-13 21:23:47 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
return scrollableRect;
|
|
|
|
}
|
|
|
|
|
2014-03-11 01:56:59 +04:00
|
|
|
// Return the scale factor needed to fit the viewport
|
|
|
|
// into its composition bounds.
|
2014-11-10 22:35:11 +03:00
|
|
|
CSSToParentLayerScale CalculateIntrinsicScale() const
|
2013-06-26 17:53:51 +04:00
|
|
|
{
|
2014-11-10 22:35:11 +03:00
|
|
|
return CSSToParentLayerScale(
|
2014-07-04 16:12:41 +04:00
|
|
|
std::max(mCompositionBounds.width / mViewport.width,
|
|
|
|
mCompositionBounds.height / mViewport.height));
|
2013-06-26 17:53:51 +04:00
|
|
|
}
|
|
|
|
|
2014-03-28 18:36:47 +04:00
|
|
|
CSSSize CalculateCompositedSizeInCssPixels() const
|
2013-06-26 17:54:49 +04:00
|
|
|
{
|
2014-11-10 22:35:11 +03:00
|
|
|
return mCompositionBounds.Size() / GetZoom();
|
2014-03-28 18:36:47 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
CSSRect CalculateCompositedRectInCssPixels() const
|
|
|
|
{
|
2014-11-10 22:35:11 +03:00
|
|
|
return mCompositionBounds / GetZoom();
|
2013-06-26 17:54:49 +04:00
|
|
|
}
|
|
|
|
|
2014-05-06 22:29:44 +04:00
|
|
|
CSSSize CalculateBoundedCompositedSizeInCssPixels() const
|
|
|
|
{
|
|
|
|
CSSSize size = CalculateCompositedSizeInCssPixels();
|
|
|
|
size.width = std::min(size.width, mRootCompositionSize.width);
|
|
|
|
size.height = std::min(size.height, mRootCompositionSize.height);
|
|
|
|
return size;
|
|
|
|
}
|
|
|
|
|
2014-03-13 10:34:34 +04:00
|
|
|
void ScrollBy(const CSSPoint& aPoint)
|
|
|
|
{
|
|
|
|
mScrollOffset += aPoint;
|
|
|
|
}
|
|
|
|
|
2014-03-12 20:46:57 +04:00
|
|
|
void ZoomBy(float aFactor)
|
|
|
|
{
|
|
|
|
mZoom.scale *= aFactor;
|
|
|
|
}
|
|
|
|
|
2014-03-28 16:21:19 +04:00
|
|
|
void CopyScrollInfoFrom(const FrameMetrics& aOther)
|
|
|
|
{
|
|
|
|
mScrollOffset = aOther.mScrollOffset;
|
|
|
|
mScrollGeneration = aOther.mScrollGeneration;
|
|
|
|
}
|
|
|
|
|
2014-07-10 22:52:40 +04:00
|
|
|
void CopySmoothScrollInfoFrom(const FrameMetrics& aOther)
|
|
|
|
{
|
|
|
|
mSmoothScrollOffset = aOther.mSmoothScrollOffset;
|
|
|
|
mScrollGeneration = aOther.mScrollGeneration;
|
|
|
|
mDoSmoothScroll = aOther.mDoSmoothScroll;
|
|
|
|
}
|
|
|
|
|
2014-09-03 20:54:26 +04:00
|
|
|
// Make a copy of this FrameMetrics object which does not have any pointers
|
|
|
|
// to heap-allocated memory (i.e. is Plain Old Data, or 'POD'), and is
|
|
|
|
// therefore safe to be placed into shared memory.
|
|
|
|
FrameMetrics MakePODObject() const
|
|
|
|
{
|
|
|
|
FrameMetrics copy = *this;
|
|
|
|
copy.mContentDescription.Truncate();
|
|
|
|
return copy;
|
|
|
|
}
|
|
|
|
|
2012-09-29 06:16:34 +04:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// The following metrics are all in widget space/device pixels.
|
|
|
|
//
|
|
|
|
|
2014-12-12 08:13:10 +03:00
|
|
|
// This is the area within the widget that we're compositing to. It is in the
|
|
|
|
// same coordinate space as the reference frame for the scrolled frame.
|
2012-09-29 06:16:34 +04:00
|
|
|
//
|
|
|
|
// This is useful because, on mobile, the viewport and composition dimensions
|
|
|
|
// are not always the same. In this case, we calculate the displayport using
|
|
|
|
// an area bigger than the region we're compositing to. If we used the
|
|
|
|
// viewport dimensions to calculate the displayport, we'd run into situations
|
|
|
|
// where we're prerendering the wrong regions and the content may be clipped,
|
2013-10-09 01:13:11 +04:00
|
|
|
// or too much of it prerendered. If the composition dimensions are the same as the
|
|
|
|
// viewport dimensions, there is no need for this and we can just use the viewport
|
2012-09-29 06:16:34 +04:00
|
|
|
// instead.
|
|
|
|
//
|
2013-10-09 01:13:11 +04:00
|
|
|
// This value is valid for nested scrollable layers as well, and is still
|
2013-11-08 20:23:47 +04:00
|
|
|
// relative to the layer tree origin. This value is provided by Gecko at
|
|
|
|
// layout/paint time.
|
2014-07-04 16:12:41 +04:00
|
|
|
ParentLayerRect mCompositionBounds;
|
2012-09-29 06:16:34 +04:00
|
|
|
|
2015-01-17 00:15:52 +03:00
|
|
|
public:
|
|
|
|
void SetPresShellResolution(const float aPresShellResolution)
|
|
|
|
{
|
|
|
|
mPresShellResolution = aPresShellResolution;
|
|
|
|
}
|
2012-09-29 06:16:38 +04:00
|
|
|
|
2015-01-17 00:15:52 +03:00
|
|
|
float GetPresShellResolution() const
|
|
|
|
{
|
|
|
|
return mPresShellResolution;
|
|
|
|
}
|
2013-09-06 02:26:59 +04:00
|
|
|
|
2014-12-23 18:35:58 +03:00
|
|
|
void SetDisplayPort(const CSSRect& aDisplayPort)
|
|
|
|
{
|
|
|
|
mDisplayPort = aDisplayPort;
|
|
|
|
}
|
|
|
|
|
|
|
|
CSSRect GetDisplayPort() const
|
|
|
|
{
|
|
|
|
return mDisplayPort;
|
|
|
|
}
|
|
|
|
|
2014-12-30 22:07:57 +03:00
|
|
|
void SetCriticalDisplayPort(const CSSRect& aCriticalDisplayPort)
|
|
|
|
{
|
|
|
|
mCriticalDisplayPort = aCriticalDisplayPort;
|
|
|
|
}
|
|
|
|
|
|
|
|
CSSRect GetCriticalDisplayPort() const
|
|
|
|
{
|
|
|
|
return mCriticalDisplayPort;
|
|
|
|
}
|
|
|
|
|
2014-12-19 03:33:18 +03:00
|
|
|
void SetCumulativeResolution(const LayoutDeviceToLayerScale& aCumulativeResolution)
|
|
|
|
{
|
|
|
|
mCumulativeResolution = aCumulativeResolution;
|
|
|
|
}
|
|
|
|
|
|
|
|
LayoutDeviceToLayerScale GetCumulativeResolution() const
|
|
|
|
{
|
|
|
|
return mCumulativeResolution;
|
|
|
|
}
|
|
|
|
|
2014-12-18 01:14:05 +03:00
|
|
|
void SetDevPixelsPerCSSPixel(const CSSToLayoutDeviceScale& aDevPixelsPerCSSPixel)
|
|
|
|
{
|
|
|
|
mDevPixelsPerCSSPixel = aDevPixelsPerCSSPixel;
|
|
|
|
}
|
|
|
|
|
|
|
|
CSSToLayoutDeviceScale GetDevPixelsPerCSSPixel() const
|
|
|
|
{
|
|
|
|
return mDevPixelsPerCSSPixel;
|
|
|
|
}
|
|
|
|
|
2014-08-24 03:09:10 +04:00
|
|
|
void SetIsRoot(bool aIsRoot)
|
|
|
|
{
|
|
|
|
mIsRoot = aIsRoot;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool GetIsRoot() const
|
|
|
|
{
|
|
|
|
return mIsRoot;
|
|
|
|
}
|
|
|
|
|
2014-06-26 03:16:27 +04:00
|
|
|
void SetHasScrollgrab(bool aHasScrollgrab)
|
|
|
|
{
|
|
|
|
mHasScrollgrab = aHasScrollgrab;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool GetHasScrollgrab() const
|
|
|
|
{
|
|
|
|
return mHasScrollgrab;
|
|
|
|
}
|
|
|
|
|
2014-03-13 10:34:34 +04:00
|
|
|
void SetScrollOffset(const CSSPoint& aScrollOffset)
|
|
|
|
{
|
|
|
|
mScrollOffset = aScrollOffset;
|
|
|
|
}
|
|
|
|
|
|
|
|
const CSSPoint& GetScrollOffset() const
|
|
|
|
{
|
|
|
|
return mScrollOffset;
|
|
|
|
}
|
|
|
|
|
2014-07-10 22:52:40 +04:00
|
|
|
void SetSmoothScrollOffset(const CSSPoint& aSmoothScrollDestination)
|
|
|
|
{
|
|
|
|
mSmoothScrollOffset = aSmoothScrollDestination;
|
|
|
|
}
|
|
|
|
|
|
|
|
const CSSPoint& GetSmoothScrollOffset() const
|
|
|
|
{
|
|
|
|
return mSmoothScrollOffset;
|
|
|
|
}
|
|
|
|
|
2014-11-10 22:35:11 +03:00
|
|
|
void SetZoom(const CSSToParentLayerScale& aZoom)
|
2014-03-12 20:46:57 +04:00
|
|
|
{
|
|
|
|
mZoom = aZoom;
|
|
|
|
}
|
|
|
|
|
2014-11-10 22:35:11 +03:00
|
|
|
CSSToParentLayerScale GetZoom() const
|
2014-03-12 20:46:57 +04:00
|
|
|
{
|
|
|
|
return mZoom;
|
|
|
|
}
|
|
|
|
|
2014-02-06 02:43:20 +04:00
|
|
|
void SetScrollOffsetUpdated(uint32_t aScrollGeneration)
|
|
|
|
{
|
|
|
|
mUpdateScrollOffset = true;
|
|
|
|
mScrollGeneration = aScrollGeneration;
|
|
|
|
}
|
|
|
|
|
2014-07-10 22:52:40 +04:00
|
|
|
void SetSmoothScrollOffsetUpdated(int32_t aScrollGeneration)
|
|
|
|
{
|
|
|
|
mDoSmoothScroll = true;
|
|
|
|
mScrollGeneration = aScrollGeneration;
|
|
|
|
}
|
|
|
|
|
2014-02-06 02:43:20 +04:00
|
|
|
bool GetScrollOffsetUpdated() const
|
|
|
|
{
|
|
|
|
return mUpdateScrollOffset;
|
|
|
|
}
|
|
|
|
|
2014-07-10 22:52:40 +04:00
|
|
|
bool GetDoSmoothScroll() const
|
|
|
|
{
|
|
|
|
return mDoSmoothScroll;
|
|
|
|
}
|
|
|
|
|
2014-02-06 02:43:20 +04:00
|
|
|
uint32_t GetScrollGeneration() const
|
|
|
|
{
|
|
|
|
return mScrollGeneration;
|
|
|
|
}
|
|
|
|
|
2014-03-22 01:48:08 +04:00
|
|
|
ViewID GetScrollId() const
|
|
|
|
{
|
|
|
|
return mScrollId;
|
|
|
|
}
|
2014-08-11 21:32:51 +04:00
|
|
|
|
|
|
|
void SetScrollId(ViewID scrollId)
|
2014-03-22 01:48:08 +04:00
|
|
|
{
|
|
|
|
mScrollId = scrollId;
|
|
|
|
}
|
2014-03-27 03:24:25 +04:00
|
|
|
|
2014-08-28 06:13:39 +04:00
|
|
|
ViewID GetScrollParentId() const
|
|
|
|
{
|
|
|
|
return mScrollParentId;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetScrollParentId(ViewID aParentId)
|
|
|
|
{
|
|
|
|
mScrollParentId = aParentId;
|
|
|
|
}
|
|
|
|
|
2014-03-27 03:24:25 +04:00
|
|
|
void SetRootCompositionSize(const CSSSize& aRootCompositionSize)
|
|
|
|
{
|
|
|
|
mRootCompositionSize = aRootCompositionSize;
|
|
|
|
}
|
|
|
|
|
|
|
|
const CSSSize& GetRootCompositionSize() const
|
|
|
|
{
|
|
|
|
return mRootCompositionSize;
|
|
|
|
}
|
|
|
|
|
2014-10-24 23:49:38 +04:00
|
|
|
void SetDisplayPortMargins(const ScreenMargin& aDisplayPortMargins)
|
2014-03-27 05:46:24 +04:00
|
|
|
{
|
|
|
|
mDisplayPortMargins = aDisplayPortMargins;
|
|
|
|
}
|
|
|
|
|
2014-10-24 23:49:38 +04:00
|
|
|
const ScreenMargin& GetDisplayPortMargins() const
|
2014-03-27 05:46:24 +04:00
|
|
|
{
|
|
|
|
return mDisplayPortMargins;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetUseDisplayPortMargins()
|
|
|
|
{
|
|
|
|
mUseDisplayPortMargins = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool GetUseDisplayPortMargins() const
|
|
|
|
{
|
|
|
|
return mUseDisplayPortMargins;
|
|
|
|
}
|
|
|
|
|
2014-05-17 03:00:50 +04:00
|
|
|
uint32_t GetPresShellId() const
|
|
|
|
{
|
|
|
|
return mPresShellId;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetPresShellId(uint32_t aPresShellId)
|
|
|
|
{
|
|
|
|
mPresShellId = aPresShellId;
|
|
|
|
}
|
|
|
|
|
2014-08-23 07:18:56 +04:00
|
|
|
void SetViewport(const CSSRect& aViewport)
|
|
|
|
{
|
|
|
|
mViewport = aViewport;
|
|
|
|
}
|
|
|
|
|
|
|
|
const CSSRect& GetViewport() const
|
|
|
|
{
|
|
|
|
return mViewport;
|
|
|
|
}
|
|
|
|
|
2014-10-24 23:49:38 +04:00
|
|
|
void SetExtraResolution(const ScreenToLayerScale& aExtraResolution)
|
|
|
|
{
|
|
|
|
mExtraResolution = aExtraResolution;
|
|
|
|
}
|
|
|
|
|
|
|
|
ScreenToLayerScale GetExtraResolution() const
|
|
|
|
{
|
|
|
|
return mExtraResolution;
|
|
|
|
}
|
|
|
|
|
2014-08-29 16:23:25 +04:00
|
|
|
const gfxRGBA& GetBackgroundColor() const
|
|
|
|
{
|
|
|
|
return mBackgroundColor;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetBackgroundColor(const gfxRGBA& aBackgroundColor)
|
|
|
|
{
|
|
|
|
mBackgroundColor = aBackgroundColor;
|
|
|
|
}
|
|
|
|
|
2014-09-03 20:54:26 +04:00
|
|
|
const nsCString& GetContentDescription() const
|
2014-08-29 16:23:25 +04:00
|
|
|
{
|
2014-09-03 20:54:26 +04:00
|
|
|
return mContentDescription;
|
2014-08-29 16:23:25 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void SetContentDescription(const nsCString& aContentDescription)
|
|
|
|
{
|
2014-09-03 20:54:26 +04:00
|
|
|
mContentDescription = aContentDescription;
|
2014-08-29 16:23:25 +04:00
|
|
|
}
|
|
|
|
|
2014-10-22 21:40:20 +04:00
|
|
|
bool GetMayHaveTouchCaret() const
|
|
|
|
{
|
|
|
|
return mMayHaveTouchCaret;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetMayHaveTouchCaret(bool aMayHaveTouchCaret)
|
|
|
|
{
|
|
|
|
mMayHaveTouchCaret = aMayHaveTouchCaret;
|
|
|
|
}
|
|
|
|
|
2014-10-23 17:10:47 +04:00
|
|
|
bool GetMayHaveTouchListeners() const
|
|
|
|
{
|
|
|
|
return mMayHaveTouchListeners;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetMayHaveTouchListeners(bool aMayHaveTouchListeners)
|
|
|
|
{
|
|
|
|
mMayHaveTouchListeners = aMayHaveTouchListeners;
|
|
|
|
}
|
|
|
|
|
2014-11-18 07:56:18 +03:00
|
|
|
const LayoutDeviceIntSize& GetLineScrollAmount() const
|
|
|
|
{
|
|
|
|
return mLineScrollAmount;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetLineScrollAmount(const LayoutDeviceIntSize& size)
|
|
|
|
{
|
|
|
|
mLineScrollAmount = size;
|
|
|
|
}
|
|
|
|
|
2014-12-27 20:48:27 +03:00
|
|
|
const CSSRect& GetScrollableRect() const
|
|
|
|
{
|
|
|
|
return mScrollableRect;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetScrollableRect(const CSSRect& aScrollableRect)
|
|
|
|
{
|
|
|
|
mScrollableRect = aScrollableRect;
|
|
|
|
}
|
|
|
|
|
2014-01-21 21:33:52 +04:00
|
|
|
private:
|
2015-01-17 00:15:52 +03:00
|
|
|
|
|
|
|
// The pres-shell resolution that has been induced on the document containing
|
|
|
|
// this scroll frame as a result of zooming this scroll frame (whether via
|
|
|
|
// user action, or choosing an initial zoom level on page load). This can
|
|
|
|
// only be different from 1.0 for frames that are zoomable, which currently
|
|
|
|
// is just the root content document's root scroll frame (mIsRoot = true).
|
|
|
|
// This is a plain float rather than a ScaleFactor because in and of itself
|
|
|
|
// it does not convert between any coordinate spaces for which we have names.
|
|
|
|
float mPresShellResolution;
|
|
|
|
|
2014-12-23 18:35:58 +03:00
|
|
|
// The area of a frame's contents that has been painted, relative to
|
|
|
|
// mCompositionBounds.
|
|
|
|
//
|
|
|
|
// Note that this is structured in such a way that it doesn't depend on the
|
|
|
|
// method layout uses to scroll content.
|
|
|
|
//
|
|
|
|
// May be larger or smaller than |mScrollableRect|.
|
|
|
|
//
|
|
|
|
// To pre-render a margin of 100 CSS pixels around the window,
|
|
|
|
// { x = -100, y = - 100,
|
|
|
|
// width = window.innerWidth + 200, height = window.innerHeight + 200 }
|
|
|
|
CSSRect mDisplayPort;
|
|
|
|
|
2014-12-30 22:07:57 +03:00
|
|
|
// If non-empty, the area of a frame's contents that is considered critical
|
|
|
|
// to paint. Area outside of this area (i.e. area inside mDisplayPort, but
|
|
|
|
// outside of mCriticalDisplayPort) is considered low-priority, and may be
|
|
|
|
// painted with lower precision, or not painted at all.
|
|
|
|
//
|
|
|
|
// The same restrictions for mDisplayPort apply here.
|
|
|
|
CSSRect mCriticalDisplayPort;
|
|
|
|
|
2014-12-27 20:48:27 +03:00
|
|
|
// The scrollable bounds of a frame. This is determined by reflow.
|
|
|
|
// Ordinarily the x and y will be 0 and the width and height will be the
|
|
|
|
// size of the element being scrolled. However for RTL pages or elements
|
|
|
|
// the x value may be negative.
|
|
|
|
//
|
|
|
|
// This is relative to the document. It is in the same coordinate space as
|
|
|
|
// |mScrollOffset|, but a different coordinate space than |mViewport| and
|
|
|
|
// |mDisplayPort|. Note also that this coordinate system is understood by
|
|
|
|
// window.scrollTo().
|
|
|
|
//
|
|
|
|
// This is valid on any layer unless it has no content.
|
|
|
|
CSSRect mScrollableRect;
|
|
|
|
|
2014-12-19 03:33:18 +03:00
|
|
|
// The cumulative resolution that the current frame has been painted at.
|
|
|
|
// This is the product of the pres-shell resolutions of the document
|
|
|
|
// containing this scroll frame and its ancestors, and any css-driven
|
|
|
|
// resolution. This information is provided by Gecko at layout/paint time.
|
|
|
|
LayoutDeviceToLayerScale mCumulativeResolution;
|
|
|
|
|
2014-01-21 21:33:52 +04:00
|
|
|
// New fields from now on should be made private and old fields should
|
|
|
|
// be refactored to be private.
|
|
|
|
|
2014-12-18 01:14:05 +03:00
|
|
|
// The conversion factor between CSS pixels and device pixels for this frame.
|
|
|
|
// This can vary based on a variety of things, such as reflowing-zoom. The
|
|
|
|
// conversion factor for device pixels to layers pixels is just the
|
|
|
|
// resolution.
|
|
|
|
CSSToLayoutDeviceScale mDevPixelsPerCSSPixel;
|
|
|
|
|
2014-12-09 13:38:23 +03:00
|
|
|
// Whether or not this frame may have touch or scroll wheel listeners.
|
2014-10-23 17:10:47 +04:00
|
|
|
bool mMayHaveTouchListeners;
|
|
|
|
|
2014-10-22 21:40:20 +04:00
|
|
|
// Whether or not this frame may have a touch caret.
|
|
|
|
bool mMayHaveTouchCaret;
|
|
|
|
|
2014-08-24 03:09:10 +04:00
|
|
|
// Whether or not this is the root scroll frame for the root content document.
|
|
|
|
bool mIsRoot;
|
|
|
|
|
2014-06-26 03:16:27 +04:00
|
|
|
// Whether or not this frame is for an element marked 'scrollgrab'.
|
|
|
|
bool mHasScrollgrab;
|
|
|
|
|
2014-03-22 01:48:08 +04:00
|
|
|
// A unique ID assigned to each scrollable frame.
|
|
|
|
ViewID mScrollId;
|
|
|
|
|
2014-08-28 06:13:39 +04:00
|
|
|
// The ViewID of the scrollable frame to which overscroll should be handed off.
|
|
|
|
ViewID mScrollParentId;
|
|
|
|
|
2014-03-13 10:34:34 +04:00
|
|
|
// The position of the top-left of the CSS viewport, relative to the document
|
|
|
|
// (or the document relative to the viewport, if that helps understand it).
|
|
|
|
//
|
|
|
|
// Thus it is relative to the document. It is in the same coordinate space as
|
|
|
|
// |mScrollableRect|, but a different coordinate space than |mViewport| and
|
|
|
|
// |mDisplayPort|.
|
|
|
|
//
|
|
|
|
// It is required that the rect:
|
|
|
|
// { x = mScrollOffset.x, y = mScrollOffset.y,
|
|
|
|
// width = mCompositionBounds.x / mResolution.scale,
|
|
|
|
// height = mCompositionBounds.y / mResolution.scale }
|
|
|
|
// Be within |mScrollableRect|.
|
|
|
|
//
|
|
|
|
// This is valid for any layer, but is always relative to this frame and
|
|
|
|
// not any parents, regardless of parent transforms.
|
|
|
|
CSSPoint mScrollOffset;
|
|
|
|
|
2014-03-12 20:46:57 +04:00
|
|
|
// The "user zoom". Content is painted by gecko at mResolution * mDevPixelsPerCSSPixel,
|
|
|
|
// but will be drawn to the screen at mZoom. In the steady state, the
|
|
|
|
// two will be the same, but during an async zoom action the two may
|
|
|
|
// diverge. This information is initialized in Gecko but updated in the APZC.
|
2014-11-10 22:35:11 +03:00
|
|
|
CSSToParentLayerScale mZoom;
|
2014-03-12 20:46:57 +04:00
|
|
|
|
2014-02-06 02:43:20 +04:00
|
|
|
// Whether mScrollOffset was updated by something other than the APZ code, and
|
|
|
|
// if the APZC receiving this metrics should update its local copy.
|
|
|
|
bool mUpdateScrollOffset;
|
|
|
|
// The scroll generation counter used to acknowledge the scroll offset update.
|
|
|
|
uint32_t mScrollGeneration;
|
2014-01-23 01:37:57 +04:00
|
|
|
|
2014-07-10 22:52:40 +04:00
|
|
|
// When mDoSmoothScroll, the scroll offset should be animated to
|
|
|
|
// smoothly transition to mScrollOffset rather than be updated instantly.
|
|
|
|
bool mDoSmoothScroll;
|
|
|
|
CSSPoint mSmoothScrollOffset;
|
|
|
|
|
2014-03-27 03:24:25 +04:00
|
|
|
// The size of the root scrollable's composition bounds, but in local CSS pixels.
|
|
|
|
CSSSize mRootCompositionSize;
|
2014-03-27 05:46:24 +04:00
|
|
|
|
|
|
|
// A display port expressed as layer margins that apply to the rect of what
|
|
|
|
// is drawn of the scrollable element.
|
2014-10-24 23:49:38 +04:00
|
|
|
ScreenMargin mDisplayPortMargins;
|
2014-03-27 05:46:24 +04:00
|
|
|
|
|
|
|
// If this is true then we use the display port margins on this metrics,
|
|
|
|
// otherwise use the display port rect.
|
|
|
|
bool mUseDisplayPortMargins;
|
2014-05-17 03:00:50 +04:00
|
|
|
|
|
|
|
uint32_t mPresShellId;
|
2014-08-23 07:18:56 +04:00
|
|
|
|
|
|
|
// The CSS viewport, which is the dimensions we're using to constrain the
|
|
|
|
// <html> element of this frame, relative to the top-left of the layer. Note
|
|
|
|
// that its offset is structured in such a way that it doesn't depend on the
|
|
|
|
// method layout uses to scroll content.
|
|
|
|
//
|
|
|
|
// This is mainly useful on the root layer, however nested iframes can have
|
|
|
|
// their own viewport, which will just be the size of the window of the
|
|
|
|
// iframe. For layers that don't correspond to a document, this metric is
|
|
|
|
// meaningless and invalid.
|
|
|
|
CSSRect mViewport;
|
2014-08-29 16:23:25 +04:00
|
|
|
|
2014-10-24 23:49:38 +04:00
|
|
|
// The extra resolution at which content in this scroll frame is drawn beyond
|
|
|
|
// that necessary to draw one Layer pixel per Screen pixel.
|
|
|
|
ScreenToLayerScale mExtraResolution;
|
|
|
|
|
2014-08-29 16:23:25 +04:00
|
|
|
// The background color to use when overscrolling.
|
|
|
|
gfxRGBA mBackgroundColor;
|
2014-08-29 16:23:25 +04:00
|
|
|
|
|
|
|
// A description of the content element corresponding to this frame.
|
2014-09-03 20:54:26 +04:00
|
|
|
// This is empty unless this is a scrollable layer and the
|
2014-08-29 16:23:25 +04:00
|
|
|
// apz.printtree pref is turned on.
|
2014-09-03 20:54:26 +04:00
|
|
|
nsCString mContentDescription;
|
2014-11-18 07:56:18 +03:00
|
|
|
|
|
|
|
// The value of GetLineScrollAmount(), for scroll frames.
|
|
|
|
LayoutDeviceIntSize mLineScrollAmount;
|
2012-07-31 04:42:26 +04:00
|
|
|
};
|
|
|
|
|
2013-11-13 22:20:31 +04:00
|
|
|
/**
|
|
|
|
* This class allows us to uniquely identify a scrollable layer. The
|
|
|
|
* mLayersId identifies the layer tree (corresponding to a child process
|
|
|
|
* and/or tab) that the scrollable layer belongs to. The mPresShellId
|
|
|
|
* is a temporal identifier (corresponding to the document loaded that
|
|
|
|
* contains the scrollable layer, which may change over time). The
|
|
|
|
* mScrollId corresponds to the actual frame that is scrollable.
|
|
|
|
*/
|
|
|
|
struct ScrollableLayerGuid {
|
|
|
|
uint64_t mLayersId;
|
|
|
|
uint32_t mPresShellId;
|
|
|
|
FrameMetrics::ViewID mScrollId;
|
|
|
|
|
|
|
|
ScrollableLayerGuid()
|
|
|
|
: mLayersId(0)
|
|
|
|
, mPresShellId(0)
|
|
|
|
, mScrollId(0)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
ScrollableLayerGuid(uint64_t aLayersId, uint32_t aPresShellId,
|
|
|
|
FrameMetrics::ViewID aScrollId)
|
|
|
|
: mLayersId(aLayersId)
|
|
|
|
, mPresShellId(aPresShellId)
|
|
|
|
, mScrollId(aScrollId)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
ScrollableLayerGuid(uint64_t aLayersId, const FrameMetrics& aMetrics)
|
|
|
|
: mLayersId(aLayersId)
|
2014-05-17 03:00:50 +04:00
|
|
|
, mPresShellId(aMetrics.GetPresShellId())
|
2014-03-22 01:48:08 +04:00
|
|
|
, mScrollId(aMetrics.GetScrollId())
|
2013-11-13 22:20:31 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-08-11 21:32:51 +04:00
|
|
|
ScrollableLayerGuid(const ScrollableLayerGuid& other)
|
|
|
|
: mLayersId(other.mLayersId)
|
|
|
|
, mPresShellId(other.mPresShellId)
|
|
|
|
, mScrollId(other.mScrollId)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-11-13 22:20:31 +04:00
|
|
|
~ScrollableLayerGuid()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool operator==(const ScrollableLayerGuid& other) const
|
|
|
|
{
|
|
|
|
return mLayersId == other.mLayersId
|
|
|
|
&& mPresShellId == other.mPresShellId
|
|
|
|
&& mScrollId == other.mScrollId;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool operator!=(const ScrollableLayerGuid& other) const
|
|
|
|
{
|
|
|
|
return !(*this == other);
|
|
|
|
}
|
2014-08-20 05:17:08 +04:00
|
|
|
|
|
|
|
bool operator<(const ScrollableLayerGuid& other) const
|
|
|
|
{
|
|
|
|
if (mLayersId < other.mLayersId) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (mLayersId == other.mLayersId) {
|
|
|
|
if (mPresShellId < other.mPresShellId) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (mPresShellId == other.mPresShellId) {
|
|
|
|
return mScrollId < other.mScrollId;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
2013-11-13 22:20:31 +04:00
|
|
|
};
|
|
|
|
|
2014-01-23 03:44:59 +04:00
|
|
|
template <int LogLevel>
|
|
|
|
gfx::Log<LogLevel>& operator<<(gfx::Log<LogLevel>& log, const ScrollableLayerGuid& aGuid) {
|
|
|
|
return log << '(' << aGuid.mLayersId << ',' << aGuid.mPresShellId << ',' << aGuid.mScrollId << ')';
|
|
|
|
}
|
|
|
|
|
2014-01-06 22:26:44 +04:00
|
|
|
struct ZoomConstraints {
|
|
|
|
bool mAllowZoom;
|
2014-02-25 04:22:45 +04:00
|
|
|
bool mAllowDoubleTapZoom;
|
2014-11-10 22:35:11 +03:00
|
|
|
CSSToParentLayerScale mMinZoom;
|
|
|
|
CSSToParentLayerScale mMaxZoom;
|
2014-01-06 22:26:44 +04:00
|
|
|
|
|
|
|
ZoomConstraints()
|
|
|
|
: mAllowZoom(true)
|
2014-02-25 04:22:45 +04:00
|
|
|
, mAllowDoubleTapZoom(true)
|
2014-01-06 22:26:44 +04:00
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(ZoomConstraints);
|
|
|
|
}
|
|
|
|
|
|
|
|
ZoomConstraints(bool aAllowZoom,
|
2014-02-25 04:22:45 +04:00
|
|
|
bool aAllowDoubleTapZoom,
|
2014-11-10 22:35:11 +03:00
|
|
|
const CSSToParentLayerScale& aMinZoom,
|
|
|
|
const CSSToParentLayerScale& aMaxZoom)
|
2014-01-06 22:26:44 +04:00
|
|
|
: mAllowZoom(aAllowZoom)
|
2014-02-25 04:22:45 +04:00
|
|
|
, mAllowDoubleTapZoom(aAllowDoubleTapZoom)
|
2014-01-06 22:26:44 +04:00
|
|
|
, mMinZoom(aMinZoom)
|
|
|
|
, mMaxZoom(aMaxZoom)
|
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(ZoomConstraints);
|
|
|
|
}
|
|
|
|
|
2014-08-11 20:35:17 +04:00
|
|
|
ZoomConstraints(const ZoomConstraints& other)
|
|
|
|
: mAllowZoom(other.mAllowZoom)
|
|
|
|
, mAllowDoubleTapZoom(other.mAllowDoubleTapZoom)
|
|
|
|
, mMinZoom(other.mMinZoom)
|
|
|
|
, mMaxZoom(other.mMaxZoom)
|
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(ZoomConstraints);
|
|
|
|
}
|
|
|
|
|
2014-01-06 22:26:44 +04:00
|
|
|
~ZoomConstraints()
|
|
|
|
{
|
|
|
|
MOZ_COUNT_DTOR(ZoomConstraints);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool operator==(const ZoomConstraints& other) const
|
|
|
|
{
|
|
|
|
return mAllowZoom == other.mAllowZoom
|
2014-02-25 04:22:45 +04:00
|
|
|
&& mAllowDoubleTapZoom == other.mAllowDoubleTapZoom
|
2014-01-06 22:26:44 +04:00
|
|
|
&& mMinZoom == other.mMinZoom
|
|
|
|
&& mMaxZoom == other.mMaxZoom;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool operator!=(const ZoomConstraints& other) const
|
|
|
|
{
|
|
|
|
return !(*this == other);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2012-07-31 04:42:26 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* GFX_FRAMEMETRICS_H */
|