diff --git a/layout/generic/ScrollAnchorContainer.cpp b/layout/generic/ScrollAnchorContainer.cpp index 6bf88a8b6063..eb8ec4c90fb0 100644 --- a/layout/generic/ScrollAnchorContainer.cpp +++ b/layout/generic/ScrollAnchorContainer.cpp @@ -303,7 +303,8 @@ void ScrollAnchorContainer::SelectAnchor() { // Calculate the position to use for scroll adjustments if (mAnchorNode) { mLastAnchorOffset = FindScrollAnchoringBoundingOffset(Frame(), mAnchorNode); - ANCHOR_LOG("Using last anchor offset = %d.\n", mLastAnchorOffset); + ANCHOR_LOG("Using last anchor offset = %s.\n", + ToString(CSSPixel::FromAppUnits(mLastAnchorOffset)).c_str()); } else { mLastAnchorOffset = 0; } @@ -496,7 +497,9 @@ void ScrollAnchorContainer::ApplyAdjustments() { nscoord logicalAdjustment = current - mLastAnchorOffset; WritingMode writingMode = Frame()->GetWritingMode(); - ANCHOR_LOG("Anchor has moved from %d to %d.\n", mLastAnchorOffset, current); + ANCHOR_LOG("Anchor has moved from %s to %s.\n", + ToString(CSSPixel::FromAppUnits(mLastAnchorOffset)).c_str(), + ToString(CSSPixel::FromAppUnits(current)).c_str()); auto maybeInvalidate = MakeScopeExit([&] { if (mAnchorMightBeSubOptimal && @@ -521,8 +524,9 @@ void ScrollAnchorContainer::ApplyAdjustments() { return; } - ANCHOR_LOG("Applying anchor adjustment of %d in %s with anchor %p.\n", - logicalAdjustment, ToString(writingMode).c_str(), mAnchorNode); + ANCHOR_LOG("Applying anchor adjustment of %s in %s with anchor %p.\n", + ToString(CSSPixel::FromAppUnits(logicalAdjustment)).c_str(), + ToString(writingMode).c_str(), mAnchorNode); AdjustmentMade(logicalAdjustment); @@ -656,8 +660,7 @@ ScrollAnchorContainer::ExamineAnchorCandidate(nsIFrame* aFrame) const { // Find the scroll anchoring bounding rect. nsRect rect = FindScrollAnchoringBoundingRect(Frame(), aFrame); - ANCHOR_LOG("\t\trect = [%d %d x %d %d].\n", rect.x, rect.y, rect.width, - rect.height); + ANCHOR_LOG("\t\trect = %s.\n", ToString(CSSRect::FromAppUnits(rect)).c_str()); // Check if this frame is visible in the scroll port. This will exclude rects // with zero sized area. The specification is ambiguous about this [1], but