mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 1667863 - Replace AppendToString of SizeTyped with ostream usage. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D91655
This commit is contained in:
parent
5590eaf278
commit
f4c6658819
@ -90,8 +90,8 @@ void AppendToString(std::stringstream& aStream, const FrameMetrics& m,
|
||||
}
|
||||
AppendToString(aStream, m.GetZoom(), "] [z=", "] }");
|
||||
} else {
|
||||
AppendToString(aStream, m.GetRootCompositionSize(), "] [rcs=");
|
||||
aStream << "] [v=" << m.GetLayoutViewport()
|
||||
aStream << "] [rcs=" << m.GetRootCompositionSize()
|
||||
<< "] [v=" << m.GetLayoutViewport()
|
||||
<< nsPrintfCString("] [z=(ld=%.3f r=%.3f",
|
||||
m.GetDevPixelsPerCSSPixel().scale,
|
||||
m.GetPresShellResolution())
|
||||
|
@ -56,15 +56,6 @@ void AppendToString(std::stringstream& aStream, const FrameMetrics& m,
|
||||
void AppendToString(std::stringstream& aStream, const ZoomConstraints& z,
|
||||
const char* pfx = "", const char* sfx = "");
|
||||
|
||||
template <class T>
|
||||
void AppendToString(std::stringstream& aStream,
|
||||
const mozilla::gfx::SizeTyped<T>& sz, const char* pfx = "",
|
||||
const char* sfx = "") {
|
||||
aStream << pfx;
|
||||
aStream << nsPrintfCString("(w=%f, h=%f)", sz.width, sz.height).get();
|
||||
aStream << sfx;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void AppendToString(std::stringstream& aStream,
|
||||
const mozilla::gfx::IntSizeTyped<T>& sz,
|
||||
|
@ -1898,8 +1898,7 @@ void MLGDeviceD3D11::CopyTexture(MLGTexture* aDest,
|
||||
IntRect destBounds(IntPoint(0, 0), aDest->GetSize());
|
||||
if (!destBounds.Contains(IntRect(aTarget, aRect.Size()))) {
|
||||
gfxWarning() << "Attempt to write out-of-bounds in CopySubresourceRegion: "
|
||||
<< destBounds << ", " << aTarget << ", "
|
||||
<< Stringify(aRect.Size());
|
||||
<< destBounds << ", " << aTarget << ", " << aRect.Size();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
#include "MobileViewportManager.h"
|
||||
|
||||
#include "LayersLogging.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
#include "mozilla/ToString.h"
|
||||
#include "mozilla/dom/Document.h"
|
||||
#include "mozilla/dom/Event.h"
|
||||
#include "mozilla/dom/EventTarget.h"
|
||||
@ -500,7 +500,7 @@ void MobileViewportManager::UpdateVisualViewportSize(
|
||||
ScreenSize compositionSize = ScreenSize(GetCompositionSize(aDisplaySize));
|
||||
|
||||
CSSSize compSize = compositionSize / aZoom;
|
||||
MVM_LOG("%p: Setting VVPS %s\n", this, Stringify(compSize).c_str());
|
||||
MVM_LOG("%p: Setting VVPS %s\n", this, ToString(compSize).c_str());
|
||||
mContext->SetVisualViewportSize(compSize);
|
||||
}
|
||||
|
||||
@ -566,7 +566,7 @@ void MobileViewportManager::UpdateSizesBeforeReflow() {
|
||||
|
||||
mDisplaySize = *newDisplaySize;
|
||||
MVM_LOG("%p: Reflow starting, display size updated to %s\n", this,
|
||||
Stringify(mDisplaySize).c_str());
|
||||
ToString(mDisplaySize).c_str());
|
||||
|
||||
if (mDisplaySize.width == 0 || mDisplaySize.height == 0) {
|
||||
return;
|
||||
@ -577,7 +577,7 @@ void MobileViewportManager::UpdateSizesBeforeReflow() {
|
||||
nsViewportInfo viewportInfo = mContext->GetViewportInfo(displaySize);
|
||||
mMobileViewportSize = viewportInfo.GetSize();
|
||||
MVM_LOG("%p: MVSize updated to %s\n", this,
|
||||
Stringify(mMobileViewportSize).c_str());
|
||||
ToString(mMobileViewportSize).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@ -637,7 +637,7 @@ void MobileViewportManager::RefreshViewportSize(bool aForceAdjustResolution) {
|
||||
viewportInfo.IsDefaultZoomValid());
|
||||
|
||||
CSSSize viewport = viewportInfo.GetSize();
|
||||
MVM_LOG("%p: Computed CSS viewport %s\n", this, Stringify(viewport).c_str());
|
||||
MVM_LOG("%p: Computed CSS viewport %s\n", this, ToString(viewport).c_str());
|
||||
|
||||
if (!mIsFirstPaint && mMobileViewportSize == viewport) {
|
||||
// Nothing changed, so no need to do a reflow
|
||||
@ -680,7 +680,7 @@ void MobileViewportManager::RefreshViewportSize(bool aForceAdjustResolution) {
|
||||
|
||||
// Kick off a reflow.
|
||||
MVM_LOG("%p: Triggering reflow with viewport %s\n", this,
|
||||
Stringify(viewport).c_str());
|
||||
ToString(viewport).c_str());
|
||||
mContext->Reflow(viewport);
|
||||
|
||||
// We are going to fit the content to the display width if the initial-scale
|
||||
@ -713,7 +713,7 @@ void MobileViewportManager::ShrinkToDisplaySizeIfNeeded() {
|
||||
if (Maybe<CSSRect> scrollableRect =
|
||||
mContext->CalculateScrollableRectForRSF()) {
|
||||
MVM_LOG("%p: ShrinkToDisplaySize using scrollableRect %s\n", this,
|
||||
Stringify(scrollableRect->Size()).c_str());
|
||||
ToString(scrollableRect->Size()).c_str());
|
||||
UpdateResolutionForContentSizeChange(scrollableRect->Size());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user