Bug 660587 - Remove nsRuleNode::gLangService. r=roc

This commit is contained in:
Makoto Kato 2011-05-31 14:18:50 +09:00
Родитель 15b03f8e17
Коммит 93109e7bf5
4 изменённых файлов: 4 добавлений и 18 удалений

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

@ -89,7 +89,6 @@
#include "nsBox.h"
#include "nsIFrameTraversal.h"
#include "nsLayoutCID.h"
#include "nsILanguageAtomService.h"
#include "nsStyleSheetService.h"
#include "nsXULPopupManager.h"
#include "nsFocusManager.h"

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

@ -338,8 +338,6 @@ nsLayoutStatics::Shutdown()
nsCSSScanner::ReleaseGlobals();
NS_IF_RELEASE(nsRuleNode::gLangService);
nsTextFragment::Shutdown();
nsAttrValue::Shutdown();

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

@ -67,7 +67,6 @@
#include "nsSize.h"
#include "imgIRequest.h"
#include "nsRuleData.h"
#include "nsILanguageAtomService.h"
#include "nsIStyleRule.h"
#include "nsBidiUtils.h"
#include "nsUnicharUtils.h"
@ -1172,8 +1171,6 @@ nsRuleNode* nsRuleNode::CreateRootNode(nsPresContext* aPresContext)
nsRuleNode(aPresContext, nsnull, nsnull, 0xff, PR_FALSE);
}
nsILanguageAtomService* nsRuleNode::gLangService = nsnull;
nsRuleNode::nsRuleNode(nsPresContext* aContext, nsRuleNode* aParent,
nsIStyleRule* aRule, PRUint8 aLevel,
PRBool aIsImportant)
@ -4528,17 +4525,11 @@ nsRuleNode::ComputeVisibilityData(void* aStartStruct,
// this is not a real CSS property, it is a html attribute mapped to CSS struture
const nsCSSValue* langValue = aRuleData->ValueForLang();
if (eCSSUnit_Ident == langValue->GetUnit()) {
if (!gLangService) {
CallGetService(NS_LANGUAGEATOMSERVICE_CONTRACTID, &gLangService);
}
nsAutoString lang;
langValue->GetStringValue(lang);
if (gLangService) {
nsAutoString lang;
langValue->GetStringValue(lang);
nsContentUtils::ASCIIToLower(lang);
visibility->mLanguage = do_GetAtom(lang);
}
nsContentUtils::ASCIIToLower(lang);
visibility->mLanguage = do_GetAtom(lang);
}
COMPUTE_END_INHERITED(Visibility, visibility)

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

@ -50,7 +50,6 @@
class nsStyleContext;
struct PLDHashTable;
class nsILanguageAtomService;
struct nsRuleData;
class nsIStyleRule;
struct nsCSSValueList;
@ -416,7 +415,6 @@ public:
// (which comes from the presShell) to perform the allocation.
void* operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW;
void Destroy() { DestroyInternal(nsnull); }
static nsILanguageAtomService* gLangService;
// Implemented in nsStyleSet.h, since it needs to know about nsStyleSet.
inline void AddRef();