Bug 782517 - Make nsFrame:MakeFrameName() annotate an iframe's src. r=roc
authorChris Pearce <cpearce@mozilla.com>
Tue, 14 Aug 2012 17:39:11 +1200
changeset 102286 9e7c04aff0e6e07edb91f602a4899e2042721e52
parent 102285 d29b79c37f86cea741af162866002b26f72aada1
child 102287 d9183f015df867977de7d9eef4d23ec51d4a875b
child 102291 ad77846165e301f5cd3f028147fab7b72230f1b4
push id23272
push useremorley@mozilla.com
push dateTue, 14 Aug 2012 12:52:48 +0000
treeherdermozilla-central@d9183f015df8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs782517
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 782517 - Make nsFrame:MakeFrameName() annotate an iframe's src. r=roc
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -5353,16 +5353,21 @@ nsFrame::GetDebugStateBits() const
 
 nsresult
 nsFrame::MakeFrameName(const nsAString& aType, nsAString& aResult) const
 {
   aResult = aType;
   if (mContent && !mContent->IsNodeOfType(nsINode::eTEXT)) {
     nsAutoString buf;
     mContent->Tag()->ToString(buf);
+    if (GetType() == nsGkAtoms::subDocumentFrame) {
+      nsAutoString src;
+      mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::src, src);
+      buf.Append(NS_LITERAL_STRING(" src=") + src);
+    }
     aResult.Append(NS_LITERAL_STRING("(") + buf + NS_LITERAL_STRING(")"));
   }
   char buf[40];
   PR_snprintf(buf, sizeof(buf), "(%d)", ContentIndexInContainer(this));
   AppendASCIItoUTF16(buf, aResult);
   return NS_OK;
 }