Bug 1283242: style: Whitespace cleanup and remove dead code. r=bobbyholley+313730

gNewCount and gSharedCount aren't even declared.

--HG--
extra : rebase_source : 3c7d79a360ad6eef2e884de513ee45a289d4cd0a
This commit is contained in:
Emilio Cobos Álvarez 2016-06-29 11:27:42 +00:00
Родитель 0423031f08
Коммит e6ed33b04e
4 изменённых файлов: 14 добавлений и 25 удалений

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

@ -1029,15 +1029,15 @@ public:
static void ComputeFontFeatures(const nsCSSValuePairList *aFeaturesList,
nsTArray<gfxFontFeature>& aFeatureSettings);
static nscoord CalcFontPointSize(int32_t aHTMLSize, int32_t aBasePointSize,
static nscoord CalcFontPointSize(int32_t aHTMLSize, int32_t aBasePointSize,
nsPresContext* aPresContext,
nsFontSizeType aFontSizeType = eFontSize_HTML);
static nscoord FindNextSmallerFontSize(nscoord aFontSize, int32_t aBasePointSize,
static nscoord FindNextSmallerFontSize(nscoord aFontSize, int32_t aBasePointSize,
nsPresContext* aPresContext,
nsFontSizeType aFontSizeType = eFontSize_HTML);
static nscoord FindNextLargerFontSize(nscoord aFontSize, int32_t aBasePointSize,
static nscoord FindNextLargerFontSize(nscoord aFontSize, int32_t aBasePointSize,
nsPresContext* aPresContext,
nsFontSizeType aFontSizeType = eFontSize_HTML);

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

@ -31,10 +31,6 @@
#include "mozilla/StyleSetHandle.h"
#include "mozilla/StyleSetHandleInlines.h"
#ifdef DEBUG
// #define NOISY_DEBUG
#endif
using namespace mozilla;
//----------------------------------------------------------------------
@ -331,7 +327,7 @@ void nsStyleContext::RemoveChild(nsStyleContext* aChild)
if ((*list) == aChild) {
(*list) = (*list)->mNextSibling;
}
}
}
else {
NS_ASSERTION((*list) == aChild, "bad sibling pointers");
(*list) = nullptr;
@ -474,7 +470,7 @@ const void* nsStyleContext::StyleData(nsStyleStructID aSID)
// This is an evil evil function, since it forces you to alloc your own separate copy of
// style data! Do not use this function unless you absolutely have to! You should avoid
// this at all costs! -dwh
void*
void*
nsStyleContext::GetUniqueStyleData(const nsStyleStructID& aSID)
{
MOZ_ASSERT(!mSource.IsServoComputedValues(),
@ -559,7 +555,7 @@ nsStyleContext::SetStyle(nsStyleStructID aSID, void* aStruct)
{
// This method should only be called from nsRuleNode! It is not a public
// method!
NS_ASSERTION(aSID >= 0 && aSID < nsStyleStructID_Length, "out of bounds");
// NOTE: nsCachedStyleData::GetStyleData works roughly the same way.
@ -1143,9 +1139,9 @@ nsStyleContext::CalcStyleDifference(nsStyleContext* aNewContext,
const nsStyleOutline *otherVisOutline = otherVis->StyleOutline();
bool haveColor;
nscolor thisColor, otherColor;
if (thisVisOutline->GetOutlineInitialColor() !=
if (thisVisOutline->GetOutlineInitialColor() !=
otherVisOutline->GetOutlineInitialColor() ||
(haveColor = thisVisOutline->GetOutlineColor(thisColor)) !=
(haveColor = thisVisOutline->GetOutlineColor(thisColor)) !=
otherVisOutline->GetOutlineColor(otherColor) ||
(haveColor && thisColor != otherColor)) {
change = true;
@ -1278,7 +1274,7 @@ void nsStyleContext::List(FILE* out, int32_t aIndent, bool aListDescendants)
// Overloaded new operator. Initializes the memory to 0 and relies on an arena
// (which comes from the presShell) to perform the allocation.
void*
void*
nsStyleContext::operator new(size_t sz, nsPresContext* aPresContext) CPP_THROW_NEW
{
// Check the recycle list first.
@ -1288,7 +1284,7 @@ nsStyleContext::operator new(size_t sz, nsPresContext* aPresContext) CPP_THROW_N
// Overridden to prevent the global delete from being called, since the memory
// came out of an nsIArena instead of the global delete operator's heap.
void
void
nsStyleContext::Destroy()
{
// Get the pres context.

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

@ -421,7 +421,7 @@ nsStyleSet::GatherRuleProcessors(SheetType aType)
// Clear mScopedDocSheetRuleProcessors, but save it.
oldScopedDocRuleProcessors.SwapElements(mScopedDocSheetRuleProcessors);
}
if (mAuthorStyleDisabled && (aType == SheetType::Doc ||
if (mAuthorStyleDisabled && (aType == SheetType::Doc ||
aType == SheetType::ScopedDoc ||
aType == SheetType::StyleAttr)) {
// Don't regather if this level is disabled. Note that we gather
@ -907,13 +907,6 @@ nsStyleSet::GetContext(nsStyleContext* aParentContext,
aVisitedRuleNode,
relevantLinkVisited);
#ifdef NOISY_DEBUG
if (result)
fprintf(stdout, "--- SharedSC %d ---\n", ++gSharedCount);
else
fprintf(stdout, "+++ NewSC %d +++\n", ++gNewCount);
#endif
if (!result) {
result = NS_NewStyleContext(aParentContext, aPseudoTag, aPseudoType,
aRuleNode,
@ -1068,7 +1061,7 @@ nsStyleSet::AssertNoCSSRules(nsRuleNode* aCurrLevelNode,
// Enumerate the rules in a way that cares about the order of the rules.
void
nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc,
nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc,
RuleProcessorData* aData, Element* aElement,
nsRuleWalker* aRuleWalker)
{

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

@ -461,14 +461,14 @@ private:
// aLastPrevLevelNode.
void AssertNoImportantRules(nsRuleNode* aCurrLevelNode,
nsRuleNode* aLastPrevLevelNode);
// Just like AddImportantRules except it doesn't actually add anything; it
// just asserts that there are no CSS rules between aCurrLevelNode and
// aLastPrevLevelNode. Mostly useful for the preshint level.
void AssertNoCSSRules(nsRuleNode* aCurrLevelNode,
nsRuleNode* aLastPrevLevelNode);
#endif
// Enumerate the rules in a way that cares about the order of the
// rules.
// aElement is the element the rules are for. It might be null. aData