Bug 1630704 - Part 7: Move layout debugging methods to nsIFrame r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D75075
This commit is contained in:
Kagami Sascha Rosylight 2020-05-13 18:24:45 +00:00
Родитель b77454b2ee
Коммит aa24fb47bd
3 изменённых файлов: 35 добавлений и 30 удалений

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

@ -195,16 +195,23 @@ static void PrintDisplayListTo(nsDisplayListBuilder* aBuilder,
}
}
void nsFrame::PrintDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayList& aList,
std::stringstream& aStream, bool aDumpHtml) {
void nsIFrame::PrintDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayList& aList, bool aDumpHtml) {
std::stringstream ss;
PrintDisplayList(aBuilder, aList, ss, aDumpHtml);
fprintf_stderr(stderr, "%s", ss.str().c_str());
}
void nsIFrame::PrintDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayList& aList,
std::stringstream& aStream, bool aDumpHtml) {
PrintDisplayListTo(aBuilder, aList, aStream, 0, aDumpHtml);
}
void nsFrame::PrintDisplayItem(nsDisplayListBuilder* aBuilder,
nsDisplayItem* aItem, std::stringstream& aStream,
uint32_t aIndent, bool aDumpSublist,
bool aDumpHtml) {
void nsIFrame::PrintDisplayItem(nsDisplayListBuilder* aBuilder,
nsDisplayItem* aItem,
std::stringstream& aStream, uint32_t aIndent,
bool aDumpSublist, bool aDumpHtml) {
PrintDisplayItemTo(aBuilder, aItem, aStream, aIndent, aDumpSublist,
aDumpHtml);
}
@ -242,9 +249,9 @@ static void PrintDisplayListSetItem(nsDisplayListBuilder* aBuilder,
}
}
void nsFrame::PrintDisplayListSet(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aSet,
std::stringstream& aStream, bool aDumpHtml) {
void nsIFrame::PrintDisplayListSet(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aSet,
std::stringstream& aStream, bool aDumpHtml) {
if (aDumpHtml) {
aStream << "<ul>";
}

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

@ -411,26 +411,6 @@ class nsFrame : public nsIFrame {
static void ShowEventTargetFrameBorder(bool aEnable);
static bool GetShowEventTargetFrameBorder();
#endif
static void PrintDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayList& aList,
bool aDumpHtml = false) {
std::stringstream ss;
PrintDisplayList(aBuilder, aList, ss, aDumpHtml);
fprintf_stderr(stderr, "%s", ss.str().c_str());
}
static void PrintDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayList& aList,
std::stringstream& aStream,
bool aDumpHtml = false);
static void PrintDisplayItem(nsDisplayListBuilder* aBuilder,
nsDisplayItem* aItem, std::stringstream& aStream,
uint32_t aIndent = 0, bool aDumpSublist = false,
bool aDumpHtml = false);
static void PrintDisplayListSet(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aList,
std::stringstream& aStream,
bool aDumpHtml = false);
};
#endif /* nsFrame_h___ */

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

@ -4487,6 +4487,24 @@ class nsIFrame : public nsQueryFrame {
bool HasDisplayItem(nsDisplayItemBase* aItem);
bool HasDisplayItem(uint32_t aKey);
static void PrintDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayList& aList,
bool aDumpHtml = false);
static void PrintDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayList& aList,
std::stringstream& aStream,
bool aDumpHtml = false);
static void PrintDisplayItem(nsDisplayListBuilder* aBuilder,
nsDisplayItem* aItem, std::stringstream& aStream,
uint32_t aIndent = 0, bool aDumpSublist = false,
bool aDumpHtml = false);
#ifdef MOZ_DUMP_PAINTING
static void PrintDisplayListSet(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aSet,
std::stringstream& aStream,
bool aDumpHtml = false);
#endif
bool ForceDescendIntoIfVisible() const { return mForceDescendIntoIfVisible; }
void SetForceDescendIntoIfVisible(bool aForce) {
mForceDescendIntoIfVisible = aForce;