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

Depends on D91338

Differential Revision: https://phabricator.services.mozilla.com/D91339
This commit is contained in:
Kartikaya Gupta 2020-09-25 08:57:24 +00:00
Родитель 8150321a2c
Коммит cb1b7eb76c
4 изменённых файлов: 4 добавлений и 12 удалений

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

@ -21,13 +21,6 @@ using namespace mozilla::gfx;
namespace mozilla {
namespace layers {
void AppendToString(std::stringstream& aStream, const nsPoint& p,
const char* pfx, const char* sfx) {
aStream << pfx;
aStream << nsPrintfCString("(x=%d, y=%d)", p.x, p.y).get();
aStream << sfx;
}
void AppendToString(std::stringstream& aStream, const nsRect& r,
const char* pfx, const char* sfx) {
aStream << pfx;

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

@ -34,9 +34,6 @@ enum class ImageFormat;
namespace layers {
struct ZoomConstraints;
void AppendToString(std::stringstream& aStream, const nsPoint& p,
const char* pfx = "", const char* sfx = "");
void AppendToString(std::stringstream& aStream, const nsRect& r,
const char* pfx = "", const char* sfx = "");

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

@ -12,6 +12,7 @@
#include "mozilla/Preferences.h"
#include "mozilla/PresShell.h"
#include "mozilla/StaticPrefs_ui.h"
#include "mozilla/ToString.h"
#include "mozilla/dom/MouseEventBinding.h"
#include "nsFrameList.h" // for DEBUG_FRAME_DUMP
#include "nsHTMLParts.h"
@ -477,7 +478,7 @@ nsIFrame* FindFrameTargetedByInputEvent(
"Found initial target %p for event class %s message %s point %s "
"relative to root frame %s\n",
target, ToChar(aEvent->mClass), ToChar(aEvent->mMessage),
mozilla::layers::Stringify(aPointRelativeToRootFrame).c_str(),
mozilla::ToString(aPointRelativeToRootFrame).c_str(),
ToString(aRootFrame).c_str());
EventRadiusPrefs prefs(aEvent->mClass);

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

@ -68,6 +68,7 @@
#include "mozilla/StaticPrefs_layers.h"
#include "mozilla/StaticPrefs_layout.h"
#include "mozilla/StaticPrefs_mousewheel.h"
#include "mozilla/ToString.h"
#include "ScrollAnimationPhysics.h"
#include "ScrollAnimationBezierPhysics.h"
#include "ScrollAnimationMSDPhysics.h"
@ -6309,7 +6310,7 @@ bool ScrollFrameHelper::ReflowFinished() {
mScrollGeneration);
MOZ_ASSERT(mScrollUpdates.LastElement().GetDestination() == CSSPoint());
SCROLLRESTORE_LOG("%p: updating initial SPU to pos %s\n", this,
Stringify(currentScrollPos).c_str());
ToString(currentScrollPos).c_str());
mScrollUpdates.Clear();
// Scroll generation bump not strictly necessary, but good for
// consistency.