Skip to content

Commit

Permalink
Bug 1556556 - Remove APZCCallbackHelper::ApplyCallbackTransform(). r=…
Browse files Browse the repository at this point in the history
…kats

It has no more callers.

Differential Revision: https://phabricator.services.mozilla.com/D68276
  • Loading branch information
theres-waldo committed Apr 28, 2020
1 parent f9e919a commit 09e7b83
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
27 changes: 0 additions & 27 deletions gfx/layers/apz/util/APZCCallbackHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,33 +483,6 @@ mozilla::CSSToCSSMatrix4x4 APZCCallbackHelper::GetCallbackTransform(
.PostTranslate(transform.x, transform.y, 0);
}

CSSPoint APZCCallbackHelper::ApplyCallbackTransform(
const CSSPoint& aInput, const ScrollableLayerGuid& aGuid) {
return GetCallbackTransform(aGuid).TransformPoint(aInput);
}

LayoutDeviceIntPoint APZCCallbackHelper::ApplyCallbackTransform(
const LayoutDeviceIntPoint& aPoint, const ScrollableLayerGuid& aGuid,
const CSSToLayoutDeviceScale& aScale) {
LayoutDevicePoint point = LayoutDevicePoint(aPoint.x, aPoint.y);
point = ApplyCallbackTransform(point / aScale, aGuid) * aScale;
return LayoutDeviceIntPoint::Round(point);
}

void APZCCallbackHelper::ApplyCallbackTransform(
WidgetEvent& aEvent, const ScrollableLayerGuid& aGuid,
const CSSToLayoutDeviceScale& aScale) {
if (aEvent.AsTouchEvent()) {
WidgetTouchEvent& event = *(aEvent.AsTouchEvent());
for (size_t i = 0; i < event.mTouches.Length(); i++) {
event.mTouches[i]->mRefPoint =
ApplyCallbackTransform(event.mTouches[i]->mRefPoint, aGuid, aScale);
}
} else {
aEvent.mRefPoint = ApplyCallbackTransform(aEvent.mRefPoint, aGuid, aScale);
}
}

nsEventStatus APZCCallbackHelper::DispatchWidgetEvent(WidgetGUIEvent& aEvent) {
nsEventStatus status = nsEventStatus_eConsumeNoDefault;
if (aEvent.mWidget) {
Expand Down
17 changes: 0 additions & 17 deletions gfx/layers/apz/util/APZCCallbackHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,6 @@ class APZCCallbackHelper {
static CSSToCSSMatrix4x4 GetCallbackTransform(
const ScrollableLayerGuid& aGuid);

/* Apply |GetCallbackTransform()| to |aInput| and return the result. */
static CSSPoint ApplyCallbackTransform(const CSSPoint& aInput,
const ScrollableLayerGuid& aGuid);

/* Same as above, but operates on LayoutDeviceIntPoint.
Requires an additonal |aScale| parameter to convert between CSS and
LayoutDevice space. */
static mozilla::LayoutDeviceIntPoint ApplyCallbackTransform(
const LayoutDeviceIntPoint& aPoint, const ScrollableLayerGuid& aGuid,
const CSSToLayoutDeviceScale& aScale);

/* Convenience function for applying a callback transform to all refpoints
* in the input event. */
static void ApplyCallbackTransform(WidgetEvent& aEvent,
const ScrollableLayerGuid& aGuid,
const CSSToLayoutDeviceScale& aScale);

/* Dispatch a widget event via the widget stored in the event, if any.
* In a child process, allows the BrowserParent event-capture mechanism to
* intercept the event. */
Expand Down

0 comments on commit 09e7b83

Please sign in to comment.