зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1306603 - Remove APZ code that uses the mozpasspointerevents update region. r=kanru
MozReview-Commit-ID: L8QQkoSjFTu
This commit is contained in:
Родитель
d31503d9d3
Коммит
2478ce37cb
|
@ -548,7 +548,6 @@ TabChild::TabChild(nsIContentChild* aManager,
|
|||
, mParentIsActive(false)
|
||||
, mDidSetRealShowInfo(false)
|
||||
, mDidLoadURLInit(false)
|
||||
, mAPZChild(nullptr)
|
||||
, mLayerObserverEpoch(0)
|
||||
#if defined(XP_WIN) && defined(ACCESSIBILITY)
|
||||
, mNativeWindowHandle(0)
|
||||
|
@ -3012,9 +3011,6 @@ void
|
|||
TabChild::UpdateHitRegion(const nsRegion& aRegion)
|
||||
{
|
||||
mRemoteFrame->SendUpdateHitRegion(aRegion);
|
||||
if (mAPZChild) {
|
||||
mAPZChild->SendUpdateHitRegion(aRegion);
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -651,11 +651,6 @@ public:
|
|||
const CSSRect& aRect,
|
||||
const uint32_t& aFlags);
|
||||
|
||||
void SetAPZChild(layers::APZChild* aAPZChild)
|
||||
{
|
||||
mAPZChild = aAPZChild;
|
||||
}
|
||||
|
||||
// Request that the docshell be marked as active.
|
||||
void ForcePaint(uint64_t aLayerObserverEpoch);
|
||||
|
||||
|
|
|
@ -107,23 +107,6 @@ public:
|
|||
*/
|
||||
virtual void DispatchToRepaintThread(already_AddRefed<Runnable> aTask) = 0;
|
||||
|
||||
/**
|
||||
* APZ uses |FrameMetrics::mCompositionBounds| for hit testing. Sometimes,
|
||||
* widget code has knowledge of a touch-sensitive region that should
|
||||
* additionally constrain hit testing for all frames associated with the
|
||||
* controller. This method allows APZ to query the controller for such a
|
||||
* region. A return value of true indicates that the controller has such a
|
||||
* region, and it is returned in |aOutRegion|.
|
||||
* This method needs to be called on the main thread.
|
||||
* TODO: once bug 928833 is implemented, this should be removed, as
|
||||
* APZ can then get the correct touch-sensitive region for each frame
|
||||
* directly from the layer.
|
||||
*/
|
||||
virtual bool GetTouchSensitiveRegion(CSSRect* aOutRegion)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
enum class APZStateChange {
|
||||
/**
|
||||
* APZ started modifying the view (including panning, zooming, and fling).
|
||||
|
|
|
@ -223,30 +223,6 @@ ComputeClipRegion(GeckoContentController* aController,
|
|||
clipRegion = RoundedToInt(aLayer.Metrics().GetCompositionBounds());
|
||||
}
|
||||
|
||||
// Optionally, the GeckoContentController can provide a touch-sensitive
|
||||
// region that constrains all frames associated with the controller.
|
||||
// In this case we intersect the composition bounds with that region.
|
||||
CSSRect touchSensitiveRegion;
|
||||
if (aController->GetTouchSensitiveRegion(&touchSensitiveRegion)) {
|
||||
// Here we assume 'touchSensitiveRegion' is in the CSS pixels of the
|
||||
// parent frame. To convert it to ParentLayer pixels, we therefore need
|
||||
// the cumulative resolution of the parent frame. We approximate this as
|
||||
// the quotient of our cumulative resolution and our pres shell resolution;
|
||||
// this approximation may not be accurate in the presence of a css-driven
|
||||
// resolution.
|
||||
LayoutDeviceToParentLayerScale2D parentCumulativeResolution =
|
||||
aLayer.Metrics().GetCumulativeResolution()
|
||||
/ ParentLayerToLayerScale(aLayer.Metrics().GetPresShellResolution());
|
||||
// Not sure what rounding option is the most correct here, but if we ever
|
||||
// figure it out we can change this. For now I'm rounding in to minimize
|
||||
// the chances of getting a complex region.
|
||||
ParentLayerIntRegion extraClip = RoundedIn(
|
||||
touchSensitiveRegion
|
||||
* aLayer.Metrics().GetDevPixelsPerCSSPixel()
|
||||
* parentCumulativeResolution);
|
||||
clipRegion.AndWith(extraClip);
|
||||
}
|
||||
|
||||
return clipRegion;
|
||||
}
|
||||
|
||||
|
|
|
@ -99,8 +99,6 @@ ContentProcessController::~ContentProcessController()
|
|||
if (mObserver) {
|
||||
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
|
||||
os->RemoveObserver(mObserver, "tab-child-created");
|
||||
} else if (mBrowser) {
|
||||
mBrowser->SetAPZChild(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,8 +46,6 @@ sync protocol PAPZ
|
|||
|
||||
parent:
|
||||
|
||||
async UpdateHitRegion(nsRegion aRegion);
|
||||
|
||||
async __delete__();
|
||||
|
||||
child:
|
||||
|
|
|
@ -30,7 +30,6 @@ using namespace mozilla::gfx;
|
|||
RemoteContentController::RemoteContentController()
|
||||
: mCompositorThread(MessageLoop::current())
|
||||
, mCanSend(true)
|
||||
, mMutex("RemoteContentController")
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -160,18 +159,6 @@ RemoteContentController::DispatchToRepaintThread(already_AddRefed<Runnable> aTas
|
|||
mCompositorThread->PostTask(Move(aTask));
|
||||
}
|
||||
|
||||
bool
|
||||
RemoteContentController::GetTouchSensitiveRegion(CSSRect* aOutRegion)
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
if (mTouchSensitiveRegion.IsEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
*aOutRegion = CSSRect::FromAppUnits(mTouchSensitiveRegion.GetBounds());
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
RemoteContentController::NotifyAPZStateChange(const ScrollableLayerGuid& aGuid,
|
||||
APZStateChange aChange,
|
||||
|
@ -264,14 +251,6 @@ RemoteContentController::NotifyFlushComplete()
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
RemoteContentController::RecvUpdateHitRegion(const nsRegion& aRegion)
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
mTouchSensitiveRegion = aRegion;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
RemoteContentController::ActorDestroy(ActorDestroyReason aWhy)
|
||||
{
|
||||
|
|
|
@ -59,8 +59,6 @@ public:
|
|||
|
||||
virtual void DispatchToRepaintThread(already_AddRefed<Runnable> aTask) override;
|
||||
|
||||
virtual bool GetTouchSensitiveRegion(CSSRect* aOutRegion) override;
|
||||
|
||||
virtual void NotifyAPZStateChange(const ScrollableLayerGuid& aGuid,
|
||||
APZStateChange aChange,
|
||||
int aArg) override;
|
||||
|
@ -76,8 +74,6 @@ public:
|
|||
|
||||
virtual void NotifyFlushComplete() override;
|
||||
|
||||
virtual bool RecvUpdateHitRegion(const nsRegion& aRegion) override;
|
||||
|
||||
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
|
||||
virtual void Destroy() override;
|
||||
|
@ -91,10 +87,6 @@ private:
|
|||
Modifiers aModifiers,
|
||||
const ScrollableLayerGuid& aGuid,
|
||||
uint64_t aInputBlockId);
|
||||
|
||||
// Mutex protecting members below accessed from multiple threads.
|
||||
mozilla::Mutex mMutex;
|
||||
nsRegion mTouchSensitiveRegion;
|
||||
};
|
||||
|
||||
} // namespace layers
|
||||
|
|
Загрузка…
Ссылка в новой задаче