gecko-dev/layout/style/moz.build
Xidorn Quan d7f3530f07 Bug 1449068 part 2 - Use Servo data to back @counter-style rule. r=emilio
This patch basically does:
* Add descriptor setters and generation count to CounterStyleRule in
  Servo. (This code is mostly based on the old code inside
  nsCSSCounterStyleRule for handling mutation.)
* Use RawServoCounterStyleRule in CounterStyleManager.
* Add ServoCounterStyleRule and remove nsCSSCounterStyleRule.

Test change:
* "fixed" was parsed as and thus serialized to "fixed 1", but Servo
  doesn't do so. It preserves whether the number presents. Either way
  is probably fine.

MozReview-Commit-ID: EtKTeu32isi

--HG--
extra : rebase_source : ec44f01c581003ce4b6ef69435a05de7f3da5469
2018-04-05 08:41:28 +10:00

292 lines
7.2 KiB
Python

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
with Files('**'):
BUG_COMPONENT = ('Core', 'CSS Parsing and Computation')
with Files('nsComputedDOMStyle.*'):
BUG_COMPONENT = ('Core', 'DOM: CSS Object Model')
with Files('nsROCSSPrimitiveValue.*'):
BUG_COMPONENT = ('Core', 'DOM: CSS Object Model')
with Files('CSSRuleList.*'):
BUG_COMPONENT = ('Core', 'DOM: CSS Object Model')
with Files('nsDOM*'):
BUG_COMPONENT = ('Core', 'DOM: CSS Object Model')
DIRS += ['xbl-marquee']
TEST_DIRS += ['test']
EXPORTS += [
'AnimationCommon.h',
'CounterStyleManager.h',
'nsAnimationManager.h',
'nsComputedDOMStylePropertyList.h',
'nsCSSAnonBoxes.h',
'nsCSSAnonBoxList.h',
'nsCSSCounterDescList.h',
'nsCSSFontDescList.h',
'nsCSSKeywordList.h',
'nsCSSKeywords.h',
'nsCSSParser.h',
'nsCSSPropAliasList.h',
'nsCSSPropertyID.h',
'nsCSSPropertyIDSet.h',
'nsCSSPropList.h',
'nsCSSProps.h',
'nsCSSPseudoElementList.h',
'nsCSSPseudoElements.h',
'nsCSSScanner.h',
'nsCSSValue.h',
'nsDOMCSSAttrDeclaration.h',
'nsDOMCSSDeclaration.h',
'nsDOMCSSRGBColor.h',
'nsICSSDeclaration.h',
'nsICSSLoaderObserver.h',
'nsLayoutStylesheetCache.h',
'nsMediaFeatures.h',
'nsStyleAutoArray.h',
'nsStyleConsts.h',
'nsStyleCoord.h',
'nsStyleStruct.h',
'nsStyleStructFwd.h',
'nsStyleStructInlines.h',
'nsStyleStructList.h',
'nsStyleTransformMatrix.h',
'nsStyleUtil.h',
'nsTimingFunction.h',
]
EXPORTS.mozilla += [
'AnimationCollection.h',
'BindingStyleRule.h',
'CachedInheritingStyles.h',
'ComputedStyle.h',
'ComputedStyleInlines.h',
'CSSEnabledState.h',
'DeclarationBlock.h',
'DeclarationBlockInlines.h',
'DocumentStyleRootIterator.h',
'GenericSpecifiedValues.h',
'GenericSpecifiedValuesInlines.h',
'LayerAnimationInfo.h',
'MediaFeatureChange.h',
'PostTraversalTask.h',
'PreloadedStyleSheet.h',
'ServoArcTypeList.h',
'ServoBindingList.h',
'ServoBindings.h',
'ServoBindingTypes.h',
'ServoCounterStyleRule.h',
'ServoCSSParser.h',
'ServoCSSRuleList.h',
'ServoDeclarationBlock.h',
'ServoDocumentRule.h',
'ServoElementSnapshot.h',
'ServoElementSnapshotTable.h',
'ServoFontFaceRule.h',
'ServoFontFeatureValuesRule.h',
'ServoImportRule.h',
'ServoKeyframeRule.h',
'ServoKeyframesRule.h',
'ServoMediaList.h',
'ServoMediaRule.h',
'ServoNamespaceRule.h',
'ServoPageRule.h',
'ServoPropPrefList.h',
'ServoSpecifiedValues.h',
'ServoStyleRule.h',
'ServoStyleSet.h',
'ServoStyleSetInlines.h',
'ServoStyleSheet.h',
'ServoSupportsRule.h',
'ServoTraversalStatistics.h',
'ServoTypes.h',
'ServoUtils.h',
'SheetType.h',
'StyleAnimationValue.h',
'StyleComplexColor.h',
'StyleSheet.h',
'StyleSheetInfo.h',
'StyleSheetInlines.h',
'URLExtraData.h',
]
EXPORTS.mozilla.dom += [
'CSS.h',
'CSSFontFeatureValuesRule.h',
'CSSImportRule.h',
'CSSKeyframeRule.h',
'CSSKeyframesRule.h',
'CSSLexer.h',
'CSSMediaRule.h',
'CSSMozDocumentRule.h',
'CSSNamespaceRule.h',
'CSSPageRule.h',
'CSSRuleList.h',
'CSSSupportsRule.h',
'CSSValue.h',
'FontFace.h',
'FontFaceSet.h',
'FontFaceSetIterator.h',
'MediaList.h',
'MediaQueryList.h',
]
EXPORTS.mozilla.css += [
'ErrorReporter.h',
'GroupRule.h',
'ImageLoader.h',
'Loader.h',
'Rule.h',
'SheetLoadData.h',
'SheetParsingMode.h',
'StreamLoader.h',
'URLMatchingFunction.h',
]
UNIFIED_SOURCES += [
'AnimationCollection.cpp',
'BindingStyleRule.cpp',
'CachedInheritingStyles.cpp',
'ComputedStyle.cpp',
'CounterStyleManager.cpp',
'CSS.cpp',
'CSSFontFeatureValuesRule.cpp',
'CSSImportRule.cpp',
'CSSKeyframeRule.cpp',
'CSSKeyframesRule.cpp',
'CSSLexer.cpp',
'CSSMediaRule.cpp',
'CSSMozDocumentRule.cpp',
'CSSPageRule.cpp',
'CSSRuleList.cpp',
'CSSSupportsRule.cpp',
'DocumentStyleRootIterator.cpp',
'ErrorReporter.cpp',
'FontFace.cpp',
'FontFaceSet.cpp',
'FontFaceSetIterator.cpp',
'GroupRule.cpp',
'ImageLoader.cpp',
'LayerAnimationInfo.cpp',
'Loader.cpp',
'MediaList.cpp',
'MediaQueryList.cpp',
'nsAnimationManager.cpp',
'nsComputedDOMStyle.cpp',
'nsCSSKeywords.cpp',
'nsCSSProps.cpp',
'nsCSSScanner.cpp',
'nsCSSValue.cpp',
'nsDOMCSSAttrDeclaration.cpp',
'nsDOMCSSDeclaration.cpp',
'nsDOMCSSRect.cpp',
'nsDOMCSSRGBColor.cpp',
'nsDOMCSSValueList.cpp',
'nsFontFaceLoader.cpp',
'nsFontFaceUtils.cpp',
'nsHTMLCSSStyleSheet.cpp',
'nsHTMLStyleSheet.cpp',
'nsICSSDeclaration.cpp',
'nsMediaFeatures.cpp',
'nsROCSSPrimitiveValue.cpp',
'nsStyleCoord.cpp',
'nsStyleStruct.cpp',
'nsStyleTransformMatrix.cpp',
'nsStyleUtil.cpp',
'nsTransitionManager.cpp',
'PostTraversalTask.cpp',
'PreloadedStyleSheet.cpp',
'Rule.cpp',
'ServoBindings.cpp',
'ServoCounterStyleRule.cpp',
'ServoCSSParser.cpp',
'ServoCSSRuleList.cpp',
'ServoDeclarationBlock.cpp',
'ServoDocumentRule.cpp',
'ServoElementSnapshot.cpp',
'ServoFontFaceRule.cpp',
'ServoFontFeatureValuesRule.cpp',
'ServoImportRule.cpp',
'ServoKeyframeRule.cpp',
'ServoKeyframesRule.cpp',
'ServoMediaList.cpp',
'ServoMediaRule.cpp',
'ServoNamespaceRule.cpp',
'ServoPageRule.cpp',
'ServoSpecifiedValues.cpp',
'ServoStyleRule.cpp',
'ServoStyleSet.cpp',
'ServoStyleSheet.cpp',
'ServoSupportsRule.cpp',
'StreamLoader.cpp',
'StyleAnimationValue.cpp',
'StyleSheet.cpp',
'URLExtraData.cpp',
]
SOURCES += [
'nsCSSAnonBoxes.cpp',
'nsCSSPseudoElements.cpp',
# nsLayoutStylesheetCache.cpp uses nsExceptionHandler.h, which includes
# windows.h.
'nsLayoutStylesheetCache.cpp',
]
if CONFIG['CC_TYPE'] == 'msvc':
# Needed for gCSSAnonBoxAtoms.
SOURCES['nsCSSAnonBoxes.cpp'].flags += ['-Zc:externConstexpr']
# Needed for gCSSPseudoElementAtoms.
SOURCES['nsCSSPseudoElements.cpp'].flags += ['-Zc:externConstexpr']
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'../base',
'../generic',
'../svg',
'../xul',
'/dom/base',
'/dom/html',
'/dom/xbl',
'/dom/xul',
'/image',
]
JAR_MANIFESTS += ['jar.mn']
RESOURCE_FILES += [
'contenteditable.css',
'designmode.css',
]
CONTENT_ACCESSIBLE_FILES += [
'ImageDocument.css',
'res/plaintext.css',
'res/viewsource.css',
'TopLevelImageDocument.css',
'TopLevelVideoDocument.css',
]
if CONFIG['COMPILE_ENVIRONMENT']:
GENERATED_FILES += [
'nsCSSPropsGenerated.inc',
]
css_props = GENERATED_FILES['nsCSSPropsGenerated.inc']
css_props.script = 'GenerateCSSPropsGenerated.py:generate'
css_props.inputs = [
'nsCSSPropsGenerated.inc.in',
'PythonCSSProps.h',
]
CONFIGURE_SUBST_FILES += [
'bindgen.toml',
]