2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 00:47:22 +04:00
|
|
|
# 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/.
|
|
|
|
|
2015-03-04 04:03:19 +03:00
|
|
|
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')
|
|
|
|
|
2018-09-03 02:47:52 +03:00
|
|
|
with Files('AnimationCollection.*'):
|
|
|
|
BUG_COMPONENT = ('Core', 'CSS Transitions and Animations')
|
|
|
|
|
|
|
|
with Files('AnimationCommon.*'):
|
|
|
|
BUG_COMPONENT = ('Core', 'CSS Transitions and Animations')
|
|
|
|
|
|
|
|
with Files('nsAnimationManager.*'):
|
|
|
|
BUG_COMPONENT = ('Core', 'CSS Transitions and Animations')
|
|
|
|
|
|
|
|
with Files('nsTransitionManager.*'):
|
|
|
|
BUG_COMPONENT = ('Core', 'CSS Transitions and Animations')
|
|
|
|
|
|
|
|
with Files('StyleAnimationValue.*'):
|
|
|
|
BUG_COMPONENT = ('Core', 'CSS Transitions and Animations')
|
|
|
|
|
2013-02-26 00:47:22 +04:00
|
|
|
DIRS += ['xbl-marquee']
|
2014-07-29 03:55:55 +04:00
|
|
|
TEST_DIRS += ['test']
|
2013-03-19 22:47:00 +04:00
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
EXPORTS += [
|
2018-04-18 12:39:51 +03:00
|
|
|
'!nsCSSPropertyID.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'AnimationCommon.h',
|
2014-06-12 05:12:00 +04:00
|
|
|
'CounterStyleManager.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'nsAnimationManager.h',
|
|
|
|
'nsCSSAnonBoxes.h',
|
2013-10-24 03:05:43 +04:00
|
|
|
'nsCSSAnonBoxList.h',
|
2014-06-12 05:10:00 +04:00
|
|
|
'nsCSSCounterDescList.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'nsCSSFontDescList.h',
|
|
|
|
'nsCSSKeywordList.h',
|
|
|
|
'nsCSSKeywords.h',
|
2016-08-17 04:46:58 +03:00
|
|
|
'nsCSSPropertyIDSet.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'nsCSSProps.h',
|
|
|
|
'nsCSSPseudoElementList.h',
|
|
|
|
'nsCSSPseudoElements.h',
|
|
|
|
'nsCSSValue.h',
|
|
|
|
'nsDOMCSSAttrDeclaration.h',
|
|
|
|
'nsDOMCSSDeclaration.h',
|
|
|
|
'nsICSSDeclaration.h',
|
|
|
|
'nsICSSLoaderObserver.h',
|
|
|
|
'nsLayoutStylesheetCache.h',
|
2017-01-14 18:16:47 +03:00
|
|
|
'nsMediaFeatures.h',
|
2017-03-10 05:53:17 +03:00
|
|
|
'nsStyleAutoArray.h',
|
2013-07-31 04:36:09 +04:00
|
|
|
'nsStyleConsts.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'nsStyleCoord.h',
|
|
|
|
'nsStyleStruct.h',
|
|
|
|
'nsStyleStructFwd.h',
|
|
|
|
'nsStyleStructInlines.h',
|
2018-03-26 12:09:17 +03:00
|
|
|
'nsStyleStructList.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'nsStyleTransformMatrix.h',
|
|
|
|
'nsStyleUtil.h',
|
2018-03-08 12:22:45 +03:00
|
|
|
'nsTimingFunction.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
]
|
|
|
|
|
Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron
Patch co-authored by Emmanuele Bassi <ebassi@gmail.com>
This defines a CSSVariableDeclarations class that holds a set of
variable declarations. This is at the specified value stage, so values
can either be 'initial', 'inherit' or a token stream (which is what you
normally have). The variables are stored in a hash table. Although
it's a bit of a hack, we store 'initial' and 'inherit' using special
string values that can't be valid token streams (we use "!" and ";").
Declaration objects now can have two CSSVariableDeclarations objects
on them, to store normal and !important variable declarations. So that
we keep preserving the order of declarations on the object, we inflate
mOrder to store uint32_ts, where values from eCSSProperty_COUNT onwards
represent custom properties. mVariableOrder stores the names of the
variables corresponding to those entries in mOrder.
We also add a new nsCSSProperty value, eCSSPropertyExtra_variable, which
is used to represent any custom property name.
nsCSSProps::LookupProperty can return this value.
The changes to nsCSSParser are straightforward. Custom properties
are parsed and checked for syntactic validity (e.g. "var(a,)" being
invalid) and stored on the Declaration. We use nsCSSScanner's
recording ability to grab the unparsed CSS string corresponding to
the variable's value.
2013-12-12 06:09:40 +04:00
|
|
|
EXPORTS.mozilla += [
|
2018-04-16 07:08:20 +03:00
|
|
|
'!ServoCSSPropList.h',
|
2016-02-24 10:08:20 +03:00
|
|
|
'AnimationCollection.h',
|
2017-01-13 18:41:03 +03:00
|
|
|
'BindingStyleRule.h',
|
2018-01-10 21:57:12 +03:00
|
|
|
'CachedInheritingStyles.h',
|
2018-03-22 21:20:41 +03:00
|
|
|
'ComputedStyle.h',
|
|
|
|
'ComputedStyleInlines.h',
|
2016-05-10 11:44:05 +03:00
|
|
|
'CSSEnabledState.h',
|
2018-04-26 08:00:50 +03:00
|
|
|
'CSSPropFlags.h',
|
2016-10-18 07:29:03 +03:00
|
|
|
'DeclarationBlock.h',
|
2016-12-02 11:55:40 +03:00
|
|
|
'DocumentStyleRootIterator.h',
|
2018-10-14 03:05:48 +03:00
|
|
|
'GeckoBindings.h',
|
2015-09-03 23:59:00 +03:00
|
|
|
'LayerAnimationInfo.h',
|
2018-06-22 19:48:42 +03:00
|
|
|
'MappedDeclarations.h',
|
2018-02-06 14:51:32 +03:00
|
|
|
'MediaFeatureChange.h',
|
2017-04-30 09:45:32 +03:00
|
|
|
'PostTraversalTask.h',
|
2017-01-05 10:32:22 +03:00
|
|
|
'PreloadedStyleSheet.h',
|
2018-10-14 03:05:54 +03:00
|
|
|
'RustCell.h',
|
2016-11-23 03:35:55 +03:00
|
|
|
'ServoArcTypeList.h',
|
2015-11-25 04:14:39 +03:00
|
|
|
'ServoBindings.h',
|
2016-10-24 12:16:46 +03:00
|
|
|
'ServoBindingTypes.h',
|
2018-10-14 03:06:05 +03:00
|
|
|
'ServoBoxedTypeList.h',
|
2018-05-16 08:35:59 +03:00
|
|
|
'ServoComputedData.h',
|
|
|
|
'ServoComputedDataInlines.h',
|
2017-10-16 03:54:47 +03:00
|
|
|
'ServoCSSParser.h',
|
2016-11-23 02:26:20 +03:00
|
|
|
'ServoCSSRuleList.h',
|
2016-07-19 04:02:55 +03:00
|
|
|
'ServoElementSnapshot.h',
|
2017-05-07 17:36:47 +03:00
|
|
|
'ServoElementSnapshotTable.h',
|
2016-02-24 10:01:10 +03:00
|
|
|
'ServoStyleSet.h',
|
2018-03-29 14:15:46 +03:00
|
|
|
'ServoStyleSetInlines.h',
|
2018-03-15 03:59:22 +03:00
|
|
|
'ServoTraversalStatistics.h',
|
2016-09-22 01:42:45 +03:00
|
|
|
'ServoTypes.h',
|
2016-10-13 15:45:03 +03:00
|
|
|
'ServoUtils.h',
|
2015-10-20 02:16:20 +03:00
|
|
|
'SheetType.h',
|
2014-06-24 10:29:54 +04:00
|
|
|
'StyleAnimationValue.h',
|
2016-09-02 07:58:10 +03:00
|
|
|
'StyleComplexColor.h',
|
2016-02-26 04:51:01 +03:00
|
|
|
'StyleSheet.h',
|
2016-02-26 04:51:01 +03:00
|
|
|
'StyleSheetInfo.h',
|
2016-03-02 01:38:13 +03:00
|
|
|
'StyleSheetInlines.h',
|
2017-04-04 03:04:13 +03:00
|
|
|
'URLExtraData.h',
|
Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron
Patch co-authored by Emmanuele Bassi <ebassi@gmail.com>
This defines a CSSVariableDeclarations class that holds a set of
variable declarations. This is at the specified value stage, so values
can either be 'initial', 'inherit' or a token stream (which is what you
normally have). The variables are stored in a hash table. Although
it's a bit of a hack, we store 'initial' and 'inherit' using special
string values that can't be valid token streams (we use "!" and ";").
Declaration objects now can have two CSSVariableDeclarations objects
on them, to store normal and !important variable declarations. So that
we keep preserving the order of declarations on the object, we inflate
mOrder to store uint32_ts, where values from eCSSProperty_COUNT onwards
represent custom properties. mVariableOrder stores the names of the
variables corresponding to those entries in mOrder.
We also add a new nsCSSProperty value, eCSSPropertyExtra_variable, which
is used to represent any custom property name.
nsCSSProps::LookupProperty can return this value.
The changes to nsCSSParser are straightforward. Custom properties
are parsed and checked for syntactic validity (e.g. "var(a,)" being
invalid) and stored on the Declaration. We use nsCSSScanner's
recording ability to grab the unparsed CSS string corresponding to
the variable's value.
2013-12-12 06:09:40 +04:00
|
|
|
]
|
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
EXPORTS.mozilla.dom += [
|
|
|
|
'CSS.h',
|
2018-06-05 03:07:25 +03:00
|
|
|
'CSSCounterStyleRule.h',
|
2018-06-05 02:55:11 +03:00
|
|
|
'CSSFontFaceRule.h',
|
2017-07-25 02:12:57 +03:00
|
|
|
'CSSFontFeatureValuesRule.h',
|
2017-05-30 04:10:25 +03:00
|
|
|
'CSSImportRule.h',
|
2017-05-19 09:12:34 +03:00
|
|
|
'CSSKeyframeRule.h',
|
|
|
|
'CSSKeyframesRule.h',
|
2017-03-09 09:37:38 +03:00
|
|
|
'CSSMediaRule.h',
|
2017-05-11 15:11:15 +03:00
|
|
|
'CSSMozDocumentRule.h',
|
2017-03-14 10:50:28 +03:00
|
|
|
'CSSNamespaceRule.h',
|
2017-04-01 03:14:49 +03:00
|
|
|
'CSSPageRule.h',
|
2014-06-10 06:11:00 +04:00
|
|
|
'CSSRuleList.h',
|
2018-06-04 16:35:50 +03:00
|
|
|
'CSSStyleRule.h',
|
2017-04-26 11:55:36 +03:00
|
|
|
'CSSSupportsRule.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'CSSValue.h',
|
2014-10-02 06:32:05 +04:00
|
|
|
'FontFace.h',
|
|
|
|
'FontFaceSet.h',
|
2015-03-31 06:05:33 +03:00
|
|
|
'FontFaceSetIterator.h',
|
2016-11-09 09:28:24 +03:00
|
|
|
'MediaList.h',
|
2013-12-16 18:03:19 +04:00
|
|
|
'MediaQueryList.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
]
|
|
|
|
|
|
|
|
EXPORTS.mozilla.css += [
|
2018-07-19 13:56:27 +03:00
|
|
|
'DocumentMatchingFunction.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'ErrorReporter.h',
|
|
|
|
'GroupRule.h',
|
|
|
|
'ImageLoader.h',
|
|
|
|
'Loader.h',
|
|
|
|
'Rule.h',
|
2017-08-29 16:01:42 +03:00
|
|
|
'SheetLoadData.h',
|
2016-02-24 10:01:11 +03:00
|
|
|
'SheetParsingMode.h',
|
2017-08-29 16:01:42 +03:00
|
|
|
'StreamLoader.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
]
|
|
|
|
|
2013-11-15 06:42:57 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2016-02-24 10:08:20 +03:00
|
|
|
'AnimationCollection.cpp',
|
2017-02-21 14:27:58 +03:00
|
|
|
'BindingStyleRule.cpp',
|
2018-01-10 21:57:12 +03:00
|
|
|
'CachedInheritingStyles.cpp',
|
2018-03-22 21:20:41 +03:00
|
|
|
'ComputedStyle.cpp',
|
2014-06-12 05:11:00 +04:00
|
|
|
'CounterStyleManager.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'CSS.cpp',
|
2018-06-05 03:07:25 +03:00
|
|
|
'CSSCounterStyleRule.cpp',
|
2018-06-05 02:55:11 +03:00
|
|
|
'CSSFontFaceRule.cpp',
|
2017-07-25 02:12:57 +03:00
|
|
|
'CSSFontFeatureValuesRule.cpp',
|
2017-05-30 04:10:25 +03:00
|
|
|
'CSSImportRule.cpp',
|
2017-05-19 09:12:34 +03:00
|
|
|
'CSSKeyframeRule.cpp',
|
|
|
|
'CSSKeyframesRule.cpp',
|
2017-03-09 09:37:38 +03:00
|
|
|
'CSSMediaRule.cpp',
|
2017-05-11 15:11:15 +03:00
|
|
|
'CSSMozDocumentRule.cpp',
|
2018-06-01 13:35:39 +03:00
|
|
|
'CSSNamespaceRule.cpp',
|
2017-04-01 03:14:49 +03:00
|
|
|
'CSSPageRule.cpp',
|
2014-06-10 06:11:00 +04:00
|
|
|
'CSSRuleList.cpp',
|
2018-06-04 16:35:50 +03:00
|
|
|
'CSSStyleRule.cpp',
|
2017-04-26 11:55:36 +03:00
|
|
|
'CSSSupportsRule.cpp',
|
2018-05-30 19:15:25 +03:00
|
|
|
'DeclarationBlock.cpp',
|
2016-12-02 11:55:40 +03:00
|
|
|
'DocumentStyleRootIterator.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'ErrorReporter.cpp',
|
2014-10-02 06:32:05 +04:00
|
|
|
'FontFace.cpp',
|
2015-07-02 01:45:00 +03:00
|
|
|
'FontFaceSet.cpp',
|
2015-03-31 06:05:33 +03:00
|
|
|
'FontFaceSetIterator.cpp',
|
2018-10-14 03:05:48 +03:00
|
|
|
'GeckoBindings.cpp',
|
2017-03-07 07:19:03 +03:00
|
|
|
'GroupRule.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'ImageLoader.cpp',
|
2015-09-03 23:59:00 +03:00
|
|
|
'LayerAnimationInfo.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'Loader.cpp',
|
2018-06-22 19:48:42 +03:00
|
|
|
'MappedDeclarations.cpp',
|
2016-11-09 09:28:24 +03:00
|
|
|
'MediaList.cpp',
|
2013-12-16 18:03:19 +04:00
|
|
|
'MediaQueryList.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsAnimationManager.cpp',
|
2013-10-24 03:05:43 +04:00
|
|
|
'nsComputedDOMStyle.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsCSSKeywords.cpp',
|
|
|
|
'nsCSSProps.cpp',
|
|
|
|
'nsCSSValue.cpp',
|
|
|
|
'nsDOMCSSAttrDeclaration.cpp',
|
|
|
|
'nsDOMCSSDeclaration.cpp',
|
|
|
|
'nsDOMCSSValueList.cpp',
|
2014-10-09 00:19:14 +04:00
|
|
|
'nsFontFaceLoader.cpp',
|
2015-03-06 11:44:23 +03:00
|
|
|
'nsFontFaceUtils.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsHTMLCSSStyleSheet.cpp',
|
|
|
|
'nsHTMLStyleSheet.cpp',
|
2018-01-30 22:48:26 +03:00
|
|
|
'nsICSSDeclaration.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsMediaFeatures.cpp',
|
|
|
|
'nsROCSSPrimitiveValue.cpp',
|
|
|
|
'nsStyleCoord.cpp',
|
|
|
|
'nsStyleStruct.cpp',
|
|
|
|
'nsStyleTransformMatrix.cpp',
|
|
|
|
'nsStyleUtil.cpp',
|
|
|
|
'nsTransitionManager.cpp',
|
2018-09-20 14:34:01 +03:00
|
|
|
'PaintWorkletImpl.cpp',
|
2017-04-30 09:45:32 +03:00
|
|
|
'PostTraversalTask.cpp',
|
2017-01-05 10:32:22 +03:00
|
|
|
'PreloadedStyleSheet.cpp',
|
2017-11-24 13:01:47 +03:00
|
|
|
'Rule.cpp',
|
2017-10-16 03:54:47 +03:00
|
|
|
'ServoCSSParser.cpp',
|
2016-11-23 02:26:20 +03:00
|
|
|
'ServoCSSRuleList.cpp',
|
2016-07-19 04:02:55 +03:00
|
|
|
'ServoElementSnapshot.cpp',
|
2016-02-24 10:01:10 +03:00
|
|
|
'ServoStyleSet.cpp',
|
2017-08-29 16:01:42 +03:00
|
|
|
'StreamLoader.cpp',
|
2014-06-24 10:29:54 +04:00
|
|
|
'StyleAnimationValue.cpp',
|
2018-05-09 10:03:02 +03:00
|
|
|
'StyleComplexColor.cpp',
|
2016-02-26 04:51:01 +03:00
|
|
|
'StyleSheet.cpp',
|
2017-04-04 03:04:13 +03:00
|
|
|
'URLExtraData.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
|
|
|
|
2013-11-15 06:42:57 +04:00
|
|
|
SOURCES += [
|
Bug 1411469 - Statically allocate static atoms. r=froydnj
Currently static atoms are stored on the heap, but their char buffers are
stored in read-only static memory.
This patch changes the representation of nsStaticAtom (thus making it a
non-trivial subclass of nsAtom). Instead of a pointer to the string, it now has
an mStringOffset field which is a 32-bit offset to the string. (This requires
placement of the string and the atom within the same object so that the offset
is known to be small. The docs and macros in nsStaticAtom.h handle that.)
Static and dynamic atoms now store their chars in different ways: nsStaticAtom
stores them inline, nsDynamicAtom has a pointer to separate storage. So
`mString` and GetStringBuffer() move from nsAtom to nsDynamicAtom.
The change to static atoms means they can be made constexpr and stored in
read-only memory instead of on the heap. On 64-bit this reduces the per-process
overhead by 16 bytes; on 32-bit the saving is 12 bytes. (Further reductions
will be possible in follow-up patches.)
The increased use of constexpr required multiple workarounds for MSVC.
- Multiple uses of MOZ_{PUSH,POP}_DISABLE_INTEGRAL_CONSTANT_OVERFLOW_WARNING to
disable warnings about (well-defined!) overflow of unsigned integer
arithmetic.
- The use of -Zc:externConstexpr on all files defining static atoms, to make
MSVC follow the C++ standard(!) and let constexpr variables have external
linkage.
- The use of -constexpr:steps300000 to increase the number of operations
allowed in a constexpr value, in order to handle gGkAtoms, which requires
hashing ~2,500 atom strings.
The patch also changes how HTML5 atoms are handled. They are now treated as
dynamic atoms, i.e. we have "dynamic normal" atoms and "dynamic HTML5 atoms",
and "dynamic atoms" covers both cases, and both are represented via
nsDynamicAtom. The main difference between the two kinds is that dynamic HTML5
atoms still aren't allowed to be used in various operations, most notably
AddRef()/Release(). All this also required moving nsDynamicAtom into the header
file.
There is a slight performance cost to all these changes: now that nsStaticAtom
and nsDynamicAtom store their chars in different ways, a conditional branch is
required in the following functions: Equals(), GetUTF16String(),
WeakAtom::as_slice().
Finally, in about:memory the "explicit/atoms/static/atom-objects" value is no
longer needed, because that memory is static instead of heap-allocated.
MozReview-Commit-ID: 4AxPv05ngZy
2018-03-08 04:59:11 +03:00
|
|
|
'nsCSSAnonBoxes.cpp',
|
2017-10-22 00:50:25 +03:00
|
|
|
'nsCSSPseudoElements.cpp',
|
|
|
|
# nsLayoutStylesheetCache.cpp uses nsExceptionHandler.h, which includes
|
|
|
|
# windows.h.
|
2016-02-25 03:09:34 +03:00
|
|
|
'nsLayoutStylesheetCache.cpp',
|
2013-11-15 06:42:57 +04:00
|
|
|
]
|
Bug 1411469 - Statically allocate static atoms. r=froydnj
Currently static atoms are stored on the heap, but their char buffers are
stored in read-only static memory.
This patch changes the representation of nsStaticAtom (thus making it a
non-trivial subclass of nsAtom). Instead of a pointer to the string, it now has
an mStringOffset field which is a 32-bit offset to the string. (This requires
placement of the string and the atom within the same object so that the offset
is known to be small. The docs and macros in nsStaticAtom.h handle that.)
Static and dynamic atoms now store their chars in different ways: nsStaticAtom
stores them inline, nsDynamicAtom has a pointer to separate storage. So
`mString` and GetStringBuffer() move from nsAtom to nsDynamicAtom.
The change to static atoms means they can be made constexpr and stored in
read-only memory instead of on the heap. On 64-bit this reduces the per-process
overhead by 16 bytes; on 32-bit the saving is 12 bytes. (Further reductions
will be possible in follow-up patches.)
The increased use of constexpr required multiple workarounds for MSVC.
- Multiple uses of MOZ_{PUSH,POP}_DISABLE_INTEGRAL_CONSTANT_OVERFLOW_WARNING to
disable warnings about (well-defined!) overflow of unsigned integer
arithmetic.
- The use of -Zc:externConstexpr on all files defining static atoms, to make
MSVC follow the C++ standard(!) and let constexpr variables have external
linkage.
- The use of -constexpr:steps300000 to increase the number of operations
allowed in a constexpr value, in order to handle gGkAtoms, which requires
hashing ~2,500 atom strings.
The patch also changes how HTML5 atoms are handled. They are now treated as
dynamic atoms, i.e. we have "dynamic normal" atoms and "dynamic HTML5 atoms",
and "dynamic atoms" covers both cases, and both are represented via
nsDynamicAtom. The main difference between the two kinds is that dynamic HTML5
atoms still aren't allowed to be used in various operations, most notably
AddRef()/Release(). All this also required moving nsDynamicAtom into the header
file.
There is a slight performance cost to all these changes: now that nsStaticAtom
and nsDynamicAtom store their chars in different ways, a conditional branch is
required in the following functions: Equals(), GetUTF16String(),
WeakAtom::as_slice().
Finally, in about:memory the "explicit/atoms/static/atom-objects" value is no
longer needed, because that memory is static instead of heap-allocated.
MozReview-Commit-ID: 4AxPv05ngZy
2018-03-08 04:59:11 +03:00
|
|
|
if CONFIG['CC_TYPE'] == 'msvc':
|
|
|
|
# Needed for gCSSAnonBoxAtoms.
|
|
|
|
SOURCES['nsCSSAnonBoxes.cpp'].flags += ['-Zc:externConstexpr']
|
|
|
|
# Needed for gCSSPseudoElementAtoms.
|
|
|
|
SOURCES['nsCSSPseudoElements.cpp'].flags += ['-Zc:externConstexpr']
|
2013-11-15 06:42:57 +04:00
|
|
|
|
2013-10-02 21:17:55 +04:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|
2014-07-23 03:37:51 +04:00
|
|
|
FINAL_LIBRARY = 'xul'
|
2013-11-28 18:23:10 +04:00
|
|
|
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'../base',
|
|
|
|
'../generic',
|
2015-03-06 11:44:32 +03:00
|
|
|
'../svg',
|
2013-12-04 05:06:16 +04:00
|
|
|
'../xul',
|
2013-11-28 18:23:10 +04:00
|
|
|
'/dom/base',
|
2014-10-25 21:24:55 +04:00
|
|
|
'/dom/html',
|
2014-01-10 07:03:25 +04:00
|
|
|
'/dom/xbl',
|
2014-10-25 21:21:03 +04:00
|
|
|
'/dom/xul',
|
2015-03-17 22:25:35 +03:00
|
|
|
'/image',
|
2013-11-28 18:23:10 +04:00
|
|
|
]
|
2013-12-10 11:18:11 +04:00
|
|
|
|
2014-01-10 07:03:25 +04:00
|
|
|
JAR_MANIFESTS += ['jar.mn']
|
2013-11-05 22:37:54 +04:00
|
|
|
|
|
|
|
RESOURCE_FILES += [
|
|
|
|
'contenteditable.css',
|
|
|
|
'designmode.css',
|
2017-06-08 12:52:46 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
CONTENT_ACCESSIBLE_FILES += [
|
2013-11-05 22:37:54 +04:00
|
|
|
'ImageDocument.css',
|
2017-08-31 12:06:22 +03:00
|
|
|
'res/plaintext.css',
|
2017-06-08 12:52:46 +03:00
|
|
|
'res/viewsource.css',
|
2013-11-05 22:37:54 +04:00
|
|
|
'TopLevelImageDocument.css',
|
|
|
|
'TopLevelVideoDocument.css',
|
|
|
|
]
|
2014-07-28 19:26:16 +04:00
|
|
|
|
2018-04-16 07:08:20 +03:00
|
|
|
GENERATED_FILES += [
|
2018-04-18 12:39:51 +03:00
|
|
|
'nsCSSPropertyID.h',
|
2018-04-16 07:08:20 +03:00
|
|
|
'ServoCSSPropList.h',
|
|
|
|
'ServoCSSPropList.py',
|
|
|
|
]
|
|
|
|
|
2018-04-18 12:39:51 +03:00
|
|
|
prop_id = GENERATED_FILES['nsCSSPropertyID.h']
|
|
|
|
prop_id.script = 'GenerateCSSPropertyID.py:generate'
|
|
|
|
prop_id.inputs = [
|
|
|
|
'nsCSSPropertyID.h.in',
|
2018-04-19 14:08:09 +03:00
|
|
|
'!ServoCSSPropList.py',
|
2018-04-18 12:39:51 +03:00
|
|
|
]
|
|
|
|
|
2018-04-16 07:08:20 +03:00
|
|
|
servo_props = GENERATED_FILES['ServoCSSPropList.h']
|
|
|
|
servo_props.script = 'GenerateServoCSSPropList.py:generate_header'
|
|
|
|
servo_props.inputs = [
|
|
|
|
'!ServoCSSPropList.py',
|
|
|
|
]
|
|
|
|
|
|
|
|
servo_props = GENERATED_FILES['ServoCSSPropList.py']
|
|
|
|
servo_props.script = 'GenerateServoCSSPropList.py:generate_data'
|
|
|
|
servo_props.inputs = [
|
|
|
|
'ServoCSSPropList.mako.py',
|
|
|
|
]
|
|
|
|
|
2016-05-11 00:35:56 +03:00
|
|
|
if CONFIG['COMPILE_ENVIRONMENT']:
|
|
|
|
GENERATED_FILES += [
|
2018-06-27 08:34:29 +03:00
|
|
|
'nsComputedDOMStyleGenerated.cpp',
|
2016-05-11 00:35:56 +03:00
|
|
|
'nsCSSPropsGenerated.inc',
|
2018-08-17 19:43:06 +03:00
|
|
|
'ServoStyleConsts.h',
|
|
|
|
]
|
|
|
|
|
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'!ServoStyleConsts.h',
|
2016-05-11 00:35:56 +03:00
|
|
|
]
|
2018-04-16 07:08:20 +03:00
|
|
|
|
2018-06-27 08:34:29 +03:00
|
|
|
computed = GENERATED_FILES['nsComputedDOMStyleGenerated.cpp']
|
|
|
|
computed.script = 'GenerateComputedDOMStyleGenerated.py:generate'
|
|
|
|
computed.inputs = [
|
|
|
|
'!ServoCSSPropList.py',
|
|
|
|
]
|
|
|
|
|
2016-05-11 00:35:56 +03:00
|
|
|
css_props = GENERATED_FILES['nsCSSPropsGenerated.inc']
|
|
|
|
css_props.script = 'GenerateCSSPropsGenerated.py:generate'
|
|
|
|
css_props.inputs = [
|
2018-04-17 07:40:12 +03:00
|
|
|
'!ServoCSSPropList.py',
|
2016-05-11 00:35:56 +03:00
|
|
|
]
|
2017-07-06 21:34:03 +03:00
|
|
|
|
2018-08-17 19:43:06 +03:00
|
|
|
consts = GENERATED_FILES['ServoStyleConsts.h']
|
|
|
|
consts.script = 'GenerateServoStyleConsts.py:generate'
|
|
|
|
consts.inputs = [
|
|
|
|
'/servo/components/style/cbindgen.toml',
|
|
|
|
]
|
|
|
|
|
2017-07-06 21:34:03 +03:00
|
|
|
CONFIGURE_SUBST_FILES += [
|
|
|
|
'bindgen.toml',
|
|
|
|
]
|