Bug 1667176 - Use ostream operator instead of AppendToString for nsRectAbsolute. r=mattwoodrow

Depends on D91340

Differential Revision: https://phabricator.services.mozilla.com/D91341
This commit is contained in:
Kartikaya Gupta 2020-09-25 08:57:25 +00:00
parent 0c9ba9147e
commit 1e2a75a230
3 changed files with 2 additions and 14 deletions

View File

@ -260,8 +260,8 @@ struct BaseRectAbsolute {
friend std::ostream& operator<<(
std::ostream& stream,
const BaseRectAbsolute<T, Sub, Point, Rect>& aRect) {
return stream << '(' << aRect.left << ',' << aRect.top << ',' << aRect.right
<< ',' << aRect.bottom << ')';
return stream << "(l=" << aRect.left << ", t=" << aRect.top
<< ", r=" << aRect.right << ", b=" << aRect.bottom << ')';
}
};

View File

@ -21,15 +21,6 @@ using namespace mozilla::gfx;
namespace mozilla {
namespace layers {
void AppendToString(std::stringstream& aStream, const nsRectAbsolute& r,
const char* pfx, const char* sfx) {
aStream << pfx;
aStream << nsPrintfCString("(l=%d, t=%d, r=%d, b=%d)", r.Left(), r.Top(),
r.Right(), r.Bottom())
.get();
aStream << sfx;
}
void AppendToString(std::stringstream& aStream, const wr::ColorF& c,
const char* pfx, const char* sfx) {
aStream << pfx;

View File

@ -34,9 +34,6 @@ enum class ImageFormat;
namespace layers {
struct ZoomConstraints;
void AppendToString(std::stringstream& aStream, const nsRectAbsolute& r,
const char* pfx = "", const char* sfx = "");
template <class T>
void AppendToString(std::stringstream& aStream,
const mozilla::gfx::PointTyped<T>& p, const char* pfx = "",