зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1001582 - HasScrollgrab transitioned from private to public member, getter/setter added. r=kats
This commit is contained in:
Родитель
2b6f358c9a
Коммит
fa8357c97b
|
@ -354,10 +354,17 @@ public:
|
|||
// Whether or not this is the root scroll frame for the root content document.
|
||||
bool mIsRoot;
|
||||
|
||||
// Whether or not this frame is for an element marked 'scrollgrab'.
|
||||
bool mHasScrollgrab;
|
||||
|
||||
public:
|
||||
void SetHasScrollgrab(bool aHasScrollgrab)
|
||||
{
|
||||
mHasScrollgrab = aHasScrollgrab;
|
||||
}
|
||||
|
||||
bool GetHasScrollgrab() const
|
||||
{
|
||||
return mHasScrollgrab;
|
||||
}
|
||||
|
||||
void SetScrollOffset(const CSSPoint& aScrollOffset)
|
||||
{
|
||||
mScrollOffset = aScrollOffset;
|
||||
|
@ -460,6 +467,9 @@ private:
|
|||
// New fields from now on should be made private and old fields should
|
||||
// be refactored to be private.
|
||||
|
||||
// Whether or not this frame is for an element marked 'scrollgrab'.
|
||||
bool mHasScrollgrab;
|
||||
|
||||
// A unique ID assigned to each scrollable frame.
|
||||
ViewID mScrollId;
|
||||
|
||||
|
|
|
@ -2291,7 +2291,7 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aLayerMetri
|
|||
mFrameMetrics.SetRootCompositionSize(aLayerMetrics.GetRootCompositionSize());
|
||||
mFrameMetrics.mResolution = aLayerMetrics.mResolution;
|
||||
mFrameMetrics.mCumulativeResolution = aLayerMetrics.mCumulativeResolution;
|
||||
mFrameMetrics.mHasScrollgrab = aLayerMetrics.mHasScrollgrab;
|
||||
mFrameMetrics.SetHasScrollgrab(aLayerMetrics.GetHasScrollgrab());
|
||||
|
||||
if (scrollOffsetUpdated) {
|
||||
APZC_LOG("%p updating scroll offset from (%f, %f) to (%f, %f)\n", this,
|
||||
|
|
|
@ -316,7 +316,7 @@ public:
|
|||
* Returns whether this APZC is for an element marked with the 'scrollgrab'
|
||||
* attribute.
|
||||
*/
|
||||
bool HasScrollgrab() const { return mFrameMetrics.mHasScrollgrab; }
|
||||
bool HasScrollgrab() const { return mFrameMetrics.GetHasScrollgrab(); }
|
||||
|
||||
/**
|
||||
* Returns whether this APZC has room to be panned (in any direction).
|
||||
|
|
|
@ -813,7 +813,7 @@ static void RecordFrameMetrics(nsIFrame* aForFrame,
|
|||
// in the FrameMetrics so APZ knows to provide the scroll grabbing
|
||||
// behaviour.
|
||||
if (aScrollFrame && nsContentUtils::HasScrollgrab(aScrollFrame->GetContent())) {
|
||||
metrics.mHasScrollgrab = true;
|
||||
metrics.SetHasScrollgrab(true);
|
||||
}
|
||||
|
||||
aRoot->SetFrameMetrics(metrics);
|
||||
|
|
Загрузка…
Ссылка в новой задаче