Bug 737510 - Print something useful when dumping an ImmutableViewportMetrics. r=Cwiiis

This commit is contained in:
Kartikaya Gupta 2012-04-23 23:52:58 -04:00
parent 4bccf87c66
commit c49b3b664f
2 changed files with 10 additions and 2 deletions

View File

@ -43,9 +43,10 @@ public final class DisplayPortMetrics {
return sb.toString();
}
@Override
public String toString() {
return "DisplayPortMetrics(" + mPosition.left + ","
return "DisplayPortMetrics v=(" + mPosition.left + ","
+ mPosition.top + "," + mPosition.right + ","
+ mPosition.bottom + "," + mResolution + ")";
+ mPosition.bottom + ") z=" + mResolution;
}
}

View File

@ -81,4 +81,11 @@ public class ImmutableViewportMetrics {
public FloatSize getCssPageSize() {
return new FloatSize(cssPageSizeWidth, cssPageSizeHeight);
}
@Override
public String toString() {
return "ImmutableViewportMetrics v=(" + viewportRectLeft + "," + viewportRectTop + ","
+ viewportRectRight + "," + viewportRectBottom + ") p=(" + pageSizeWidth + ","
+ pageSizeHeight + ") z=" + zoomFactor;
}
}