зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1523061 Part 1 - Remove two nsIFrame::ListTag() methods that retrieve frame tag in a string. r=dholbert
There are three different APIs that serve similar purpose. Keeping only one is sufficient. Differential Revision: https://phabricator.services.mozilla.com/D17732 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
de5dfda48c
Коммит
c4c0690aa3
|
@ -7329,21 +7329,21 @@ int32_t nsFrame::ContentIndexInContainer(const nsIFrame* aFrame) {
|
|||
*/
|
||||
void DebugListFrameTree(nsIFrame* aFrame) { ((nsFrame*)aFrame)->List(stderr); }
|
||||
|
||||
void nsIFrame::ListTag(nsACString& aTo) const { ListTag(aTo, this); }
|
||||
|
||||
/* static */
|
||||
void nsIFrame::ListTag(nsACString& aTo, const nsIFrame* aFrame) {
|
||||
nsAutoCString nsIFrame::ListTag() const {
|
||||
nsAutoString tmp;
|
||||
aFrame->GetFrameName(tmp);
|
||||
aTo += NS_ConvertUTF16toUTF8(tmp).get();
|
||||
aTo += nsPrintfCString("@%p", static_cast<const void*>(aFrame));
|
||||
GetFrameName(tmp);
|
||||
|
||||
nsAutoCString tag;
|
||||
tag += NS_ConvertUTF16toUTF8(tmp);
|
||||
tag += nsPrintfCString("@%p", static_cast<const void*>(this));
|
||||
return tag;
|
||||
}
|
||||
|
||||
// Debugging
|
||||
void nsIFrame::ListGeneric(nsACString& aTo, const char* aPrefix,
|
||||
uint32_t aFlags) const {
|
||||
aTo += aPrefix;
|
||||
ListTag(aTo);
|
||||
aTo += ListTag();
|
||||
if (HasView()) {
|
||||
aTo += nsPrintfCString(" [view=%p]", static_cast<void*>(GetView()));
|
||||
}
|
||||
|
|
|
@ -4530,22 +4530,14 @@ class nsIFrame : public nsQueryFrame {
|
|||
}
|
||||
void ListTag(FILE* out) const { ListTag(out, this); }
|
||||
static void ListTag(FILE* out, const nsIFrame* aFrame) {
|
||||
nsAutoCString t;
|
||||
ListTag(t, aFrame);
|
||||
fputs(t.get(), out);
|
||||
fputs(aFrame->ListTag().get(), out);
|
||||
}
|
||||
static void ListTag(FILE* out, const nsFrameList& aFrameList) {
|
||||
for (nsIFrame* frame : aFrameList) {
|
||||
ListTag(out, frame);
|
||||
}
|
||||
}
|
||||
void ListTag(nsACString& aTo) const;
|
||||
nsAutoCString ListTag() const {
|
||||
nsAutoCString tag;
|
||||
ListTag(tag);
|
||||
return tag;
|
||||
}
|
||||
static void ListTag(nsACString& aTo, const nsIFrame* aFrame);
|
||||
nsAutoCString ListTag() const;
|
||||
void ListGeneric(nsACString& aTo, const char* aPrefix = "",
|
||||
uint32_t aFlags = 0) const;
|
||||
enum {TRAVERSE_SUBDOCUMENT_FRAMES = 0x01};
|
||||
|
|
|
@ -267,7 +267,7 @@ void nsPlaceholderFrame::List(FILE* out, const char* aPrefix,
|
|||
|
||||
if (mOutOfFlowFrame) {
|
||||
str += " outOfFlowFrame=";
|
||||
nsFrame::ListTag(str, mOutOfFlowFrame);
|
||||
str += mOutOfFlowFrame->ListTag();
|
||||
}
|
||||
fprintf_stderr(out, "%s\n", str.get());
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче