diff options
Diffstat (limited to 'layout/style')
23 files changed, 7 insertions, 112 deletions
diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp index 155ecbeeef..a28a1053f0 100644 --- a/layout/style/Loader.cpp +++ b/layout/style/Loader.cpp @@ -5,13 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * This Original Code has been modified by IBM Corporation. - * Modifications made by IBM described herein are Copyright (c) - * International Business Machines Corporation, 2000. Modifications - * to Mozilla code or documentation identified per MPL Section 3.3 - * - * Date Modified by Description of modification - * 04/20/2000 IBM Corp. OS/2 VisualAge build. */ /* loading of CSS style sheets using the network APIs */ @@ -58,9 +51,7 @@ #include "mozilla/StyleSheetInlines.h" #include "mozilla/ConsoleReportCollector.h" -#ifdef MOZ_XUL #include "nsXULPrototypeCache.h" -#endif #include "nsIMediaList.h" #include "nsIDOMStyleSheet.h" @@ -1104,7 +1095,6 @@ Loader::CreateSheet(nsIURI* aURI, RefPtr<StyleSheet> sheet; // First, the XUL cache -#ifdef MOZ_XUL if (IsChromeURI(aURI)) { nsXULPrototypeCache* cache = nsXULPrototypeCache::GetInstance(); if (cache) { @@ -1114,7 +1104,6 @@ Loader::CreateSheet(nsIURI* aURI, } } } -#endif bool fromCompleteSheets = false; if (!sheet) { @@ -1945,7 +1934,6 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus, } data = data->mNext; } -#ifdef MOZ_XUL if (IsChromeURI(aLoadData->mURI)) { nsXULPrototypeCache* cache = nsXULPrototypeCache::GetInstance(); if (cache && cache->IsEnabled()) { @@ -1956,9 +1944,7 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus, cache->PutStyleSheet(sheet); } } - } - else { -#endif + } else { URIPrincipalReferrerPolicyAndCORSModeHashKey key(aLoadData->mURI, aLoadData->mLoaderPrincipal, aLoadData->mSheet->GetCORSMode(), @@ -1966,9 +1952,7 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus, NS_ASSERTION(sheet->IsComplete(), "Should only be caching complete sheets"); mSheets->mCompleteSheets.Put(&key, sheet); -#ifdef MOZ_XUL } -#endif } else { NS_WARNING("stylo: Stylesheet caching not yet supported - see bug 1290218."); } diff --git a/layout/style/SVGAttrAnimationRuleProcessor.cpp b/layout/style/SVGAttrAnimationRuleProcessor.cpp index 9eb31b1b23..edc468003b 100644 --- a/layout/style/SVGAttrAnimationRuleProcessor.cpp +++ b/layout/style/SVGAttrAnimationRuleProcessor.cpp @@ -92,14 +92,12 @@ SVGAttrAnimationRuleProcessor::RulesMatching(AnonBoxRuleProcessorData* aData) // see comment in RulesMatching(PseudoElementRuleProcessorData*). } -#ifdef MOZ_XUL /* virtual */ void SVGAttrAnimationRuleProcessor::RulesMatching(XULTreeRuleProcessorData* aData) { // If SMIL Animation of SVG attributes can ever target XUL tree pseudos, // see comment in RulesMatching(PseudoElementRuleProcessorData*). } -#endif /* virtual */ size_t SVGAttrAnimationRuleProcessor::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const diff --git a/layout/style/SVGAttrAnimationRuleProcessor.h b/layout/style/SVGAttrAnimationRuleProcessor.h index 1750c761bd..f5aa0aaf37 100644 --- a/layout/style/SVGAttrAnimationRuleProcessor.h +++ b/layout/style/SVGAttrAnimationRuleProcessor.h @@ -37,9 +37,7 @@ public: virtual void RulesMatching(ElementRuleProcessorData* aData) override; virtual void RulesMatching(PseudoElementRuleProcessorData* aData) override; virtual void RulesMatching(AnonBoxRuleProcessorData* aData) override; -#ifdef MOZ_XUL virtual void RulesMatching(XULTreeRuleProcessorData* aData) override; -#endif virtual nsRestyleHint HasStateDependentStyle(StateRuleProcessorData* aData) override; virtual nsRestyleHint HasStateDependentStyle(PseudoElementStateRuleProcessorData* aData) override; virtual bool HasDocumentStateDependentStyle(StateRuleProcessorData* aData) override; diff --git a/layout/style/StyleRule.cpp b/layout/style/StyleRule.cpp index 8fde725349..6fad62f8b6 100644 --- a/layout/style/StyleRule.cpp +++ b/layout/style/StyleRule.cpp @@ -489,17 +489,11 @@ int32_t nsCSSSelector::CalcWeightWithoutNegations() const { int32_t weight = 0; -#ifdef MOZ_XUL MOZ_ASSERT(!(IsPseudoElement() && PseudoType() != CSSPseudoElementType::XULTree && mClassList), "If non-XUL-tree pseudo-elements can have class selectors " "after them, specificity calculation must be updated"); -#else - MOZ_ASSERT(!(IsPseudoElement() && mClassList), - "If pseudo-elements can have class selectors " - "after them, specificity calculation must be updated"); -#endif MOZ_ASSERT(!(IsPseudoElement() && (mIDList || mAttrList)), "If pseudo-elements can have id or attribute selectors " "after them, specificity calculation must be updated"); @@ -513,13 +507,11 @@ int32_t nsCSSSelector::CalcWeightWithoutNegations() const list = list->mNext; } list = mClassList; -#ifdef MOZ_XUL // XUL tree pseudo-elements abuse mClassList to store some private // data; ignore that. if (PseudoType() == CSSPseudoElementType::XULTree) { list = nullptr; } -#endif while (nullptr != list) { weight += 0x000100; list = list->mNext; @@ -793,7 +785,6 @@ nsCSSSelector::AppendToStringWithoutCombinatorsOrNegations // Append each class in the linked list if (mClassList) { if (isPseudoElement) { -#ifdef MOZ_XUL MOZ_ASSERT(nsCSSAnonBoxes::IsTreePseudoElement(mLowercaseTag), "must be tree pseudo-element"); @@ -804,9 +795,6 @@ nsCSSSelector::AppendToStringWithoutCombinatorsOrNegations } // replace the final comma with a close-paren aString.Replace(aString.Length() - 1, 1, char16_t(')')); -#else - NS_ERROR("Can't happen"); -#endif } else { nsAtomList* list = mClassList; while (list != nullptr) { diff --git a/layout/style/nsCSSAnonBoxList.h b/layout/style/nsCSSAnonBoxList.h index bb44215f18..fb97bff4dc 100644 --- a/layout/style/nsCSSAnonBoxList.h +++ b/layout/style/nsCSSAnonBoxList.h @@ -82,7 +82,6 @@ CSS_ANON_BOX(rubyBaseContainer, ":-moz-ruby-base-container") CSS_ANON_BOX(rubyText, ":-moz-ruby-text") CSS_ANON_BOX(rubyTextContainer, ":-moz-ruby-text-container") -#ifdef MOZ_XUL CSS_ANON_BOX(moztreecolumn, ":-moz-tree-column") CSS_ANON_BOX(moztreerow, ":-moz-tree-row") CSS_ANON_BOX(moztreeseparator, ":-moz-tree-separator") @@ -95,7 +94,6 @@ CSS_ANON_BOX(moztreecelltext, ":-moz-tree-cell-text") CSS_ANON_BOX(moztreecheckbox, ":-moz-tree-checkbox") CSS_ANON_BOX(moztreeprogressmeter, ":-moz-tree-progressmeter") CSS_ANON_BOX(moztreedropfeedback, ":-moz-tree-drop-feedback") -#endif CSS_ANON_BOX(mozSVGMarkerAnonChild, ":-moz-svg-marker-anon-child") CSS_ANON_BOX(mozSVGOuterSVGAnonChild, ":-moz-svg-outer-svg-anon-child") diff --git a/layout/style/nsCSSAnonBoxes.cpp b/layout/style/nsCSSAnonBoxes.cpp index 3585c9e38d..0c0adbb1d1 100644 --- a/layout/style/nsCSSAnonBoxes.cpp +++ b/layout/style/nsCSSAnonBoxes.cpp @@ -42,11 +42,9 @@ bool nsCSSAnonBoxes::IsAnonBox(nsIAtom *aAtom) ArrayLength(CSSAnonBoxes_info)); } -#ifdef MOZ_XUL /* static */ bool nsCSSAnonBoxes::IsTreePseudoElement(nsIAtom* aPseudo) { return StringBeginsWith(nsDependentAtomString(aPseudo), NS_LITERAL_STRING(":-moz-tree-")); } -#endif diff --git a/layout/style/nsCSSAnonBoxes.h b/layout/style/nsCSSAnonBoxes.h index f631f88013..ed55eef442 100644 --- a/layout/style/nsCSSAnonBoxes.h +++ b/layout/style/nsCSSAnonBoxes.h @@ -20,9 +20,7 @@ public: static void AddRefAtoms(); static bool IsAnonBox(nsIAtom *aAtom); -#ifdef MOZ_XUL static bool IsTreePseudoElement(nsIAtom* aPseudo); -#endif static bool IsNonElement(nsIAtom* aPseudo) { return aPseudo == mozText || aPseudo == mozOtherNonElement; } diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 9866dd09e8..3d5edbd0ee 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -863,9 +863,7 @@ protected: }; PriorityParsingStatus ParsePriority(); -#ifdef MOZ_XUL bool ParseTreePseudoElement(nsAtomList **aPseudoElementArgs); -#endif // Property specific parsing routines bool ParseImageLayers(const nsCSSPropertyID aTable[]); @@ -6052,7 +6050,6 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask, } } -#ifdef MOZ_XUL isTreePseudo = (pseudoElementType == CSSPseudoElementType::XULTree); // If a tree pseudo-element is using the function syntax, it will // get isTree set here and will pass the check below that only @@ -6062,7 +6059,7 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask, // pseudo-elements are allowed to be either functions or not, as // desired. bool isTree = (eCSSToken_Function == mToken.mType) && isTreePseudo; -#endif + bool isPseudoElement = (pseudoElementType < CSSPseudoElementType::Count); // anonymous boxes are only allowed if they're the tree boxes or we have // enabled agent rules @@ -6088,10 +6085,7 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask, // If it's a function token, it better be on our "ok" list, and if the name // is that of a function pseudo it better be a function token if ((eCSSToken_Function == mToken.mType) != - ( -#ifdef MOZ_XUL - isTree || -#endif + (isTree || CSSPseudoClassType::negation == pseudoClassType || nsCSSPseudoClasses::HasStringArg(pseudoClassType) || nsCSSPseudoClasses::HasNthPairArg(pseudoClassType) || @@ -6185,11 +6179,8 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask, // various -moz-* pseudo-elements) must have |parsingPseudoElement| // set. if (!parsingPseudoElement && - !nsCSSPseudoElements::IsCSS2PseudoElement(pseudo) -#ifdef MOZ_XUL - && !isTreePseudo -#endif - ) { + !nsCSSPseudoElements::IsCSS2PseudoElement(pseudo) && + !isTreePseudo) { REPORT_UNEXPECTED_TOKEN(PEPseudoSelNewStyleOnly); UngetToken(); return eSelectorParsingStatus_Error; @@ -6200,7 +6191,6 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask, NS_ADDREF(*aPseudoElement = pseudo); *aPseudoElementType = pseudoElementType; -#ifdef MOZ_XUL if (isTree) { // We have encountered a pseudoelement of the form // -moz-tree-xxxx(a,b,c). We parse (a,b,c) and add each @@ -6210,7 +6200,6 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask, return eSelectorParsingStatus_Error; } } -#endif // Pseudo-elements can only be followed by user action pseudo-classes // or be the end of the selector. So the next non-whitespace token must @@ -7096,7 +7085,6 @@ CSSParserImpl::ParseRGBColor(ComponentType& aR, return false; } -#ifdef MOZ_XUL bool CSSParserImpl::ParseTreePseudoElement(nsAtomList **aPseudoElementArgs) { @@ -7122,7 +7110,6 @@ CSSParserImpl::ParseTreePseudoElement(nsAtomList **aPseudoElementArgs) fakeSelector.mClassList = nullptr; return true; } -#endif nsCSSKeyword CSSParserImpl::LookupKeywordPrefixAware(nsAString& aKeywordStr, diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index 461b3e3ee3..756e3eb25c 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -1316,7 +1316,6 @@ KTableEntry nsCSSProps::kDisplayKTable[] = { // nsCSSFrameConstructor::ConstructXULFrame { eCSSKeyword__moz_box, StyleDisplay::Box }, { eCSSKeyword__moz_inline_box, StyleDisplay::InlineBox }, -#ifdef MOZ_XUL { eCSSKeyword__moz_grid, StyleDisplay::XulGrid }, { eCSSKeyword__moz_inline_grid, StyleDisplay::InlineXulGrid }, { eCSSKeyword__moz_grid_group, StyleDisplay::XulGridGroup }, @@ -1326,7 +1325,6 @@ KTableEntry nsCSSProps::kDisplayKTable[] = { { eCSSKeyword__moz_deck, StyleDisplay::Deck }, { eCSSKeyword__moz_popup, StyleDisplay::Popup }, { eCSSKeyword__moz_groupbox, StyleDisplay::Groupbox }, -#endif { eCSSKeyword_flex, StyleDisplay::Flex }, { eCSSKeyword_inline_flex, StyleDisplay::InlineFlex }, { eCSSKeyword_ruby, StyleDisplay::Ruby }, diff --git a/layout/style/nsCSSPseudoElements.cpp b/layout/style/nsCSSPseudoElements.cpp index ef09f2d42a..49621374fe 100644 --- a/layout/style/nsCSSPseudoElements.cpp +++ b/layout/style/nsCSSPseudoElements.cpp @@ -92,11 +92,9 @@ nsCSSPseudoElements::GetPseudoType(nsIAtom *aAtom, EnabledState aEnabledState) } if (nsCSSAnonBoxes::IsAnonBox(aAtom)) { -#ifdef MOZ_XUL if (nsCSSAnonBoxes::IsTreePseudoElement(aAtom)) { return Type::XULTree; } -#endif return Type::AnonBox; } diff --git a/layout/style/nsCSSPseudoElements.h b/layout/style/nsCSSPseudoElements.h index 22c744ad06..90db43c7d3 100644 --- a/layout/style/nsCSSPseudoElements.h +++ b/layout/style/nsCSSPseudoElements.h @@ -55,9 +55,7 @@ enum class CSSPseudoElementType : CSSPseudoElementTypeBase { #undef CSS_PSEUDO_ELEMENT Count, AnonBox = Count, -#ifdef MOZ_XUL XULTree, -#endif NotPseudo, MAX }; diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp index 6de279ac5c..aed26a1c01 100644 --- a/layout/style/nsCSSRuleProcessor.cpp +++ b/layout/style/nsCSSRuleProcessor.cpp @@ -853,9 +853,7 @@ struct RuleCascadeData { // case-sensitive match. mAttributeSelectors(&AtomSelector_CSOps, sizeof(AtomSelectorEntry)), mAnonBoxRules(&RuleHash_TagTable_Ops, sizeof(RuleHashTagTableEntry)), -#ifdef MOZ_XUL mXULTreeRules(&RuleHash_TagTable_Ops, sizeof(RuleHashTagTableEntry)), -#endif mKeyframesRuleTable(), mCounterStyleRuleTable(), mCacheKey(aMedium), @@ -885,9 +883,7 @@ struct RuleCascadeData { nsTArray<nsCSSSelector*> mPossiblyNegatedIDSelectors; PLDHashTable mAttributeSelectors; PLDHashTable mAnonBoxRules; -#ifdef MOZ_XUL PLDHashTable mXULTreeRules; -#endif nsTArray<nsFontFaceRuleContainer> mFontFaceRules; nsTArray<nsCSSKeyframesRule*> mKeyframesRules; @@ -940,9 +936,7 @@ RuleCascadeData::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const n += SizeOfSelectorsHashTable(mAttributeSelectors, aMallocSizeOf); n += SizeOfRuleHashTable(mAnonBoxRules, aMallocSizeOf); -#ifdef MOZ_XUL n += SizeOfRuleHashTable(mXULTreeRules, aMallocSizeOf); -#endif n += mFontFaceRules.ShallowSizeOfExcludingThis(aMallocSizeOf); n += mKeyframesRules.ShallowSizeOfExcludingThis(aMallocSizeOf); @@ -2589,7 +2583,6 @@ nsCSSRuleProcessor::RulesMatching(AnonBoxRuleProcessorData* aData) } } -#ifdef MOZ_XUL /* virtual */ void nsCSSRuleProcessor::RulesMatching(XULTreeRuleProcessorData* aData) { @@ -2612,7 +2605,6 @@ nsCSSRuleProcessor::RulesMatching(XULTreeRuleProcessorData* aData) } } } -#endif static inline nsRestyleHint RestyleHintForOp(char16_t oper) { @@ -3362,7 +3354,6 @@ AddRule(RuleSelectorPair* aRuleInfo, RuleCascadeData* aCascade) aRuleInfo->mSelector->mLowercaseTag, RuleValue(*aRuleInfo, 0, aCascade->mQuirksMode)); } else { -#ifdef MOZ_XUL NS_ASSERTION(pseudoType == CSSPseudoElementType::XULTree, "Unexpected pseudo type"); // Index doesn't matter here, since we'll just be walking these @@ -3370,9 +3361,6 @@ AddRule(RuleSelectorPair* aRuleInfo, RuleCascadeData* aCascade) AppendRuleToTagTable(&cascade->mXULTreeRules, aRuleInfo->mSelector->mLowercaseTag, RuleValue(*aRuleInfo, 0, aCascade->mQuirksMode)); -#else - NS_NOTREACHED("Unexpected pseudo type"); -#endif } for (nsCSSSelector* selector = aRuleInfo->mSelector; diff --git a/layout/style/nsCSSRuleProcessor.h b/layout/style/nsCSSRuleProcessor.h index e207a71afe..ae3e76da28 100644 --- a/layout/style/nsCSSRuleProcessor.h +++ b/layout/style/nsCSSRuleProcessor.h @@ -140,9 +140,7 @@ public: virtual void RulesMatching(AnonBoxRuleProcessorData* aData) override; -#ifdef MOZ_XUL virtual void RulesMatching(XULTreeRuleProcessorData* aData) override; -#endif virtual nsRestyleHint HasStateDependentStyle(StateRuleProcessorData* aData) override; virtual nsRestyleHint HasStateDependentStyle(PseudoElementStateRuleProcessorData* aData) override; diff --git a/layout/style/nsHTMLCSSStyleSheet.cpp b/layout/style/nsHTMLCSSStyleSheet.cpp index 9b3bd65fb5..c477dc65f2 100644 --- a/layout/style/nsHTMLCSSStyleSheet.cpp +++ b/layout/style/nsHTMLCSSStyleSheet.cpp @@ -119,12 +119,10 @@ nsHTMLCSSStyleSheet::RulesMatching(AnonBoxRuleProcessorData* aData) { } -#ifdef MOZ_XUL /* virtual */ void nsHTMLCSSStyleSheet::RulesMatching(XULTreeRuleProcessorData* aData) { } -#endif // Test if style is dependent on content state /* virtual */ nsRestyleHint diff --git a/layout/style/nsHTMLCSSStyleSheet.h b/layout/style/nsHTMLCSSStyleSheet.h index 2b7ea7ae83..b5f2941c99 100644 --- a/layout/style/nsHTMLCSSStyleSheet.h +++ b/layout/style/nsHTMLCSSStyleSheet.h @@ -37,9 +37,7 @@ public: virtual void RulesMatching(ElementRuleProcessorData* aData) override; virtual void RulesMatching(PseudoElementRuleProcessorData* aData) override; virtual void RulesMatching(AnonBoxRuleProcessorData* aData) override; -#ifdef MOZ_XUL virtual void RulesMatching(XULTreeRuleProcessorData* aData) override; -#endif virtual nsRestyleHint HasStateDependentStyle(StateRuleProcessorData* aData) override; virtual nsRestyleHint HasStateDependentStyle(PseudoElementStateRuleProcessorData* aData) override; virtual bool HasDocumentStateDependentStyle(StateRuleProcessorData* aData) override; diff --git a/layout/style/nsHTMLStyleSheet.cpp b/layout/style/nsHTMLStyleSheet.cpp index 70a5c7f414..af5df10493 100644 --- a/layout/style/nsHTMLStyleSheet.cpp +++ b/layout/style/nsHTMLStyleSheet.cpp @@ -3,13 +3,6 @@ * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This Original Code has been modified by IBM Corporation. Modifications made by IBM - * described herein are Copyright (c) International Business Machines Corporation, 2000. - * Modifications to Mozilla code or documentation identified per MPL Section 3.3 - * - * Date Modified by Description of modification - * 04/20/2000 IBM Corp. OS/2 VisualAge build. */ /* @@ -456,12 +449,10 @@ nsHTMLStyleSheet::RulesMatching(AnonBoxRuleProcessorData* aData) { } -#ifdef MOZ_XUL /* virtual */ void nsHTMLStyleSheet::RulesMatching(XULTreeRuleProcessorData* aData) { } -#endif void nsHTMLStyleSheet::SetOwningDocument(nsIDocument* aDocument) diff --git a/layout/style/nsHTMLStyleSheet.h b/layout/style/nsHTMLStyleSheet.h index a522fc3b41..eacee9d080 100644 --- a/layout/style/nsHTMLStyleSheet.h +++ b/layout/style/nsHTMLStyleSheet.h @@ -37,9 +37,7 @@ public: virtual void RulesMatching(ElementRuleProcessorData* aData) override; virtual void RulesMatching(PseudoElementRuleProcessorData* aData) override; virtual void RulesMatching(AnonBoxRuleProcessorData* aData) override; -#ifdef MOZ_XUL virtual void RulesMatching(XULTreeRuleProcessorData* aData) override; -#endif virtual nsRestyleHint HasStateDependentStyle(StateRuleProcessorData* aData) override; virtual nsRestyleHint HasStateDependentStyle(PseudoElementStateRuleProcessorData* aData) override; virtual bool HasDocumentStateDependentStyle(StateRuleProcessorData* aData) override; diff --git a/layout/style/nsIStyleRuleProcessor.h b/layout/style/nsIStyleRuleProcessor.h index 2075050d40..fbaaf9c37d 100644 --- a/layout/style/nsIStyleRuleProcessor.h +++ b/layout/style/nsIStyleRuleProcessor.h @@ -20,9 +20,7 @@ struct RuleProcessorData; struct ElementRuleProcessorData; struct PseudoElementRuleProcessorData; struct AnonBoxRuleProcessorData; -#ifdef MOZ_XUL struct XULTreeRuleProcessorData; -#endif struct StateRuleProcessorData; struct PseudoElementStateRuleProcessorData; struct AttributeRuleProcessorData; @@ -70,13 +68,11 @@ public: */ virtual void RulesMatching(AnonBoxRuleProcessorData* aData) = 0; -#ifdef MOZ_XUL /** * Just like the previous |RulesMatching|, except for a given content * node <em>and tree pseudo</em>. */ virtual void RulesMatching(XULTreeRuleProcessorData* aData) = 0; -#endif /** * Return whether style can depend on a change of the given document state. diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 9d0821406b..e59c10cd2f 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -1402,11 +1402,7 @@ struct SetEnumValueHelper DEFINE_ENUM_CLASS_SETTER(StyleUserModify, ReadOnly, WriteOnly) DEFINE_ENUM_CLASS_SETTER(StyleWindowDragging, Default, NoDrag) DEFINE_ENUM_CLASS_SETTER(StyleOrient, Inline, Vertical) -#ifdef MOZ_XUL DEFINE_ENUM_CLASS_SETTER(StyleDisplay, None, Popup) -#else - DEFINE_ENUM_CLASS_SETTER(StyleDisplay, None, InlineBox) -#endif #undef DEF_SET_ENUMERATED_VALUE }; diff --git a/layout/style/nsRuleProcessorData.h b/layout/style/nsRuleProcessorData.h index 6f8cba8959..fbaa768cc9 100644 --- a/layout/style/nsRuleProcessorData.h +++ b/layout/style/nsRuleProcessorData.h @@ -499,7 +499,6 @@ struct MOZ_STACK_CLASS AnonBoxRuleProcessorData : public RuleProcessorData { nsIAtom* mPseudoTag; }; -#ifdef MOZ_XUL struct MOZ_STACK_CLASS XULTreeRuleProcessorData : public ElementDependentRuleProcessorData { XULTreeRuleProcessorData(nsPresContext* aPresContext, @@ -522,7 +521,6 @@ struct MOZ_STACK_CLASS XULTreeRuleProcessorData : nsIAtom* mPseudoTag; nsICSSPseudoComparator* mComparator; }; -#endif struct MOZ_STACK_CLASS StateRuleProcessorData : public ElementDependentRuleProcessorData { diff --git a/layout/style/nsStyleConsts.h b/layout/style/nsStyleConsts.h index 60377928b0..8966932626 100644 --- a/layout/style/nsStyleConsts.h +++ b/layout/style/nsStyleConsts.h @@ -559,7 +559,6 @@ enum class StyleDisplay : uint8_t { WebkitInlineBox, Box, InlineBox, -#ifdef MOZ_XUL XulGrid, InlineXulGrid, XulGridGroup, @@ -569,7 +568,6 @@ enum class StyleDisplay : uint8_t { Deck, Groupbox, Popup, -#endif }; // See nsStyleDisplay diff --git a/layout/style/nsStyleSet.cpp b/layout/style/nsStyleSet.cpp index 558b9fa7f1..5890100eb0 100644 --- a/layout/style/nsStyleSet.cpp +++ b/layout/style/nsStyleSet.cpp @@ -1969,11 +1969,8 @@ nsStyleSet::ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag, NS_ENSURE_FALSE(mInShutdown, nullptr); #ifdef DEBUG - bool isAnonBox = nsCSSAnonBoxes::IsAnonBox(aPseudoTag) -#ifdef MOZ_XUL - && !nsCSSAnonBoxes::IsTreePseudoElement(aPseudoTag) -#endif - ; + bool isAnonBox = nsCSSAnonBoxes::IsAnonBox(aPseudoTag) && + !nsCSSAnonBoxes::IsTreePseudoElement(aPseudoTag); NS_PRECONDITION(isAnonBox, "Unexpected pseudo"); #endif @@ -2007,7 +2004,6 @@ nsStyleSet::ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag, nullptr, aFlags); } -#ifdef MOZ_XUL already_AddRefed<nsStyleContext> nsStyleSet::ResolveXULTreePseudoStyle(Element* aParentElement, nsIAtom* aPseudoTag, @@ -2046,7 +2042,6 @@ nsStyleSet::ResolveXULTreePseudoStyle(Element* aParentElement, aPseudoTag, CSSPseudoElementType::XULTree, nullptr, eNoFlags); } -#endif bool nsStyleSet::AppendFontFaceRules(nsTArray<nsFontFaceRuleContainer>& aArray) diff --git a/layout/style/nsStyleSet.h b/layout/style/nsStyleSet.h index 879d0add39..52541d030f 100644 --- a/layout/style/nsStyleSet.h +++ b/layout/style/nsStyleSet.h @@ -240,7 +240,6 @@ class nsStyleSet final ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag, nsStyleContext* aParentContext, uint32_t aFlags = eNoFlags); -#ifdef MOZ_XUL // Get a style context for a XUL tree pseudo. aPseudoTag is the // pseudo-tag to use and must be non-null. aParentContent must be // non-null. aComparator must be non-null. @@ -249,7 +248,6 @@ class nsStyleSet final nsIAtom* aPseudoTag, nsStyleContext* aParentContext, nsICSSPseudoComparator* aComparator); -#endif // Append all the currently-active font face rules to aArray. Return // true for success and false for failure. |