Bug 1355836 - Improve logging in PositionedEventTargeting slightly. r=snorp

Differential Revision: https://phabricator.services.mozilla.com/D64654

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kartikaya Gupta 2020-02-27 21:58:38 +00:00
parent 466993fb8f
commit 7221dbbf38

View File

@ -376,12 +376,13 @@ static nsIFrame* GetClosest(
nsRegion exposedRegion(aTargetRect);
for (uint32_t i = 0; i < aCandidates.Length(); ++i) {
nsIFrame* f = aCandidates[i];
PET_LOG("Checking candidate %p\n", f);
bool preservesAxisAlignedRectangles = false;
nsRect borderBox = nsLayoutUtils::TransformFrameRectToAncestor(
f, nsRect(nsPoint(0, 0), f->GetSize()), aRoot,
&preservesAxisAlignedRectangles);
PET_LOG("Checking candidate %p with border box %s\n", f,
mozilla::layers::Stringify(borderBox).c_str());
nsRegion region;
region.And(exposedRegion, borderBox);
if (region.IsEmpty()) {