Bug 1596339 Part 3 - Implement operator<< for LogicalSize, and use it in frame tree dump. r=dholbert

Note: The output format of BaseSize is "3 x 5", so a pair of parentheses
is added around %s in "logical-size=(%s)" to make it looks better.

Differential Revision: https://phabricator.services.mozilla.com/D52964

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ting-Yu Lin 2019-11-15 04:49:27 +00:00
Родитель 9b33cffdf0
Коммит e5ffc03d4b
2 изменённых файлов: 7 добавлений и 2 удалений

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

@ -1041,6 +1041,11 @@ class LogicalSize {
return *this;
}
friend std::ostream& operator<<(std::ostream& aStream,
const LogicalSize& aSize) {
return aStream << aSize.mSize;
}
private:
friend class LogicalRect;

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

@ -7847,8 +7847,8 @@ void nsIFrame::ListGeneric(nsACString& aTo, const char* aPrefix,
mozilla::WritingMode wm = GetWritingMode();
if (wm.IsVertical() || wm.IsBidiRTL()) {
aTo += nsPrintfCString(" wm=%s logical-size={%d,%d}", ToString(wm).c_str(),
ISize(), BSize());
aTo += nsPrintfCString(" wm=%s logical-size=(%s)", ToString(wm).c_str(),
ToString(GetLogicalSize()).c_str());
}
nsIFrame* parent = GetParent();