Bug 1159455 - Fix assorted debugging strings in APZ code. r=botond

This commit is contained in:
Kartikaya Gupta 2015-04-30 14:30:37 -04:00
Родитель 38655a0b62
Коммит 03de57ce9a
5 изменённых файлов: 13 добавлений и 11 удалений

Просмотреть файл

@ -2961,7 +2961,7 @@ APZCTreeManager* AsyncPanZoomController::GetApzcTreeManager() const {
void AsyncPanZoomController::ZoomToRect(CSSRect aRect) {
if (!aRect.IsFinite()) {
NS_WARNING("ZoomToRect got called with a non-finite rect; ignoring...\n");
NS_WARNING("ZoomToRect got called with a non-finite rect; ignoring...");
return;
}
@ -3130,7 +3130,7 @@ void AsyncPanZoomController::UpdateZoomConstraints(const ZoomConstraints& aConst
APZC_LOG("%p updating zoom constraints to %d %d %f %f\n", this, aConstraints.mAllowZoom,
aConstraints.mAllowDoubleTapZoom, aConstraints.mMinZoom.scale, aConstraints.mMaxZoom.scale);
if (IsNaN(aConstraints.mMinZoom.scale) || IsNaN(aConstraints.mMaxZoom.scale)) {
NS_WARNING("APZC received zoom constraints with NaN values; dropping...\n");
NS_WARNING("APZC received zoom constraints with NaN values; dropping...");
return;
}
// inf float values and other bad cases should be sanitized by the code below.

Просмотреть файл

@ -10,6 +10,7 @@
#include "AsyncPanZoomController.h" // for AsyncPanZoomController
#include "base/task.h" // for CancelableTask, etc
#include "gfxPrefs.h" // for gfxPrefs
#include "mozilla/SizePrintfMacros.h" // for PRIuSIZE
#include "nsDebug.h" // for NS_WARNING
#include "nsMathUtils.h" // for NS_hypot
@ -78,7 +79,7 @@ GestureEventListener::~GestureEventListener()
nsEventStatus GestureEventListener::HandleInputEvent(const MultiTouchInput& aEvent)
{
GEL_LOG("Receiving event type %d with %lu touches in state %d\n", aEvent.mType, aEvent.mTouches.Length(), mState);
GEL_LOG("Receiving event type %d with %" PRIuSIZE " touches in state %d\n", aEvent.mType, aEvent.mTouches.Length(), mState);
nsEventStatus rv = nsEventStatus_eIgnore;

Просмотреть файл

@ -5,9 +5,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "InputBlockState.h"
#include "mozilla/layers/APZCTreeManager.h" // for AllowedTouchBehavior
#include "AsyncPanZoomController.h" // for AsyncPanZoomController
#include "gfxPrefs.h" // for gfxPrefs
#include "mozilla/SizePrintfMacros.h" // for PRIuSIZE
#include "mozilla/layers/APZCTreeManager.h" // for AllowedTouchBehavior
#include "OverscrollHandoffState.h"
#define TBS_LOG(...)
@ -247,7 +248,7 @@ WheelBlockState::HasEvents() const
void
WheelBlockState::DropEvents()
{
TBS_LOG("%p dropping %lu events\n", this, mEvents.Length());
TBS_LOG("%p dropping %" PRIuSIZE " events\n", this, mEvents.Length());
mEvents.Clear();
}
@ -255,7 +256,7 @@ void
WheelBlockState::HandleEvents()
{
while (HasEvents()) {
TBS_LOG("%p returning first of %lu events\n", this, mEvents.Length());
TBS_LOG("%p returning first of %" PRIuSIZE " events\n", this, mEvents.Length());
ScrollWheelInput event = mEvents[0];
mEvents.RemoveElementAt(0);
GetTargetApzc()->HandleInputEvent(event, mTransformToApzc);
@ -416,7 +417,7 @@ TouchBlockState::SetAllowedTouchBehaviors(const nsTArray<TouchBehaviorFlags>& aB
if (mAllowedTouchBehaviorSet) {
return false;
}
TBS_LOG("%p got allowed touch behaviours for %lu points\n", this, aBehaviors.Length());
TBS_LOG("%p got allowed touch behaviours for %" PRIuSIZE " points\n", this, aBehaviors.Length());
mAllowedTouchBehaviors.AppendElements(aBehaviors);
mAllowedTouchBehaviorSet = true;
return true;
@ -516,7 +517,7 @@ TouchBlockState::Type()
void
TouchBlockState::DropEvents()
{
TBS_LOG("%p dropping %lu events\n", this, mEvents.Length());
TBS_LOG("%p dropping %" PRIuSIZE " events\n", this, mEvents.Length());
mEvents.Clear();
}
@ -524,7 +525,7 @@ void
TouchBlockState::HandleEvents()
{
while (HasEvents()) {
TBS_LOG("%p returning first of %lu events\n", this, mEvents.Length());
TBS_LOG("%p returning first of %" PRIuSIZE " events\n", this, mEvents.Length());
MultiTouchInput event = mEvents[0];
mEvents.RemoveElementAt(0);
GetTargetApzc()->HandleInputEvent(event, mTransformToApzc);

Просмотреть файл

@ -17,7 +17,7 @@
#include "TouchManager.h"
#define APZES_LOG(...)
// #define APZES_LOG(...) printf_stderr("APZCCH: " __VA_ARGS__)
// #define APZES_LOG(...) printf_stderr("APZES: " __VA_ARGS__)
// Static helper functions
namespace {

Просмотреть файл

@ -67,7 +67,7 @@ APZThreadUtils::RunOnControllerThread(Task* aTask)
#else
if (!sControllerThread) {
// Could happen on startup
NS_WARNING("Dropping task posted to controller thread\n");
NS_WARNING("Dropping task posted to controller thread");
delete aTask;
return;
}