Bug 1568876 - Make copyRule in the ChangesView fission compatible. r=rcaliman
[gecko.git] / gfx / layers / LayersTypes.cpp
blob857b6f2f9bca050f9d9c0fbb44d77c8d8f827a68
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "LayersTypes.h"
9 namespace mozilla {
10 namespace layers {
12 EventRegions::EventRegions(const nsIntRegion& aHitRegion,
13 const nsIntRegion& aMaybeHitRegion,
14 const nsIntRegion& aDispatchToContentRegion,
15 const nsIntRegion& aNoActionRegion,
16 const nsIntRegion& aHorizontalPanRegion,
17 const nsIntRegion& aVerticalPanRegion,
18 bool aDTCRequiresTargetConfirmation) {
19 mHitRegion = aHitRegion;
20 mNoActionRegion = aNoActionRegion;
21 mHorizontalPanRegion = aHorizontalPanRegion;
22 mVerticalPanRegion = aVerticalPanRegion;
23 // Points whose hit-region status we're not sure about need to be dispatched
24 // to the content thread. If a point is in both maybeHitRegion and hitRegion
25 // then it's not a "maybe" any more, and doesn't go into the dispatch-to-
26 // content region.
27 mDispatchToContentHitRegion.Sub(aMaybeHitRegion, mHitRegion);
28 mDispatchToContentHitRegion.OrWith(aDispatchToContentRegion);
29 mHitRegion.OrWith(aMaybeHitRegion);
30 mDTCRequiresTargetConfirmation = aDTCRequiresTargetConfirmation;
33 } // namespace layers
34 } // namespace mozilla