mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 00:55:37 +00:00
85fd233d34
There were a couple of problems when delivering tap gestures to content with full zoom applied. One was that the ConverToGecko function converted the coords into "CSS pixel" space by using the web content's CSS-to-LD scale, but also applied that on the translation from the chrome area. Moving that conversion to later in the process (after the coords got passed through TabParent:: AdjustTapToChildWidget) corrected that issue. The other problem was that bits of code in APZEventState and APZCCallbackHelper were using the widget->GetDefaultScale() value as the CSS-to-LD scale, but that omitted the full zoom value. Getting the CSS-to-LD scale from the presShell and propagating that through corrected that issue. MozReview-Commit-ID: KdrkdEZslHo
63 lines
1.7 KiB
C++
63 lines
1.7 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set sw=4 ts=8 et tw=80 : */
|
|
/* 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 mozilla_layers_APZChild_h
|
|
#define mozilla_layers_APZChild_h
|
|
|
|
#include "mozilla/layers/PAPZChild.h"
|
|
|
|
class nsIObserver;
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
class TabChild;
|
|
} // namespace dom
|
|
|
|
namespace layers {
|
|
|
|
class APZChild final : public PAPZChild
|
|
{
|
|
public:
|
|
static APZChild* Create(const dom::TabId& aTabId);
|
|
|
|
~APZChild();
|
|
|
|
virtual bool RecvUpdateFrame(const FrameMetrics& frame) override;
|
|
|
|
virtual bool RecvHandleTap(const TapType& aType,
|
|
const LayoutDevicePoint& aPoint,
|
|
const Modifiers& aModifiers,
|
|
const ScrollableLayerGuid& aGuid,
|
|
const uint64_t& aInputBlockId,
|
|
const bool& aCallTakeFocusForClickFromTap) override;
|
|
|
|
virtual bool RecvNotifyAPZStateChange(const ViewID& aViewId,
|
|
const APZStateChange& aChange,
|
|
const int& aArg) override;
|
|
|
|
virtual bool RecvNotifyFlushComplete() override;
|
|
|
|
virtual bool RecvDestroy() override;
|
|
|
|
void SetBrowser(dom::TabChild* aBrowser);
|
|
|
|
private:
|
|
APZChild();
|
|
|
|
void SetObserver(nsIObserver* aObserver);
|
|
|
|
RefPtr<dom::TabChild> mBrowser;
|
|
RefPtr<nsIObserver> mObserver;
|
|
bool mDestroyed;
|
|
};
|
|
|
|
} // namespace layers
|
|
|
|
} // namespace mozilla
|
|
|
|
#endif // mozilla_layers_APZChild_h
|