зеркало из https://github.com/mozilla/gecko-dev.git
Bug 938123 - Build layout/style in unified mode; r=roc
This commit is contained in:
Родитель
dab5894743
Коммит
35ff0cae16
|
@ -73,6 +73,14 @@ public:
|
|||
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
|
||||
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
|
||||
|
||||
static bool
|
||||
CloneRuleInto(Rule* aRule, void* aArray)
|
||||
{
|
||||
nsRefPtr<Rule> clone = aRule->Clone();
|
||||
static_cast<nsCOMArray<Rule>*>(aArray)->AppendObject(clone);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected:
|
||||
// to help implement nsIDOMCSSRule
|
||||
void AppendRulesToCssText(nsAString& aCssText);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
class nsIDOMCSSStyleDeclaration;
|
||||
class nsIDOMCSSStyleSheet;
|
||||
|
||||
namespace css = mozilla::css;
|
||||
using namespace mozilla;
|
||||
|
||||
#define NS_IF_CLONE(member_) \
|
||||
PR_BEGIN_MACRO \
|
||||
|
|
|
@ -76,7 +76,7 @@ EXPORTS.mozilla.css += [
|
|||
'StyleRule.h',
|
||||
]
|
||||
|
||||
SOURCES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'AnimationCommon.cpp',
|
||||
'CSS.cpp',
|
||||
'Declaration.cpp',
|
||||
|
@ -92,7 +92,6 @@ SOURCES += [
|
|||
'nsCSSProps.cpp',
|
||||
'nsCSSPseudoClasses.cpp',
|
||||
'nsCSSPseudoElements.cpp',
|
||||
'nsCSSRuleProcessor.cpp',
|
||||
'nsCSSRules.cpp',
|
||||
'nsCSSScanner.cpp',
|
||||
'nsCSSStyleSheet.cpp',
|
||||
|
@ -123,6 +122,11 @@ SOURCES += [
|
|||
'StyleRule.cpp',
|
||||
]
|
||||
|
||||
# nsCSSRuleProcessor.cpp needs to be built separately because it uses plarena.h.
|
||||
SOURCES += [
|
||||
'nsCSSRuleProcessor.cpp',
|
||||
]
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
LIBXUL_LIBRARY = True
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "nsStyleContext.h"
|
||||
#include "nsIDocument.h"
|
||||
|
||||
namespace css = mozilla::css;
|
||||
using namespace mozilla;
|
||||
|
||||
/**
|
||||
* Does a fast move of aSource to aDest. The previous value in
|
||||
|
|
|
@ -19,13 +19,13 @@ const char* const kCSSRawKeywords[] = {
|
|||
};
|
||||
#undef CSS_KEY
|
||||
|
||||
static int32_t gTableRefCount;
|
||||
static int32_t gKeywordTableRefCount;
|
||||
static nsStaticCaseInsensitiveNameTable* gKeywordTable;
|
||||
|
||||
void
|
||||
nsCSSKeywords::AddRefTable(void)
|
||||
{
|
||||
if (0 == gTableRefCount++) {
|
||||
if (0 == gKeywordTableRefCount++) {
|
||||
NS_ASSERTION(!gKeywordTable, "pre existing array!");
|
||||
gKeywordTable = new nsStaticCaseInsensitiveNameTable();
|
||||
if (gKeywordTable) {
|
||||
|
@ -51,7 +51,7 @@ nsCSSKeywords::AddRefTable(void)
|
|||
void
|
||||
nsCSSKeywords::ReleaseTable(void)
|
||||
{
|
||||
if (0 == --gTableRefCount) {
|
||||
if (0 == --gKeywordTableRefCount) {
|
||||
if (gKeywordTable) {
|
||||
delete gKeywordTable;
|
||||
gKeywordTable = nullptr;
|
||||
|
|
|
@ -48,7 +48,7 @@ const char* const kCSSRawProperties[eCSSProperty_COUNT_with_aliases] = {
|
|||
|
||||
using namespace mozilla;
|
||||
|
||||
static int32_t gTableRefCount;
|
||||
static int32_t gPropertyTableRefCount;
|
||||
static nsStaticCaseInsensitiveNameTable* gPropertyTable;
|
||||
static nsStaticCaseInsensitiveNameTable* gFontDescTable;
|
||||
|
||||
|
@ -96,7 +96,7 @@ static nsCSSProperty gAliases[eCSSAliasCount != 0 ? eCSSAliasCount : 1] = {
|
|||
void
|
||||
nsCSSProps::AddRefTable(void)
|
||||
{
|
||||
if (0 == gTableRefCount++) {
|
||||
if (0 == gPropertyTableRefCount++) {
|
||||
NS_ABORT_IF_FALSE(!gPropertyTable, "pre existing array!");
|
||||
NS_ABORT_IF_FALSE(!gFontDescTable, "pre existing array!");
|
||||
|
||||
|
@ -336,7 +336,7 @@ nsCSSProps::BuildShorthandsContainingTable()
|
|||
void
|
||||
nsCSSProps::ReleaseTable(void)
|
||||
{
|
||||
if (0 == --gTableRefCount) {
|
||||
if (0 == --gPropertyTableRefCount) {
|
||||
delete gPropertyTable;
|
||||
gPropertyTable = nullptr;
|
||||
|
||||
|
|
|
@ -21,13 +21,13 @@ using namespace mozilla;
|
|||
#undef CSS_PSEUDO_CLASS
|
||||
|
||||
#define CSS_PSEUDO_CLASS(name_, value_, pref_) \
|
||||
NS_STATIC_ATOM_BUFFER(name_##_buffer, value_)
|
||||
NS_STATIC_ATOM_BUFFER(name_##_pseudo_class_buffer, value_)
|
||||
#include "nsCSSPseudoClassList.h"
|
||||
#undef CSS_PSEUDO_CLASS
|
||||
|
||||
static const nsStaticAtom CSSPseudoClasses_info[] = {
|
||||
#define CSS_PSEUDO_CLASS(name_, value_, pref_) \
|
||||
NS_STATIC_ATOM(name_##_buffer, &sPseudoClass_##name_),
|
||||
NS_STATIC_ATOM(name_##_pseudo_class_buffer, &sPseudoClass_##name_),
|
||||
#include "nsCSSPseudoClassList.h"
|
||||
#undef CSS_PSEUDO_CLASS
|
||||
};
|
||||
|
|
|
@ -21,13 +21,13 @@ using namespace mozilla;
|
|||
#undef CSS_PSEUDO_ELEMENT
|
||||
|
||||
#define CSS_PSEUDO_ELEMENT(name_, value_, flags_) \
|
||||
NS_STATIC_ATOM_BUFFER(name_##_buffer, value_)
|
||||
NS_STATIC_ATOM_BUFFER(name_##_pseudo_element_buffer, value_)
|
||||
#include "nsCSSPseudoElementList.h"
|
||||
#undef CSS_PSEUDO_ELEMENT
|
||||
|
||||
static const nsStaticAtom CSSPseudoElements_info[] = {
|
||||
#define CSS_PSEUDO_ELEMENT(name_, value_, flags_) \
|
||||
NS_STATIC_ATOM(name_##_buffer, (nsIAtom**)&nsCSSPseudoElements::name_),
|
||||
NS_STATIC_ATOM(name_##_pseudo_element_buffer, (nsIAtom**)&nsCSSPseudoElements::name_),
|
||||
#include "nsCSSPseudoElementList.h"
|
||||
#undef CSS_PSEUDO_ELEMENT
|
||||
};
|
||||
|
|
|
@ -505,14 +505,6 @@ ImportRule::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
|
|||
// must be outside the namespace
|
||||
DOMCI_DATA(CSSImportRule, css::ImportRule)
|
||||
|
||||
static bool
|
||||
CloneRuleInto(css::Rule* aRule, void* aArray)
|
||||
{
|
||||
nsRefPtr<css::Rule> clone = aRule->Clone();
|
||||
static_cast<nsCOMArray<css::Rule>*>(aArray)->AppendObject(clone);
|
||||
return true;
|
||||
}
|
||||
|
||||
namespace mozilla {
|
||||
namespace css {
|
||||
|
||||
|
@ -532,7 +524,7 @@ SetParentRuleReference(Rule* aRule, void* aParentRule)
|
|||
GroupRule::GroupRule(const GroupRule& aCopy)
|
||||
: Rule(aCopy)
|
||||
{
|
||||
const_cast<GroupRule&>(aCopy).mRules.EnumerateForwards(CloneRuleInto, &mRules);
|
||||
const_cast<GroupRule&>(aCopy).mRules.EnumerateForwards(GroupRule::CloneRuleInto, &mRules);
|
||||
mRules.EnumerateForwards(SetParentRuleReference, this);
|
||||
}
|
||||
|
||||
|
|
|
@ -749,14 +749,6 @@ static bool SetStyleSheetReference(css::Rule* aRule, void* aSheet)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
CloneRuleInto(css::Rule* aRule, void* aArray)
|
||||
{
|
||||
nsRefPtr<css::Rule> clone = aRule->Clone();
|
||||
static_cast<nsCOMArray<css::Rule>*>(aArray)->AppendObject(clone);
|
||||
return true;
|
||||
}
|
||||
|
||||
struct ChildSheetListBuilder {
|
||||
nsRefPtr<nsCSSStyleSheet>* sheetSlot;
|
||||
nsCSSStyleSheet* parent;
|
||||
|
@ -862,7 +854,7 @@ nsCSSStyleSheetInner::nsCSSStyleSheetInner(nsCSSStyleSheetInner& aCopy,
|
|||
{
|
||||
MOZ_COUNT_CTOR(nsCSSStyleSheetInner);
|
||||
AddSheet(aPrimarySheet);
|
||||
aCopy.mOrderedRules.EnumerateForwards(CloneRuleInto, &mOrderedRules);
|
||||
aCopy.mOrderedRules.EnumerateForwards(css::GroupRule::CloneRuleInto, &mOrderedRules);
|
||||
mOrderedRules.EnumerateForwards(SetStyleSheetReference, aPrimarySheet);
|
||||
|
||||
ChildSheetListBuilder builder = { &mFirstChild, aPrimarySheet };
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "imgRequestProxy.h"
|
||||
#include "nsDeviceContext.h"
|
||||
|
||||
namespace css = mozilla::css;
|
||||
using namespace mozilla;
|
||||
|
||||
nsCSSValue::nsCSSValue(int32_t aValue, nsCSSUnit aUnit)
|
||||
: mUnit(aUnit)
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
#include "nsAttrValue.h"
|
||||
#include "nsAttrValueInlines.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
namespace css = mozilla::css;
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "nsStyleAnimation.h"
|
||||
#include "gfxMatrix.h"
|
||||
|
||||
namespace css = mozilla::css;
|
||||
using namespace mozilla;
|
||||
|
||||
namespace nsStyleTransformMatrix {
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче