From 3c19efedf2d17dd9cad857aaf4ac253878533692 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Tue, 26 Aug 2014 12:05:05 -0400 Subject: [PATCH] Bug 1057642 - Fix some printing call sites that try to print CoordTyped as floats. r=botond --- gfx/layers/Layers.cpp | 3 ++- gfx/layers/LayersLogging.h | 2 +- gfx/layers/apz/src/AsyncPanZoomController.cpp | 6 +++--- gfx/layers/client/TiledContentClient.cpp | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp index bc587e08221a..bbf7342da8a4 100644 --- a/gfx/layers/Layers.cpp +++ b/gfx/layers/Layers.cpp @@ -1446,7 +1446,8 @@ Layer::PrintInfo(std::stringstream& aStream, const char* aPrefix) aStream << nsPrintfCString(" [hscrollbar=%lld]", GetScrollbarTargetContainerId()).get(); } if (GetIsFixedPosition()) { - aStream << nsPrintfCString(" [isFixedPosition anchor=%f,%f margin=%f,%f,%f,%f]", mAnchor.x, mAnchor.y, + aStream << nsPrintfCString(" [isFixedPosition anchor=%f,%f margin=%f,%f,%f,%f]", + mAnchor.x.value, mAnchor.y.value, mMargins.top, mMargins.right, mMargins.bottom, mMargins.left).get(); } if (GetIsStickyPosition()) { diff --git a/gfx/layers/LayersLogging.h b/gfx/layers/LayersLogging.h index d6517e5d668d..5949202e9f2b 100644 --- a/gfx/layers/LayersLogging.h +++ b/gfx/layers/LayersLogging.h @@ -55,7 +55,7 @@ AppendToString(std::stringstream& aStream, const mozilla::gfx::PointTyped& p, const char* pfx="", const char* sfx="") { aStream << pfx; - aStream << nsPrintfCString("(x=%f, y=%f)", p.x, p.y).get(); + aStream << nsPrintfCString("(x=%f, y=%f)", p.x.value, p.y.value).get(); aStream << sfx; } diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index 78748afb56fd..65ede5b296db 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -2024,7 +2024,7 @@ const LayerMargin AsyncPanZoomController::CalculatePendingDisplayPort( APZC_LOG_FM(aFrameMetrics, "Calculated displayport as (%f %f %f %f) from velocity (%f %f) paint time %f metrics", displayPort.x, displayPort.y, displayPort.width, displayPort.height, - aVelocity.x, aVelocity.y, (float)estimatedPaintDurationMillis); + aVelocity.x.value, aVelocity.y.value, (float)estimatedPaintDurationMillis); CSSMargin cssMargins; cssMargins.left = -displayPort.x; @@ -2492,8 +2492,8 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aLayerMetri if (scrollOffsetUpdated) { APZC_LOG("%p updating scroll offset from (%f, %f) to (%f, %f)\n", this, - mFrameMetrics.GetScrollOffset().x, mFrameMetrics.GetScrollOffset().y, - aLayerMetrics.GetScrollOffset().x, aLayerMetrics.GetScrollOffset().y); + mFrameMetrics.GetScrollOffset().x.value, mFrameMetrics.GetScrollOffset().y.value, + aLayerMetrics.GetScrollOffset().x.value, aLayerMetrics.GetScrollOffset().y.value); mFrameMetrics.CopyScrollInfoFrom(aLayerMetrics); diff --git a/gfx/layers/client/TiledContentClient.cpp b/gfx/layers/client/TiledContentClient.cpp index 6dd26d9fd9c6..67fcc9511ec6 100644 --- a/gfx/layers/client/TiledContentClient.cpp +++ b/gfx/layers/client/TiledContentClient.cpp @@ -1409,7 +1409,7 @@ ClientTiledLayerBuffer::ComputeProgressiveUpdateRegion(const nsIntRegion& aInval viewTransform); #endif - TILING_LOG("TILING %p: Progressive update view transform %f %f zoom %f abort %d\n", mThebesLayer, viewTransform.mTranslation.x, viewTransform.mTranslation.y, viewTransform.mScale.scale, abortPaint); + TILING_LOG("TILING %p: Progressive update view transform %f %f zoom %f abort %d\n", mThebesLayer, viewTransform.mTranslation.x.value, viewTransform.mTranslation.y.value, viewTransform.mScale.scale, abortPaint); if (abortPaint) { // We ignore if front-end wants to abort if this is the first,