Add more profile labels for the separate parts of restyle processing. (Bug 790379) rs=cjones

This commit is contained in:
L. David Baron 2012-09-14 14:12:34 -07:00
parent 8187290f06
commit 0ed8ec207f
2 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,7 @@
#include "prlog.h"
#include "nsStyleAnimation.h"
#include "mozilla/Util.h"
#include "sampler.h"
#ifdef DEBUG
// #define NOISY_DEBUG
@ -368,6 +369,8 @@ nsChangeHint
nsStyleContext::CalcStyleDifference(nsStyleContext* aOther,
nsChangeHint aParentHintsNotHandledForDescendants)
{
SAMPLE_LABEL("nsStyleContext", "CalcStyleDifference");
NS_ABORT_IF_FALSE(NS_IsHintSubset(aParentHintsNotHandledForDescendants,
nsChangeHint_Hints_NotHandledForDescendants),
"caller is passing inherited hints, but shouldn't be");

View File

@ -28,6 +28,7 @@
#include "nsAnimationManager.h"
#include "nsEventStates.h"
#include "mozilla/dom/Element.h"
#include "sampler.h"
using namespace mozilla;
using namespace mozilla::dom;
@ -714,6 +715,8 @@ nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc,
void* aData, nsIContent* aContent,
nsRuleWalker* aRuleWalker)
{
SAMPLE_LABEL("nsStyleSet", "FileRules");
// Cascading order:
// [least important]
// - UA normal rules = Agent normal