Bug 1088900 - Parse console.group/groupCollapse for custom styling. r=baku
Process the arguments of "MethodGroup" and "MethodGroupCollapsed"
Use the result of ProcessArguments to compute the groupName so we can get
rid of the "%c" parts.
MozReview-Commit-ID: 5B2jqG5RoRj
--- a/dom/console/Console.cpp
+++ b/dom/console/Console.cpp
@@ -1555,16 +1555,19 @@ Console::PopulateConsoleNotificationInTh
switch (aData->mMethodName) {
case MethodLog:
case MethodInfo:
case MethodWarn:
case MethodError:
case MethodException:
case MethodDebug:
case MethodAssert:
+ case MethodGroup:
+ case MethodGroupCollapsed:
+ case MethodGroupEnd:
event.mArguments.Construct();
event.mStyles.Construct();
if (NS_WARN_IF(!ProcessArguments(aCx, aArguments,
event.mArguments.Value(),
event.mStyles.Value()))) {
return false;
}
@@ -1576,17 +1579,17 @@ Console::PopulateConsoleNotificationInTh
event.mArguments.Value()))) {
return false;
}
}
if (aData->mMethodName == MethodGroup ||
aData->mMethodName == MethodGroupCollapsed ||
aData->mMethodName == MethodGroupEnd) {
- ComposeGroupName(aCx, aArguments, event.mGroupName);
+ ComposeGroupName(aCx, event.mArguments.Value(), event.mGroupName);
}
else if (aData->mMethodName == MethodTime && !aArguments.IsEmpty()) {
event.mTimer = CreateStartTimerValue(aCx, aData->mStartTimerLabel,
aData->mStartTimerStatus);
}
else if (aData->mMethodName == MethodTimeEnd && !aArguments.IsEmpty()) {