mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1267438 - Use the layer's scrolled clip during compositor hit testing. r=mstange
MozReview-Commit-ID: 2nodwaZHeWZ --HG-- extra : rebase_source : 4a61e20fa5ea6de457132aa7e06c27e48286f28c extra : source : 6618e805fce8e1b45241783d8ba3b5bec5ad182a extra : histedit_source : 4b27d55d0f26de7a13ef741feef9df6f8e6c4f13
This commit is contained in:
parent
771407a83d
commit
29ef36444d
@ -372,10 +372,14 @@ public:
|
||||
|
||||
Maybe<ParentLayerIntRect> result;
|
||||
|
||||
// The layer can have a clip rect, which is considered to apply
|
||||
// only to the bottommost LayerMetrics.
|
||||
// The layer can have a clip rect and a scrolled clip, which are considered
|
||||
// to apply only to the bottommost LayerMetricsWrapper.
|
||||
// TODO: These actually apply in a different coordinate space than the
|
||||
// scroll clip of the bottommost metrics, so we shouldn't be intersecting
|
||||
// them with the scroll clip; bug 1269537 tracks fixing this.
|
||||
if (AtBottomLayer()) {
|
||||
result = mLayer->GetClipRect();
|
||||
result = IntersectMaybeRects(result, mLayer->GetScrolledClipRect());
|
||||
}
|
||||
|
||||
// The scroll metadata can have a clip rect as well.
|
||||
|
@ -851,6 +851,12 @@ Layer::CalculateScissorRect(const RenderTargetIntRect& aCurrentScissorRect)
|
||||
return currentClip.Intersect(scissor);
|
||||
}
|
||||
|
||||
Maybe<ParentLayerIntRect>
|
||||
Layer::GetScrolledClipRect() const
|
||||
{
|
||||
return mScrolledClip ? Some(mScrolledClip->GetClipRect()) : Nothing();
|
||||
}
|
||||
|
||||
const ScrollMetadata&
|
||||
Layer::GetScrollMetadata(uint32_t aIndex) const
|
||||
{
|
||||
|
@ -1302,6 +1302,7 @@ public:
|
||||
gfx::CompositionOp GetMixBlendMode() const { return mMixBlendMode; }
|
||||
const Maybe<ParentLayerIntRect>& GetClipRect() const { return mClipRect; }
|
||||
const Maybe<LayerClip>& GetScrolledClip() const { return mScrolledClip; }
|
||||
Maybe<ParentLayerIntRect> GetScrolledClipRect() const;
|
||||
uint32_t GetContentFlags() { return mContentFlags; }
|
||||
const gfx::IntRect& GetLayerBounds() const { return mLayerBounds; }
|
||||
const LayerIntRegion& GetVisibleRegion() const { return mVisibleRegion; }
|
||||
|
Loading…
Reference in New Issue
Block a user