Bug 1219352 - Update a couple of bool-setters to take a bool argument. r?botond
--- a/gfx/layers/FrameMetrics.h
+++ b/gfx/layers/FrameMetrics.h
@@ -406,19 +406,19 @@ public:
mDisplayPortMargins = aDisplayPortMargins;
}
const ScreenMargin& GetDisplayPortMargins() const
{
return mDisplayPortMargins;
}
- void SetUseDisplayPortMargins()
+ void SetUseDisplayPortMargins(bool aValue)
{
- mUseDisplayPortMargins = true;
+ mUseDisplayPortMargins = aValue;
}
bool GetUseDisplayPortMargins() const
{
return mUseDisplayPortMargins;
}
uint32_t GetPresShellId() const
@@ -501,19 +501,19 @@ public:
mScrollableRect = aScrollableRect;
}
bool AllowVerticalScrollWithWheel() const
{
return mAllowVerticalScrollWithWheel;
}
- void SetAllowVerticalScrollWithWheel()
+ void SetAllowVerticalScrollWithWheel(bool aValue)
{
- mAllowVerticalScrollWithWheel = true;
+ mAllowVerticalScrollWithWheel = aValue;
}
void SetClipRect(const Maybe<ParentLayerIntRect>& aClipRect)
{
mClipRect = aClipRect;
}
const Maybe<ParentLayerIntRect>& GetClipRect() const
{
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -2800,17 +2800,17 @@ int32_t AsyncPanZoomController::GetLastT
}
void AsyncPanZoomController::RequestContentRepaint() {
RequestContentRepaint(mFrameMetrics);
}
void AsyncPanZoomController::RequestContentRepaint(FrameMetrics& aFrameMetrics) {
aFrameMetrics.SetDisplayPortMargins(CalculatePendingDisplayPort(aFrameMetrics, GetVelocityVector()));
- aFrameMetrics.SetUseDisplayPortMargins();
+ aFrameMetrics.SetUseDisplayPortMargins(true);
// If we're trying to paint what we already think is painted, discard this
// request since it's a pointless paint.
ScreenMargin marginDelta = (mLastPaintRequestMetrics.GetDisplayPortMargins()
- aFrameMetrics.GetDisplayPortMargins());
if (fabsf(marginDelta.left) < EPSILON &&
fabsf(marginDelta.top) < EPSILON &&
fabsf(marginDelta.right) < EPSILON &&
@@ -3394,17 +3394,17 @@ void AsyncPanZoomController::ZoomToRect(
if (aRect.y < 0.0f) {
aRect.y = 0.0f;
}
}
endZoomToMetrics.SetScrollOffset(aRect.TopLeft());
endZoomToMetrics.SetDisplayPortMargins(
CalculatePendingDisplayPort(endZoomToMetrics, ParentLayerPoint(0,0)));
- endZoomToMetrics.SetUseDisplayPortMargins();
+ endZoomToMetrics.SetUseDisplayPortMargins(true);
StartAnimation(new ZoomAnimation(
mFrameMetrics.GetScrollOffset(),
mFrameMetrics.GetZoom(),
endZoomToMetrics.GetScrollOffset(),
endZoomToMetrics.GetZoom()));
// Schedule a repaint now, so the new displayport will be painted before the
--- a/gfx/layers/apz/test/gtest/TestAsyncPanZoomController.cpp
+++ b/gfx/layers/apz/test/gtest/TestAsyncPanZoomController.cpp
@@ -2077,17 +2077,17 @@ protected:
metrics.SetIsLayersIdRoot(true);
}
IntRect layerBound = aLayer->GetVisibleRegion().ToUnknownRegion().GetBounds();
metrics.SetCompositionBounds(ParentLayerRect(layerBound.x, layerBound.y,
layerBound.width, layerBound.height));
metrics.SetScrollableRect(aScrollableRect);
metrics.SetScrollOffset(CSSPoint(0, 0));
metrics.SetPageScrollAmount(LayoutDeviceIntSize(50, 100));
- metrics.SetAllowVerticalScrollWithWheel();
+ metrics.SetAllowVerticalScrollWithWheel(true);
aLayer->SetFrameMetrics(metrics);
aLayer->SetClipRect(Some(ViewAs<ParentLayerPixel>(layerBound)));
if (!aScrollableRect.IsEqualEdges(CSSRect(-1, -1, -1, -1))) {
// The purpose of this is to roughly mimic what layout would do in the
// case of a scrollable frame with the event regions and clip. This lets
// us exercise the hit-testing code in APZCTreeManager
EventRegions er = aLayer->GetEventRegions();
IntRect scrollRect = RoundedToInt(aScrollableRect * metrics.LayersPixelsPerCSSPixel()).ToUnknownRect();
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -8538,17 +8538,17 @@ nsLayoutUtils::ComputeFrameMetrics(nsIFr
nsSize pageScrollAmount = scrollableFrame->GetPageScrollAmount();
LayoutDeviceIntSize pageScrollAmountInDevPixels =
LayoutDeviceIntSize::FromAppUnitsRounded(pageScrollAmount, presContext->AppUnitsPerDevPixel());
metrics.SetPageScrollAmount(pageScrollAmountInDevPixels);
if (!aScrollFrame->GetParent() ||
EventStateManager::CanVerticallyScrollFrameWithWheel(aScrollFrame->GetParent()))
{
- metrics.SetAllowVerticalScrollWithWheel();
+ metrics.SetAllowVerticalScrollWithWheel(true);
}
metrics.SetUsesContainerScrolling(scrollableFrame->UsesContainerScrolling());
}
// If we have the scrollparent being the same as the scroll id, the
// compositor-side code could get into an infinite loop while building the
// overscroll handoff chain.